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 |
---|---|---|---|---|---|---|
Create a new EndingDialog popup. | public EndingDialog(Game game, Occupant result) {
this.game = game;
this.result = result;
initializeUI();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Dialog createDialog(DialogDescriptor descriptor);",
"public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}",
"public void createPopupWindow() {\r\n \t//\r\n }",
"protected abstract JDialog createDialog();",
"private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }",
"public void popupAdd() {\n builder = new AlertDialog.Builder(getView().getContext());\n View views = getLayoutInflater().inflate(R.layout.departmentpopup, (ViewGroup) null);\n DepartmentName = (EditText) views.findViewById(R.id.department_name);\n DepartmentId = (EditText) views.findViewById(R.id.department_id);\n pbar =views.findViewById(R.id.departmentProgress);\n Button button =views.findViewById(R.id.save_depart);\n saveButton = button;\n button.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n addDeparatments();\n }\n });\n builder.setView(views);\n AlertDialog create =builder.create();\n dialog = create;\n create.show();\n }",
"void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_leave_channel)\n .setPositiveButton(R.string.button_yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.v(LOGTAG, \"YES clicked\");\n getGTracker().send(MapBuilder\n .createEvent(\"ui_action\", \"channel_dialog\", \"leave_yes\", null)\n .build()\n );\n mListener.onDialogLeaveChannelConfirm(LeaveChanDialog.this);\n }\n })\n .setNegativeButton(R.string.button_no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.v(LOGTAG, \"NO clicked\");\n getGTracker().send(MapBuilder\n .createEvent(\"ui_action\", \"channel_dialog\", \"leave_no\", null)\n .build()\n );\n }\n })\n .setTitle(R.string.dialog_signup_title);\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"private void showEndGameResults() {\n EndGameDialog endGameDialog = new EndGameDialog(this, stats, playerOne, playerTwo, (e) -> {\n dispose();\n\n this.start();\n });\n\n\n }",
"protected Dialog onCreateDialog (int id) {\n\t\tif (!this.hasWindowFocus())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tdismissDialog (DIALOG_CREATE);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tdismissDialog (DIALOG_SUBMIT);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tAlertDialog.Builder bld = new AlertDialog.Builder(this);\r\n\t\tswitch (id){\r\n\t\tcase DIALOG_CREATE: \r\n\t\t{bld.setMessage(\"More than one call needs to be reported. Your most recent call is first.\").setCancelable(false).setPositiveButton(\"OK\", new DialogInterface.OnClickListener()\r\n\t\t{\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\tdialog.dismiss();\r\n\t\t}\r\n\t\t}).setTitle(\"New Record\");\r\n\t\tbreak;\r\n\t\t}\r\n\t\tcase DIALOG_SUBMIT:\r\n\t\t{\r\n\t\t\tbld.setMessage(\"Please submit your previous call record now.\").setCancelable(false).setPositiveButton(\"OK\", new DialogInterface.OnClickListener()\r\n\t\t\t{\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t\t}).setTitle(\"Older Record\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t}\r\n\t\treturn bld.create();\r\n\t}",
"private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}",
"public StandardDialog() {\n super();\n init();\n }",
"@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\r\n\t\tDialog dialog = super.onCreateDialog(savedInstanceState);\r\n\t\tdialog.setCanceledOnTouchOutside(false);\r\n\t\treturn dialog;\r\n\t}",
"private void popupCalibratingDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.motion_calibrating);\n builder.setCancelable(false);\n builder.setMessage(R.string.motion_calibrating_message);\n\n calibratingDialog = builder.create();\n calibratingDialog.show();\n }",
"public Dialog() {\n\t}",
"public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }",
"public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\" \"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}",
"private void createGroupDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_group_title);\n dialog.setMessage(R.string.add_new_group_description);\n\n View newGroupDialog = getLayoutInflater().inflate(R.layout.new_group_dialog, null);\n dialog.setView(newGroupDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddGroupButtonListener(alertDialog, newGroupDialog);\n\n alertDialog.show();\n }",
"public InspectionModal createNewInspection(){\n waitForLoading();\n clickElement(createNewInspectionButton);\n return new InspectionModal(super.driver); // return pop ap\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }",
"@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }",
"private void showEndShiftDialog() {\n Log.i(LOG_TAG, \"showEndShiftDialog() called\");\n EndShiftDialogFragment newFragment = new EndShiftDialogFragment();\n newFragment.show(getSupportFragmentManager(), \"endShift\");\n }",
"public PaySuccessDialog create() {\r\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n View layout = inflater.inflate(R.layout.paysucdialog, null);\r\n final PaySuccessDialog dialog = new PaySuccessDialog(context,R.style.Dialog);\r\n ImageView img_success = (ImageView)layout.findViewById(R.id.img_success);\r\n img_success.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}\r\n\t\t\t});\r\n \r\n dialog.setContentView(layout);\r\n return dialog;\r\n }",
"private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }",
"private void newDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.addmark));\n\t\tfinal EditText input = new EditText(this);\n\t\tinput.setHint(getString(R.string.pleasemark));\n\t\tbuilder.setView(input);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tif (input.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\t\taddTag(input.getText().toString());\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.successaddmark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.pleasemark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tnewDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}",
"public static void closeNew() {\n\t\tDIALOG.dispose();\n\t\tDIALOG = null;\n\t}",
"public static void showNew() {\n\t\tif (DIALOG == null) {\n\t\t\tDIALOG = new NewDialog();\n\t\t}\n\t\tDIALOG.setVisible(true);\n\t\tDIALOG.toFront();\n\t}",
"public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tsuper.onCreateDialog(id);\n\t\treturn visitor.instantiateDialog(id);\n\t}",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this,\n myDateListener, year, month, day);\n }\n if (id == 998) {\n return new DatePickerDialog(this,\n myDateListener_end, year, month, day);\n }\n return null;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"They decliened your invitation\";\n if(getArguments().getBoolean(\"hostDeclined\"))\n {\n mess = \"They canceled their invitation\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"protected Control createDialogArea(Composite parent) {\n\t\t\ttext = new Text(parent, SWT.READ_ONLY | SWT.NO_FOCUS);\n\n\t\t\t// Use the compact margins employed by PopupDialog.\n\t\t\tGridData gd = new GridData(GridData.BEGINNING | GridData.FILL_BOTH);\n\t\t\tgd.horizontalIndent = 5;\n\t\t\tgd.verticalAlignment = SWT.CENTER;\n\t\t\ttext.setLayoutData(gd);\n\t\t\ttext.setText(contents);\n\n\t\t\t// since SWT.NO_FOCUS is only a hint...\n\t\t\ttext.addFocusListener(new FocusAdapter() {\n\t\t\t\tpublic void focusGained(FocusEvent event) {\n\t\t\t\t\tContentProposalPopup.this.close();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn text;\n\t\t}",
"@Override\n public Dialog onCreateDialog(Bundle state) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n // Set the title\n builder.setTitle(R.string.new_location_title);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n // Pass null as the parent view because its going in the dialog layout\n view = inflater.inflate(R.layout.fire_report, null);\n builder.setView(view);\n\n populate();\n\n // Add a cancel button\n builder.setNegativeButton(R.string.close, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n Boolean checked = ((CheckBox) view.findViewById(R.id.checkExtinguished)).isChecked();\n if (fire.isExtinguished() != checked) {\n fire.setExtinguished(checked);\n if (!new Cloud(view.getContext()).updateExtinguishedToCloud(fire)) {\n fire.setExtinguished(!checked);\n view.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(view.getContext(), R.string.extinguished_failed, Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n }\n }).start();\n }\n });\n\n dlg = builder.create();\n\n return dlg;\n }",
"@Override\r\n protected Dialog onCreateDialog(int id) {\r\n switch (id) {\r\n case START_DATE_DIALOG_ID:\r\n return new DatePickerDialog(this,\r\n \t\t\tstartDateSetListener,\r\n \t\t\tstartYear_dp, startMonth_dp-1, startDay_dp); \r\n case START_TIME_DIALOG_ID:\r\n return new TimePickerDialog(this,\r\n \t\t\tstartTimeSetListener, startHour_dp, startMinute_dp, false); \r\n case END_DATE_DIALOG_ID:\r\n return new DatePickerDialog(this,\r\n endDateSetListener,\r\n endYear_dp, endMonth_dp-1, endDay_dp);\r\n case END_TIME_DIALOG_ID:\r\n return new TimePickerDialog(this,\r\n \t\t\tendTimeSetListener, endHour_dp, endMinute_dp, false);\r\n }\r\n return null;\r\n }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //setting the message and the title of dialog\n builder.setTitle(R.string.dialog_title)\n .setMessage(R.string.dialog_message)\n .setPositiveButton(android.R.string.yes, (dialog, which) -> {\n getActivity().finish();\n })\n .setOnCancelListener(dialog -> getActivity().finish());\n\n //creating and returning the dialog\n return builder.create();\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Done entering class?\")\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent tmp = new Intent(getContext(), course_info.class);\n startActivity(tmp);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"protected Popup() {}",
"private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Do you want to remove this item from cart?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n new Cart().removeFromCart(gindex);\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}",
"private void showExecutionEnd() {\n log.info(\"##############################################################\");\n log.info(\"Application created: Press Cancel to end dialog\");\n log.info(\"##############################################################\");\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(R.string.dialog_internet_eng_text).setPositiveButton\n (R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n System.exit(1);\n /*\n Intent homeIntent= new Intent(getContext(), MainCardActivity.class);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n */\n }\n });\n return builder.create();\n }",
"public static void newJFXDialogPopUp(String min, String sec, String dist, StackPane stP) {\n System.out.println(\"DialogBox Posted\");\n JFXDialogLayout jfxDialogLayout = new JFXDialogLayout();\n jfxDialogLayout.setHeading(new Text(\"Time Details\"));\n jfxDialogLayout.setBody(new Text(\"Time Estimate: \" + min + \" \" + sec +\"\\n\" + \"Distance Estimate: \" + dist));\n JFXDialog dialog = new JFXDialog(stP, jfxDialogLayout, JFXDialog.DialogTransition.CENTER);\n JFXButton okay = new JFXButton(\"Okay\");\n okay.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n dialog.close();\n\n }\n });\n jfxDialogLayout.setActions(okay);\n dialog.show();\n }",
"private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }",
"@Override\r\n\t protected Dialog onCreateDialog(int id) {\n\t \r\n\t screenDialog = null;\r\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t screenDialog = new Dialog(this);\r\n\t screenDialog.setContentView(R.layout.message);\r\n\t messageText=(EditText)screenDialog.findViewById(R.id.messagetext1);\r\n\t send=(Button)screenDialog.findViewById(R.id.button1);\r\n\t send.setOnClickListener(sendmessage);\r\n\t cancel=(Button)screenDialog.findViewById(R.id.button2);\r\n\t cancel.setOnClickListener(cancelmessage);\r\n\t }\r\n\t return screenDialog;\r\n\t }",
"public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.complete_workout_dialog,null);\n builder.setView(view);\n completeScore = view.findViewById(R.id.score_edit_text);\n completeTime = view.findViewById(R.id.time_edit_text);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n // Add action buttons\n builder.setMessage(\"\")\n .setPositiveButton(\"Ok \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n completeWorkoutListener.onCompletedWorkoutSelected(completeScore.getText().toString(), completeTime.getText().toString());\n }\n })\n .setNegativeButton(\" Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }",
"void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }",
"private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }",
"@Override\r\n\tprotected Dialog onCreateDialog(int id) {\r\n\t\tProgressDialog dialog = new ProgressDialog(this);\r\n\t\tdialog.setMessage(\"Please wait while saving...\");\r\n\t\tdialog.setIndeterminate(true);\r\n\t\tdialog.setCancelable(true);\r\n\t\treturn dialog;\r\n\t}",
"protected Dialog onCreateDialog(int id) {\n if (id == 1) {\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n // заголовок\n adb.setTitle(\"PIN Removed\");\n // сообщение\n adb.setMessage(\"There will be no PIN entry screen when Application starts up.\");\n // иконка\n adb.setIcon(android.R.drawable.ic_dialog_info);\n adb.setNeutralButton(\"Ok\", myClickListener);\n // создаем диалог\n return adb.create();\n }\n return super.onCreateDialog(id);\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n \tswitch (id) {\n\t\tcase DLG_PROGRESSBAR:\n\t\t\treturn dialogoProgressBar();\n\t\tcase DLG_BUTTONS:\n\t\t\treturn dialogButtons();\n\t\tcase DLG_LIST:\n\t\t\treturn dialogLista();\n\t\tcase DLG_LIST_SELECT:\n\t\t\treturn dialogListaSelect();\n\t\tdefault:\n\t\t\treturn dialogButtons();\n\t\t}\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n switch (id) {\n // create a new TimePickerDialog with values you want to show\n case TIME_DIALOG_ID:\n return new TimePickerDialog(this, mTimeSetListener, mHour, mMinute, false);\n }\n return null;\n }",
"protected void createProgressDialog() {\r\t\tif (pd == null) {\r\t\t\tpd = new ProgressDialog(this);\r\t\t\tpd.setCanceledOnTouchOutside(false);\r\t\t\tpd.getWindow().setGravity(Gravity.CENTER);\r\t\t\tpd.setOnCancelListener(new DialogInterface.OnCancelListener() {\r\t\t\t\t@Override\r\t\t\t\tpublic void onCancel(DialogInterface dialogInterface) {\r\t\t\t\t\tonPdCancel();\r\t\t\t\t}\r\t\t\t});\r\t\t}\r\t}",
"void dialogClosed(PDialog dialog);",
"public static Dialog postWaitDialog(Context context){\r\n\t\tfinal Dialog lDialog = new Dialog(context,android.R.style.Theme_Translucent_NoTitleBar);\r\n\t\tlDialog.setContentView(R.layout.wait_dialog);\r\n\t\treturn lDialog;\r\n\t}",
"@Override\n protected Dialog onCreateDialog(int id) {\n Dialog dialog = null;\n switch (id) {\n case CHOOSE_METHOD_DIALOG:\n return chooseActionContextMenu.createMenu(this.getString(R.string.choose_action_title));\n case ABOUT_DIALOG:\n dialog = createAboutDialog();\n break;\n default:\n dialog = null;\n break;\n }\n return dialog;\n }",
"public AlertDialog createSimpleDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Code with love by\")\n .setMessage(\"Alvaro Velasco & Jose Alberto del Val\");\n return builder.create();\n }",
"public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tView dialogView = inflater.inflate(R.layout.posted, null);\r\n\r\n\t\tbuilder.setTitle(\"Posted Message to:\");\r\n\t\tbuilder.setView(dialogView);\r\n\t\tfinal AlertDialog dialog = builder.show();\r\n\t\t//dialog.getWindow().setLayout(520, 525);\r\n\t\t\r\n\t\tTextView message = (TextView) dialog.findViewById(R.id.sites_posted);\r\n\t\tmessage.setText(sites);\r\n\r\n\t\tButton done = (Button) dialog.findViewById(R.id.done);\r\n\t\tdone.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO open social media options\r\n\t\t\t\tdialog.cancel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\treturn dialog;\r\n\t}",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the Builder class for convenient dialog construction\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.title_add_to_shopping);\n\n // initialize itemcreation\n m_createItemDlg = new CreateItemDialog(this);\n\n // create item selection\n builder.setView(createItemSelection());\n\n // set buttonss\n builder.setPositiveButton(R.string.button_add, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if(m_callback != null) {\n m_callback.readAddToShoppingDlgAndUpdate();\n }\n }\n });\n builder.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) { }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"private Dialogs () {\r\n\t}",
"public void dialog_exitSheet() {\n\n final Dialog dialog = new Dialog(ReportActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_exit_sheet);\n dialog.getWindow().setBackgroundDrawable(getResources().getDrawable(R.drawable.transparent));\n\n TextView tv_outgoingDialog = dialog.findViewById(R.id.tv_outgoingDialog);\n tv_outgoingDialog.setText(outgoing);\n DataBaseHandler dataBaseHandler = new DataBaseHandler(ReportActivity.this);\n ArrayList<ExitSheet> preExitSheetList = new ArrayList<>();\n preExitSheetList = dataBaseHandler.getAllExitSheet();\n\n TextView tv_Title = dialog.findViewById(R.id.tv_Title);\n if (preExitSheetList.size() == 0) {\n tv_Title.setText(no_outgoing_dialog);\n } else {\n tv_Title.setText(has_outgoing_dialog);\n }\n\n ListView lv_preExitSheet = dialog.findViewById(R.id.lv_preExitSheet);\n PreExitSheetAdapter preExitSheetAdapter = new PreExitSheetAdapter(ReportActivity.this, preExitSheetList, dialog);\n lv_preExitSheet.setAdapter(preExitSheetAdapter);\n\n Button bt_AddExitSheet = dialog.findViewById(R.id.bt_AddExitSheet);\n bt_AddExitSheet.setText(add_new_outgoing_process);\n bt_AddExitSheet.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n dialog_AddExitSheet();\n dialog.dismiss();\n dialog.cancel();\n }\n });\n\n dialog.setCancelable(true);\n dialog.show();\n }",
"public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }",
"private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }",
"private void buildWaitingDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Waiting for server...\");\n\t\tJPanel p1= new JPanel(new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\n\t\t//waiting text\n\t\tJLabel lab = new JLabel(\"Please wait...\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//waiting animation\n\t\tImageIcon gif = new ImageIcon (\"./client_images/load.gif\");\n\t\tJLabel imgLabel = new JLabel(gif);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\t//abort button to close client application\n\t\tJButton abort = new JButton (\"Abort\");\n\t\t//register anonymous listener class that closes up application\n\t\tabort.addActionListener (new ActionListener(){\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\t\tp1.add(abort,BorderLayout.SOUTH);\n\n\t\t//dialog settings\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\t\n\t}",
"@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}",
"private void createStopJourneyDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setMessage(\"Do you want to stop your current journey\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // user wants to stop his current journey\n Intent intent = new Intent(DestinationReachedReceiver.DESTINATION_REACHED_FILTER_TAG);\n LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n builder.show();\n\n }",
"public NewEmployeeDialog(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n currentEmployeeCode = \"\";\n populatePositionComboBox ();\n putDialogToCenter();\n }",
"private void disposeDialogAndCreateNewGame() {\r\n resultDialog.dispose();\r\n Utilities.bringWindowToFront(parentFrame);\r\n game.createNewGameState(game.getBoard().getRowLength(), game.getBoard().getColumnLength());\r\n }",
"public static int EndDialog(int hDlg, int nResult) {\n WinWindow dlg = WinWindow.get(hDlg);\n if (dlg == null || dlg.dlgInfo == null) {\n warn(\"EndDialog: invalid window handle\");\n return FALSE;\n }\n DialogInfo dlgInfo = dlg.dlgInfo;\n dlgInfo.idResult = nResult;\n dlgInfo.flags |= DF_END;\n int wasEnabled = (dlgInfo.flags & DF_OWNERENABLED);\n\n int owner = WinWindow.GetWindow(hDlg, GW_OWNER);\n if (wasEnabled != 0 && owner != 0)\n DIALOG_EnableOwner(owner);\n\n /* Windows sets the focus to the dialog itself in EndDialog */\n\n if (WinWindow.IsChild(hDlg, Focus.GetFocus()) != 0)\n Focus.SetFocus(hDlg);\n\n /* Don't have to send a ShowWindow(SW_HIDE), just do\n SetWindowPos with SWP_HIDEWINDOW as done in Windows */\n\n WinPos.SetWindowPos(hDlg, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW);\n\n if (hDlg == Focus.GetActiveWindow()) {\n /* If this dialog was given an owner then set the focus to that owner\n even when the owner is disabled (normally when a window closes any\n disabled windows cannot receive the focus). */\n if (owner != 0)\n Focus.SetForegroundWindow(owner);\n else\n WinPos.WINPOS_ActivateOtherWindow(hDlg);\n }\n\n /* unblock dialog loop */\n Message.PostMessageA(hDlg, WM_NULL, 0, 0);\n return TRUE;\n }",
"private void openCreateAccountDialog()\n {\n testDialog();\n\n }",
"public void createNewSoundBoard() {\n\n dialogCreateSoundBoard = new Dialog(this);\n dialogCreateSoundBoard.setContentView(R.layout.soundboard_create);\n dialogCreateSoundBoard.setTitle(\"Create board\");\n dialogCreateSoundBoard.setCancelable(true);\n\n\n sbName = (EditText) dialogCreateSoundBoard.findViewById(R.id.textfieldcreatesoundboardname);\n sbName.setHint(\"Name\");\n Button createOkButton = (Button) dialogCreateSoundBoard.findViewById(R.id.createSoundBoardButton);\n createOkButton.setOnClickListener(createSoundBoardListener);\n\n Button createCancelButton = (Button) dialogCreateSoundBoard.findViewById(R.id.cancelSoundBoardButton);\n createCancelButton.setOnClickListener(cancelButtonCreateSoundBoardListener);\n\n dialogCreateSoundBoard.show();\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n Dialog dialog = null;\n String title;\n String message;\n String value;\n \n Units units = new Units(Settings.KEY_UNITS);\n \t\n \tswitch (id) {\n \tcase DIALOG_CONFIRM_ODOMETER_LOW_ID:\n \t\ttitle = getString(R.string.title_confirm_odometer);\n \t\tmessage = getString(R.string.message_confirm_odometer);\n \t\tvalue = Integer.toString(current_odometer);\n \t\tmessage = String.format(message,value);\n \tdialog = ConfirmationDialog.create(this,this,id,title,message);\n \tbreak;\n \t\n \tcase DIALOG_CONFIRM_GALLONS_HIGH_ID:\n \t\ttitle = getString(R.string.title_confirm_gallons);\n \t\ttitle = String.format(title,units.getLiquidVolumeLabel());\n \t\tmessage = getString(R.string.message_confirm_gallons);\n \t\tvalue = String.format(App.getLocale(),\"%.1f %s\", \n \t\t\t\ttank_size, units.getLiquidVolumeLabelLowerCase());\n \t\tmessage = String.format(message,value);\n \tdialog = ConfirmationDialog.create(this,this,id,title,message);\n \tbreak;\n \t\n \t}\n \treturn dialog;\n }",
"@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tbuilder.setMessage(R.string.save_before_quit)\n\t\t\t\t.setPositiveButton(R.string.yes,\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t// SAVE THRESHOLDS\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\t((SHHeatingThresholdsActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t.saveThresholds(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t.setNegativeButton(R.string.no_quit,\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t// QUIT W/OUT SAVING\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tgetActivity().finish();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t// Create the AlertDialog object and return it\n\t\treturn builder.create();\n\t}",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this, myDateListener, year, month, day);\n }\n return null;\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this, myDateListener, year, month, day);\n }\n return null;\n }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(),\n R.style.RedButtonAlertDialog);\n\n builder.setTitle(\"Add new profile\").setView(R.layout.dialog_add_player)\n .setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n EditText profileNameEditText =\n (EditText) getDialog().findViewById(R.id.add_player_edit_text);\n String name = profileNameEditText.getText().toString();\n DartLogDatabaseHelper dbHelper = new DartLogDatabaseHelper(getContext());\n dbHelper.addPlayer(name);\n getProfilesAdapter().updateDataSetFromDatabase();\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"private void makeDialog() {\n \t\tfinal BackgroundGame thisPanel = this;\n \n \t\tfinal JInternalFrame dialog = new JInternalFrame(\"Question!\");\n \t\tdialog.addInternalFrameListener(new InternalFrameListener() {\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameOpened(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosing(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosed(InternalFrameEvent arg0) {\n \t\t\t\tthisPanel.requestFocusInWindow();\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameIconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeiconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameActivated(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeactivated(InternalFrameEvent arg0) {\n \t\t\t}\n \t\t});\n \n \t\tQuestion randQuestion = questions.get(\n \t\t\t\t(int) (Math.random() * questions.size()));\n \n \t\tJLabel label = new JLabel(randQuestion.getQuestion());\n \t\tlabel.setHorizontalAlignment(SwingConstants.LEFT);\n \t\tFont font = label.getFont();\n \t\tlabel.setFont(label.getFont().deriveFont(font.PLAIN, 14.0f));\n \n \t\tJPanel a = new JPanel();\n \t\ta.setLayout(new BoxLayout(a, BoxLayout.Y_AXIS));\n \t\ta.add(label);\n \t\t\n \t\tJPanel choicesPanel = new JPanel();\n \t\tfor (int i = 1; i <= 4; ++i) {\n \t\t\tString choice = randQuestion.getChoice(i);\n \t\t\tJButton button = new JButton();\n \t\t\tif (randQuestion.answerIs(choice)) {\n \t\t\t\t//Remove the \"--\" marker\n \t\t\t\tchoice = choice.substring(0, choice.indexOf(\"--\"));\n \t\t\t\t\n \t\t\t\tbutton.addActionListener(new ActionListener() {\n \t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t\t\t\t\tdialog.setVisible(false);\n \t\t\t\t\t\tdialog.dispose();\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t}\n \t\t\t\t\t\t\t\n \t\t\tbutton.setText(choice);\n \t\t\tchoicesPanel.add(button);\n \t\t}\n \t\ta.add(choicesPanel);\n \n \t\tdialog.setContentPane(a);\n \n \t\tdialog.pack();\n \t\tdialog.setVisible(true);\n \t\tadd(dialog);\n \n \t\tdialog.setLocation(\n \t\t\t\t(int) (Math.random() * (getWidth() - dialog.getWidth())),\n \t\t\t\t(int) (Math.random() * (getHeight() - dialog.getHeight())));\n \t\t/*\n \t\t\n \t\tfor (max = max; max >= 1; max--) {\n \t\ttest = choices.get((int) (Math.random() * max) + min);\n \t\tSystem.out.println(test);\n \t\tSystem.out.println(choices.indexOf(test));\n \t\tchoices.remove(test);\n \t\tSystem.out.println(max);\n \t\t}*/\n \n \t\tincreaseCpuUsage(2);\n \t}",
"public void popUpDiet(int id) {\n\n final AlertDialog popUpDialog = new AlertDialog.Builder(this).create();\n\n LayoutInflater pop = LayoutInflater.from(this);\n final View popView;\n if (id == 1) {\n popView = pop.inflate(R.layout.activity_meat_pop_up, null);\n } else if (id == 2) {\n popView = pop.inflate(R.layout.activity_veg_pop_up, null);\n } else {\n popView = pop.inflate(R.layout.activity_balance_pop_up, null);\n }\n popUpDialog.setView(popView);\n\n\n final Button cancel = popView.findViewById(R.id.button_close);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n popUpDialog.dismiss();\n }\n });\n popUpDialog.show();\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this,\n myDateListener, year, month, day);\n }\n return null;\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this,\n myDateListener, year, month, day);\n }\n return null;\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this,\n myDateListener, year, month, day);\n }\n return null;\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this,\n myDateListener, year, month, day);\n }\n return null;\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this,\n myDateListener, year, month, day);\n }\n return null;\n }",
"@Override\n protected Dialog onCreateDialog(int id) {\n if (id == 999) {\n return new DatePickerDialog(this,\n myDateListener, year, month, day);\n }\n return null;\n }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Do you want to play a game with \"+getArguments().getString(\"name\")+\"?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n acceptGame(getContext());\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n declineGame(getContext());\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //set new View to the builder and create the Dialog\n Dialog dialog = builder.setView(new View(getActivity())).create();\n\n //get WindowManager.LayoutParams, copy attributes from Dialog to LayoutParams and override them with MATCH_PARENT\n WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();\n layoutParams.copyFrom(dialog.getWindow().getAttributes());\n layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT;\n layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;\n //show the Dialog before setting new LayoutParams to the Dialog\n dialog.show();\n dialog.getWindow().setAttributes(layoutParams);\n\n return dialog;\n }",
"public void addRelationshipDialog() { new RelationshipDialog(); }",
"private AlertDialog getDialog(int type) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n if(type == 0){\n final Intent summary = new Intent(this, SummaryActivity.class);\n builder.setMessage(\"Press proceed to see your session summary.\")\n .setTitle(\"Are you done?\");\n // Add the buttons\n builder.setPositiveButton(\"Proceed\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n startActivity(summary);\n finish();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n else if(type == 1){\n builder.setMessage(\"You are about to exit and end this session, no data will be saved.\")\n .setTitle(\"Exit?\");\n // Add the buttons\n builder.setPositiveButton(\"Exit\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n builder.setNegativeButton(\"Continue Running\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n\n\n return builder.create();\n }",
"public static void openQuitDialog(final AppCompatActivity currentActivity) {\n AlertDialog.Builder quitDialog = new AlertDialog.Builder(currentActivity);\n quitDialog.setTitle(currentActivity.getResources().getString(R.string.exitConfirmation));\n quitDialog.setNegativeButton(currentActivity.getResources().getString(R.string.no), new DialogInterface.OnClickListener() { @Override\n public void onClick(DialogInterface dialog, int which) { /*NOP*/ }\n });\n quitDialog.setPositiveButton(currentActivity.getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ClipboardHelper.stopService(currentActivity.getApplicationContext());\n currentActivity.finish();\n }\n });\n quitDialog.show();\n }",
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }",
"EndEvent createEndEvent();",
"public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n\t return mDialog;\r\n\t }",
"DialogResult show();",
"public static void hideNew() {\n\t\tDIALOG.setVisible(false);\n\t}"
]
| [
"0.64636815",
"0.6334499",
"0.6099195",
"0.5951339",
"0.58073694",
"0.5771171",
"0.57643586",
"0.5740888",
"0.57243174",
"0.5711567",
"0.5678009",
"0.5663764",
"0.5642448",
"0.56002307",
"0.5599762",
"0.5597486",
"0.5588607",
"0.55477184",
"0.55446446",
"0.5544615",
"0.5528981",
"0.5524011",
"0.5508226",
"0.5487832",
"0.5467547",
"0.5437524",
"0.54214174",
"0.5415831",
"0.5409762",
"0.5407983",
"0.5394882",
"0.5394772",
"0.53713506",
"0.5354299",
"0.53501904",
"0.53465056",
"0.53439605",
"0.5327726",
"0.5320017",
"0.53131545",
"0.5306857",
"0.53059864",
"0.5303932",
"0.5299945",
"0.5299161",
"0.5286738",
"0.52861327",
"0.5270281",
"0.52556777",
"0.5255595",
"0.52502847",
"0.5243026",
"0.52322656",
"0.5228902",
"0.52033794",
"0.5189279",
"0.51864475",
"0.51850635",
"0.5183581",
"0.51835454",
"0.5181884",
"0.51800954",
"0.5179868",
"0.51779854",
"0.51738507",
"0.51718444",
"0.5164494",
"0.5162658",
"0.51603466",
"0.5157708",
"0.51574266",
"0.5151278",
"0.51416236",
"0.5140342",
"0.513472",
"0.5132154",
"0.5122695",
"0.5120966",
"0.5116391",
"0.5116391",
"0.51150626",
"0.5114537",
"0.51115227",
"0.51048726",
"0.51048726",
"0.51048726",
"0.51048726",
"0.51048726",
"0.51048726",
"0.51009136",
"0.5100209",
"0.5088779",
"0.5087612",
"0.5086934",
"0.50795484",
"0.5076074",
"0.5070694",
"0.506096",
"0.5060737",
"0.5059449"
]
| 0.5558453 | 17 |
All initial UI elements are created here. | private void initializeUI() {
this.parentFrame = game.getFrame();
parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.
createResultPopup();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initUI() {\n }",
"public void init()\n {\n buildUI(getContentPane());\n }",
"@Override\r\n\tprotected void initUI() {\n\r\n\t}",
"private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}",
"private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}",
"void initUI();",
"private void initUI() {\n\t\tStage stage = Stage.createStage();\n\n\t\tControl formPanel = buildFormTestTab();\n\n\t\tControl cellPanel = buildCellTestTab();\n\t\t\n\t\tTabPanel tabbedPane = new TabPanel();\n\t\ttabbedPane.add(\"Form Test\", formPanel);\n\t\ttabbedPane.add(\"Cell Layout Test\", cellPanel);\n\n\t\tstage.setContent(tabbedPane);\n\t}",
"public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }",
"private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}",
"public mainUI() {\n initComponents();\n }",
"private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public UI() {\n initComponents();\n setResizable(false);\n }",
"private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }",
"protected void setupUI() {\n\n }",
"private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}",
"public UI() {\n initComponents();\n }",
"protected void setupUI() {\r\n this.setLayout(new GridLayout((this.needDefaultValue) ? 3 : 2, 2));\r\n\r\n this.nameLabel = new JLabel(this.nameLabelText);\r\n this.add(this.nameLabel);\r\n this.add(this.nameTextField);\r\n\r\n this.typeLabel = new JLabel(this.typeLabelText);\r\n this.add(this.typeLabel);\r\n this.add(this.typeDropDown);\r\n\r\n if (this.needDefaultValue) {\r\n this.defValLabel = new JLabel(this.defValLabelText);\r\n this.add(this.defValLabel);\r\n this.add(this.defValueTextField);\r\n }\r\n }",
"private void initUI() {\n tvQuote = (TextView) findViewById(R.id.tvQuote);\n tvBeginButton = (TextView) findViewById(R.id.tvBeginButton);\n\n tvBeginButton.setOnClickListener(this);\n\n loadBackground();\n }",
"private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }",
"public BridgingUI() {\n initComponents();\n initUserActions();\n }",
"public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"protected void initUI() {\n\r\n\t\t((Button) findViewById(R.id.project_site_start_wifiscan_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_calculate_ap_positions_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_add_known_ap)).setOnClickListener(this);\r\n\r\n\t\t((Button) findViewById(R.id.project_site_step_detect)).setOnClickListener(this);\r\n\t\t\r\n\t\t((ToggleButton) findViewById(R.id.project_site_toggle_autorotate)).setOnClickListener(this);\r\n\r\n\t\tmultiTouchView = ((MultiTouchView) findViewById(R.id.project_site_resultview));\r\n\t\tmultiTouchView.setRearrangable(false);\r\n\r\n\t\tmultiTouchView.addDrawable(map);\r\n\r\n\t\tif (site.getTitle().equals(ProjectSite.UNTITLED)) {\r\n\t\t\tshowDialog(DIALOG_TITLE);\r\n\t\t} else {\r\n\t\t\tif (freshSite) {\r\n\t\t\t\t// start configuration dialog\r\n\t\t\t\tshowDialog(DIALOG_FRESH_SITE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}",
"private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }",
"private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }",
"private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}",
"public abstract void initUiAndListener();",
"private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}",
"private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"public final void initUI() {\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\t\n\t\tJPanel nameChoicePanel = new JPanel();\n\t\tnameChoicePanel.setLayout(new BoxLayout(nameChoicePanel, BoxLayout.Y_AXIS));\n\t\tnameChoicePanel.setName(\"Panel\");\n\t\t\n\t\t// Add instructions for what to do:\n\t\tinstructionLabel = new JLabel(\"Enter your name here:\", JLabel.CENTER);\n\t\tinstructionLabel.setMinimumSize(new Dimension(0, 40));\n\t\tinstructionLabel.setPreferredSize(new Dimension(instructionLabel.getPreferredSize().width, 40));\n\t\tinstructionLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tnameChoicePanel.add(instructionLabel);\n\t\t\n\t\t// Add textfield for user's name\n\t\tnameField = new JTextField(10);\n\t\tnameField.setName(\"textField\");\n\t\tnameField.getDocument().addDocumentListener(this);\n\t\tnameField.setMinimumSize(new Dimension(nameField.getWidth(), 41));\n\t\tnameField.setMaximumSize(new Dimension(250, 41));\n\t\t\n\t\tnameChoicePanel.add(nameField);\n\t\t\n\t\t// Add button\n\t\ttimeToPick = new JButton(\"Pick your team\");\n\t\ttimeToPick.setName(\"Test\");\n\t\ttimeToPick.addActionListener(nameChoiceListener);\n\t\ttimeToPick.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\n\t\ttimeToPick.setEnabled(false);\n\t\tnameChoicePanel.add(timeToPick);\n\t\t\n\t\t// Add name choice panel dimensions\n\t\tadd(nameChoicePanel);\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\tnameChoicePanel.setMinimumSize(new Dimension(400,240));\n\t\tnameChoicePanel.setPreferredSize(new Dimension(400,240));\n\t}",
"public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }",
"private void initComponents() {\n\t\t\n\t}",
"private void initComponents() {\n\t\t\n\t}",
"private void setupUI() \n\t{\n\t\t\n\t\tthis.setLayout( new FormLayout() );\n\t\tmyInterfaceContainer = new Composite( this, SWT.NONE );\n\t\tmyInterfaceContainer.setLayoutData( FormDataMaker.makeFullFormData());\n\t\t\n\t\tsetupInterfaceContainer();\n\t}",
"private void initUI() {\n // deal with toolbar\n setSupportActionBar(activityToolbar);\n if(getSupportActionBar() != null) {\n getSupportActionBar().setTitle(\"\");\n } else {\n Timber.w(\"Action bar is null? Strange behavior might occur\");\n }\n\n // deal with nav drawer\n drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n drawerLayout.addDrawerListener(drawerListener);\n\n }",
"private void initializateGUI() {\n\t\t\n\t\t\n\t\tthis.menuBar = buildMenuBar();\n\t\t\n\t\tthis.toolBar = buildToolBar();\n\t\t\n\t\tthis.container = (JComponent) ContainerViewFactory.getInstance().getContainerView(null);\n\t\t\n\t\tthis.status = buildStatusBar();\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.getViewport().add(this.container);\n\t\t\n\t\ttextResources.getString(\"application.title\").ifPresent(super::setTitle);\n\n\t\tif (this.menuBar != null) {\n\t\t\tsuper.setJMenuBar(this.menuBar);\n\t\t}\n\t\tsuper.setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.setMinimumSize(MINIMUM_SIZE);\n\t\tsuper.setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\n\t\tsuper.getRootPane().setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.getRootPane().setMinimumSize(MINIMUM_SIZE);\t\t\n\t\tsuper.getRootPane().setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\t\t\n\t\tsuper.setLayout(new BorderLayout());\n\t\t\n\t\tsuper.add(toolBar, BorderLayout.NORTH);\n\t\tsuper.add(scrollPane, BorderLayout.CENTER);\n\t\tsuper.add(status, BorderLayout.SOUTH);\n\t\t\n\t\tsuper.addWindowListener(new WindowAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tinitializationDialog = buildInitializationAction();\n\t\t\t\tinitializationDialog.setVisible(true);\n\t\t\t\tinitializationDialog.toFront();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tconfirmExitAction();\n\t\t\t}\n\t\t});\n\t\tthis.handlerInitializateGUI();\n\t}",
"private void buildUIElements() {\n uiCamera = new OrthographicCamera( Global.WINDOW_WIDTH, Global.WINDOW_HEIGHT );\n uiViewport = new ExtendViewport( Global.WINDOW_WIDTH, Global.WINDOW_HEIGHT, uiCamera );\n\n //Build the table.\n uiStage = new Stage( uiViewport );\n rootTable = new Table( VisUI.getSkin() );\n uiStage.addActor( rootTable );\n rootTable.setFillParent( true );\n rootTable.left().top();\n\n //Fill up the healthMeter is images to be used as healthBars.\n for ( int i = 0; i < 20; i++ ) {\n healthMeter.add( new Image( healthBars.findRegion( \"highHealth\" ) ) );\n }\n }",
"public RummyUI(){\n \n //Call method initComponents\n initComponents();\n \n }",
"private void init() {\n setBackground(LIGHT_GRAY);\n Box layout = new Box(BoxLayout.Y_AXIS);\n\n jump = createButton(\"Jump\", null);\n exit = createButton(\"Exit!\", null);\n fly = createButton(\"Fly\", null);\n Jfloat = createButton(\"Float\", null);\n layout.add(Box.createRigidArea(new Dimension(0, 150)));\n layout.add(jump);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(Jfloat);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(fly);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(exit);\n add(layout);\n }",
"private UIManager() {\n tableUI = new TableUI();\n snifferUI = new SnifferUI();\n }",
"private void initUI() {\n mLocalContainer = findViewById(R.id.local_video_view_container);\n mRemoteContainer = findViewById(R.id.remote_video_view_container);\n\n mCallBtn = findViewById(R.id.btn_call);\n mMuteBtn = findViewById(R.id.btn_mute);\n mSwitchCameraBtn = findViewById(R.id.btn_switch_camera);\n }",
"private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }",
"public void init() {\r\n\r\n add(btnUn);\r\n add(btnDeux);\r\n add(btnTrois);\r\n add(btnQuatre);\r\n add(btnCinq);\r\n\r\n btnUn.setBounds(120, 120, 100, 75);\r\n btnDeux.setBounds(120, 310, 100, 75);\r\n btnDeux.setTransferHandler(new TransferHandler(\"icon\"));\r\n btnTrois.setBounds(360, 310, 100, 75);\r\n btnQuatre.setBounds(160, 600, 100, 75);\r\n btnQuatre.setTransferHandler(new TransferHandler(\"icon\"));\r\n btnCinq.setBounds(360, 600, 100, 75);\r\n\r\n }",
"private void initUI() {\n\t\t//Creating the window for our game\n\t\tframe = new JFrame(GAME_TITLE);\n\t\tframe.setSize(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\t//Creating a canvas to add to the window\n\t\tcanvas = new Canvas();\n\t\tcanvas.setPreferredSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMaximumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMinimumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\t\n\t\tframe.add(canvas);\n\t\tframe.pack();\n\t\t\n\t}",
"private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}",
"private void initUIElements() \n\t{\n\t\t// Init UI element collections.\n\t\tbarcharts\t\t= new HashMap<String, BarChart>();\n\t\t//spinners\t\t= new HashMap<String, Spinner<Float>>();\n\t\trangeSliders\t= new HashMap<String, RangeSlider>();\n\t\tvBoxes\t\t\t= new HashMap<String, VBox>();\n\t\t\n\t\t// Remove deprecated UI elements in parameter configuration grid pane.\n\t\tint vboxCount = 0;\n\t\tfor (Object child : parameterConfiguration_gridPane.getChildren().toArray()) {\n\t\t\tNode node = (Node)child;\n\t\t\t\n\t\t\t//System.out.println(node.getClass().getName());\n\t\t\tswitch (node.getClass().getName()) \n\t\t\t{\n\t \t\t// Replace TextFields with numeric steppers / spinners.\n\t \t\tcase \"javafx.scene.control.TextField\":\n\t \t\t\t// Set initial values.\n\t \t\t\tif (node.getId().contains(\"min\"))\n\t \t\t\t\t((TextField)node).setText(\"0\");\n\t \t\t\telse\n\t \t\t\t\t((TextField)node).setText(\"100\");\n\t \t\tbreak;\n\t \t\t\n\t \t\tcase \"javafx.scene.layout.VBox\":\n\t \t\t\tVBox currentVBox = ((VBox)node);\n\t \t\t\t// Look for Sliders in VBox nodes; replace with RangeSliders.\n\t \t\t\tfor (Object vboxChild : currentVBox.getChildren().toArray()) {\n\t \t\t\t\tNode vboxNode = (Node)vboxChild;\n\t \t\t\t\t\n\t \t\t\t\tif (vboxNode.getClass().getName() == \"javafx.scene.control.Slider\") {\n\t \t\t\t\t\tcurrentVBox.getChildren().remove(vboxNode);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\t// Store references to VBoxes.\n\t \t\t\tswitch(vboxCount++)\n\t \t\t\t{\n\t \t\t\t\tcase 0:\n\t \t\t\t\t\tvBoxes.put(\"alpha\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 1:\n\t \t\t\t\t\tvBoxes.put(\"eta\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 2:\n\t \t\t\t\t\tvBoxes.put(\"kappa\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t}\n\t \t\tbreak;\n\t \t}\n\t }\n\t\t\n\t\t// Init barcharts.\n\t\tinitBarcharts();\n\t\t\n\t\t// Init range sliders.\n\t\tinitRangeSliders();\n\t\t\n\t\t// Init textfields.\n\t\tinitTextFields();\n\t\t\n\t\t// Init combobox.\n\t\tinitComboBoxes();\n\t}",
"private GUIReminder() {\n\n initComponents();\n initOthers();\n\n }",
"public GUI() {\n\t\tinitComponents();\n\t}",
"private void InitializeUI(){\n\t\t//Set up the menu items, which are differentiated by their IDs\n\t\tArrayList<MenuItem> values = new ArrayList<MenuItem>();\n\t\tMenuItem value = new MenuItem();\n\t\tvalue.setiD(0); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(1); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(2); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(3); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(4); values.add(value);\n\n MenuAdapter adapter = new MenuAdapter(this, R.layout.expandable_list_item3, values);\n \n // Assign adapter to List\n setListAdapter(adapter);\n \n //Set copyright information\n Calendar c = Calendar.getInstance();\n\t\tString year = String.valueOf(c.get(Calendar.YEAR));\n\t\t\n\t\t//Set up the copyright message which links to the author's linkedin page\n TextView lblCopyright = (TextView)findViewById(R.id.lblCopyright);\n lblCopyright.setText(getString(R.string.copyright) + year + \" \");\n \n TextView lblName = (TextView)findViewById(R.id.lblName);\n lblName.setText(Html.fromHtml(\"<a href=\\\"http://uk.linkedin.com/in/lekanbaruwa/\\\">\" + getString(R.string.name) + \"</a>\"));\n lblName.setMovementMethod(LinkMovementMethod.getInstance());\n\t}",
"protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }",
"public MainUI() {\r\n initComponents();\r\n this.setLocationRelativeTo(null);\r\n /**/\r\n }",
"@Override\n public final void initGui() {\n \tKeyboard.enableRepeatEvents(true);\n\t\t\n \tif(components == null) {\n \t\tcomponents = Lists.newArrayList();\n \t\t\n \t\ttry {\n \t\t\tbuildGui();\n \t\t} catch(Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n \t\n \t// XXX: Untested. Might lead to crash. Leaving it in for now.\n \tif(this.behindScreen != null) {\n \t\tthis.behindScreen.width = this.width;\n \t\tthis.behindScreen.height = this.height;\n \t\tthis.behindScreen.initGui();\n \t}\n \t\n \tlayoutGui();\n }",
"private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }",
"private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}",
"private void setupUI() {\r\n\t\tWindow.setTitle(\"Battle\");\r\n\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\tpanel.addStyleName(NAME);\r\n\t\tinitWidget(panel);\r\n\t\t\r\n\t\tlabelTitle = new Label(\"Battle\");\r\n\t\tlabelTitle.addStyleName(Styles.page_title);\r\n\t\tpanel.add(labelTitle);\r\n\t\t\r\n\t\tLabel instructions = new Label(\"Click to go!\");\r\n\t\tpanel.add(instructions);\r\n\r\n\t\tHorizontalPanel hPanel = new HorizontalPanel();\r\n\t\tpanel.add(hPanel);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\thPanel.add(canvas);\r\n\r\n\t\tVerticalPanel vPanelInfo = new VerticalPanel();\r\n\t\thPanel.add(vPanelInfo);\r\n\t\t\r\n\t\tlabelInfo = new Label();\r\n\t\tlabelInfo.addStyleName(Styles.battle_info);\r\n\t\tvPanelInfo.add(labelInfo);\r\n\t\t\r\n\t\tvPanelInfoHistory = new VerticalPanel();\r\n\t\tvPanelInfoHistory.addStyleName(Styles.battle_info_history);\r\n\t\tvPanelInfo.add(vPanelInfoHistory);\r\n\r\n\t\t\r\n\t\tcanvas.setWidth(width + \"px\");\r\n\t\tcanvas.setHeight(height + \"px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(width);\r\n\t\tcanvas.setCoordinateSpaceHeight(height);\r\n\r\n\t\t//Adding handlers seems to create a performance issue in Java\r\n\t\t//mode, but likely not in javascript\r\n\t\tcanvas.addMouseDownHandler(this);\r\n//\t\tcanvas.addMouseUpHandler(this);\r\n//\t\tcanvas.addMouseMoveHandler(this);\r\n\r\n\t\tcontext2d = canvas.getContext2d();\r\n\r\n\t\tlastUpdate = System.currentTimeMillis();\r\n\t\ttimer = new Timer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\t\tupdate(now - lastUpdate);\r\n\t\t\t\tlastUpdate = now;\r\n\r\n\t\t\t\tdraw();\r\n\t\t\t}\r\n\t\t};\r\n\t\ttimer.scheduleRepeating(1000 / 60);\r\n\t}",
"protected void setupUI() {\n textView = (TextView) findViewById(R.id.textView);\n viewGradeButton = (Button) findViewById(R.id.viewAllBillsButton);\n viewDash = (Button) findViewById(R.id.viewDash);\n\n //Listen if the buttons is clicked\n viewGradeButton.setOnClickListener(onClickViewGradeButton);\n viewDash.setOnClickListener(onClickViewDash);\n\n }",
"private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }",
"private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}",
"private void initiateInternal() {\n\n //define adaptation listener\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(ComponentEvent e) {\n adapt(e);\n }\n });\n\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n }",
"public UI() \n {\n // initiate attributs\n loadedDictionaryFilename = \"\";\n lexiNodeTrees = new ArrayList<>();\n \n // initiate window component\n initComponents();\n setTitle(\"Dictio\");\n \n // empty lists\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n this.getAllWordsList().setModel( new DefaultListModel() );\n }",
"public void InitUI() {\n this.mSetData = new CanDataInfo.CAN_Msg();\n this.mDoorInfo = new CanDataInfo.CAN_DoorInfo();\n setBackgroundResource(R.drawable.can_vw_carinfo_bg);\n this.mDoorIcons = new CustomImgView[6];\n if (MainSet.GetScreenType() == 5) {\n InitUI_1280x480();\n } else {\n InitUI_1024x600();\n }\n this.mOilItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mTempItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mElctricItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mTrunkUpItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mParkingItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mXhlcItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mRPMItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mSpeedItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mDistanceItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mLqywdItemTxt.setText(TXZResourceManager.STYLE_DEFAULT);\n }",
"private void setupUIElements() {\n setBadgeDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.company_logo));\n //setTitle(getString(R.string.browse_title));\n\n setHeadersState(HEADERS_ENABLED);\n setHeadersTransitionOnBackEnabled(true);\n\n // Set headers and rows background color\n setBrandColor(ContextCompat.getColor(getActivity(), R.color.browse_headers_bar));\n mBackgroundManager.setColor(ContextCompat.getColor(getActivity(),\n R.color.browse_background_color));\n\n // Disables the scaling of rows when Headers bar is in open state.\n enableRowScaling(false);\n\n // Here is where a header presenter can be set to customize the look\n // of the headers list.\n setHeaderPresenterSelector(new PresenterSelector() {\n @Override\n public Presenter getPresenter(Object o) {\n\n return new RowHeaderPresenter();\n }\n });\n }",
"private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new BorderLayout(0, 0));\n }",
"public void init() {\n fIconkit = new Iconkit(this);\n\n\t\tsetLayout(new BorderLayout());\n\n fView = createDrawingView();\n\n Panel attributes = createAttributesPanel();\n createAttributeChoices(attributes);\n add(\"North\", attributes);\n\n Panel toolPanel = createToolPalette();\n createTools(toolPanel);\n add(\"West\", toolPanel);\n\n add(\"Center\", fView);\n Panel buttonPalette = createButtonPanel();\n createButtons(buttonPalette);\n add(\"South\", buttonPalette);\n\n initDrawing();\n setBufferedDisplayUpdate();\n setupAttributes();\n }",
"private void initializeUI() {\n emailTV = findViewById(R.id.email);\n passwordTV = findViewById(R.id.password);\n regBtn = findViewById(R.id.register);\n progressBar = findViewById(R.id.progressBar);\n nameTV = findViewById(R.id.displayName);\n }",
"private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }",
"public void initUI() {\n\t\t\n\t\tsetPreferredSize(new Dimension((int)((2*Board.NUMBER_OF_FREE_COLUMNS)+1)*Board.TILE_SIZE + 2*Board.GAP_WIDTH, (int)((2*Board.NUMBER_OF_FREE_ROWS)+1)*Board.TILE_SIZE));\n\t\tsetLayout(new GridLayout(10,1));\n\t\taddKeyListener(this);\n\t\tsetBackground(Color.WHITE);\n\t\tJLabel label1 = new JLabel();\n\t\t\n\t\tlabel1.setFont(new Font(\"Verdana\", Font.BOLD, 55));\n\t\t\n\t\tlabel1.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\tlabel1.setText(\"Player \"+winner+\" has won!\");\n\t \n\t add(label1);\n\t}",
"public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }",
"private void uiInit() {\n mRemoveIcon = findViewById(R.id.remove_icon);\n mRemoveIcon.setOnClickListener(v -> {\n if (mListener != null && mRemoveEnabled) {\n mListener.onRemoveClicked(mEntry);\n }\n });\n\n mDragIcon = findViewById(R.id.drag_icon);\n }",
"public MainWindow() {\n\t\t\tthis.initUI();\n\t\t\t\n\t\t}",
"private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}",
"private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n }",
"private void initUI()\r\n {\r\n var webIcon = new ImageIcon(\"src/resources/web.png\");\r\n \r\n // The setIconImage() sets the image to be displayed as the icon for this window. the getImage() returns the\r\n // icon's Image.\r\n setIconImage(webIcon.getImage());\r\n \r\n setTitle(\"Icon\");\r\n setSize(300, 200);\r\n setLocationRelativeTo(null);\r\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n }",
"public void initGUI(){\n\t\t\n\t\t//the layout is a new BorderLayout\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t//the label will be north\t\n\t\tadd(createHeroList(), BorderLayout.NORTH);\n\t\t\n\t\t//the questions will be displayed center\t\t\n\t\tadd(createQuestions(), BorderLayout.CENTER);\n\t\t//the button panel should be south\n\t\tadd(createAnswerButtonPanel(), BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t \n\t}",
"private void initComponents() {\n LOOGER.info(\"Get init components\");\n this.loadButton = new JButton(\"Load\");\n this.fillButton = new JButton(\"Fill\");\n this.deleteButton = new JButton(\"Delete\");\n this.setLayout(new FlowLayout());\n LOOGER.info(\"components exit\");\n }",
"private void initUi() {\n mToolbsr = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbsr);\n\n fab = (FloatingActionButton) findViewById(R.id.fab);\n mDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);\n mNavigationView = (NavigationView) findViewById(R.id.nav_view);\n\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n viewPager = (ViewPager) findViewById(R.id.viewpager);\n }",
"protected void init() {\r\n\t\tsetBackground(Color.black);\r\n\t\tsetForeground(Color.white);\r\n\t\taddMouseListener(this);\r\n\t\taddMouseMotionListener(this);\r\n\t\tcreateSelection();\r\n\t\tsel.addListener(this);\r\n\t\tcreateSection();\r\n\t\tsection.addListener(this);\r\n\t\tsetOpaque(true);\r\n\t\tremoveAll();\r\n\t}",
"@Override\n public void initialiseUiCells() {\n }",
"private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }",
"public void initGui()\n {\n Keyboard.enableRepeatEvents(true);\n this.buttons.clear();\n GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format(\"selectWorld.edit.resetIcon\")));\n this.buttons.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format(\"selectWorld.edit.openFolder\")));\n this.buttons.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectWorld.edit.save\")));\n this.buttons.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\")));\n guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, \"icon.png\").isFile();\n ISaveFormat isaveformat = this.mc.getSaveLoader();\n WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);\n String s = worldinfo == null ? \"\" : worldinfo.getWorldName();\n this.nameEdit = new GuiTextField(2, this.fontRenderer, this.width / 2 - 100, 60, 200, 20);\n this.nameEdit.setFocused(true);\n this.nameEdit.setText(s);\n }",
"private void createUIComponents() {\n }",
"private static void initAndShowGUI() {\n }",
"private void initializeUi() {\n scanner = findViewById(R.id.surfaceView);\n cameraPreview = findViewById(R.id.surfaceView);\n bt_cross = findViewById(R.id.bt_cross);\n cargando = cargando();\n }",
"public userinterface() {\n initComponents();\n }",
"private void initGui()\n {\n setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.WHITE));\n\n setLayout(new GridBagLayout());\n\n GridBagConstraints gbc = new GridBagConstraints();\n\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n\n this.add(lblHint, gbc);\n }",
"private void initializeUI() {\n MedUtils.displayMedInfo(coverArt, playBinding.thumbIv, playBinding.titleTv,\n playBinding.subtitleTv, selectedMed);\n\n playBinding.playPauseBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n switch (MediaPlayerService.getState()) {\n case Constants.STATE_PLAY:\n mediaPlayerService.pauseAction();\n break;\n case Constants.STATE_PAUSE:\n mediaPlayerService.playAction();\n break;\n case Constants.STATE_NOT_INIT:\n startMediaPlayerService();\n break;\n }\n }\n });\n\n playBinding.stopBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mediaPlayerService.stopAction();\n }\n });\n }",
"public HealthUI() {\n init();\n }",
"public Gui() { \n preInitComponents(); \n initComponents();\n postInitComponents(); \n setVisible(true);\n appInitialization();\n }",
"private UI()\n {\n this(null, null);\n }",
"private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints1 = new GridBagConstraints();\r\n\t\tgridBagConstraints1.gridx = 0;\r\n\t\tgridBagConstraints1.gridy = 1;\r\n\t\tlaunchSubLabel = new JLabel();\r\n\t\tlaunchSubLabel.setText(Message.getMessage(\"reportmaker.process.sublabel\"));\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.gridx = 0;\r\n\t\tgridBagConstraints.gridy = 0;\r\n\t\tthis.setSize(800, 400);\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setPreferredSize(new Dimension(800, 400));\r\n\t\tthis.setBackground(Color.white);\r\n\t\tthis.add(getLaunchButton(), gridBagConstraints);\r\n\r\n\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\r\n\t\tgridBagConstraints2.insets = new Insets(50, 0, 0, 0);\r\n\t\tgridBagConstraints2.gridx = 0;\r\n\t\tgridBagConstraints2.gridy = 2;\r\n\t\tthis.add(getViewButton(), gridBagConstraints2);\r\n\t\tthis.add(launchSubLabel, gridBagConstraints1);\r\n\t}",
"protected void createComponents() {\n sampleText = new JTextField(20);\n displayArea = new JLabel(\"\");\n displayArea.setPreferredSize(new Dimension(200, 75));\n displayArea.setMinimumSize(new Dimension(200, 75));\n }",
"private void createUIComponents() {\n }",
"private void createUIComponents() {\n }",
"private void createUIComponents() {\n }",
"private void createUIComponents() {\n }",
"private void createUIComponents() {\n }",
"private void createUIComponents() {\n }",
"private void createUIComponents() {\n }"
]
| [
"0.8351217",
"0.80177444",
"0.7908524",
"0.77896845",
"0.7783062",
"0.77689487",
"0.77134025",
"0.7677407",
"0.7623262",
"0.76079804",
"0.75907594",
"0.756598",
"0.7561558",
"0.751816",
"0.7502631",
"0.7476667",
"0.7465865",
"0.7463799",
"0.74146825",
"0.7379771",
"0.73796594",
"0.7332127",
"0.7330081",
"0.7314551",
"0.72995245",
"0.72916913",
"0.7274767",
"0.72659975",
"0.72643095",
"0.72294545",
"0.7206997",
"0.72031933",
"0.7152539",
"0.7148015",
"0.7148015",
"0.71292716",
"0.7128012",
"0.7123842",
"0.71131307",
"0.7099959",
"0.70912814",
"0.70820093",
"0.7079925",
"0.7071402",
"0.70705277",
"0.70460826",
"0.70434237",
"0.7033857",
"0.70238185",
"0.7020179",
"0.70200187",
"0.7019808",
"0.70178217",
"0.7016392",
"0.7015977",
"0.7015829",
"0.70064324",
"0.6992622",
"0.69872165",
"0.6980402",
"0.6968167",
"0.695495",
"0.693705",
"0.69257873",
"0.691405",
"0.6913758",
"0.6909761",
"0.68908846",
"0.6890301",
"0.6888916",
"0.6886153",
"0.6884324",
"0.6884294",
"0.68834907",
"0.6882509",
"0.68797594",
"0.68777496",
"0.68689275",
"0.6862867",
"0.68627584",
"0.68611306",
"0.68598646",
"0.68581986",
"0.68538326",
"0.6846083",
"0.6845063",
"0.68440145",
"0.6835595",
"0.683124",
"0.6827186",
"0.682402",
"0.6821231",
"0.68209976",
"0.6812756",
"0.6812756",
"0.6812756",
"0.6812756",
"0.6812756",
"0.6812756",
"0.6812756"
]
| 0.72780436 | 26 |
Create the result (ending dialog) UI. | private void createResultPopup() {
resultDialog = new JDialog(parentFrame);
resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));
resultDialog.setAlwaysOnTop(true);
Utilities.centerWindowTo(resultDialog, parentFrame);
resultDialog.add(createResultLabel());
resultDialog.add(createButtonDescription());
resultDialog.add(createConfirmationButtons());
resultDialog.pack();
resultDialog.setVisible(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }",
"public EndingDialog(Game game, Occupant result) {\r\n this.game = game;\r\n this.result = result;\r\n initializeUI();\r\n }",
"private void buildSuccessDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Success!\");\n\t\t//mainDialog.getContentPane().removeAll();\n\t\tJPanel p1 = new JPanel (new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\t\t//success text\n\t\tJLabel lab = new JLabel(\"Login Successful!\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//success image\n\t\tImageIcon img = new ImageIcon (\"./client_images/success.png\");\n\t\timg = new ImageIcon ( img.getImage().getScaledInstance(100,100,Image.SCALE_DEFAULT));\n\t\tJLabel imgLabel = new JLabel(img);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\tJButton ok = new JButton (\"Ok\");\n\t\t//pressing ok closes the application\n\t\t//register action listener (anonymous inner class is sufficient)\n\t\tok.addActionListener (new ActionListener(){\n\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t//call GUI's close up method to gracefully release all\n\t\t\t\t\t\t\t//resources\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\tp1.add(ok,BorderLayout.SOUTH);\n\n\t\t//settings of the dialog box\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\n\t}",
"private void showEndGameResults() {\n EndGameDialog endGameDialog = new EndGameDialog(this, stats, playerOne, playerTwo, (e) -> {\n dispose();\n\n this.start();\n });\n\n\n }",
"public HandResultsDialog(BlackJackFrame owner, boolean modal) {\n super(owner,modal);\n this.owner = owner;\n \n resultsText = new JTextArea(4,30);\n resultsText.setEditable(false);\n scrollPane = new JScrollPane(resultsText,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n \n confirmButton = new JButton(\"Next Hand!\");\n confirmButton.addActionListener(this);\n \n exitButton = new JButton(\"Exit Game\");\n exitButton.addActionListener(this);\n \n //setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n setLayout(new GridLayout(3,1));\n //setLayout(new BorderLayout());\n \n add(scrollPane);\n add(confirmButton);\n add(exitButton); \n \n getRootPane().setDefaultButton(confirmButton);\n\n //addWindowListener(new ClosingListener()); // might be taken out\n }",
"DialogResult show();",
"private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}",
"private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}",
"private void buildWaitingDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Waiting for server...\");\n\t\tJPanel p1= new JPanel(new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\n\t\t//waiting text\n\t\tJLabel lab = new JLabel(\"Please wait...\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//waiting animation\n\t\tImageIcon gif = new ImageIcon (\"./client_images/load.gif\");\n\t\tJLabel imgLabel = new JLabel(gif);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\t//abort button to close client application\n\t\tJButton abort = new JButton (\"Abort\");\n\t\t//register anonymous listener class that closes up application\n\t\tabort.addActionListener (new ActionListener(){\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\t\tp1.add(abort,BorderLayout.SOUTH);\n\n\t\t//dialog settings\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\t\n\t}",
"private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }",
"private void createResultFilePart() {\n\t\t//------------------------------------------------\n\t\t// Result File Label\n\t\t//------------------------------------------------\n\t\tLabel resultFileLabel = new Label(generalSettingsGroup, SWT.NONE);\n\t\tresultFileLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));\n\t\tresultFileLabel.setText(\"Result File:\");\n\t\t\n\t\tresultFileDeco = new ControlDecoration(resultFileLabel, SWT.LEFT | SWT.TOP);\n\t\tresultFileDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tresultFileDeco.setDescriptionText(\"Choose a file to store the compare results.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// \"Choose...\" Button\n\t\t//------------------------------------------------\n\t\tButton fileChooserButton = new Button(generalSettingsGroup, SWT.NONE);\n\t\tfileChooserButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n\t\tfileChooserButton.setText(\"Choose...\");\n\t\t\n\t\tfileChooserButton.addSelectionListener(\n\t\t\t\tnew SelectionAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\n\t\t\t\t\t\tString filePath = fileDialog.open();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(filePath != null){\n\t\t\t\t\t\t\tsetSelectedFile(filePath);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t//------------------------------------------------\n\t\t// FilePath Field\n\t\t//------------------------------------------------\n\t\tresultFilepathField = new Text(generalSettingsGroup, SWT.BORDER);\n\t\tresultFilepathField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n\t\t\n\t\tNotNullStringValidator filepathValidator = new NotNullStringValidator(resultFileLabel, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tresultFilepathField.addModifyListener(filepathValidator);\n\t\t\n\t\tfilepathValidator.setTag(\"ALWAYS\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathValidator);\n\t\t\n\t\t//------------------------------------------------\n\t\t// Create file writeable Validator\n\t\t//------------------------------------------------\n\n\t\tFileCanWriteValidator filepathWritableValidator = new FileCanWriteValidator(null, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tfilepathWritableValidator.setTag(\"PRECHECK\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathWritableValidator);\n\t}",
"public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}",
"@Override\n\tprotected void onPostExecute(String result) \n\t{\n\t\tsuper.onPostExecute(result);\n\t\tact.createUI(result);\n\t}",
"public final void showInput(final SimulationVersion result) {\r\n // Eingegebene Investitionen werden angezeigt\r\n verticalPanelInput = new VerticalPanel();\r\n lbResults = new Label(\"Ihre Eingabe: \");\r\n lbResults.setStyleName(\"gwt-Panel-Invest-Inputlabel\");\r\n // Ein neues Panel wird angebracht\r\n absolutePanelYear[stackYear - 1].add(lbResults, 10, 10);\r\n absolutePanelYear[stackYear - 1].add(verticalPanelInput, 10, 34);\r\n verticalPanelInput.setSize(\"154px\", \"18px\");\r\n\r\n // Labels mit den Daten befüllen\r\n lbInvestMarketing = new Label(\"Marketing: \" + result.getMarketing());\r\n lbInvestPersonal = new Label(\"Personal: \" + result.getPersonal());\r\n lbInvestPrice = new Label(\"Produktpreis: \" + result.getPrice());\r\n lbInvestMachineValue = new Label(\"Maschinenwert: \"\r\n + result.getMachineValue());\r\n lbInvestMachinesCapacity = new Label(\"Maschinenkapazit\\u00E4t: \"\r\n + result.getMachineCapacity());\r\n lbInvestMachinePersonal = new Label(\"Maschinenpersonal: \"\r\n + result.getMachineStaff());\r\n\r\n // Labels werden auf dem VerticalPanel angebracht\r\n verticalPanelInput.setSize(\"210px\", \"236px\");\r\n verticalPanelInput.add(lbInvestMarketing);\r\n verticalPanelInput.add(lbInvestPersonal);\r\n verticalPanelInput.add(lbInvestPrice);\r\n verticalPanelInput.add(lbInvestMachineValue);\r\n verticalPanelInput.add(lbInvestMachinesCapacity);\r\n verticalPanelInput.add(lbInvestMachinePersonal);\r\n }",
"private void showResults() {\n\n AlertDialog.Builder builder1 = new AlertDialog.Builder(this);\n\n Collections.shuffle(selectedPlayers); // shuffle the players the user has selected\n\n StringBuilder sb = new StringBuilder(); // create a string builder to add numbers in front of the players' names\n for (int i = 0; i < selectedPlayers.size(); i++) {\n sb.append(String.valueOf(i + 1) + \". \" + selectedPlayers.get(i) + \"\\n\");\n }\n builder1.setTitle(\"Player order is\");\n String s = sb.toString();\n s = s.trim();\n builder1.setMessage(s);\n builder1.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }\n });\n gong.stop();\n gong.start();\n builder1.show();\n }",
"private void createComponents()\n\t{\n\t\t// Create search results' table header\n\t\tm_ResultHeader = new PrinterLabel(1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\"PRINTER\",\"VENDOR\",\"TENSION (ksi)\",\"COMPRESSION (ksi)\",\"IMPACT (lb-ft)\",\"MATERIALS\",\"TOLERANCE (in)\",\"FINISH (\\u00B5in)\", false);\n\t\tm_ResultHeader.setBackground(Color.lightGray);\n\t\t// Add tool tips for long header categories before adding to GUI\n\t\tm_ResultHeader.getMaterials().setToolTipText(\"Range of Materials\");\n\t\tm_PrinterList = ToolBox.generatePrinterList();\n\t}",
"void generar_dialog_preguntas();",
"public void popResultDialog(int index) {\n JFrame frame = (JFrame) SwingUtilities.windowForComponent(this);\n if (frame != null && index > 0 && index < listRank.size()) {\n Record record = listRank.get(index);\n ResultDetailDialog dialog = new ResultDetailDialog(frame, record);\n dialog.setModal(true);\n int x = frame.getX() + (frame.getWidth() - dialog.getWidth()) / 2;\n int y = frame.getY() + (frame.getHeight() - dialog.getHeight()) / 2;\n dialog.setLocation(x, y);\n dialog.setVisible(true);\n }\n }",
"private void process() {\n final PluginsDialog dialog = new PluginsDialog();\n dialog.show();\n }",
"protected abstract JDialog createDialog();",
"private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.\r\n createResultPopup();\r\n }",
"public ResultGUI getResultGUI() {\n return resultGUI;\n }",
"public void handleResultShow(){\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Make a selection\");\n\n //create the String[] to display the search result to user\n final CharSequence[] sArray = new CharSequence[searchResult.size()];\n for (int i = 0; i < searchResult.size(); i++){\n sArray[i] = searchResult.get(i).getSymbolwithName();\n }\n builder.setItems(sArray, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //add the selection stock to main page\n validateAdd(searchResult.get(which));\n updatePrice();\n }\n });\n\n builder.setNegativeButton(\"Nevermind\", null);\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }",
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }",
"public JDialogScenarioResult(Window owner) {\r\n\t\tsuper(owner);\r\n\t\tthis.initialize();\r\n\t\tthis.loadDatabaseSettings();\r\n\t}",
"public resultview() {\n initComponents();\n }",
"private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }",
"void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}",
"@Override\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t//status of 1 is success\n\t\t\t\t\t\tif (status==1){\n\t\t\t\t\t\t\tmainDialog.dispose();\n\t\t\t\t\t\t\tbuildSuccessDialog();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//else error\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tmainDialog.dispose();\n\t\t\t\t\t\t\tbuildErrorDialog(status);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}",
"public void createControl() {\n Button button1 = new Button(getShell(), SWT.PUSH);\n button1.setText(\"PolicyValueSelectionDialog with valid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog1 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy1\", selectionElement1);\n button1.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog1.open();\n String[] results = (String[]) dialog1.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n dialog1.setInitialSelections(new String[]{\"choice7\", \"choice3\"});\n\n Button button2 = new Button(getShell(), SWT.PUSH);\n button2.setText(\"PolicyValueSelectionDialog with invalid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog2 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy2\", selectionElement2);\n button2.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog2.open();\n String[] results = (String[]) dialog2.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n\n\n }",
"private void showResult() {\n if (Utils.isKitkat()) TransitionManager.beginDelayedTransition(llBody);\n if (tvResult != null)\n flSceneFrame.removeView(tvResult);\n tvResult = new TextView(this);\n tvResult.setBackgroundColor(getResources().getColor(R.color.colorRedTranslucent));\n tvResult.setTextColor(getResources().getColor(android.R.color.white));\n tvResult.setText(selectedAnswer.getText());\n tvResult.setPadding(4, 4, 4, 4);\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.setMargins(utils.getQuadrantBasedX(ivScene, selectedAnswer.getRelativeCoordinateX()), utils.getQuadrantBasedY(ivScene, selectedAnswer.getRelativeCoordinateY()), 0, 0);\n flSceneFrame.addView(tvResult, params);\n btNext.setVisibility(View.VISIBLE);\n }",
"private void showExecutionEnd() {\n log.info(\"##############################################################\");\n log.info(\"Application created: Press Cancel to end dialog\");\n log.info(\"##############################################################\");\n }",
"public StandardDialog() {\n super();\n init();\n }",
"private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"private void resultsConfigButton(){\n if(!resultsOpened){\n resultsUI = new ResultsUI(this, false);\n resultsOpened = true;\n } \n }",
"public void displayResultScreen() {\n displayScreenAdminView = new Result();\n\n\n }",
"public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}",
"@Override\n public Control createDialogArea(Composite parent) {\n Composite top = (Composite) super.createDialogArea(parent);\n\n /*\n * Create the main layout for the shell.\n */\n GridLayout mainLayout = new GridLayout(1, false);\n mainLayout.verticalSpacing = 15;\n top.setLayout(mainLayout);\n GridData mainLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);\n top.setLayoutData(mainLayoutData);\n\n createStormTypeArea(top);\n createViewerArea(top);\n createTransmitArea(top);\n\n /*\n * Sets dialog title\n */\n getShell().setText(\"View/Send PSH\");\n\n // Update GUI from PshData.\n updateGui(pshData);\n\n return top;\n }",
"@Override\n public Dialog onCreateDialog(Bundle bundle) {\n AlertDialog.Builder builder =\n new AlertDialog.Builder(getActivity());\n builder.setMessage(\n getString(R.string.results,\n totalSuposicoes,\n (1000 / (double) totalSuposicoes)));\n\n // \"Resetar Questão\" Button\n builder.setPositiveButton(R.string.reset_quiz,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n resetQuiz();\n }\n }\n );\n\n return builder.create(); // retorna o AlertDialog\n }",
"private AlertDialog cargando() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater inflater = getLayoutInflater();\n\n @SuppressLint(\"InflateParams\") View v = inflater.inflate(R.layout.loading, null);\n\n\n builder.setView(v);\n builder.setCancelable(false);\n\n return builder.create();\n\n }",
"private AlertDialog getDialog(int type) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n if(type == 0){\n final Intent summary = new Intent(this, SummaryActivity.class);\n builder.setMessage(\"Press proceed to see your session summary.\")\n .setTitle(\"Are you done?\");\n // Add the buttons\n builder.setPositiveButton(\"Proceed\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n startActivity(summary);\n finish();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n else if(type == 1){\n builder.setMessage(\"You are about to exit and end this session, no data will be saved.\")\n .setTitle(\"Exit?\");\n // Add the buttons\n builder.setPositiveButton(\"Exit\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n builder.setNegativeButton(\"Continue Running\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n\n\n return builder.create();\n }",
"public PaySuccessDialog create() {\r\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n View layout = inflater.inflate(R.layout.paysucdialog, null);\r\n final PaySuccessDialog dialog = new PaySuccessDialog(context,R.style.Dialog);\r\n ImageView img_success = (ImageView)layout.findViewById(R.id.img_success);\r\n img_success.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}\r\n\t\t\t});\r\n \r\n dialog.setContentView(layout);\r\n return dialog;\r\n }",
"public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}",
"@Override\r\n\tpublic void createPartControl(Composite parent) {\n\t\ttoolkit = new FormToolkit(parent.getDisplay());\r\n\t\t\r\n\t\t/*\r\n\t\t * Create a scrolled form widget, \r\n\t\t */\r\n\t\tscrolledForm = toolkit.createScrolledForm(parent);\r\n\t\tscrolledForm.setFont(new Font(null,\"Times\",18,SWT.BOLD|SWT.ITALIC));\r\n\t\tscrolledForm.setText(\"Simulation Results\");\r\n\t\tscrolledForm.setImage(JQuantPlugin.getImageDescriptor(\"money.png\").createImage());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Make a nice gradient\r\n\t\t */\r\n\t\ttoolkit.decorateFormHeading(scrolledForm.getForm());\r\n\t\t\r\n\t\treadSimulationResults();\r\n\t\tbuildStatSection();\r\n\t\tif(results != null)\r\n\t\t\trefreshSimulationStatistics();\r\n\r\n\t\t\r\n\t}",
"public void run() {\n\t\t\tshowSystemDialog(ResultMsg);\r\n\t\t}",
"private void populateOverallResultsPanel(){\n\t\tmeetingSchedulingService.getBestScheduleTimes(pollId, new AsyncCallback<String>(){\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tMessageBox.alert(\"Error\", \"Server threw an error: \" + caught.getMessage(), null);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\n\t\t\t\tif(result == null){\n\t\t\t\t\tMessageBox.info(\"Results\", \"No responses yet!\", new Listener<MessageBoxEvent>(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleEvent(MessageBoxEvent be) {\n\t\t\t\t\t\t\tif(be.getButtonClicked().getId().equalsIgnoreCase(\"ok\"))\n\t\t\t\t\t\t\t\tInfo.display(\"Hi\", \"Ok button clicked\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tft = new FlexTable();\n\t\t\t\t\n\t\t\t\tpollTrackingInfo = getPollTrackingInfo(result);\n\t\t\t\tint row = ft.getRowCount();\n\t\t\t\t\n\t\t\t\t//set the header of the flextable. \n\t\t\t\tft.setWidget(row, 0, new Label(\"Date-Time\"));\n\t\t\t\tft.getCellFormatter().setHorizontalAlignment(row, 0, HasHorizontalAlignment.ALIGN_CENTER);\n\t\t\t\tft.setWidget(row, 1, new Label(\"Participants Available\"));\n\t\t\t\tft.getColumnFormatter().setWidth(1, \"100px\");\n\t\t\t\tft.getCellFormatter().setHorizontalAlignment(row, 1, HasHorizontalAlignment.ALIGN_CENTER);\n\t\t\t\tft.setWidget(row, 2, new Label(\"When to schedule?\"));\n\t\t\t\tft.getCellFormatter().setHorizontalAlignment(row, 2, HasHorizontalAlignment.ALIGN_CENTER);\n\t\t\t\t\n\t\t\t\tfor(int i = 0 ; i < pollTrackingInfo.length() ; i ++){\n\t\t\t\t\tPollTrackingInfo pti = pollTrackingInfo.get(i);\n\t\t\t\t\t\n\t\t\t\t\tRadio rb = new Radio();\n\t\t\t\t\trb.setId(pti.getDate());\n\t\t\t\t\t\n\t\t\t\t\trg.add(rb);\n\t\t\t\t\t\n\t\t\t\t\tft.setWidget(++row, 0, new Label(pti.getDate()));\n\t\t\t\t\tft.getCellFormatter().setHorizontalAlignment(row, 0, HasHorizontalAlignment.ALIGN_CENTER);\n\t\t\t\t\tft.setWidget(row, 1, new Label(pti.getCount()));\n\t\t\t\t\tft.getCellFormatter().setHorizontalAlignment(row, 1, HasHorizontalAlignment.ALIGN_CENTER);\n\t\t\t\t\tft.setWidget(row, 2, rb);\n\t\t\t\t\tft.getCellFormatter().setHorizontalAlignment(row, 2, HasHorizontalAlignment.ALIGN_CENTER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tft.getRowFormatter().addStyleName(0, \"DateTimeWidgetHeader\");\n\t\t\t\t\n\t\t\t\toverallResultsPanel.add(ft);\n\t\t\t}\n\t\t});\n\t}",
"protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tnum1 = new Text(shell, SWT.BORDER);\n\t\tnum1.setBounds(32, 51, 112, 19);\n\t\t\n\t\tnum2 = new Text(shell, SWT.BORDER);\n\t\tnum2.setBounds(32, 120, 112, 19);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setBounds(32, 31, 92, 14);\n\t\tlblNewLabel.setText(\"First Number:\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(32, 100, 112, 14);\n\t\tlblNewLabel_1.setText(\"Second Number: \");\n\t\t\n\t\tfinal Label answer = new Label(shell, SWT.NONE);\n\t\tanswer.setBounds(35, 204, 60, 14);\n\t\tanswer.setText(\"Answer:\");\n\t\t\n\t\tButton plusButton = new Button(shell, SWT.NONE);\n\t\tplusButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint number1, number2;\n\t\t\t\ttry {\n\t\t\t\t\tnumber1 = Integer.parseInt(num1.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnumber2 = Integer.parseInt(num2.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint ans = number1 + number2;\n\t\t\t\tanswer.setText(\"Answer: \" + ans);\n\t\t\t}\n\t\t});\n\t\tplusButton.setBounds(29, 158, 56, 28);\n\t\tplusButton.setText(\"+\");\n\t\t\n\t\t\n\n\t}",
"private void successDialog() {\n AlertDialog dialog = _dialogFactory.createDialog(this, R.string.completed, R.string.success);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n gotoGameEnd(IGameConstants.GAME_SUCCESS);\n }\n });\n\n dialog.setCancelable(false);\n _dialogActive = true;\n dialog.show();\n }",
"protected void showDialog(final IJobChangeEvent event) {\r\n\t\tDisplay display = Display.getDefault();\r\n\t\tdisplay.asyncExec(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tShell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();\r\n\t\t\t\tswitch (event.getResult().getSeverity()) {\r\n\t\t\t\tcase IStatus.ERROR:\r\n\t\t\t\t\tErrorDialog.openError(shell, \"Code Generation Error\", null, event.getResult());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase IStatus.CANCEL:\r\n\t\t\t\t\tMessageDialog.openInformation(shell, \"Code Generation Canceled\", event.getJob().getName() + \"Code generation canceled!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tMessageDialog.openInformation(shell, \"Code generation finished!\", event.getJob().getName()+\" finished without errors!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}",
"public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }",
"private void disposeDialogAndCreateNewGame() {\r\n resultDialog.dispose();\r\n Utilities.bringWindowToFront(parentFrame);\r\n game.createNewGameState(game.getBoard().getRowLength(), game.getBoard().getColumnLength());\r\n }",
"public interface ResultProgressHandle {\n \n /**\n * Set the current position and total number of steps. Note it is\n * inadvisable to be holding any locks when calling this method, as it\n * may immediately update the GUI using \n * <code>EventQueue.invokeAndWait()</code>.\n * \n * @param currentStep the current step in the progress of computing the\n * result.\n * @param totalSteps the total number of steps. Must be greater than\n * or equal to currentStep.\n */\n public abstract void setProgress (int currentStep, int totalSteps);\n \n /** \n * Set the current position and total number of steps, and description \n * of what the computation is doing. Note it is\n * inadvisable to be holding any locks when calling this method, as it\n * may immediately update the GUI using \n * <code>EventQueue.invokeAndWait()</code>. \n * @param description Text to describe what is being done, which can\n * be displayed in the UI.\n * @param currentStep the current step in the progress of computing the\n * result.\n * @param totalSteps the total number of steps. Must be greater than\n * or equal to currentStep.\n */\n public abstract void setProgress (String description, int currentStep, int totalSteps);\n \n /**\n * Set the status as \"busy\" - a rotating icon will be displayed instead\n * of a percent complete progress bar.\n * \n * Note it is inadvisable to be holding any locks when calling this method, as it\n * may immediately update the GUI using \n * <code>EventQueue.invokeAndWait()</code>. \n * @param description Text to describe what is being done, which can\n * be displayed in the UI.\n */\n public abstract void setBusy (String description);\n \n /**\n * Call this method when the computation is complete, and pass in the \n * final result of the computation. The method doing the computation\n * (<code>DeferredWizardResult.start()</code> or something it \n * called) should exit immediately after calling this method. If the\n * <code>failed()</code> method is called after this method has been\n * called, a runtime exception may be thrown.\n * @param result the Object which was computed, if any.\n */ \n public abstract void finished(Object result);\n /**\n * Call this method if computation fails. The message may be some text\n * describing what went wrong, or null if no description.\n * @param message The text to display to the user. The method \n * doing the computation (<code>DeferredWizardResult.start()</code> or something it \n * called). If the <code>finished()</code> method is called after this\n * method has been called, a runtime exception may be thrown.\n * should exit immediately after calling this method.\n * It is A description of what went wrong, or null.\n * @param canNavigateBack whether or not the Prev button should be \n * enabled.\n */ \n public abstract void failed (String message, boolean canNavigateBack);\n \n /**\n * Add the component to show for the progress display to the instructions panel. \n */\n public abstract void addProgressComponents (Container panel);\n \n /**\n * Returns true if the computation is still running, i.e., if neither finished or failed have been called.\n *\n * @return true if there is no result yet.\n */\n public boolean isRunning();\n}",
"public void ExperimentResults() {\n\t\t/*\n\t\t * Creating a ScreenPresenter. To create other ResultsPresenter, the\n\t\t * better idea is to create a Factory.\n\t\t */\n\t\tResultPresenter presenter = new ScreenPresenter();\n\t\tpresenter.setText(evaluator.evalResults.resultsInText());\n\n\t}",
"private void scoreDialog() {\n JPanel jp = new JPanel();\n \n Box verticalBox = Box.createVerticalBox();\n \n JLabel scoreTitle = new JLabel(\"<html><font size=13><center>Score: \" + challengeModel.getChallenge().getScore().getScorePoints() + \"</center></font></html>\");\n scoreTitle.setAlignmentX(CENTER_ALIGNMENT);\n verticalBox.add(scoreTitle);\n \n Box horizontalBox = Box.createHorizontalBox();\n String scoreResult = \"\" + challengeModel.getChallenge().getScore().getGold() + challengeModel.getChallenge().getScore().getSilver() + challengeModel.getChallenge().getScore().getBronze();\n switch(Integer.parseInt(scoreResult)) {\n case 111: // Gold, Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalGold()));\n case 11: // Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalSilver()));\n case 1: // Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalBronze()));\n break;\n default:\n break;\n }\n \n verticalBox.add(horizontalBox);\n \n jp.add(verticalBox);\n \n int value = JOptionPane.showOptionDialog(null, jp, \"Fim do desafio\", JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, new String[] {\"Novo Desafio\"}, 1);\n \n hideAnswerResult(false);\n \n if (value == 0)\n challengeModel.newGame();\n }",
"public void dialog_returnSheet() {\n final Dialog dialog = new Dialog(ReportActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_return_sheet);\n dialog.getWindow().setBackgroundDrawable(getResources().getDrawable(R.drawable.transparent));\n\n TextView tv_returnDialog = dialog.findViewById(R.id.tv_returnDialog);\n tv_returnDialog.setText(return_text);\n\n DataBaseHandler dataBaseHandler = new DataBaseHandler(ReportActivity.this);\n ArrayList<ReturnSheet> preReturnSheetList = new ArrayList<>();\n preReturnSheetList = dataBaseHandler.getAllReturnSheet();\n\n TextView tv_Title = dialog.findViewById(R.id.tv_Title);\n if (preReturnSheetList.size() == 0) {\n tv_Title.setText(no_return_dialog);\n } else {\n tv_Title.setText(has_return_dialog);\n }\n\n\n ListView lv_preReturnSheet = dialog.findViewById(R.id.lv_preReturnSheet);\n PreReturnSheetAdapter preEntranceSheetAdapter = new PreReturnSheetAdapter(ReportActivity.this, preReturnSheetList, dialog);\n lv_preReturnSheet.setAdapter(preEntranceSheetAdapter);\n\n Button bt_AddReturnSheet = dialog.findViewById(R.id.bt_AddReturnSheet);\n bt_AddReturnSheet.setText(add_new_return_process);\n bt_AddReturnSheet.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n dialog_AddReturnSheet();\n dialog.dismiss();\n dialog.cancel();\n }\n });\n\n dialog.setCancelable(true);\n dialog.show();\n }",
"private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }",
"@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}",
"private void showResult(TYPE type){\r\n\t\tString brand = \"\";//brand\r\n\t\tString sub = \"\";//sub brand\r\n\t\tString area = \"\";//area\r\n\t\tString cus = \"\";//customer name\r\n\t\tString time = \"\";//time in second level\r\n\t\tKIND kind = null;//profit or shipment \r\n\t\t\r\n\t\tif(item1.getExpanded()){\r\n\t\t\tkind = KIND.SHIPMENT;\r\n\t\t\tbrand = combo_brand_shipment.getText();\r\n\t\t\tsub = combo_sub_shipment.getText();\r\n\t\t\tarea = combo_area_shipment.getText();\r\n\t\t\tcus = combo_cus_shipment.getText();\r\n\t\t}else if(item2.getExpanded()){\r\n\t\t\tkind = KIND.PROFIT;\r\n\t\t\tbrand = combo_brand_profit.getText();\r\n\t\t\tsub = combo_sub_profit.getText();\r\n\t\t\tarea = combo_area_profit.getText();\r\n\t\t\tcus = combo_cus_profit.getText();\r\n\t\t}else{//either item1 & item2 are not expanded\r\n\t\t\t//show a message?\r\n\t\t\tkind = KIND.NONE;\r\n\t\t}\r\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n\t\ttime = formatter.format(new Date());\r\n\t\tfinal Map<String, Object> args = new HashMap<String ,Object>();\r\n\t\targs.put(\"brand\", brand);\r\n\t\targs.put(\"sub_brand\", sub);\r\n\t\targs.put(\"area\", area);\r\n\t\targs.put(\"customer\", cus);\r\n\t\targs.put(\"time\", time);\r\n\t\targs.put(\"kind\", kind.toString());\r\n\t\targs.put(\"type\", type.toString());\r\n\t\t//call engine to get the data\t\r\n\t\t\r\n\t\tProgressMonitorDialog progressDialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());\r\n\t\tIRunnableWithProgress runnable = new IRunnableWithProgress() { \r\n\t\t public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { \r\n\t\t \t\r\n\t\t Display.getDefault().asyncExec(new Runnable() { \r\n\t\t public void run() { \r\n\t\t monitor.beginTask(\"正在进行更新,请勿关闭系统...\", 100); \r\n\t\t \r\n\t\t monitor.worked(25); \r\n\t monitor.subTask(\"收集数据\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tro.getMap().clear();\r\n\t\t\t\t\tro=statistic.startAnalyzing(args, monitor);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\t\t\tmbox.open();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tmonitor.worked(100); \r\n\t monitor.subTask(\"分析完成\");\r\n\t \r\n\t\t monitor.done();\r\n\t\t }\r\n\t\t \t });\r\n\t\t } \r\n\t\t}; \r\n\t\t \r\n\t\ttry { \r\n\t\t progressDialog.run(true,/*是否开辟另外一个线程*/ \r\n\t\t false,/*是否可执行取消操作的线程*/ \r\n\t\t runnable/*线程所执行的具体代码*/ \r\n\t\t ); \r\n\t\t} catch (InvocationTargetException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t} catch (InterruptedException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(ro.getMap().isEmpty())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tPagination page1 = (Pagination) ro.get(\"table1\");\r\n\t\tPagination page2 = (Pagination) ro.get(\"table2\");\r\n\t\tPagination page3 = (Pagination) ro.get(\"table3\");\r\n\t\tList<Object> res1 = new ArrayList<Object>();\r\n\t\tList<Object> res2 = new ArrayList<Object>();\r\n\t\tList<Object> res3 = new ArrayList<Object>();\r\n\t\tif(page1 != null)\r\n\t\t\tres1 = (List<Object>)page1.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres2 = (List<Object>)page2.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres3 = (List<Object>)page3.getItems();\r\n\t\t\r\n\t\tif(res1.size()==0 && res2.size()==0 && res3.size()==0){\r\n\t\t\tMessageBox messageBox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t \tmessageBox.setMessage(\"没有满足查询条件的数据可供分析,请查询其他条件\");\r\n\t \tmessageBox.open();\r\n\t \treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//this if/else can be optimized, since it looks better in this way, leave it\t\t\r\n\t\t//case 1: brand ratio, area ratio, trend\r\n\t\tif(brand.equals(AnalyzerConstants.ALL_BRAND) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t\t\t\t\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \t\t\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\r\n\t\t}\r\n\t\t//case 2: brand ratio, customer ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 3: brand ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 4: sub brand ratio, area ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 5: sub brand ratio, customer ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 6: sub brand ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 7: area ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 8: customer ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 9: trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) & !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//now, just trend, do nothing here\r\n\t\t}\r\n\t\tif(!kind.equals(KIND.NONE)){\r\n\t\t\t//trend, always has the trend graph \t\r\n\t\t\tTrendDataSet ts = new TrendDataSet();\r\n\t\t\tts.setKind(kind);\t\r\n\t\t\tts.setType(type);\r\n\t\t\tTrendComposite tc = new TrendComposite(composite_content, 0, ts, res3); \r\n\t\t\talys.add(tc);\r\n\t\t\tcomposite_content.setLayout(layout_content);\r\n\t\t\tcomposite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t\t\t\r\n\t}",
"private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}",
"void doNew() {\r\n\t\t\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, true);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\tsetTitle(TITLE);\r\n\t\t\tcreatePlanetSurface(dlg.width, dlg.height);\r\n\t\t\trenderer.repaint();\r\n\t\t\tsaveSettings = null;\r\n\t\t\tundoManager.discardAllEdits();\r\n\t\t\tsetUndoRedoMenu();\r\n\t\t}\r\n\t}",
"private JPanel getResultSelectionPanel() {\n\t\tif (resultSelectionPanel == null) {\n\t\t\tjLabel1 = new JLabel();\n\t\t\tjLabel1.setBounds(new java.awt.Rectangle(5, 9, 132, 24));\n\t\t\tjLabel1.setText(PluginServices.getText(this, \"Cobertura_de_salida\")\n\t\t\t\t\t+ \":\");\n\t\t\tresultSelectionPanel = new JPanel();\n\t\t\tresultSelectionPanel.setLayout(null);\n\t\t\tresultSelectionPanel.setBounds(new java.awt.Rectangle(0, 291, 468,\n\t\t\t\t\t41));\n\t\t\tresultSelectionPanel\n\t\t\t\t\t.setBorder(javax.swing.BorderFactory\n\t\t\t\t\t\t\t.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\n\t\t\tresultSelectionPanel.add(getFileNameResultTextField(), null);\n\t\t\tresultSelectionPanel.add(getOpenFileButton(), null);\n\t\t\tresultSelectionPanel.add(jLabel1, null);\n\t\t}\n\t\treturn resultSelectionPanel;\n\t}",
"public void buildGui() {\n\t}",
"protected void createContents() throws Exception {\n\t\tshlGecco = new Shell();\n\t\tshlGecco.setImage(SWTResourceManager.getImage(jdView.class, \"/images/yc.ico\"));\n\t\tshlGecco.setSize(1366, 736);\n\t\tshlGecco.setText(\"gecco爬取京东信息\");\n\t\tshlGecco.setLocation(0, 0);\n\t\tshlGecco.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tSashForm sashForm = new SashForm(shlGecco, SWT.NONE);\n\t\tsashForm.setOrientation(SWT.VERTICAL);\n\n\t\tGroup group = new Group(sashForm, SWT.NONE);\n\t\tgroup.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup.setText(\"爬取查询条件\");\n\t\tgroup.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_2 = new SashForm(group, SWT.NONE);\n\n\t\tGroup group_2 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_2.setText(\"爬取条件\");\n\n\t\tLabel lblip = new Label(group_2, SWT.NONE);\n\t\tlblip.setLocation(34, 27);\n\t\tlblip.setSize(113, 21);\n\t\tlblip.setText(\"输入开始爬取地址:\");\n\n\t\ttxtSearchUrl = new Text(group_2, SWT.BORDER);\n\t\ttxtSearchUrl.setLocation(153, 23);\n\t\ttxtSearchUrl.setSize(243, 23);\n\t\ttxtSearchUrl.setText(\"https://www.jd.com/allSort.aspx\");\n\n\t\tbtnSearch = new Button(group_2, SWT.NONE);\n\t\tbtnSearch.setLocation(408, 23);\n\t\tbtnSearch.setSize(82, 25);\n\n\t\tbtnSearch.setEnabled(false);\n\t\tbtnSearch.setText(\"开始爬取\");\n\n\t\tGroup group_3 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_3.setText(\"查询条件\");\n\n\t\tLabel label_2 = new Label(group_3, SWT.NONE);\n\t\tlabel_2.setLocation(77, 25);\n\t\tlabel_2.setSize(86, 25);\n\t\tlabel_2.setText(\"选择查询条件:\");\n\n\t\tcombo = new Combo(group_3, SWT.NONE);\n\t\tcombo.setLocation(169, 23);\n\t\tcombo.setSize(140, 23);\n\t\tcombo.setItems(new String[] { \"全部\", \"商品总类别\", \"子类别名\", \"类别链接\" });\n\t\t// combo.setText(\"全部\");\n\n\t\tbutton = new Button(group_3, SWT.NONE);\n\t\tbutton.setLocation(524, 23);\n\t\tbutton.setSize(80, 25);\n\t\tbutton.setText(\"点击查询\");\n\t\tbutton.setEnabled(false);\n\n\t\tcombo_1 = new Combo(group_3, SWT.NONE);\n\t\tcombo_1.setEnabled(false);\n\t\tcombo_1.setLocation(332, 23);\n\t\tcombo_1.setSize(170, 23);\n\t\t// combo_1.setItems(new String[] { \"全部\" });\n\t\t// combo_1.setText(\"全部\");\n\t\tsashForm_2.setWeights(new int[] { 562, 779 });\n\t\tGroup group_1 = new Group(sashForm, SWT.NONE);\n\t\tgroup_1.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup_1.setText(\"爬取结果\");\n\t\tgroup_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_1 = new SashForm(group_1, SWT.NONE);\n\n\t\tGroup group_Categorys = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_Categorys.setText(\"商品分组\");\n\t\tgroup_Categorys.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tcategorys = new Table(group_Categorys, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tcategorys.setHeaderVisible(true);\n\t\tcategorys.setLinesVisible(true);\n\n\t\tTableColumn ParentName = new TableColumn(categorys, SWT.NONE);\n\t\tParentName.setWidth(87);\n\t\tParentName.setText(\"商品总类别\");\n\n\t\tTableColumn Title = new TableColumn(categorys, SWT.NONE);\n\t\tTitle.setWidth(87);\n\t\tTitle.setText(\"子类别名\");\n\n\t\tTableColumn Ip = new TableColumn(categorys, SWT.NONE);\n\t\tIp.setWidth(152);\n\t\tIp.setText(\"类别链接\");\n\n\t\tGroup group_ProductBrief = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductBrief.setText(\"商品简要信息列表\");\n\t\tgroup_ProductBrief.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tproductBrief = new Table(group_ProductBrief, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tproductBrief.setLinesVisible(true);\n\t\tproductBrief.setHeaderVisible(true);\n\n\t\tTableColumn Code = new TableColumn(productBrief, SWT.NONE);\n\t\tCode.setWidth(80);\n\t\tCode.setText(\"商品编号\");\n\n\t\tTableColumn Detailurl = new TableColumn(productBrief, SWT.NONE);\n\t\tDetailurl.setWidth(162);\n\t\tDetailurl.setText(\"商品详情链接\");\n\n\t\tTableColumn Preview = new TableColumn(productBrief, SWT.NONE);\n\t\tPreview.setWidth(170);\n\t\tPreview.setText(\"商品图片链接\");\n\n\t\tTableColumn Dtitle = new TableColumn(productBrief, SWT.NONE);\n\t\tDtitle.setWidth(150);\n\t\tDtitle.setText(\"商品标题\");\n\n\t\tGroup group_ProductDetail = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductDetail.setText(\"商品详细信息\");\n\t\tgroup_ProductDetail.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tComposite composite = new Composite(group_ProductDetail, SWT.NONE);\n\n\t\tPDetail = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tPDetail.setLocation(55, 339);\n\t\tPDetail.setSize(360, 220);\n\n\t\tLabel Id = new Label(composite, SWT.NONE);\n\t\tId.setBounds(31, 28, 61, 15);\n\t\tId.setText(\"商品编号:\");\n\n\t\tLabel detail = new Label(composite, SWT.NONE);\n\t\tdetail.setText(\"商品详情:\");\n\t\tdetail.setBounds(31, 311, 61, 15);\n\n\t\tLabel title = new Label(composite, SWT.NONE);\n\t\ttitle.setText(\"商品标题:\");\n\t\ttitle.setBounds(31, 64, 61, 15);\n\n\t\tLabel jdAd = new Label(composite, SWT.NONE);\n\t\tjdAd.setText(\"商品广告:\");\n\t\tjdAd.setBounds(31, 201, 61, 15);\n\n\t\tLabel price = new Label(composite, SWT.NONE);\n\t\tprice.setBounds(31, 108, 61, 15);\n\t\tprice.setText(\"价格:\");\n\n\t\tdcode = new Text(composite, SWT.BORDER);\n\t\tdcode.setEditable(false);\n\t\tdcode.setBounds(98, 25, 217, 21);\n\n\t\tLabel jdprice = new Label(composite, SWT.NONE);\n\t\tjdprice.setBounds(75, 127, 48, 15);\n\t\tjdprice.setText(\"京东价:\");\n\n\t\tLabel srcPrice = new Label(composite, SWT.NONE);\n\t\tsrcPrice.setBounds(75, 166, 48, 15);\n\t\tsrcPrice.setText(\"原售价:\");\n\n\t\tdprice = new Text(composite, SWT.BORDER);\n\t\tdprice.setEditable(false);\n\t\tdprice.setBounds(128, 127, 187, 21);\n\n\t\tdsrcPrice = new Text(composite, SWT.BORDER);\n\t\tdsrcPrice.setEditable(false);\n\t\tdsrcPrice.setBounds(128, 166, 187, 21);\n\n\t\tdtitle = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tdtitle.setBounds(98, 62, 217, 42);\n\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setText(\"广告标题:\");\n\t\tlabel.setBounds(62, 233, 61, 15);\n\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setText(\"广告链接:\");\n\t\tlabel_1.setBounds(62, 272, 61, 15);\n\n\t\tadtitle = new Text(composite, SWT.BORDER);\n\t\tadtitle.setEditable(false);\n\t\tadtitle.setBounds(128, 231, 187, 21);\n\n\t\tadUrl = new Text(composite, SWT.BORDER);\n\t\tadUrl.setEditable(false);\n\t\tadUrl.setBounds(128, 270, 187, 21);\n\t\tsashForm_1.setWeights(new int[] { 335, 573, 430 });\n\t\tsashForm.setWeights(new int[] { 85, 586 });\n\n\t\tdoEvent();// 组件的事件操作\n\n\t}",
"protected void createContents() {\n\t\tshlCarbAndRemainder = new Shell(Display.getDefault(), SWT.TITLE|SWT.CLOSE|SWT.BORDER);\n\t\tshlCarbAndRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tshlCarbAndRemainder.setSize(323, 262);\n\t\tshlCarbAndRemainder.setText(\"CARB and Remainder\");\n\t\t\n\t\tGroup grpCarbSetting = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpCarbSetting.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpCarbSetting.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpCarbSetting.setText(\"CARB Setting\");\n\t\t\n\t\tgrpCarbSetting.setBounds(10, 0, 295, 106);\n\t\t\n\t\tLabel lblCARBValue = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblCARBValue.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblCARBValue.setBounds(10, 32, 149, 22);\n\t\tlblCARBValue.setText(\"CARB Value\");\n\t\t\n\t\tLabel lblAuthenticationPIN = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblAuthenticationPIN.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblAuthenticationPIN.setBounds(10, 68, 149, 22);\n\t\tlblAuthenticationPIN.setText(\"Authentication PIN\");\n\t\t\n\t\tSpinner spinnerCARBValue = new Spinner(grpCarbSetting, SWT.BORDER);\n\t\tspinnerCARBValue.setBounds(206, 29, 72, 22);\n\t\t\n\t\ttextAuthenticationPIN = new Text(grpCarbSetting, SWT.BORDER|SWT.PASSWORD);\n\t\ttextAuthenticationPIN.setBounds(206, 65, 72, 21);\n\t\t\t\t\n\t\tGroup grpRemainder = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpRemainder.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpRemainder.setText(\"Remainder\");\n\t\tgrpRemainder.setBounds(10, 112, 296, 106);\n\t\t\n\t\tButton btnInjectBolus = new Button(grpRemainder, SWT.NONE);\n\t\tbtnInjectBolus.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnInjectBolus.setBounds(183, 38, 103, 41);\n\t\tbtnInjectBolus.setText(\"INJECT BOLUS\");\n\t\t\n\t\tButton btnCancel = new Button(grpRemainder, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshlCarbAndRemainder.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setBounds(10, 38, 80, 41);\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tButton btnSnooze = new Button(grpRemainder, SWT.NONE);\n\t\tbtnSnooze.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnSnooze.setBounds(96, 38, 81, 41);\n\t\tbtnSnooze.setText(\"Snooze\");\n\n\t}",
"public abstract void initDialog();",
"private void buildErrorDialog(int status){\n\t\tmainDialog = new JDialog(mainWindow,\"Error!\");\n\t\tmainDialog.getContentPane().removeAll();\n\t\tJPanel p1 = new JPanel (new BorderLayout());\n\t\tJLabel error = new JLabel();\n\t\terror.setFont(new Font(\"TlwgTypewriter\",Font.PLAIN,15));\n\n\t\t//display error msg\n\t\tif (status ==2){\n\t\t\terror.setText(\"<html>Oops! Your roll no doesn't seem to be in the database!</html>\");\n\t\t}\n\t\telse if (status==3){\n\t\t\terror.setText(\"<html>Your seat no is not in range!</html>\");\n\t\t}\n\t\telse if (status ==4){\n\t\t\terror.setText(\"<html>Oops! Someone is already sitting here!</html>\");\n\t\t}\n\t\tp1.add(error, BorderLayout.CENTER);\n\t\tJPanel p2 = new JPanel();\n\t\tp2.setLayout(new BoxLayout(p2,BoxLayout.X_AXIS));\n\n\t\t//button to try login again\n\t\tJButton tryAgain = new JButton(\"Try Again?\");\n\t\t//listener that calls tryLoginAgain method on press\n\t\ttryAgain.addActionListener (new ActionListener(){\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tClientGui.this.tryLoginAgain();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t//abort button to close app\n\t\tJButton abort = new JButton (\"Abort\");\n\t\tabort.addActionListener (new ActionListener(){\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\n\n\t\ttryAgain.setPreferredSize(new Dimension(150,20));\n\t\tabort.setPreferredSize(new Dimension(150,20));\n\n\t\tp2.add(Box.createHorizontalGlue());\n\t\tp2.add(tryAgain);\n\t\tp2.add(Box.createHorizontalGlue());\n\t\tp2.add(abort);\n\t\tp2.add(Box.createHorizontalGlue());\n\n\t\tp1.add(p2, BorderLayout.SOUTH);\n\n\t\t//dialog settings\t\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\n\t}",
"protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(340, 217);\n\t\tshell.setText(\"Benvenuto\");\n\t\tshell.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tFormData fd_composite = new FormData();\n\t\tfd_composite.bottom = new FormAttachment(100, -10);\n\t\tfd_composite.top = new FormAttachment(0, 10);\n\t\tfd_composite.right = new FormAttachment(100, -10);\n\t\tfd_composite.left = new FormAttachment(0, 10);\n\t\tcomposite.setLayoutData(fd_composite);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblUsername = new Label(composite, SWT.NONE);\n\t\tlblUsername.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\ttxtUsername = new Text(composite, SWT.BORDER);\n\t\ttxtUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tfinal String username = txtUsername.getText();\n\t\tSystem.out.println(username);\n\t\t\n\t\tLabel lblPeriodo = new Label(composite, SWT.NONE);\n\t\tlblPeriodo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblPeriodo.setText(\"Periodo\");\n\t\t\n\t\tfinal CCombo combo_1 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_1.setVisibleItemCount(6);\n\t\tcombo_1.setItems(new String[] {\"1 settimana\", \"1 mese\", \"3 mesi\", \"6 mesi\", \"1 anno\", \"Overall\"});\n\t\t\n\t\tLabel lblNumeroCanzoni = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoni.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblNumeroCanzoni.setText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tfinal CCombo combo = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo.setItems(new String[] {\"25\", \"50\"});\n\t\tcombo.setVisibleItemCount(2);\n\t\tcombo.setToolTipText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tLabel lblNumeroCanzoniDa = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoniDa.setText(\"Numero canzoni da consigliare\");\n\t\t\n\t\tfinal CCombo combo_2 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_2.setVisibleItemCount(3);\n\t\tcombo_2.setToolTipText(\"Numero canzoni da consigliare\");\n\t\tcombo_2.setItems(new String[] {\"5\", \"10\", \"20\"});\n\t\t\n\t\tButton btnAvviaRicerca = new Button(composite, SWT.NONE);\n\t\tbtnAvviaRicerca.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfinal String username = txtUsername.getText();\n\t\t\t\tfinal String numSong = combo.getText();\n\t\t\t\tfinal String period = combo_1.getText();\n\t\t\t\tfinal String numConsigli = combo_2.getText();\n\t\t\t\tif(username.isEmpty() || numSong.isEmpty() || period.isEmpty() || numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"si prega di compilare tutti i campi\");\n\t\t\t\t}\n\t\t\t\tif(!username.isEmpty() && !numSong.isEmpty() && !period.isEmpty() && !numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"tutto ok\");\n\t\t\t\t\t\n\t\t\t\t\tFileOutputStream out;\n\t\t\t\t\tPrintStream ps;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout = new FileOutputStream(\"datiutente.txt\");\n\t\t\t\t\t\tps = new PrintStream(out);\n\t\t\t\t\t\tps.println(username);\n\t\t\t\t\t\tps.println(numSong);\n\t\t\t\t\t\tps.println(period);\n\t\t\t\t\t\tps.println(numConsigli);\n\t\t\t\t\t\tps.close();\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\tSystem.err.println(\"Errore nella scrittura del file\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tPrincipaleParteA.main();\n\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t\t\n\t\t});\n\t\tGridData gd_btnAvviaRicerca = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);\n\t\tgd_btnAvviaRicerca.heightHint = 31;\n\t\tbtnAvviaRicerca.setLayoutData(gd_btnAvviaRicerca);\n\t\tbtnAvviaRicerca.setText(\"Avvia Ricerca\");\n\t}",
"private void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tshell.setSize(500, 400);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FormLayout());\r\n\t\t\r\n\t\tSERVER_COUNTRY locale = SERVER_COUNTRY.DE;\r\n\t\tString username = JOptionPane.showInputDialog(\"Username\");\r\n\t\tString password = JOptionPane.showInputDialog(\"Password\");\r\n\t\tBot bot = new Bot(username, password, locale);\r\n\t\t\r\n\t\tGroup grpActions = new Group(shell, SWT.NONE);\r\n\t\tgrpActions.setText(\"Actions\");\r\n\t\tgrpActions.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\r\n\t\tgrpActions.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setLayout(new GridLayout(5, false));\r\n\t\tFormData fd_grpActions = new FormData();\r\n\t\tfd_grpActions.left = new FormAttachment(0, 203);\r\n\t\tfd_grpActions.right = new FormAttachment(100, -10);\r\n\t\tfd_grpActions.top = new FormAttachment(0, 10);\r\n\t\tfd_grpActions.bottom = new FormAttachment(0, 152);\r\n\t\tgrpActions.setLayoutData(fd_grpActions);\r\n\t\t\r\n\t\tConsole = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tFormData fd_Console = new FormData();\r\n\t\tfd_Console.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tfd_Console.right = new FormAttachment(100, -10);\r\n\t\tConsole.setLayoutData(fd_Console);\r\n\r\n\t\t\r\n\t\tButton Feed = new Button(grpActions, SWT.CHECK);\r\n\t\tFeed.setSelection(true);\r\n\t\tFeed.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tfeed = !feed;\r\n\t\t\t\tConsole.append(\"\\nTest\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tFeed.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tFeed.setText(\"Feed\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Drink = new Button(grpActions, SWT.CHECK);\r\n\t\tDrink.setSelection(true);\r\n\t\tDrink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tdrink = !drink;\r\n\t\t\t}\r\n\t\t});\r\n\t\tDrink.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tDrink.setText(\"Drink\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Stroke = new Button(grpActions, SWT.CHECK);\r\n\t\tStroke.setSelection(true);\r\n\t\tStroke.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tstroke = !stroke;\r\n\t\t\t}\r\n\t\t});\r\n\t\tStroke.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tStroke.setText(\"Stroke\");\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_0 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_0.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tlblNewLabel_0.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/feed.png\"));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_1 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/drink.png\"));\r\n\t\tlblNewLabel_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\t\r\n\t\tGroup grpBreeds = new Group(shell, SWT.NONE);\r\n\t\tgrpBreeds.setText(\"Breeds\");\r\n\t\tgrpBreeds.setLayout(new GridLayout(1, false));\r\n\t\t\r\n\t\tFormData fd_grpBreeds = new FormData();\r\n\t\tfd_grpBreeds.top = new FormAttachment(0, 10);\r\n\t\tfd_grpBreeds.bottom = new FormAttachment(100, -10);\r\n\t\tfd_grpBreeds.right = new FormAttachment(0, 180);\r\n\t\tfd_grpBreeds.left = new FormAttachment(0, 10);\r\n\t\tgrpBreeds.setLayoutData(fd_grpBreeds);\r\n\t\t\r\n\t\tButton Defaults = new Button(grpBreeds, SWT.RADIO);\r\n\t\tDefaults.setText(\"Defaults\");\r\n\t\t//END STATIC\r\n\t\t\r\n\t\tbot.account.api.requests.setTimeout(200);\r\n\t\tbot.logger.printlevel = 1;\t\r\n\t\t\r\n\t\tReturn<HashMap<Integer,Breed>> b = bot.getBreeds();\t\t\r\n\t\tif(!b.sucess) {\r\n\t\t\tConsole.append(\"\\nERROR!\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tIterator<Breed> iterator = b.data.values().iterator();\r\n\t\tHashMap<String, java.awt.Button> buttons = new HashMap<String, Button>();\r\n\t\t\r\n\t\twhile(iterator.hasNext()) {\r\n\t\t\tBreed breed = iterator.next();\r\n\t\t\t\r\n\t\t\tString name = breed.name;\r\n\t\t\t\r\n\t\t\tButton btn = new Button(grpBreeds, SWT.RADIO);\r\n\t\t\tbtn.setText(name);\r\n\t\t\t\r\n\t\t\tbuttons.put(name, btn);\r\n\t\t\t\r\n\t\t\t//\tTODO - Für jeden Breed wird ein Button erstellt:\r\n\t\t\t//\tButton [HIER DER BREED NAME] = new Button(grpBreeds, SWT.RADIO); <-- Dass geht nicht so wirklich so\r\n\t\t\t//\tDefaults.setText(\"[BREED NAME]\");\r\n\t\t}\r\n\t\t\r\n\t\t// um ein button mit name <name> zu bekommen: Button whatever = buttons.get(<name>);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tButton btnStartBot = new Button(shell, SWT.NONE);\r\n\t\tfd_Console.top = new FormAttachment(0, 221);\r\n\t\tbtnStartBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.setText(\"Starting bot... \");\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t/*TODO\r\n\t\t\t\tBreed[] breeds = new Breed[b.data.size()];\r\n\t\t\t\t\r\n\t\t\t\tIterator<Breed> br = b.data.values().iterator();\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < b.data.size(); i++) {\r\n\t\t\t\t\tbreeds[i] = br.next();\r\n\t\t\t\t};\r\n\t\t\t\tBreed s = (Breed) JOptionPane.showInputDialog(null, \"Choose breed\", \"breed selector\", JOptionPane.PLAIN_MESSAGE, null, breeds, \"default\");\r\n\t\t\t\tEND TODO*/\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Breed breed, boolean drink, boolean stroke, boolean groom, boolean carrot, boolean mash, boolean suckle, boolean feed, boolean sleep, boolean centreMission, long timeout, Bot bot, Runnable onEnd\r\n\t\t\t\tReturn<BasicBreedTasksAsync> ret = bot.basicBreedTasks(0, drink, stroke, groom, carrot, mash, suckle, feed, sleep, mission, 500, new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"FINISHED!\", \"Bot\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tbot.logout();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(!ret.sucess) {\r\n\t\t\t\t\tConsole.append(\"ERROR\");\r\n\t\t\t\t\tSystem.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tret.data.start();\r\n\t\t\t\t\r\n\t\t\t\t//TODO\r\n\t\t\t\twhile(ret.data.running()) {\r\n\t\t\t\t\tSleeper.sleep(5000);\r\n\t\t\t\t\tif(ret.data.getProgress() == 1)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tConsole.append(\"progress: \" + (ret.data.getProgress() * 100) + \"%\");\r\n\t\t\t\t\tConsole.append(\"ETA: \" + (ret.data.getEta() / 1000) + \"sec.\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStartBot = new FormData();\r\n\t\tfd_btnStartBot.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tbtnStartBot.setLayoutData(fd_btnStartBot);\r\n\t\tbtnStartBot.setText(\"Start Bot\");\r\n\t\t\r\n\t\tButton btnStopBot = new Button(shell, SWT.NONE);\r\n\t\tfd_btnStartBot.top = new FormAttachment(btnStopBot, 0, SWT.TOP);\r\n\t\tbtnStopBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.append(\"Stopping bot...\");\r\n\t\t\t\tbot.logout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStopBot = new FormData();\r\n\t\tfd_btnStopBot.right = new FormAttachment(grpActions, 0, SWT.RIGHT);\r\n\t\tbtnStopBot.setLayoutData(fd_btnStopBot);\r\n\t\tbtnStopBot.setText(\"Stop Bot\");\r\n\t\t\t\r\n\t\t\r\n\t\tProgressBar progressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tfd_Console.bottom = new FormAttachment(progressBar, -6);\r\n\t\tfd_btnStopBot.bottom = new FormAttachment(progressBar, -119);\r\n\t\t\r\n\t\tFormData fd_progressBar = new FormData();\r\n\t\tfd_progressBar.left = new FormAttachment(grpBreeds, 23);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_2 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_2.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/stroke.png\"));\r\n\t\tlblNewLabel_2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton Groom = new Button(grpActions, SWT.CHECK);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tgroom = !groom;\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroom.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tGroom.setText(\"Groom\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Treat = new Button(grpActions, SWT.CHECK);\r\n\t\tTreat.setSelection(true);\r\n\t\tTreat.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tcarrot = !carrot;\r\n\t\t\t}\r\n\t\t});\r\n\t\tTreat.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tTreat.setText(\"Treat\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Mash = new Button(grpActions, SWT.CHECK);\r\n\t\tMash.setSelection(true);\r\n\t\tMash.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmash = !mash;\r\n\t\t\t}\r\n\t\t});\r\n\t\tMash.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tMash.setText(\"Mash\");\r\n\t\t\r\n\t\tLabel lblNewLabel_3 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_3.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/groom.png\"));\r\n\t\tlblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_4 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_4.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/carotte.png\"));\r\n\t\tlblNewLabel_4.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_5 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_5.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/mash.png\"));\r\n\t\tlblNewLabel_5.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton btnSleep = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnSleep.setSelection(true);\r\n\t\tbtnSleep.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tsleep = !sleep;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSleep.setText(\"Sleep\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton btnMission = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnMission.setSelection(true);\r\n\t\tbtnMission.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmission = !mission;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnMission.setText(\"Mission\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\r\n\t}",
"public void fillResultsBox(){\n\n //reset the text box and add the header\n resultList.setText(\"\");\n resultList.append(\"Item \\t Win \\t Loss \\t Tie \\n\");\n\n //generate a list of ranked results for the current user\n generateResultsList();\n\n //for each item in the unranked item list, print the highest ranked item and remove it from the ranked item list\n for (TestItem testItem: testItems){\n printAndDeleteHighestItem();\n }\n }",
"private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}",
"public abstract DialogBox showProgressBox(String message);",
"@Override\n protected Control createDialogArea(Composite parent) {\n Composite container = (Composite) super.createDialogArea(parent);\n container.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n final SashForm hsashForm = new SashForm(container, SWT.HORIZONTAL);\n hsashForm.SASH_WIDTH = 1;\n\n hsashForm.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_GREEN));\n\n // Create the buttons and their event handlers\n tree = new Tree(hsashForm, SWT.V_SCROLL);\n tree.setLinesVisible(true);\n tree.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n AddDetailedInfo2Tables();\n }\n });\n tree.setLayout(new FillLayout());\n\n final Composite tabledock = new Composite(hsashForm, SWT.PUSH);\n tabledock.setLayout(new FillLayout(SWT.VERTICAL));\n\n final SashForm vsashForm = new SashForm(tabledock, SWT.VERTICAL);\n vsashForm.SASH_WIDTH = 1;\n vsashForm.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_GREEN));\n\n ruletable = new Table(vsashForm, SWT.BORDER | SWT.FULL_SELECTION);\n ruletable.setHeaderVisible(true);\n ruletable.setLinesVisible(true);\n\n TableColumn col_entitysubject = new TableColumn(ruletable, SWT.CENTER);\n col_entitysubject.setWidth(87);\n col_entitysubject.setText(Messages.BaselineShowDialog_1);\n\n TableColumn col_relation = new TableColumn(ruletable, SWT.CENTER);\n col_relation.setWidth(88);\n col_relation.setText(Messages.BaselineShowDialog_2);\n\n TableColumn col_quantifier = new TableColumn(ruletable, SWT.CENTER);\n col_quantifier.setWidth(79);\n col_quantifier.setText(Messages.BaselineShowDialog_3);\n\n TableColumn col_number = new TableColumn(ruletable, SWT.CENTER);\n col_number.setWidth(80);\n col_number.setText(Messages.BaselineShowDialog_4);\n\n TableColumn col_entityguest = new TableColumn(ruletable, SWT.CENTER);\n col_entityguest.setWidth(88);\n col_entityguest.setText(Messages.BaselineShowDialog_5);\n\n requirementtable = new Table(vsashForm, SWT.BORDER | SWT.FULL_SELECTION);\n requirementtable.setHeaderVisible(true);\n requirementtable.setLinesVisible(true);\n\n TableColumn tblclmnFormaldesc = new TableColumn(requirementtable, SWT.CENTER);\n tblclmnFormaldesc.setWidth(234);\n tblclmnFormaldesc.setText(Messages.BaselineShowDialog_6);\n\n TableColumn tblclmnRelatedentity = new TableColumn(requirementtable, SWT.CENTER);\n tblclmnRelatedentity.setWidth(195);\n tblclmnRelatedentity.setText(Messages.BaselineShowDialog_7);\n\n\n hsashForm.setWeights(new int[] {2, 2});\n\n if (AddBaseline2Tree(tree, filepath)) {\n if (tree.getItemCount() > 0) {\n tree.getItem(0).setExpanded(true);\n }\n\n tree.pack();\n }\n\n return container;\n }",
"private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }",
"private static void createAndShowGUI() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\n\t\t//Create and set up the window.\n\t\tJFrame frame = new JFrame();\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(500, 500);\n\t\tframe.setLocationRelativeTo(null);\n\n\t\tResultLeftView view = new ResultLeftView();\n\t\tframe.setContentPane(view);\n\t\t//Display the window.\n\t\tframe.setVisible(true);\n\t}",
"protected void outputResultData (FinalReport report)\n {\n trc.show (\"outputResultData\", \"output simulation results\");\n\n\tmodelReport = report;\n\tnew HandleReportDialog (this);\n\n }",
"private void initDialog() {\n }",
"@Override\r\n\tpublic void resultsUpdated() {\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t\tif(mModel.getResults().size() == 1){\r\n\t\t\tmModel.selectPerson(mModel.getResults().get(0));\r\n\t\t\tmController.getProfilePicture(mModel.getResults().get(0).sciper);\r\n\t\t\tmDialog = new PersonDetailsDialog(this, mModel.getSelectedPerson());\r\n\t\t\tmDialog.show();\r\n\t\t}else\r\n\t\t\tstartActivity(new Intent(getApplicationContext(), DirectoryResultListView.class));\r\n\t\t\r\n\t}",
"private static void returnBook() {\n\t\tnew ReturnBookUI(new returnBookControl()).run();\t// method name change ReturnBookControl() to returnBookControl(),RuN to run()\r\n\t}",
"private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}",
"private void displayOnResult(String title, String message, Integer gifImage, int whoWon){\n\n switch (whoWon){\n case 1:{\n TextView textView = (TextView) mScoreGrid.getChildAt(3);\n scorePlayer1++;\n textView.setText(String.valueOf(scorePlayer1));\n break;\n }\n case 2:{\n TextView textView = (TextView) mScoreGrid.getChildAt(4);\n scorePlayer2++;\n textView.setText(String.valueOf(scorePlayer2));\n break;\n }\n case 0:\n default:{\n TextView textView = (TextView) mScoreGrid.getChildAt(5);\n scoreDraw++;\n textView.setText(String.valueOf(scoreDraw));\n break;\n }\n }\n\n new MaterialDialog.Builder(this)\n .setTitle(title)\n .setMessage(message)\n .setCancelable(false)\n .setPositiveButton(\"Okay\", R.drawable.ic_baseline_download_done_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n resetEverything();\n }\n })\n .setNegativeButton(\"Exit\", R.drawable.ic_baseline_cancel_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n finish();\n }\n })\n .setAnimation(gifImage)\n .build().show();\n }",
"public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}",
"private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }",
"private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}",
"private void openCreateAccountDialog()\n {\n testDialog();\n\n }",
"public ParkingTerminalGarageOwnerStartupWindow() {\n this.feeList = new Vector<>();\n this.outputList = new Vector<>();\n outputList.add(consoleO);\n outputList.add(JOptionPaneO);\n feeList.add(minMax);\n feeList.add(minNoMax);\n initComponents();\n\n }",
"private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog.show();\n\t\t}",
"protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(44, 47, 90, 24);\r\n\t\tlabel.setText(\"充值金额:\");\r\n\t\t\r\n\t\ttext_balance = new Text(shell, SWT.BORDER);\r\n\t\ttext_balance.setBounds(156, 47, 198, 30);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\t//确认充值\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tString balance=text_balance.getText().trim();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint i=dao.add(balance);\r\n\t\t\t\t\tif(i>0){\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"成功提示\", \"充值成功\");\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"错误提示\", \"所充值不能为零\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException 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}\r\n\t\t});\r\n\t\tbutton.setBounds(140, 131, 114, 34);\r\n\t\tbutton.setText(\"确认充值\");\r\n\r\n\t}",
"private JLabel createResultLabel() {\r\n JLabel resultLabel = new JLabel(\"Result\");\r\n resultLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n resultLabel.setBorder(new EmptyBorder(8, 8, 8, 8));\r\n setResultLabelText(resultLabel);\r\n resultLabel.setFont(new Font(null, Font.BOLD, 30));\r\n return resultLabel;\r\n }",
"void successUiUpdater();",
"public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the dialog */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n DialogUsuarioView dialog = new DialogUsuarioView(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n } catch (DAOException ex) {\n Logger.getLogger(DialogUsuarioView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n }",
"public void finalRequest() {\n if (!isSaved) {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n isFinish = true;\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n addToTemplates();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n getActivity().finish();\n }\n }, mTitle, mMessageFinal, mTitleButtonOneFinal, mTitleButtonTwoFinal);\n mDialogInfoWithTwoButtons.getDialog().show();\n } else {\n getActivity().finish();\n }\n }",
"public void done() \r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tif (ok) {\r\n\t\t\t\t\t//resultsTabbedPanel.setEntryPointsData(entryPointsTable);\r\n\t\t\t\t\t// Actualizo la tabla de estadisticas globales\r\n\t\t\t\t\tcreateGlobalStatsTable(0); // XXX TODO\r\n\r\n\t\t\t\t\tregenStatsTree();\r\n\r\n\t\t\t\t\tvalidateTree();\r\n\r\n\r\n\t\t\t\t\ttimeRange.enable();\r\n\r\n\t\t\t\t\tif (!isCached) {\r\n\t\t\t\t\t\ttimeRange.setLimits(minTs, maxTs);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tCommonForms.showError(parent, \"Error showing data\", e);\r\n\t\t\t} finally {\r\n\t\t\t\tdialog.dispose();\r\n\t\t\t\tparent.setEnabled(true);\r\n\t\t\t\tmainPanel.remove(1); \r\n\t\t\t\tJScrollPane treePanelScroll = new JScrollPane();\r\n\t\t\t\tmainPanel.add(treePanelScroll);\r\n\t\t\t\tMainFrame.this.toFront();\r\n\t\t\t}\r\n\t\t}",
"private void createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }",
"@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}",
"public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }",
"public void genNewRep() {\r\n\r\n /** can possibly delete conditional? or complete this to make a secondary safeguard against error **/\r\n if (tx_cb.getValue() == null || filter.getValue() == null || switchPatch.getValue() == null) {\r\n //conditional to tell if enough information was provide to construct a rf diagram/report\r\n return;\r\n } else{\r\n try {/** when genRep button is clicked, a event occurs and opens a new window, if unable to open, a error is caught **/\r\n\r\n /** get needed product ID's (PID) **/\r\n getSwPID();\r\n getFilterPID();\r\n getPaPID();\r\n getSwitchPID();\r\n\r\n /** get selected values to pass to new window **/\r\n selectedSWDescription = (String)mainExciterSW.getValue();\r\n selectedFilterDescription = (String)filter.getValue();\r\n selectedPADescription = (String)paModules.getValue();\r\n txSelection = (String)tx_cb.getValue();\r\n txSelectionCabinets = cabinets;\r\n if(auxAntFeed.getValue() == null)\r\n auxAntFeedSelection = \"No Aux Antenna\";\r\n else\r\n auxAntFeedSelection = (String)auxAntFeed.getValue();\r\n\r\n\r\n /** load a new scene **/\r\n FXMLLoader fxmlLoader = new FXMLLoader();\r\n fxmlLoader.setLocation(getClass().getResource(\"repStage.fxml\"));\r\n Scene scene = new Scene(fxmlLoader.load(), 1500, 1000);\r\n stage.setTitle(\"Generated report\");\r\n stage.setScene(scene);\r\n stage.setMaximized(true);\r\n stage.show();\r\n } catch (IOException e) {/** catch error opening window **/\r\n Logger logger = Logger.getLogger(getClass().getName());\r\n logger.log(Level.SEVERE, \"Failed to create generate report.\", e);\r\n }\r\n /** displays and opens new window when proper input is detected for all cases **/\r\n return;\r\n }\r\n }",
"@Override\r\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\r\n\t\tGridData dGrid = new GridData();\r\n\t\tdGrid.horizontalSpan = 180;\r\n\t\tdGrid.horizontalAlignment = GridData.FILL;\r\n\t\tcontainer.setLayoutData(dGrid);\r\n\t\t\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tString labelText = \"Most of the features for SimplifIDE require knowledge of the project structure.\\r\\n\";\r\n\t\tlabelText += \"Currently you are editting a file outside of the project where many features will not work properly.\\r\\n\";\r\n\t\tlabelText += \"Instructions for setting up your project can be found at http://simplifide.com/html2/project_structure/simplifide_structure.htm, or\\r\\n\";\r\n\t\tlabelText += \"for a simple project only containing rtl files at http://simplifide.com/html2/getting_started/simple_suite.htm.\\r\\n\";\r\n\t\tnameLabel.setText(labelText);\r\n\t\t\r\n\t\tthis.ONESHOT = true;\r\n\t\t\r\n\t\treturn container;\r\n\t}",
"private void showSummary() {\n\n // region Gerando a informação que será impressa na caixa de dialogo\n int _quantidadeTotal = 0;\n int _quantidadeOfertada = 0;\n double _valorTotal = 0;\n\n _quantidadeTotal = _lstClienteMix.size();\n\n for (tpClienteMix _tp : _lstClienteMix) {\n if (_tp.EhItemConfirmado == 1) {\n _quantidadeOfertada += 1;\n _valorTotal += (_tp.PedidoQuantidade * _tp.TabelaPrecoProduto.Preco);\n }\n }\n // endregion\n\n // region Inflando o layout customizado para a janela do resumo\n\n // region inflando o layout\n LayoutInflater _inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View _v = (View) _inflater.inflate(R.layout.dialog_cliente_mix_resumo, null);\n // endregion\n\n // region Imprimindo a quantidade de itens selecionados para compra\n TextView _txtQuantidade = (TextView) _v.findViewById(R.id.txtQuantidade);\n _txtQuantidade.setText(String.valueOf(_quantidadeOfertada));\n // endregion\n\n // region Imprimindo o valor total da compra\n TextView _txtValorTotal = (TextView) _v.findViewById(R.id.txtValorTotal);\n _txtValorTotal.setText(MSVUtil.doubleToText(\"R$\", _valorTotal));\n // endregion\n\n // region Montando o grafico de itens ofertados\n LinearLayout _llyQuantidadeTotal = (LinearLayout) _v.findViewById(R.id.llyQuantidadeTotal);\n LinearLayout _llyQuantidadeOfertada = (LinearLayout) _v.findViewById(R.id.llyQuantidadeOfertada);\n\n _llyQuantidadeTotal.getLayoutParams().width = 400;\n _llyQuantidadeOfertada.requestLayout();\n\n _llyQuantidadeOfertada.getLayoutParams().width = (int) ((400 * _quantidadeOfertada) / _quantidadeTotal);\n _llyQuantidadeOfertada.requestLayout();\n // endregion\n\n // region Imprimindo a quantidade de itens ofertados dentro do total de itens do mix\n TextView _txtQuantidadeOfertada = (TextView) _v.findViewById(R.id.txtQuantidadeOfertada);\n _txtQuantidadeOfertada.setText(String.valueOf(_quantidadeOfertada) + \" de \" + String.valueOf(_quantidadeTotal));\n // endregion\n\n // endregion\n\n // region Montando a janela de dialogo\n final AlertDialog.Builder _builder = new AlertDialog.Builder(ClienteMixActivity.this);\n\n _builder.setView(_v);\n _builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // não faz nada\n }\n });\n\n AlertDialog _dialog = _builder.create();\n _dialog.show();\n // endregion\n }"
]
| [
"0.6660411",
"0.6461031",
"0.64475083",
"0.6433866",
"0.6379929",
"0.6321857",
"0.6252792",
"0.6178243",
"0.6167914",
"0.61600375",
"0.61384034",
"0.61282295",
"0.61169845",
"0.6106862",
"0.6092153",
"0.605099",
"0.6045255",
"0.60324204",
"0.6030824",
"0.60099655",
"0.60061395",
"0.600267",
"0.59645325",
"0.59616405",
"0.5959385",
"0.59544533",
"0.5936173",
"0.5923916",
"0.59199786",
"0.5881278",
"0.5851942",
"0.5842218",
"0.5818387",
"0.580537",
"0.57902014",
"0.576636",
"0.57640547",
"0.57569414",
"0.57487184",
"0.574236",
"0.5740237",
"0.57257557",
"0.5724319",
"0.5721892",
"0.5719586",
"0.5707856",
"0.57063425",
"0.5705891",
"0.5701805",
"0.56981254",
"0.5677892",
"0.5673424",
"0.5671393",
"0.566517",
"0.5661799",
"0.56552017",
"0.5647469",
"0.56473863",
"0.5643277",
"0.56407857",
"0.5632577",
"0.5621346",
"0.5619997",
"0.5619471",
"0.56188065",
"0.5613393",
"0.56072235",
"0.5606904",
"0.5606305",
"0.55965716",
"0.55959564",
"0.5592272",
"0.55747634",
"0.5574594",
"0.55655193",
"0.55593395",
"0.55566",
"0.55451804",
"0.5543307",
"0.5543101",
"0.5539535",
"0.5535373",
"0.5526359",
"0.552558",
"0.55223393",
"0.55195737",
"0.55188423",
"0.5514143",
"0.5513775",
"0.5511167",
"0.5509818",
"0.550781",
"0.5504247",
"0.5498612",
"0.5494314",
"0.54896414",
"0.5488011",
"0.54864323",
"0.5485263",
"0.5484021"
]
| 0.7696699 | 0 |
Create a text label with the result of the game | private JLabel createResultLabel() {
JLabel resultLabel = new JLabel("Result");
resultLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
resultLabel.setBorder(new EmptyBorder(8, 8, 8, 8));
setResultLabelText(resultLabel);
resultLabel.setFont(new Font(null, Font.BOLD, 30));
return resultLabel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Label createGameOverLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"GAME OVER\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(4f*scale,4f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.80f);\n return text;\n }",
"private void setResultLabelText(JLabel resultLabel) {\r\n if (result == Occupant.NONE) { // If the result was a tie\r\n resultLabel.setText(\"Tie! No winners!\");\r\n } else { \r\n resultLabel.setText(result.toString() + \" has won this round!\");\r\n }\r\n }",
"private Label createScoreLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"Score:\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(2f*scale,2f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.70f);\n return text;\n }",
"private Label createScoreFloatLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"\"+Math.round(playerInput.gameScore),textStyle);\n text.setFontScale(2f*scale,2f*scale);\n text.setAlignment(Align.center);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.60f);\n return text;\n }",
"private void showResult() {\n if (Utils.isKitkat()) TransitionManager.beginDelayedTransition(llBody);\n if (tvResult != null)\n flSceneFrame.removeView(tvResult);\n tvResult = new TextView(this);\n tvResult.setBackgroundColor(getResources().getColor(R.color.colorRedTranslucent));\n tvResult.setTextColor(getResources().getColor(android.R.color.white));\n tvResult.setText(selectedAnswer.getText());\n tvResult.setPadding(4, 4, 4, 4);\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.setMargins(utils.getQuadrantBasedX(ivScene, selectedAnswer.getRelativeCoordinateX()), utils.getQuadrantBasedY(ivScene, selectedAnswer.getRelativeCoordinateY()), 0, 0);\n flSceneFrame.addView(tvResult, params);\n btNext.setVisibility(View.VISIBLE);\n }",
"public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }",
"private JLabel createButtonDescription() {\r\n JLabel buttonDescription = new JLabel(\"Result\");\r\n buttonDescription.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n buttonDescription.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n buttonDescription.setText(\"Play again?\");\r\n buttonDescription.setFont(new Font(null, Font.PLAIN, 20));\r\n return buttonDescription;\r\n }",
"public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }",
"private void generate() {\n\t\t_layout=new BorderPane();\n\t\t_winnings=_gController.getWinnings();\t\t\t\t\t\n\t\t\n\t\tLabel gameOver = new Label(\"Game Over\");\n\t\tgameOver.setTextFill(Color.WHITE);\n\t\tgameOver.setFont(new Font(40));\n\t\t\n\t\tLabel finalScore = new Label(\"Your final score is: $\"+_winnings);\n\t\tfinalScore.setTextFill(Color.WHITE);\n\t\t\n\t\tLabel rewardText = new Label(\"Congratulations! You have earned the title of \");\t\t\t\n\t\tString url=System.getProperty(\"user.dir\")+\"/images/\";\n\t\tif (_winnings < 3000) {\n\t\t\trewardText.setText(rewardText.getText()+\"Wonderful Weta!\");\n\t\t\turl=url+\"weta.png\";\n\t\t} else if (_winnings < 6000) {\n\t\t\trewardText.setText(rewardText.getText()+\"Knowledgeable Kiwi!\");\n\t\t\turl=url+\"kiwi.png\";\n\t\t} else if (_winnings < 9000) {\n\t\t\trewardText.setText(rewardText.getText()+\"Brilliant Bellbird!\");\n\t\t\turl=url+\"bellbird.png\";\n\t\t} else if (_winnings < 12000) {\n\t\t\trewardText.setText(rewardText.getText()+\"Fantastic Fantail!\");\n\t\t\turl=url+\"fantail.png\";\n\t\t} else {\n\t\t\trewardText.setText(rewardText.getText()+\"Talented Tuatara!\");\n\t\t\turl=url+\"tuatara.png\";\n\t\t}\t\n\t\t\n\t\tLabel img = new Label();\n\t\timg.setGraphic(new ImageView(new Image(new File(url).toURI().toString(),300,0,true,false)));\n\t\t\n\t\tLabel captionText= new Label();\n\t\tif (_winnings < 3000) {\n\t\t\tcaptionText.setText(\"Earn $3000 next time to earn a higher title\");\n\t\t} else if (_winnings < 6000) {\n\t\t\tcaptionText.setText(\"Earn $6000 next time to earn a higher title\");\n\t\t} else if (_winnings < 9000) {\n\t\t\tcaptionText.setText(\"Earn $9000 next time to earn a higher title\");\n\t\t} else if (_winnings < 12000) {\n\t\t\tcaptionText.setText(\"Earn $12000 next time to earn a higher title\");\n\t\t} else {\n\t\t\tcaptionText.setText(\"Nice! You have earned the highest title\");\n\t\t}\t\n\t\t\n\t\tLabel prompt = new Label(\"Enter your name below\");\n\t\tVBox.setMargin(prompt, new Insets(10,10,0,10));\n\t\t\n\t\tTextField nameField = new TextField();\n\t\tnameField.setPromptText(\"Enter your name here\");\n\t\tnameField.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t_gController.addNZScore(nameField.getText(), _winnings);\n\t\t\t\t_gController.showLeaderboardScreen();\n\t\t\t}});\n\t\t\n\t\tButton btnContinue = new Button(\"Enter\");\n\t\tbtnContinue.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t_gController.addNZScore(nameField.getText(), _winnings);\n\t\t\t\t_gController.showLeaderboardScreen();\n\t\t\t}\n\t\t});\t\t\n\t\tHBox userInput = new HBox(5);\n\t\tuserInput.setAlignment(Pos.CENTER);\n\t\tuserInput.getChildren().addAll(nameField,btnContinue);\n\t\tVBox.setMargin(userInput, new Insets(5,10,10,10));\n\t\t\n\t\tVBox gameInfo = new VBox();\n\t\tgameInfo.setAlignment(Pos.CENTER);\n\t\tgameInfo.getChildren().addAll(gameOver,finalScore,rewardText,img,captionText,prompt,userInput);\t\t\n\t\t_layout.setCenter(gameInfo);\n\t\t\n\t\t_gController.newGame();\n\t}",
"public void createLabels()\n {\n title = new JLabel(\"Game Over\");\n title.setForeground(Color.RED);\n title.setFont(new Font(title.getFont().getName(), Font.PLAIN, 42));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n roundLabel = new JLabel(\"CPU was infected on round \"+roundLost);\n roundLabel.setForeground(Color.RED);\n roundLabel.setFont(new Font(title.getFont().getName(), Font.PLAIN, 18));\n roundLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n }",
"public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }",
"private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }",
"private void setLabelText() {\n\t\tthis.addSpelers();\n\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\tString[] params1 = { spelerid };\n\t\t\tString query = \"SELECT COUNT(idontwikkelingskaart) FROM spelerontwikkelingskaart WHERE idspeler = ?\";\n\t\t\tResultSet result = dc.select(query, params1);\n\t\t\ttry {\n\t\t\t\tif (result.next()) {\n\t\t\t\t\tamountOfCards = result.getInt(1);\n\t\t\t\t\tcards.add(amountOfCards);\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t// Second part, getting playername and filling in their amount of cards\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\ttry {\n\n\t\t\t\tString query = \"SELECT username FROM speler WHERE idspel = ? AND idspeler = ?\";\n\t\t\t\tString idspelString = Integer.toString(idspel);\n\t\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\t\tString[] params2 = { idspelString, spelerid };\n\t\t\t\tResultSet result2;\n\t\t\t\tresult2 = dc.select(query, params2);\n\t\t\t\twhile (result2.next()) {\n\t\t\t\t\tif (amountOfCards == 1) {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" card.\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" cards.\";\n\t\t\t\t\t}\n\t\t\t\t\tlabels.get(i).setText(text);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }",
"public void display_game_start_text() {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/30);\n fill(255);\n text(\"Get Ready!\", displayW/2, displayH/2);\n\n mySound.play_opening_song();\n\n isKeyInputAllowed = false;\n }",
"private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }",
"void drawLabel(){\n FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal(\"Rubik-Regular.ttf\"));\n FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();\n parameter.size = 25;\n parameter.color = Color.BLACK;\n BitmapFont font2 = generator.generateFont(parameter);\n\n font2.getData().setScale(FONT_SCALE);\n\n font2.draw(game.getBatch(), \"Please insert the IP Address\\n you see on you partner's screen\", 50, 600);\n }",
"@Override\n public String getText(SwccgGame game) {\n return \"Calculating sabacc total\";\n }",
"private void displayOnResult(String title, String message, Integer gifImage, int whoWon){\n\n switch (whoWon){\n case 1:{\n TextView textView = (TextView) mScoreGrid.getChildAt(3);\n scorePlayer1++;\n textView.setText(String.valueOf(scorePlayer1));\n break;\n }\n case 2:{\n TextView textView = (TextView) mScoreGrid.getChildAt(4);\n scorePlayer2++;\n textView.setText(String.valueOf(scorePlayer2));\n break;\n }\n case 0:\n default:{\n TextView textView = (TextView) mScoreGrid.getChildAt(5);\n scoreDraw++;\n textView.setText(String.valueOf(scoreDraw));\n break;\n }\n }\n\n new MaterialDialog.Builder(this)\n .setTitle(title)\n .setMessage(message)\n .setCancelable(false)\n .setPositiveButton(\"Okay\", R.drawable.ic_baseline_download_done_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n resetEverything();\n }\n })\n .setNegativeButton(\"Exit\", R.drawable.ic_baseline_cancel_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n finish();\n }\n })\n .setAnimation(gifImage)\n .build().show();\n }",
"private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }",
"private void gameWonDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_won), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }",
"private Label getScoreLabel(final int score){\n\t\tfinal BitmapFontData bitmapFontData = new BitmapFontData(Gdx.files.internal(FontConstants.LARGE_FONT_FILE), false);\n\n\t\tArray<TextureRegion> textureRegions = new Array<TextureRegion>(false, 2);\n\t\ttextureRegions.add(new TextureRegion(new Texture(Gdx.files.internal(FontConstants.LARGE_FONT_IMAGE_1), false)));\n\t\ttextureRegions.add(new TextureRegion(new Texture(Gdx.files.internal(FontConstants.LARGE_FONT_IMAGE_2), false)));\n\t\t\n\t\treturn new Label(Integer.toString(score), new Label.LabelStyle( new BitmapFont(bitmapFontData, textureRegions, true), TEXT_COLOR ));\n\t}",
"public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }",
"public void calculateScore(){\n\n score.setText(Integer.toString(80));\n\n\n }",
"public void showInstructions() {\n \tcreateLabel(myResources.getString(\"whatgame\"), 1, 1, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"rightkey\"), 1, 2, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"esckey\"), 1, 3, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"buttons\"), 1, 4, NORMAL_FONT);\n }",
"public void screenText(Canvas canvas){\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setTextSize(30);\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n canvas.drawText(\"Score: \"+ (newPlayer.getScore()), 10, height-10, paint);\n canvas.drawText(\"Best Score: \"+ getRecord(), width-215, height-10, paint);\n canvas.drawText(\"Level: \" + level, 10, height-550, paint);\n\n //If the game is reset will run a seperate screen text\n if (!newPlayer.getRunning()&&gamenew&&reset){\n Paint newPaint = new Paint();\n newPaint.setTextSize(40);\n newPaint.setColor(Color.WHITE);\n newPaint.setTypeface(Typeface.create(Typeface.DEFAULT,Typeface.BOLD));\n canvas.drawText(\"Click to start!\", width/2-50, height/2, newPaint);\n\n newPaint.setTextSize(20);\n canvas.drawText(\"Press and hold for the ship to hover up\", width/2-50,height/2+20,newPaint);\n canvas.drawText(\"Release to let the ship go down!\", width/2-50,height/2+40,newPaint);\n }\n\n }",
"private void result(String result) {\n\n Log.d(LOG_TAG, \"result method\");\n setInfo(result + \"\\n НОВАЯ ИГРА\" + \"\\n побед первого игрока =\" + winsOfPlayerOne + \"\\n побед второго игрока:\" + winsOfPlayerTwo);\n enableAllButtons(false);\n startNewGame();\n Toast.makeText(this, \"Игра окончена\", Toast.LENGTH_LONG).show();\n\n }",
"private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }",
"public static void display(String result){\n\t\tresults.setText(result);\n\t}",
"public void showNextMovePrompt() {\n\n if(model.isXTurn()){\n resultLabel.setText(\"X's Turn\");\n }\n else{\n resultLabel.setText(\"O's Turn\");\n }\n }",
"void drawDeath() {\n background(255, 255, 255);\n fill(0);\n textSize(75);\n textAlign(CENTER);\n text(\"You Died!\", 1024, 100);\n text(\"Kills= \"+ playerScore, 1024,200);\n text(\"Restart Program to try again.\", 1024, 300);\n\n}",
"public String getLabelText();",
"public abstract String getGameOverText();",
"public void changeLableText(int playerScore,int computerScore);",
"private void showLabel(String text, Color color) {\n GLabel result = new GLabel(text);\n result.setFont(\"Verdana-60\");\n result.setColor(color);\n result.sendToFront();\n add(result, (getWidth() - result.getWidth()) /2, (getHeight() - result.getHeight()) / 2 );\n pause(FREEZE_TIME);\n remove(result);\n }",
"private void displayCount() {\n\t\tlabel.setText(String.format(\"%2d\", game.getCount()));\n\t}",
"private void showResult(String result) {\n TextView averageText = (TextView) findViewById(R.id.averageText);\n mUnit = getResultUnit();\n mAverageConsumption = result + \" \" + mUnit;\n\n String text = getResourceString(R.string.average) + \" \" + mAverageConsumption;\n averageText.setText(text);\n }",
"public String returnMessage () {\n String msg = getString(R.string.result, score);\n if (score > 7) {\n msg += \"\\n\" + getString(R.string.fabulous);\n }\n else if (score >= 5 && score <= 7) {\n msg += \"\\n\" + getString(R.string.good_job);\n }\n else {\n msg += \"\\n\" + getString(R.string.try_again);\n }\n return msg;\n }",
"public void showSplashScreen(int gameCondition, StatusDisplay statusDisplay){\n String printText = \"\";\n switch (gameCondition){\n case WON_GAME:\n printText = \"You won the game :)\"\n + \"\\n\\n\"\n + \"You had \" + statusDisplay.getLives() + \" lives left\"\n + \"\\n and had a score of \" + statusDisplay.getScore()\n + \"\\n\\n\"\n + \"press ENTER to start over\";\n break;\n case LOST_GAME: // i wanted to put this text as a final static, but i cant because of the level\n printText = \"You lost the game :(\"\n + \"\\n\\n\"\n + \"You reached level \" + statusDisplay.getLevel()\n + \"\\n and had a score of \" + statusDisplay.getScore()\n + \"\\n\\n\"\n + \"press ENTER to start over\";\n break;\n case START_GAME:\n printText = START_TEXT;\n break;\n }\n text.setText(printText);\n text.setY(HEIGHT/2 - text.getBoundsInLocal().getHeight()/2);\n text.setX(WIDTH/2 - text.getBoundsInLocal().getWidth()/2);\n text.setFill(Color.GREEN);\n text.setStroke(Color.GREEN);\n text.setOpacity(1);\n background.setOpacity(1);\n }",
"void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}",
"public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }",
"private Label createAdventureLabel(ClientPlayerAdventureState cpa)\n\t{\n\t\tLabel l;\n\t\tif(cpa.isRealLifeAdventure()) {\n\t\t\tl = new Label(\"[P] \" + cpa.getAdventureDescription(), SkinPicker.getSkinPicker().getCrewSkin());\n\t\t} else {\n\t\t\tl = new Label(cpa.getAdventureDescription(), SkinPicker.getSkinPicker().getCrewSkin());\n\t\t}\n\t\tl.setWrap(true);\n\t if (cpa.getAdventureState() == AdventureStateEnum.COMPLETED)\n\t\t{\n\t\t\tl.setColor(Color.GREEN);\n\t\t}\n\t else if (cpa.getQuestState() == QuestStateEnum.EXPIRED)\n {\n l.setColor(Color.BLACK);\n }\n\t\telse\n\t\t{\n\t\t\tl.setColor(Color.valueOf(blue_hex));\n\t\t}\n\t\treturn l;\n\t}",
"private void printMatch(){\n nameHomelbl.setText(match.getHomeTeam().getName());\n cittaHomelbl.setText(match.getHomeTeam().getCity());\n nameGuestlbl.setText(match.getGuestTeam().getName());\n cittaGuestlbl.setText(match.getGuestTeam().getCity());\n if(match.getPlayed()) {\n pointsHometxt.setText(String.valueOf(match.getPointsHome()));\n pointsGuesttxt.setText(String.valueOf(match.getPointsGuest()));\n } else {\n pointsHometxt.setText(\"-\");\n pointsGuesttxt.setText(\"-\");\n }\n \n try{\n logoGuestlbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getGuestTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n logoHomelbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getHomeTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n \n } catch (IOException ex){\n System.out.println(\"immagine non esistente\");\n JOptionPane.showMessageDialog(null, \"immagine non esistente\");\n }\n }",
"public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }",
"void drawLabel() {\n\t\tfloat gavityValue = (int) (radius * 100);\n\t\tgavityValue /= 100;\n\t\tString label = \"gravityField \" + id + \"\\n gravity: \" + gavityValue;\n\t\tfloat labelWidth = gg.textWidth(label);\n\t\tfloat textHeight = 8;\n\n\t\tgg.pushMatrix();\n\t\tgg.translate(x, y, radius + textHeight * 3);\n\t\t// rotateZ(-rotZ/2);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.fill(0);\n\t\tgg.rect(-labelWidth / 2 - 2, -textHeight - 1.5f, labelWidth + 4,\n\t\t\t\ttextHeight * 2 + 6);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\n\t\tgg.rotateZ(PI);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\t\tgg.popMatrix();\n\n\t}",
"public void displayResult(View view){\n countPoints();\n String quantity;\n String player;\n boolean checked = ((CheckBox) findViewById(R.id.nickname)).isChecked();\n\n if (checked == true) {\n player = \"Anonymous\";\n } else {\n player = ((EditText) findViewById(R.id.name)).getText().toString();\n }\n /*\n method to show toast message with result\n */\n if (points > 1) {\n quantity = \" points!\";\n } else {\n quantity = \" point!\";\n }\n Toast.makeText(FlagQuiz.this, player + \", your score is: \" + points + quantity, Toast.LENGTH_LONG).show();\n }",
"public void fillText(View view){\n if(running==true){\n\n\n latestOp=false;\n for(int i = 0; i<9; i++)\n if(i==win&&idOfViews[i]==view.getId()) {\n score++;\n sec=sec+3;\n latestOp=true;\n }\n\n //Defining the score\n total++;\n scoret.setText(\" \"+score+\" /\"+total);\n\n //Setting the message about the latest one.\n resultT.setText(\"Missed\");\n if(latestOp==true)\n resultT.setText(\"Correct!\");\n\n\n //Calling a new screen\n newScreen();\n }\n\n\n }",
"public void display(int counterMessage) {\n TextView textView = (TextView) findViewById(R.id.pointsValue);\n textView.setText(\"\" + counterMessage);\n }",
"void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }",
"public void updateLabels() {\n\t\tfinal PlayerInfo player = ControllerImpl.getController().getCurrentPlayer();\n\t\tplayerLabel.setText(\"Player:\\n\" + player.getName());\n\t\tcashLabel.setText(\"Cash:\\n\" + player.getMoney());\n\t\tnetWorthLabel.setText(\"Net Worth:\\n\" + player.totalAssets());\n\t\tprisonLabel.setText(player.isInJail() ? \"In jail\" : \"Free\");\n\t}",
"String getLabel();",
"String getLabel();",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"public void showParticipantLabel(String label) {\n setContentView(R.layout.fragment_participant_code);\n\n TextView tv1 = (TextView) findViewById(R.id.participant_code);\n tv1.setText(getResources().getString(R.string.participant_code, label));\n }",
"public void displayForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.score_for_lpool);\n scoreView.setText(String.valueOf(score));\n }",
"private void showGameOver()\n {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //Todo:\n // step 1. get the winner name using game.getWinner()\n // step 2. put the string player.getName()+\" won the game!\" to the string reference called \"result\"\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }\n });\n }",
"public abstract String getLabelText();",
"private void updateTurnLabel()\r\n\t{\r\n\t\tPlayer currPlayer = cantStop.getGameBoard().getCurrentPlayer();\r\n\t\tpTurnLabel.setText( currPlayer.getName() + \"'s turn.\");\r\n\t}",
"public void displayLabel(String message)\n\t{\n\t\tGameplayPanel gameplayPanel = (GameplayPanel) container.getComponent(3);\n\t\tgameplayPanel.setMessage(message);\n\t}",
"java.lang.String getLabel();",
"static void gameMenuDisplayText() {\n System.out.println(\"\\n\" +\n \" _______________________________________________________\\n\" +\n \" | ▄▄▌ ▐ ▄▄▄▄ ▄▄▌ ▄▄ ▌ ▄ ▄▄▄ |\\n\" +\n \" | ██ █▌▐▀▄ ▀██ ▐█ ▌ ██ ▐███▀▄ ▀ |\\n\" +\n \" | ██ ▐█▐▐▐▀▀ ██ ██ ▄▄▄█▀▄▐█ ▌▐▌▐█▐▀▀ ▄ |\\n\" +\n \" | ▐█▌██▐█▐█▄▄▐█▌▐▐███▐█▌ ▐██ ██▌▐█▐█▄▄▌ |\\n\" +\n \" | ▀▀▀▀ ▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀█▄▀▀▀ █ ▀▀▀▀▀▀ |\\n\" +\n \" | |\\n\" +\n \" | Welcome to Stranger Game, the Java Console Game! |\\n\" +\n \" | Please select an option from the choices below: |\\n\" +\n \" | |\\n\" +\n \" | Play the Game [Command: Play] |\\n\" +\n \" | Exit this Program [Command: Quit] |\\n\" +\n \" |_____________________________________________________|\\n\");\n }",
"private void drawScoreText(Canvas canvas) {\n paint.setTextSize(bodyTextSize);\n paint.setTextAlign(Paint.Align.CENTER);\n\n int bodyWidthHighScore = (int) (paint.measureText(\"\" + game.highScore));\n int bodyWidthScore = (int) (paint.measureText(\"\" + game.score));\n\n int textWidthHighScore = Math.max(titleWidthHighScore, bodyWidthHighScore) + textPaddingSize * 2;\n int textWidthScore = Math.max(titleWidthScore, bodyWidthScore) + textPaddingSize * 2;\n\n int textMiddleHighScore = textWidthHighScore / 2;\n int textMiddleScore = textWidthScore / 2;\n\n int eXHighScore = endingX;\n int sXHighScore = eXHighScore - textWidthHighScore;\n\n int eXScore = sXHighScore - textPaddingSize;\n int sXScore = eXScore - textWidthScore;\n\n //Outputting high-scores box\n backgroundRectangle.setBounds(sXHighScore, sYAll, eXHighScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.high_score), sXHighScore + textMiddleHighScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.highScore), sXHighScore + textMiddleHighScore, bodyStartYAll, paint);\n\n\n //Outputting scores box\n backgroundRectangle.setBounds(sXScore, sYAll, eXScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.score), sXScore + textMiddleScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.score), sXScore + textMiddleScore, bodyStartYAll, paint);\n }",
"public void drawGameCompleteScreen() {\r\n PennDraw.clear();\r\n\r\n if (didPlayerWin()) {\r\n PennDraw.text(width / 2, height / 2, \"You Win!\");\r\n } else if (didPlayerLose()) {\r\n PennDraw.text(width / 2, height / 2, \"You have lost...\");\r\n }\r\n\r\n PennDraw.advance();\r\n }",
"public void display(String result);",
"private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }",
"public void displayGameInstructions(){\n // System.out.println(\"============\");\n // System.out.println(\" _ | _ | _ \");\n // System.out.println(\"============\");\n // System.out.println(\" _ | _ | _ \");\n\n }",
"public void updateDiceLabel(int leftResult, int rightResult) {\n\t\tleftDiceResult.setText(String.valueOf(leftResult));\n\t\trightDiceResult.setText(String.valueOf(rightResult));\n\t}",
"private void displayScore(int score) {\n\n String strScore = String.valueOf (score);\n String message = getString (R.string.yourScoreIs) + strScore + getString (R.string.outOf6);\n\n if (score == 0) message += getString (R.string.score_zero);\n\n if (score == 1 || score == 2 || score == 3) message += getString (R.string.score_low);\n\n if (score == 4 || score == 5) message += getString (R.string.score_notBad);\n\n if (score == 6) message += getString (R.string.score_six);\n\n Toast.makeText (getApplicationContext (), message, Toast.LENGTH_LONG).show ();\n\n }",
"private void initialize() {\n frame = new JFrame();\n frame.getContentPane().setBackground(Color.BLACK);\n frame.setBackground(Color.BLACK);\n frame.setResizable(false);\n frame.setBounds(100, 100, 350, 300);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setTitle(\"Final Score\");\n frame.getContentPane().setLayout(null);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n JLabel lblFinalScoreText = new JLabel(\"Final score:\");\n lblFinalScoreText.setHorizontalAlignment(SwingConstants.LEFT);\n lblFinalScoreText.setForeground(Color.WHITE);\n lblFinalScoreText.setFont(new Font(\"Quantico\", Font.BOLD, 18));\n lblFinalScoreText.setBounds(24, 24, 130, 54);\n frame.getContentPane().add(lblFinalScoreText);\n\n JLabel lblFinalScoreCount = new JLabel(\"\");\n lblFinalScoreCount.setFont(new Font(\"Bitstream Vera Sans Mono\", Font.BOLD, 30));\n lblFinalScoreCount.setForeground(Color.WHITE);\n lblFinalScoreCount.setHorizontalAlignment(SwingConstants.LEFT);\n lblFinalScoreCount.setBounds(197, 12, 187, 80);\n frame.getContentPane().add(lblFinalScoreCount);\n lblFinalScoreCount.setText(String.valueOf(engine.getFinalScore()));\n \n JLabel lblShipName = new JLabel(\"Ship's Name:\");\n lblShipName.setFont(new Font(\"Ubuntu Light\", Font.BOLD, 13));\n lblShipName.setForeground(Color.WHITE);\n lblShipName.setBounds(24, 163, 158, 25);\n frame.getContentPane().add(lblShipName);\n \n JLabel lblNumDays = new JLabel(\"Number of days:\");\n lblNumDays.setFont(new Font(\"Ubuntu Light\", Font.BOLD, 13));\n lblNumDays.setForeground(Color.WHITE);\n lblNumDays.setBounds(24, 212, 146, 15);\n frame.getContentPane().add(lblNumDays);\n \n JLabel lblWonGame = new JLabel(\"\");\n lblWonGame.setHorizontalAlignment(SwingConstants.LEFT);\n lblWonGame.setForeground(Color.WHITE);\n lblWonGame.setBounds(24, 88, 314, 43);\n String template = \"<html>\";\n if (engine.hasFoundEnoughPieces()) {\n lblWonGame.setForeground(Color.GREEN);\n \ttemplate += \"You have collected all the ship pieces<br>\";\n \ttemplate += \"Congratulations, you won the game!\";\n }\n else {\n lblWonGame.setForeground(Color.RED);\n \ttemplate += \"You did not collect all the ship pieces<br>\";\n \ttemplate += \"better luck next time!\";\n }\n template += \"</html>\";\n lblWonGame.setText(template);\n frame.getContentPane().add(lblWonGame);\n \n JLabel shipNameDetail = new JLabel(\"\");\n shipNameDetail.setForeground(Color.WHITE);\n shipNameDetail.setBounds(197, 168, 141, 15);\n shipNameDetail.setText(engine.getSpaceshipName());\n frame.getContentPane().add(shipNameDetail);\n \n JLabel days = new JLabel(\"\");\n days.setForeground(Color.WHITE);\n days.setBounds(197, 212, 66, 15);\n days.setText(String.valueOf(engine.getCurrDay() - 1));\n frame.getContentPane().add(days);\n }",
"@Override\n public void onClick(View v) {\n userTurn = 0;\n\n //compScore = compTurn+compScore;\n compTurn=0;\n\n\n\n TextView scores = (TextView) findViewById(R.id.scoreStatement);\n scoreStatementjava = \"User holds. Computer's turn. Your score: \" + userScore + \". Computer score: \" + compScore + \". Your turn score is: \" + userTurn;\n //scoreStatementjava = \"User holds. Computer's turn.\";\n scores.setText(scoreStatementjava);\n\n computerTurn();\n }",
"private void resultsScreen(Stage stage, String[][] leaderboard) {\n\t\t\n\t\t//A HBox is prepared, with an int to determine spacing between the nodes within it later.\n\t\tHBox h = new HBox(30);\n\t\t\n\t\t//A VBox array of length 3 is prepared, as well as a Label array, with three values given\n\t\t//to it immediately. \n\t\tVBox[] v = new VBox[3];\n\t\tLabel[] title = {new Label(\"Name\"), new Label(\"Incorrect Guesses\"), new Label(\"Time\")};\n\t\t\n\t\t//A separate VBox is prepared.\n\t\tVBox v2;\n\t\t\n\t\t//For loop adding all the names from the leaderboard array into one VBox, then\n\t\t//adding all the incorrectGuesses to a second VBox, then adding all the times\n\t\t//to the third VBox. By doing it this way, names and scores are much more better\n\t\t//aligned as columns than if each player and their scores were put into HBoxes.\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tv[i] = new VBox();\n\t\t\tv[i].getChildren().add(title[i]);\n\t\t\t\n\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\tLabel l = new Label(leaderboard[j][i]);\n\t\t\t\tv[i].getChildren().add(l);\n\t\t\t}\n\t\t\th.getChildren().add(v[i]);\n\t\t}\n\t\t\n\t\th.setAlignment(Pos.BASELINE_CENTER);\n\t\t\n\t\t//A label is now created and put into the second VBox, along with the HBox just created.\n\t\t//This results in the statement being placed below the entire leaderboard without issues.\n\t\tLabel endStatement = new Label(\"Press any key to start a new game or escape to exit.\");\n\t\tendStatement.setWrapText(true);\n\t\tendStatement.setPrefWidth(200);\n\t\tendStatement.setMinWidth(200);\n\t\tendStatement.setMaxWidth(200);\n\n\t\tv2 = new VBox(2,h,endStatement);\n\t\tv2.setAlignment(Pos.TOP_CENTER);\n\t\tgroup = new Group(v2);\n\t\t\n\t\tscene = new Scene(group,300,300,Color.LIGHTGREY);\n\t\tstage.setScene(scene);\n\t\tstage.setResizable(false);\n\t\tstage.setTitle(\"Hangman\");\n\t\tstage.show();\n\t\t\n\t\tscene.setOnKeyReleased(new EventHandler<KeyEvent>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void handle(KeyEvent e) {\n\t\t\t\t\n\t\t\t\tif(e.getCode()==KeyCode.ESCAPE) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tclient.close();\n\t\t\t\t\t}catch(IOException ioe) {\n\t\t\t\t\t}\n\t\t\t\t\tstage.close();\n\t\t\t\t}else {\n\t\t\t\t\tstart(stage);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public void display() {\n io.writeLine(\"The correct answer is \" + rightAnswers.get(0));\n }",
"public void addText(String text){\n try{\n FXMLLoader battleLogEntryLoader = new FXMLLoader(getClass().getClassLoader().getResource(\"FXML/BattleLogEntry.fxml\"));\n Label battleLogEntryLabel = battleLogEntryLoader.load();\n battleLogEntryLabel.setText(text);\n if(count % 2 == 0){\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n } else{\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n textSpace.getChildren().add(battleLogEntryLabel);\n count++;\n } catch(Exception e) {\n\n }\n }",
"private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }",
"void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }",
"void displayInfoText(String info) {\n resultWindow.removeAll();\n JLabel label = new JLabel(info);\n label.setFont(resultFont);\n resultWindow.add(label);\n revalidate();\n repaint();\n }",
"public void setScoreText() {\n \tif(numBalls>0 && this.body.size()>0) {\n double x=this.body.get(0).getCenterX()-5;\n \tdouble y=this.body.get(0).getCenterY()+2;\n \t\n \tT.setX(x);\n \tT.setY(y);\n \tT.setText(String.valueOf(numBalls));\n \t}\n \t\n \t\n }",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tRandNum = (int)(Math.random()*100);\r\n\t\t\tresult.setText(Integer.toString(RandNum));\r\n\t\t}",
"private String showText() {\n\t\tString text = \"\";\n\t\ttry {\n\t\t\tString line1 = \"\";\n\t\t\tString line2 = \"\";\n\t\t\tString line3 = \"\";\n\t\t\tfor (LakeTile lake_tile : removed_laketile) {\n\t\t\t\tint i = removed_laketile.indexOf(lake_tile);\n\t\t\t\tPosition pos = removed_position.get(i);\n\t\t\t\tQueue<Color> color_queue = lake_tile.getColorOfFourSides();\n\t\t\t\tArrayList<Color> color_list = new ArrayList<Color>(color_queue);\n\n\t\t\t\tline1 += String.format(\"%12s\", \"\");\n\t\t\t\tline1 += Color.getColorText(color_list.get(0), \" \");\n\n\t\t\t\tline1 += String.format(\"%4s\", \"\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tline2 += String.format(\"%2s\", lake_tile.getIndex());\n\t\t\t\tline2 += \":\";\n\t\t\t\tline2 += String.format(\"%-7s\",\"(\" + pos.getX() + \",\" + pos.getY() + \")\");\n\t\t\t\tline2 += Color.getColorText(color_list.get(3), \" \");\n\t\t\t\tline2 += \" \";\n\t\t\t\tif (lake_tile.isPlatform()) {\n\t\t\t\t\tline2 += \"O\";\n\t\t\t\t} else {\n\t\t\t\t\tline2 += \"X\";\n\t\t\t\t}\n\t\t\t\tline2 += \" \" + Color.getColorText(color_list.get(1), \" \") + \" \";\n\n\t\t\t\tline3 += String.format(\"%12s\", \"\");\n\t\t\t\tline3 += Color.getColorText(color_list.get(2), \" \");\n\t\t\t\tline3 += String.format(\"%4s\", \"\");\n\n\t\t\t}\n\t\t\ttext += line1 + \"\\n\";\n\t\t\ttext += line2 + \"\\n\";\n\t\t\ttext += line3 + \"\\n\";\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\ttext = \"No Data\";\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn text;\n\n\t}",
"@Override\n public void performTrick()\n {\n Random random = new Random();\n int rnd = random.nextInt(2);\n if(rnd == 0)\n {\n setPerformText(\"rolls in the mud\");\n }\n else\n {\n setPerformText(\"runs in circles\");\n }\n System.out.println(getPerformText());\n }",
"private void createStartingLabel() {\n \tcreateLabel(myResources.getString(\"title\"), 1, 0, TITLE_FONT);\n }",
"public void displayMessage()\n{\n // game should continue\n if ( gameStatus == CONTINUE )\n showStatus( \"Roll again.\" );\n\n // game won or lost\n else {\n\n if ( gameStatus == WON )\n showStatus( \"Player wins. \" +\n \"Click Roll Dice to play again.\" );\n else \n showStatus( \"Player loses. \" + \n \"Click Roll Dice to play again.\" );\n \n // next roll is first roll of new game\n firstRoll = true; \n }\n}",
"public void drawText(Canvas canvas) {\n Paint paint = new Paint();\n paint.setColor(Color.rgb(240, 230, 140)); //gold color\n paint.setTextSize(30);\n paint.setTypeface(Typeface.SANS_SERIF);\n\n canvas.drawText(\"SCORE: \" + player.getScore(), WIDTH - 250, HEIGHT - 10, paint); //display player score\n canvas.drawText(\"LEVEL: \" + level, 100, HEIGHT - 10, paint); //display level\n\n if(!player.getPlaying()){ //if player is dead\n paint.setColor(Color.rgb(102, 0, 0));\n paint.setTextSize(50);\n paint.setTypeface(Typeface.DEFAULT_BOLD);\n canvas.drawText(\"OH DEAR, YOU ARE DEAD!\", WIDTH/2 - 320, HEIGHT/2, paint); //print death message\n gameOver();\n }\n }",
"private void showStat() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your won! Congrates!\");\n\t\tSystem.out.println(\"The word is:\");\n\t\tSystem.out.println(\"->\\t\" + this.word.toString().replaceAll(\" \", \"\"));\n\t\tSystem.out.println(\"Your found the word with \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t}",
"@Override\n\tpublic String getLabel() {\n\t\treturn \"Roll Again\";\n\t}",
"@Override\n public void run() {\n result.setText(\"\"+res);\n }",
"public void NextGame(){\n partidaNum ++;\n current = current.getSiguiente();\n ListaDoble partida = (ListaDoble) current.getDato();\n currentTurn = partida.getInicio();\n String turno = (String) currentTurn.getDato();\n String info[] = turno.split(\"#\");\n\n int infoIn = 4;\n for (int i = 0; i < 10; i++, infoIn += 1) {\n label_list[i].setIcon(new ImageIcon(info[infoIn]));\n this.screen.add(label_list[i]);\n }\n HP.setText(\"HP: \"+info[2]);\n action.setText(\"Action: \"+info[1]);\n mana.setText(\"Mana: \"+info[3]);\n game.setText(\"Game \"+String.valueOf(partidaNum)+\", Turn \"+info[0]);\n\n VerifyButtons();\n\n }",
"private void showResults() {\n\n AlertDialog.Builder builder1 = new AlertDialog.Builder(this);\n\n Collections.shuffle(selectedPlayers); // shuffle the players the user has selected\n\n StringBuilder sb = new StringBuilder(); // create a string builder to add numbers in front of the players' names\n for (int i = 0; i < selectedPlayers.size(); i++) {\n sb.append(String.valueOf(i + 1) + \". \" + selectedPlayers.get(i) + \"\\n\");\n }\n builder1.setTitle(\"Player order is\");\n String s = sb.toString();\n s = s.trim();\n builder1.setMessage(s);\n builder1.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }\n });\n gong.stop();\n gong.start();\n builder1.show();\n }",
"public void updateScoreCard(){\n scoreCard.setText(correct+\"/\"+total);\n }",
"private void tutorial(){\n\t\tString msg = \"[Space] = Inicia e pausa o jogo depois de iniciado.\";\n\t\tmsg += \"\\n[Seta esquerda] = Move o paddle para a esquerda.\";\n\t\tmsg += \"\\n[Seta direita] = Move o paddle para a direita.\";\n\t\tmsg += \"\\n[I] = Abre a janela de informaçoes.\";\n\t\tmsg += \"\\n[R] = Reinicia o jogo.\";\n\t\tJOptionPane.showMessageDialog(null, \"\"+msg, \"Informaçoes\", JOptionPane.INFORMATION_MESSAGE);\n\t}",
"private void updateText()\n\t{\n\t\tlong longResult;\t\t//holds the value of result casted to type long\n\t\tif(result % 1 == 0)\n\t\t{\n\t\t\tlongResult = (long)result;\n\t\t\tupdateText += longResult;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdateText += result;\n\t\t}\n\t\tentry.setText (\"\");\n\t\tentry.setText (updateText);\n\t\tupdateText = \"\";\n\t\tentry.grabFocus();\n\t}",
"public void empSlotText(SpriteBatch batch){\n batch.setProjectionMatrix(textCam.combined);\n String text = \"\"+manager.getEmployees()+\"/\"+manager.getEmployeeSlots();\n batch.begin();\n font2.draw(batch,text, 730, 370);\n batch.end();\n }",
"public void addGameOverText(Pane root) throws FileNotFoundException {\n\t\tgameOver=new Text(level.columnX(10)-15,level.rowX(17)+5,\"Game Over\");\n\t\tif(GameLoop.getLevelSelector()==1)\n\t\t\tgameOver=new Text(level.columnX(10),level.rowX(17+1)+5,\"Game Over\");\n\t\tgameOver.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 20));\n\t\tif(Level.getHieght()==720) {\n\t\t\tgameOver=new Text(level.columnX(10)+5,level.rowX(17)+5,\"Game Over\");\n\t\t\tgameOver.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 10));\n\t\t}\n\t\tif(GameLoop.getLevelSelector()==1)\n\t\t\tgameOver.relocate(level.columnX(10)+5, level.rowX(17)+10);\n\t\tgameOver.setFill(Color.RED);\n\t\tgameOver.setVisible(false); //gets visible when the game is over\n\t\troot.getChildren().add(gameOver);\n\t}",
"private void generateLabelPanel() {\n speedLabel = new JLabel(\"\");\n loopbackLabel = new JLabel(\"\");\n playingLabel = new JLabel(\"\");\n\n JPanel labelPanel = new JPanel();\n labelPanel.setLayout(new FlowLayout());\n labelPanel.add(playingLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(speedLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(loopbackLabel);\n mainPanel.add(labelPanel);\n }",
"private void gameOver(Graphics g) {\r\n String msg = \"Game Over!\";\r\n String msgScore = \"Your Score: \"+score;\r\n Font small = new Font(\"Helvetica\", Font.BOLD, 14);\r\n FontMetrics metr = getFontMetrics(small);\r\n //set color of text\r\n g.setColor(Color.white);\r\n //set font to small\r\n g.setFont(small);\r\n //draw string message in the center of the screen\r\n g.drawString(msg, (BRDWIDTH - metr.stringWidth(msg)) / 2, BRDHEIGHT / 2);\r\n g.drawString(msgScore, (BRDWIDTH - metr.stringWidth(msg)) / 2, BRDHEIGHT / 3);\r\n }",
"private void updateTurnInfo(){\n String info = players[blackPlayer] + \" plays Black\";\n turnInfo.setText(info);\n }",
"public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }",
"public java.lang.String getLabel();",
"protected void ifWon(){\n canvas.add(titleBorder);\n canvas.add(titleBox);\n Image wonText = new Image(205, 400, \"124-hw4/BreakoutText/wonText.png\");\n canvas.add(wonText);\n }",
"public void displayPrompt(String text){\n promptWindow.getContentTable().clearChildren();\n Label infoLabel = new Label(text, infoWindow.getSkin(), \"dialog\");\n infoLabel.setWrap(true);\n infoLabel.setAlignment(Align.center);\n promptWindow.getContentTable().add(infoLabel).width(500);\n promptWindow.show(guiStage);\n }"
]
| [
"0.7368282",
"0.72318774",
"0.70725334",
"0.6893042",
"0.68459153",
"0.6797021",
"0.674356",
"0.6690311",
"0.66204",
"0.65981334",
"0.6539938",
"0.64992976",
"0.648629",
"0.64671093",
"0.6459949",
"0.6452541",
"0.64399546",
"0.6413059",
"0.64085686",
"0.63838786",
"0.63608366",
"0.6345443",
"0.63404334",
"0.6279463",
"0.62632316",
"0.62591213",
"0.6239838",
"0.6218132",
"0.6193711",
"0.61866635",
"0.6180418",
"0.6174086",
"0.61731225",
"0.6166069",
"0.61624885",
"0.6155869",
"0.6147834",
"0.6134932",
"0.6131054",
"0.6131036",
"0.61048067",
"0.60914147",
"0.60910475",
"0.6071358",
"0.6063235",
"0.60610646",
"0.60482895",
"0.6046951",
"0.60338753",
"0.6030947",
"0.6002497",
"0.6002497",
"0.6000499",
"0.59964055",
"0.599552",
"0.59890187",
"0.59879875",
"0.5987767",
"0.59818363",
"0.59808505",
"0.5961248",
"0.595871",
"0.5954018",
"0.5937277",
"0.59341234",
"0.59321463",
"0.5929433",
"0.59280574",
"0.59274024",
"0.59247744",
"0.5922072",
"0.59171635",
"0.5915128",
"0.5913437",
"0.5908879",
"0.59018904",
"0.58855796",
"0.58837",
"0.5879984",
"0.5879879",
"0.58746594",
"0.5873319",
"0.58665526",
"0.5865707",
"0.58580905",
"0.5850531",
"0.5844682",
"0.58365476",
"0.5834166",
"0.5818262",
"0.58146036",
"0.58097976",
"0.5805913",
"0.5798877",
"0.57946527",
"0.57886887",
"0.57759446",
"0.5774071",
"0.5772757",
"0.577207"
]
| 0.7304142 | 1 |
Set the result label text according to the Occupant result | private void setResultLabelText(JLabel resultLabel) {
if (result == Occupant.NONE) { // If the result was a tie
resultLabel.setText("Tie! No winners!");
} else {
resultLabel.setText(result.toString() + " has won this round!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSearchResultLabel(String resultLabel){ searchResultLabel.setText(resultLabel);}",
"private JLabel createResultLabel() {\r\n JLabel resultLabel = new JLabel(\"Result\");\r\n resultLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n resultLabel.setBorder(new EmptyBorder(8, 8, 8, 8));\r\n setResultLabelText(resultLabel);\r\n resultLabel.setFont(new Font(null, Font.BOLD, 30));\r\n return resultLabel;\r\n }",
"public static void display(String result){\n\t\tresults.setText(result);\n\t}",
"public AggregateLabel(Result result) {\n\t\tsuper();\n\t\tthis._result = result;\n\t}",
"private void setLabelText() {\n\t\tthis.addSpelers();\n\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\tString[] params1 = { spelerid };\n\t\t\tString query = \"SELECT COUNT(idontwikkelingskaart) FROM spelerontwikkelingskaart WHERE idspeler = ?\";\n\t\t\tResultSet result = dc.select(query, params1);\n\t\t\ttry {\n\t\t\t\tif (result.next()) {\n\t\t\t\t\tamountOfCards = result.getInt(1);\n\t\t\t\t\tcards.add(amountOfCards);\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t// Second part, getting playername and filling in their amount of cards\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\ttry {\n\n\t\t\t\tString query = \"SELECT username FROM speler WHERE idspel = ? AND idspeler = ?\";\n\t\t\t\tString idspelString = Integer.toString(idspel);\n\t\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\t\tString[] params2 = { idspelString, spelerid };\n\t\t\t\tResultSet result2;\n\t\t\t\tresult2 = dc.select(query, params2);\n\t\t\t\twhile (result2.next()) {\n\t\t\t\t\tif (amountOfCards == 1) {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" card.\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" cards.\";\n\t\t\t\t\t}\n\t\t\t\t\tlabels.get(i).setText(text);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }",
"private void updateActualAndDisplayedResult() {\n\t\tresultTipValue = calculateTip( amountValue, percentValue, splitValue);\n\t\ttvResult.setText( \"Tip: $\" + String.format(\"%.2f\", resultTipValue) + \" per person.\" );\t\n\t}",
"public void updateDiceLabel(int leftResult, int rightResult) {\n\t\tleftDiceResult.setText(String.valueOf(leftResult));\n\t\trightDiceResult.setText(String.valueOf(rightResult));\n\t}",
"private void showResult(String result) {\n TextView averageText = (TextView) findViewById(R.id.averageText);\n mUnit = getResultUnit();\n mAverageConsumption = result + \" \" + mUnit;\n\n String text = getResourceString(R.string.average) + \" \" + mAverageConsumption;\n averageText.setText(text);\n }",
"public abstract String getLabelText();",
"private void setResultString(String testType) {\n\t\tswitch(testType) {\n\t\t\tcase \"manual\": \n\t\t\t\tmanualResults.setText(\"FP :\" + AntiSpamFilterControl.falsePositiveManual + \n\t\t\t\t\t\t\t\t\t\" FN:\" + AntiSpamFilterControl.falseNegativeManual);\n\t\t\t\tbreak;\n\t\t\tcase \"auto\": \n\t\t\t\tautoResults.setText(\"FP :\" + AntiSpamFilterControl.falsePositiveAuto + \n\t\t\t\t\t\t\t\t \" FN:\" + AntiSpamFilterControl.falseNegativeAuto);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}",
"private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }",
"public String getLabelText();",
"java.lang.String getLabel();",
"@Override\n public String displayUponMatchingResult() {\n\n if (brand == null || brand.equals(\"N/A\")) {\n return String.format(\"%s (%s)\", foodLabel, category);\n } else {\n return String.format(\"%s (%s by %s)\", foodLabel, category, brand);\n }\n\n }",
"private void updateNumResults(int numResults)\n {\n String message = MessageFormat.format(\"Found {0} results\", numResults);\n resultInfo.setText(message);\n }",
"private void populateResultsUI(){\n\n totalPayTextView.setText(Double.toString(totalPay));\n totalTipTextView.setText(Double.toString(totalTip));\n totalPerPersonTextView.setText(Double.toString(totalPerPerson));\n }",
"String getLabel();",
"String getLabel();",
"public void showResults(){\n customerCount = simulation.getCustomerCount();\n phoneCount = simulation.getPhoneCount();\n doorCount = simulation.getDoorCount();\n unhelpedCount = simulation.getUnhelped();\n totalCus.setText(\"Total number of Customers: \"+customerCount+\"\\t\\t\");\n doorCus.setText(\"Number of Door Customers: \"+doorCount+\"\\t\\t\");\n phoneCus.setText(\"Number of Phone Customers: \"+phoneCount+\"\\t\\t\");\n unhelped.setText(\"Number of Customers left unhelped at the end: \"+unhelpedCount);\n }",
"public java.lang.String getLabel();",
"@Override\n public void choiced(String result) {\n target.setText(result);\n target.setTextColor(getResources().getColor(R.color.app_color));\n }",
"private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }",
"public static void resultMessage (int result) {\n System.out.println(\"The result of choosed operation is: \" + result);\n }",
"public void setLabelText(String text);",
"@Override\n public void onGetResult(VoiceRecognizerResult result) {\n mResultTv.setText(\"(\" + result.text + \")\");\n\n if (result.isEnd) {\n mRecoState = 0;\n updateBtn(mRecoState);\n }\n }",
"public Patient_Record_Output(String[] result)\n\t\t{\n\t\t\tsetLayout(new GridLayout(result.length + 1, 1));\n\n\t\t\tadd(new Centered_Text_Panel(\"Results:\"));\n for(int i = 0; i < result.length; i++)\n {\n add(new JLabel(result[i]));\n }\n\t\t\t\n\t\t}",
"private void criarLabelsComRespostasAoUsuario(Numero num){\n respostaNumeroDigitado.setText(\"O número digitado é: \" +num.getValor());\n \n //Setando o Label do Par\n if(num.isPar()){\n respostaEPar.setText(\"O número é par\"); \n } else {\n respostaEPar.setText(\"O número não é par\");\n }\n \n //Setando o Label do Impar\n if(num.isImpar()){\n respostaEImpar.setText(\"O número é ímpar\"); \n } else {\n respostaEImpar.setText(\"O número não é ímpar\");\n }\n \n //Setando a Label do Primo\n if(num.isPrimo()){\n respostaEPrimo.setText(\"O número é primo\"); \n } else {\n respostaEPrimo.setText(\"O número não é primo\");\n }\n \n //Setando o Label do MaiorQue \n if(num.isMaiorque10()){\n respostaEMaiorQueDez.setText(\"O número é maior que 10\"); \n } else {\n respostaEMaiorQueDez.setText(\"O número não é maior que 10\");\n }\n //Setando a label do dobro do valor\n respostaDobro.setText(\"O dobro do número digitado é: \" +num.dobro());\n }",
"@Override\n public void run() {\n result.setText(\"\"+res);\n }",
"public Patient_Record_Output(String result)\n\t\t{\n\t\t\tsetLayout(new GridLayout(2, 1));\n\n\t\t\tadd(new Centered_Text_Panel(\"Results:\"));\n\t\t\tadd(new JLabel(result));\n\n\t\t\t/*switch(relation)\n\t\t\t{\n\t\t\t\tcase \"Treatments\":\n\t\t\t\t\tadd(new Tuple_Display_Panel(Relation_Attributes.treatment, results));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Procedures\":\n\t\t\t\t\tadd(new Tuple_Display_Panel(Relation_Attributes.procedure, results));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Prescriptions\":\n\t\t\t\t\tadd(new Tuple_Display_Panel(Relation_Attributes.prescription, results));\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t}*/\n\t\t\t\n\n\t\t}",
"public String getResultValueText() {\n if (mResultValue == 0) {\n return \"Passed\";\n }\n if (mResultValue == 1) {\n return \"Warning\";\n }\n if (mResultValue == 2) {\n return \"Failed\";\n }\n if (mResultValue == 3) {\n return \"Not executed\";\n }\n\n return \"Unknown\";\n }",
"public void showresult(String result, String status, String message) {\r\n\t\tCommonFunctions.queryresult = \"No of Cells not Matching :\" + result;\r\n\t\tCommonFunctions.teststatus = \"Status :\" + status;\r\n\t\tCommonFunctions.message = \"System Message :\" + message;\r\n\t\tresultstextarea.setText(\"No of Cells not Matching : \" + result + \"\\n\\n\" + \"Status : \" + status + \"\\n\\n\"\r\n\t\t\t\t+ \"System Message : \" + message);\r\n\t\t// CommonFunctions.invokeTestResultsDialog(getClass());\r\n\t}",
"private void setResultNumber(int number, int totalNumber) {\n mSearchResultsNumb.setText(String.format(\"%s of %s %s\", number, totalNumber, getApplicationContext().getString(R.string.results)));\n }",
"public String getLabel();",
"public String getLabel();",
"public String getLabel();",
"public String getLabel();",
"private void updateLabel() {\n\t\tString translation = lp.getString(key);\n\t\tsetText(translation);\n\n\t}",
"public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}",
"public String getResultCountText(){\n\n return searchResultCount.getText();\n\n }",
"public abstract String getLabel();",
"public abstract void displayResult(Result result);",
"private void setLabelForSpecimen(final Specimen objSpecimen) throws LabelGenException\r\n\t{\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\r\n\t\tif(isGenLabel(objSpecimen))\r\n\t\t{\r\n\t\t\tString labelFormat = getLabelFormat(objSpecimen, buffer);\r\n\r\n\t\t\tif (!Validator.isEmpty(labelFormat))\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(labelFormat, \"%\");\r\n\t\t\t\twhile (tokenizer.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tString token = tokenizer.nextToken();\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbuffer.append(getTokenValue(objSpecimen, token));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (final NameGeneratorException ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new LabelException(ex.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n//\t\t\t\t\t\tbuffer.append(\"_\");\r\n//\t\t\t\t\t\tbuffer.append(getSpecimenCount(objSpecimen));\r\n\t\t\t}\r\n\t\t\tobjSpecimen.setLabel(buffer.toString());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new LabelGenException(\"Manual Label Generation is selected for this specimen\");\r\n\t\t}\r\n\t}",
"private void setLabelInloggNamn() {\n String hittaNamn = (\"select namn from agent where agent_id = \" + agentID);\n\n try {\n inloggadSom.setText(\"Du är inloggad som: \" + mib.fetchSingle(hittaNamn));\n } catch (InfException ettUndantag) {\n JOptionPane.showMessageDialog(null, \"Databasfel!\");\n System.out.println(\"1,5 - Internt felmeddelande\" + ettUndantag.getMessage());\n } catch (Exception ettUndantag) {\n JOptionPane.showMessageDialog(null, \"Något gick fel!\");\n System.out.println(\"2 - Internt felmeddelande\" + ettUndantag.getMessage());\n }\n }",
"public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }",
"private void showResult(Double result) {\n\n if(Double.isInfinite(result)){ // THIS IS FOR THE \"DIVIDING BY ZERO\" CASE\n isError = true;\n display.setText(\"∞\");\n return;\n }\n\n DecimalFormat format = new DecimalFormat(\"0.#############\");\n String resultString = (format.format(result)).replace(',','.');\n if (resultString.length() <= 16) {\n display.setText(resultString);\n } else {\n display.setText(resultString.substring(0, 15) + \"...\");\n isError = true;\n }\n }",
"Label getLabelRootRecherche();",
"private void setResult(String term){\n\t\taddResponseToResult(term);\n\t}",
"public void setText(String s)\n {\n \tLongTermResult.setText(s);\n }",
"public void updateLabels() {\n\t\t//if credit less than 9 add 0 in front of the credit value \n\t\tif (obj.getCredit() < 10)\n\t\t\tcreditLabel.setText(\"0\" + String.valueOf(obj.getCredit()));\n\t\telse\n\t\t\tcreditLabel.setText(String.valueOf(obj.getCredit()));\n\t\t//if bet less than 9 add 0 in front of the credit value\n\t\tif (obj.getBet() < 10)\n\t\t\tbetLebal.setText(\"0\" + String.valueOf(obj.getBet()));\n\t\telse\n\t\t\tbetLebal.setText(String.valueOf(obj.getBet()));\n\t}",
"double getLabel();",
"public void init(String result) {\n resultStr.setText(result);\n }",
"public void setResult (String Result);",
"@Override\n public void setLabel(String arg0)\n {\n \n }",
"private void updateText()\n\t{\n\t\tlong longResult;\t\t//holds the value of result casted to type long\n\t\tif(result % 1 == 0)\n\t\t{\n\t\t\tlongResult = (long)result;\n\t\t\tupdateText += longResult;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdateText += result;\n\t\t}\n\t\tentry.setText (\"\");\n\t\tentry.setText (updateText);\n\t\tupdateText = \"\";\n\t\tentry.grabFocus();\n\t}",
"public void display(String result);",
"com.microsoft.schemas.xrm._2011.contracts.Label getLabel();",
"public void finalDisplay2()\n\t{\n\t\tString s1=null;\n\t\tint sum=0;\n\t\tint j;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tj=rowLabel[i];\t\t\t\n\t\t\tsum+=temp[i][j];\t\n\t\t}\n\t\ts1=\"There are multiple solutions with the cost of \"+sum;\n\t\tJTable t = new JTable();\n testTableMultiple(t,(2*noOfPeople)+2);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}",
"public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }",
"private void setLabelForActivity(){\n String label;\n if(sortOrderOfResults.equals(AppUtilities.QUERY_PATH_POPULAR)){\n label = getString(R.string.label_all_movies_activity_most_popular_movies);\n } else {\n label = getString(R.string.label_all_movies_activity_top_rated_movies);\n }\n actionBar.setTitle(label);\n }",
"private void showResult() {\n if (Utils.isKitkat()) TransitionManager.beginDelayedTransition(llBody);\n if (tvResult != null)\n flSceneFrame.removeView(tvResult);\n tvResult = new TextView(this);\n tvResult.setBackgroundColor(getResources().getColor(R.color.colorRedTranslucent));\n tvResult.setTextColor(getResources().getColor(android.R.color.white));\n tvResult.setText(selectedAnswer.getText());\n tvResult.setPadding(4, 4, 4, 4);\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.setMargins(utils.getQuadrantBasedX(ivScene, selectedAnswer.getRelativeCoordinateX()), utils.getQuadrantBasedY(ivScene, selectedAnswer.getRelativeCoordinateY()), 0, 0);\n flSceneFrame.addView(tvResult, params);\n btNext.setVisibility(View.VISIBLE);\n }",
"public void displayResults() {\n\t\tcreateCluster();\n\t\tassignClusterID();\n\t\tSystem.out.println(iterations);\n\t\tWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(\"/Users/saikalyan/Documents/ClusterResult_kmeans.txt\");\n\t\t\tfor (int key : labelsMap.keySet()) {\n\t\t\t\tclusterResultsList.add(clusterIdMap.get(labelsMap.get(key)));\n\t\t\t\twriter.write(String.valueOf(clusterIdMap.get(labelsMap.get(key))));\n\t\t\t\twriter.write(\"\\r\\n\");\n\t\t\t\tSystem.out.println(key + \" : \" + clusterIdMap.get(labelsMap.get(key)));\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tExternalValidator extValidation = new ExternalValidator(count, groundTruthList, clusterResultsList);\n\n\t\tfloat res = extValidation.getCoefficient();\n\t\tSystem.out.println(\"Rand Index------------\" + res);\n\n\t\tfloat jaccard = extValidation.getJaccardCoeff();\n\t\tSystem.out.println(\"Jaccard co-efficient------------\" + jaccard);\n\n\t}",
"Label getLabel();",
"Label getLabel();",
"Label getLabel();",
"@Override\n\tpublic void setLabelText(String label) {\n\t}",
"public String formatText(String resultString) {\n String outputString = \"\";\n\n resultString = resultString.substring(1); // removes first [\n String[] percents = resultString.split(\",\");\n\n for(int i = 0; i < percents.length && i < 3; i++) { // at most top 3 predictions\n String prediction = percents[i];\n Log.d(\"displayPredictionResult\", \"prediction @\" + i + \" \" + prediction);\n\n String digit = prediction.substring(prediction.indexOf('[') + 1, prediction.indexOf(']'));\n String percent = prediction.substring(prediction.indexOf('(') + 1, prediction.indexOf(')'));\n // outputString += \"There is a \" + percent + \" chance the number is \" + digit + '\\n';\n outputString += percent + \" chance the number is \" + digit + '\\n';\n }\n\n return outputString.substring(0, outputString.length() - 1); // removes last new line character\n }",
"private void updateTaskActivityLabel()\r\n {\r\n setLabelValue(\"Tile Downloads \" + myActiveQueryCounter.intValue());\r\n setProgress(myDoneQueryCounter.doubleValue() / myTotalSinceLastAllDoneCounter.doubleValue());\r\n }",
"private void displayCount() {\n\t\tlabel.setText(String.format(\"%2d\", game.getCount()));\n\t}",
"@Override\n\t\tpublic void onResults(ArrayList<RecognizerResult> arg0, boolean arg1) {\n\t\t\ttext+=arg0.get(0).text.toString();\n\t\t}",
"@Override\r\n\tpublic String getDescription() {\n\t\tString descr=\"Results\";\r\n\t\treturn descr;\r\n\t}",
"private JLabel createButtonDescription() {\r\n JLabel buttonDescription = new JLabel(\"Result\");\r\n buttonDescription.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n buttonDescription.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n buttonDescription.setText(\"Play again?\");\r\n buttonDescription.setFont(new Font(null, Font.PLAIN, 20));\r\n return buttonDescription;\r\n }",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"public void setSummary() {\n\t\tString dataset = datasetInfo.getSelectedFile().getAbsolutePath();\n\t\tdatasetLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + dataset + \"</font></center></html>\");\n\t\t\n\t\tfloat putNumber = privacyInfo.getPUTNumber();\n\t\tString privacyExceptions = privacyInfo.getPrivacyExceptions().toString();\n\t\tif(privacyExceptions == null || privacyExceptions.trim().length() == 0 || privacyExceptions.equals(\"[]\"))\n\t\t\tprivacyExceptions = \"<b><i>None</i></b>\";\n\t\telse\n\t\t\tprivacyExceptions = \"{\" + privacyExceptions.substring(1, privacyExceptions.length()-1) + \"}\";\n\t\tString utilityExceptions = privacyInfo.getUtilityExceptions().toString();\n\t\tif(utilityExceptions == null || utilityExceptions.trim().length() == 0 || utilityExceptions.equals(\"[]\"))\n\t\t\tutilityExceptions = \"<b><i>None</i></b>\";\n\t\telse\n\t\t\tutilityExceptions = \"{\" + utilityExceptions.substring(1, utilityExceptions.length()-1) + \"}\";\n\t\t\n\t\tputLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + putNumber + \"</font></center></html>\");\n\t\tprivacyExceptionsLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + privacyExceptions + \"</font></center></html>\");\n\t\tutilityExceptionsLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + utilityExceptions + \"</font></center></html>\");\n\t\t\n\t\tfloat vExpense = expenseInfo.getVerticalExpense();\n\t\tfloat hExpense = expenseInfo.getHorizontalExpense();\n\t\t\n\t\tverticalExpenseLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + vExpense + \"</font></center></html>\");\n\t\thorizontalExpenseLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + hExpense + \"</font></center></html>\");\n\t\t\n\t\tString classifier = classifierInfo.getClassifier();\n\t\tString classifierOptions = classifierInfo.getCustomOptions();\n\t\tif(classifierOptions == null || classifierOptions.trim().length() == 0 || classifierOptions.equals(\"{}\"))\n\t\t\tclassifierOptions = \"<b><i>None</i></b>\";\n\t\t\n\t\tclassifierLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + classifier + \"</font></center></html>\");\n\t\tclassifierOptionsLabel.setText(\"<html><center><font size='4' color='#9e1503'>\" + classifierOptions + \"</font></center></html>\");\n\t}",
"public void finalDisplay()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}",
"@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}",
"private void setUpNutritionLabel(Label l1, String color, String text){\n l1.setText(text);\n l1.setTextFill(Paint.valueOf(color));\n l1.setFont(InterfaceStyling.systemFont);\n }",
"private void showResult(int z1, int n2) {\n\t\tif (n2 < 0){\n \tresultZ.setText(\"\" + (-1*z1) );\n \tresultN.setText(\"\" + (-1*n2) );\n\t\t} else {\n \tresultZ.setText(\"\" + z1 );\n \tresultN.setText(\"\" + n2 );\n }\t\n\t}",
"@Override\r\n\tpublic void displayLabel() {\n\t\tSystem.out.println(\"Syrup should be handled with care\");\r\n\t}",
"public void\nsetNewLabel(Font font)\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(font,\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(), lineLength,\n\t\tColor.black, this.getID());\n}",
"public void finalDisplay1()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display1 algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}",
"public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }",
"private String setVerticalExpenseInfoLabel(float currentValue) {\n\t\tfloat putNumber = privacyAction.getPUTNumber();\n\t\tBigInteger totalCombinations = PUTExperiment.getNcKValue(numOfAttributes, PUTExperiment.calculatePartitionSize(numOfAttributes, putNumber));\n\t\tBigInteger numberOfCombinations = new BigDecimal(totalCombinations).multiply(new BigDecimal(\"\" + currentValue)).setScale(0, RoundingMode.HALF_UP).toBigInteger();\n\t\tif(numberOfCombinations.compareTo(BigInteger.ZERO) == 0) {\n\t\t\tif(!switchOffWarnings)\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The number of attribute combinations cannot be 0 !!\", \"Error (0 combinations)\", JOptionPane.ERROR_MESSAGE);\n\t\t\tBigDecimal leastVal;\n\t\t\tif(totalCombinations.equals(BigDecimal.ONE))\n\t\t\t\tleastVal = BigDecimal.ONE;\n\t\t\telse\n\t\t\t\tleastVal = BigDecimal.ONE.divide(new BigDecimal(totalCombinations), FloatingSliderPanel.MAX_PRECISION, RoundingMode.HALF_DOWN);\n\t\t\tnumberOfCombinations = new BigDecimal(totalCombinations).multiply(new BigDecimal(\"\" + leastVal)).setScale(0, RoundingMode.HALF_UP).toBigInteger();\n\t\t\tverticalExpenseSlider.setCurrentValue(Math.nextUp(leastVal.floatValue()));\n\t\t}\n\t\tString text = \"Select \" + numberOfCombinations + \" attribute combinations out of \" + totalCombinations + \" (without considering any Privacy Exceptions)\";\n\t\treturn \"<html><center><font size='4' color='#2d0c08'>\" + text + \"</font></center></html>\";\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 }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n lblResult = new javax.swing.JLabel();\n btndone = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n lblResultInWords = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBounds(new java.awt.Rectangle(100, 500, 770, 522));\n setPreferredSize(new java.awt.Dimension(770, 522));\n setResizable(false);\n getContentPane().setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\".AppleSystemUIFont\", 1, 36)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Total Marks\");\n jLabel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n getContentPane().add(jLabel1);\n jLabel1.setBounds(150, 70, 350, 60);\n\n lblResult.setFont(new java.awt.Font(\".AppleSystemUIFont\", 1, 36)); // NOI18N\n lblResult.setForeground(new java.awt.Color(255, 0, 51));\n lblResult.setText(\" \");\n lblResult.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n getContentPane().add(lblResult);\n lblResult.setBounds(530, 140, 110, 80);\n\n btndone.setFont(new java.awt.Font(\".AppleSystemUIFont\", 1, 36)); // NOI18N\n btndone.setForeground(new java.awt.Color(255, 255, 255));\n btndone.setText(\"DONE\");\n btndone.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n btndone.setContentAreaFilled(false);\n btndone.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btndoneActionPerformed(evt);\n }\n });\n getContentPane().add(btndone);\n btndone.setBounds(520, 380, 210, 80);\n\n jLabel3.setFont(new java.awt.Font(\".AppleSystemUIFont\", 1, 36)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Final Score\");\n jLabel3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n getContentPane().add(jLabel3);\n jLabel3.setBounds(150, 140, 350, 80);\n\n jLabel5.setFont(new java.awt.Font(\".AppleSystemUIFont\", 1, 36)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\" 50\");\n jLabel5.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n getContentPane().add(jLabel5);\n jLabel5.setBounds(530, 70, 110, 60);\n\n lblResultInWords.setFont(new java.awt.Font(\"Lucida Grande\", 3, 18)); // NOI18N\n lblResultInWords.setForeground(new java.awt.Color(255, 255, 255));\n lblResultInWords.setText(\"Result in words goes here..\");\n getContentPane().add(lblResultInWords);\n lblResultInWords.setBounds(130, 300, 520, 40);\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/examb/examb_images/bg.jpg\"))); // NOI18N\n jLabel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jLabel2.setMaximumSize(new java.awt.Dimension(5169, 3200));\n jLabel2.setMinimumSize(new java.awt.Dimension(5169, 3200));\n jLabel2.setPreferredSize(new java.awt.Dimension(5169, 3200));\n getContentPane().add(jLabel2);\n jLabel2.setBounds(0, 0, 780, 500);\n\n pack();\n }",
"@Override\r\n public void onSuccess(List<ImageLabel> labels) {\n Toast.makeText(AttendanceActivity.this, \"Got results from mlkit!!!\", Toast.LENGTH_SHORT).show();\r\n for (ImageLabel label : labels) {\r\n String text = label.getText();\r\n float confidence = label.getConfidence();\r\n int index = label.getIndex();\r\n Log.d(\"confidence\",text+\" \"+confidence);\r\n }\r\n }",
"@Override\n public String getLabel() {\n return label;\n }",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"void setLabelString() {\n int pad = 5; // fudge to make up for variable width fonts\n float maxVal = Math.max(Math.abs(min), Math.abs(max));\n intDigits = Math.round((float) (Math.log(maxVal) / Math.log(10))) + pad;\n if (min < 0) {\n intDigits++; // add one for the '-'\n }\n // fractDigits is num digits of resolution for fraction. Use base 10 log\n // of scale, rounded up, + 2.\n fractDigits = (int) Math.ceil((Math.log(scale) / Math.log(10)));\n nf.setMinimumFractionDigits(fractDigits);\n nf.setMaximumFractionDigits(fractDigits);\n String value = nf.format(current);\n while (value.length() < (intDigits + fractDigits)) {\n value = value + \" \";\n }\n valueLabel.setText(value);\n }",
"public void displayResult(Dealer d) {\n if (d.getPlayer2ResultMap() != null) {\n\n controller.p1result.setText(String.format(\"%.2f\", controller.p1WinPercentage) + \"%\");\n controller.p2result.setText(String.format(\"%.2f\", controller.p2WinPercentage) + \"%\");\n controller.tielabel.setText(\"tie\");\n controller.tielabel.setTextFill(Color.BROWN);\n controller.tieresult.setText(String.format(\"%.2f\", controller.tiePercentage));\n controller.tieresult.setTextFill(Color.BROWN);\n if (controller.p1WinPercentage > controller.p2WinPercentage) {\n controller.p1result.setTextFill(Color.GREEN);\n controller.p2result.setTextFill(Color.RED);\n } else {\n controller.p1result.setTextFill(Color.RED);\n controller.p2result.setTextFill(Color.GREEN);\n }\n for (int i = 0; i < controller.p2ResultList.size(); i++) {\n controller.p2ResultList.get(i).setText(controller.p2Results[i]);\n }\n } else {\n for (int i = 0; i < controller.p2ResultList.size(); i++) {\n controller.p2ResultList.get(i).setText(\"\");\n }\n controller.p2result.setText(\"\");\n controller.tielabel.setText(\"\");\n controller.tieresult.setText(\"\");\n }\n\n for (int i = 0; i < controller.p1ResultList.size(); i++) {\n\n controller.p1ResultList.get(i).setText(controller.p1Results[i]);\n }\n controller.errorLabel.setText(\"\");\n }",
"public void changeText()\n {\n Double base = 1.0;\n Double exponent = 0.0;\n\n try\n {\n /*get the values of the text inputs and set them to their respective variable, converting them to\n a double*/\n base = Double.parseDouble(txtBase.getText());\n exponent = Double.parseDouble(txtExponent.getText());\n }\n catch (NumberFormatException e) {\n /*On NumberFormatException, do nothing. Suppresses errors in the console which we do not need to\n know about, this is an expected and solved issue.*/\n }\n\n //calculate the new result, based on the current values of exponent and base, then set it to the output.\n Double result = Math.pow(base, exponent);\n lblResult.setText(result.toString());\n }",
"void setLabel(String label);",
"public void displaySearchQueryResult(ResultSet result) {\n try {\n // if there are no result\n if (!result.isBeforeFirst()) {\n displayNotificationMessage(\"No Result Found.\");\n resultPane.setContent(new GridPane());\n return;\n }\n\n // clear the userMessage area\n userMessage.setText(\"\");\n resultPane.setContent(createSearchResultArea(result));\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"void setLastrunresult(java.lang.String lastrunresult);",
"public void setScoreText() {\n \tif(numBalls>0 && this.body.size()>0) {\n double x=this.body.get(0).getCenterX()-5;\n \tdouble y=this.body.get(0).getCenterY()+2;\n \t\n \tT.setX(x);\n \tT.setY(y);\n \tT.setText(String.valueOf(numBalls));\n \t}\n \t\n \t\n }",
"public void onSuccess(Object result) {\n\t\t\trefgview.getNavPanel().getSearchPanelView().displayNameSearchResult(result);\n\t\t}",
"@Override\n\tpublic String getLabel() {\n\t\treturn \"Roll Again\";\n\t}",
"@Override\r\n\tpublic void tooManyResults(int nb) {\r\n\t\tmLayout.setText( getString(R.string.directory_too_many_results_warning) );\r\n\t}",
"void displayInfoText(String info) {\n resultWindow.removeAll();\n JLabel label = new JLabel(info);\n label.setFont(resultFont);\n resultWindow.add(label);\n revalidate();\n repaint();\n }",
"com.google.ads.googleads.v6.resources.Label getLabel();"
]
| [
"0.77904433",
"0.732148",
"0.67330325",
"0.6677658",
"0.64522034",
"0.6418658",
"0.63807213",
"0.63072556",
"0.62076765",
"0.6196471",
"0.6158221",
"0.6146046",
"0.61436135",
"0.60650516",
"0.60137933",
"0.59562844",
"0.5935871",
"0.5934831",
"0.5934831",
"0.5919172",
"0.5891391",
"0.5886974",
"0.5852319",
"0.5843254",
"0.5828604",
"0.5827055",
"0.58066475",
"0.5783029",
"0.57671535",
"0.5767073",
"0.574585",
"0.57432497",
"0.57286996",
"0.5721344",
"0.5721344",
"0.5721344",
"0.5721344",
"0.5694887",
"0.56865203",
"0.5682081",
"0.5676819",
"0.5662854",
"0.5662853",
"0.56608677",
"0.5660853",
"0.5637133",
"0.56290764",
"0.5623201",
"0.5621464",
"0.5618448",
"0.56153435",
"0.5602429",
"0.5599851",
"0.55794096",
"0.55765426",
"0.5564382",
"0.5560474",
"0.5559604",
"0.55538785",
"0.55389273",
"0.55334336",
"0.5531495",
"0.55250365",
"0.55250365",
"0.55250365",
"0.55180895",
"0.5502871",
"0.5493083",
"0.5486187",
"0.5481945",
"0.547938",
"0.54678714",
"0.5466453",
"0.5460755",
"0.5456767",
"0.5455745",
"0.5439749",
"0.54375196",
"0.5426886",
"0.5415922",
"0.541266",
"0.5408534",
"0.5382023",
"0.53809893",
"0.53737533",
"0.53726494",
"0.5369291",
"0.5367771",
"0.5352962",
"0.53524244",
"0.53470945",
"0.53422916",
"0.533501",
"0.5334763",
"0.53306836",
"0.5329831",
"0.53212214",
"0.53111863",
"0.5306193",
"0.5302137"
]
| 0.8110485 | 0 |
Text label for the result description | private JLabel createButtonDescription() {
JLabel buttonDescription = new JLabel("Result");
buttonDescription.setAlignmentX(Component.CENTER_ALIGNMENT);
buttonDescription.setBorder(new EmptyBorder(5, 5, 5, 5));
buttonDescription.setText("Play again?");
buttonDescription.setFont(new Font(null, Font.PLAIN, 20));
return buttonDescription;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getLabel();",
"public String getLabelText();",
"public java.lang.String getLabel();",
"@Override\r\n\tpublic String getDescription() {\n\t\tString descr=\"Results\";\r\n\t\treturn descr;\r\n\t}",
"String getLabel();",
"String getLabel();",
"public String getLabel();",
"public String getLabel();",
"public String getLabel();",
"public String getLabel();",
"public abstract String getLabelText();",
"com.microsoft.schemas.xrm._2011.contracts.Label getDescription();",
"private JLabel createResultLabel() {\r\n JLabel resultLabel = new JLabel(\"Result\");\r\n resultLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n resultLabel.setBorder(new EmptyBorder(8, 8, 8, 8));\r\n setResultLabelText(resultLabel);\r\n resultLabel.setFont(new Font(null, Font.BOLD, 30));\r\n return resultLabel;\r\n }",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"public abstract String getLabel();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"@Override\n public String getLabel() {\n return label;\n }",
"@Override\n\tpublic String getDescription();",
"public String getLabel() {\r\n return lbl;\r\n }",
"public String getLabel()\n { \n return label;\n }",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"com.microsoft.schemas.xrm._2011.contracts.Label getLabel();",
"void setDescription(com.microsoft.schemas.xrm._2011.contracts.Label description);",
"public String getLabel()\n {\n return label;\n }",
"@AutoEscape\n\tpublic String getDescription();",
"@AutoEscape\n\tpublic String getDescription();",
"@AutoEscape\n\tpublic String getDescription();",
"@AutoEscape\n\tpublic String getDescription();",
"@Override\n public String getDescription() {\n return descriptionText;\n }",
"String nameLabel();",
"public String getLabel() {\n return label;\n }",
"@Override\r\n\tpublic String getDescription() {\n\t\treturn \"\";\r\n\t}"
]
| [
"0.76806873",
"0.7672673",
"0.7591965",
"0.7533417",
"0.7481534",
"0.7481534",
"0.7445114",
"0.7445114",
"0.7445114",
"0.7445114",
"0.7413176",
"0.73118573",
"0.72757804",
"0.70957375",
"0.70957375",
"0.70957375",
"0.70957375",
"0.70957375",
"0.70957375",
"0.70957375",
"0.70957375",
"0.70957375",
"0.70560354",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.6922218",
"0.69207466",
"0.6880249",
"0.6823415",
"0.6808304",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.680822",
"0.6800488",
"0.6794541",
"0.67771894",
"0.6770695",
"0.6770695",
"0.6770695",
"0.6770695",
"0.673545",
"0.6735249",
"0.67336875",
"0.67285395"
]
| 0.72113806 | 13 |
Create dialog confirmation and cancel buttons | private JPanel createConfirmationButtons() {
JPanel buttonPanel = new JPanel();
buttonPanel.setAlignmentX(Component.CENTER_ALIGNMENT);
buttonPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
JButton confirmButton = new JButton("Confirm");
confirmButton.addActionListener(event -> onConfirmButtonPressed());
JButton cancelButton = new JButton("Cancel");
cancelButton.addActionListener(event -> onCancelButtonPressed());
buttonPanel.add(confirmButton);
buttonPanel.add(cancelButton);
return buttonPanel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDiagnosticChain diagnosticChain = new BasicDiagnostic();\n\t if (isValid(diagnosticChain)) {\n\t \t okFlag = true;\n\t\t okPressed();\n\t\t }else{\n\t\t \t Message messageDialog = new Message(EditTask.this.getShell());\n\t\t \t messageDialog.setMessage(Util.getErrorMessage(diagnosticChain));\n\t\t \t messageDialog.open();\n\t\t }\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"private JPanel createConfirmButtonsPanel() {\n JPanel p = new JPanel(new FlowLayout());\n p.add(createConfirmButton());\n p.add(createCancelButton());\n \n return p;\n }",
"private JPanel createConfirmButtons() {\n JPanel panel = new JPanel(new FlowLayout(FlowLayout.TRAILING));\n panel.add(createConfirmButton());\n panel.add(createCancelButton());\n\n return panel;\n }",
"@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.CANCEL_ID, Messages.BaselineShowDialog_8, false);\n }",
"public OverviewSmallConfirmDialogOptions showConfirmDialog(String referenceID, String title, String textContent, String okText, String cancelText) {\n/*Generated! Do not modify!*/ ConfirmDialogParameters confirmDialogParameters = new ConfirmDialogParameters();\n/*Generated! Do not modify!*/ confirmDialogParameters.setReferenceID(referenceID);\n/*Generated! Do not modify!*/ confirmDialogParameters.setTitle(title);\n/*Generated! Do not modify!*/ confirmDialogParameters.setTextContent(textContent);\n/*Generated! Do not modify!*/ confirmDialogParameters.setOkText(okText);\n/*Generated! Do not modify!*/ confirmDialogParameters.setCancelText(cancelText);\n/*Generated! Do not modify!*/ replyDTO.setConfirmDialogParameters(confirmDialogParameters);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"showConfirmDialog(\" + escapeString(referenceID) + \", \" + escapeString(title) + \", \" + escapeString(textContent) \n/*Generated! Do not modify!*/ \t\t\t+ \", \" + escapeString(okText) + \", \" + escapeString(cancelText)+ \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ return new OverviewSmallConfirmDialogOptions(this, confirmDialogParameters);\n/*Generated! Do not modify!*/ }",
"private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }",
"private void createButtonComp() {\n GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);\n Composite okBtnComp = new Composite(shell, SWT.NONE);\n GridLayout okBtnCompLayout = new GridLayout(2, true);\n okBtnComp.setLayout(okBtnCompLayout);\n okBtnComp.setLayoutData(gd);\n\n GridData bd = new GridData(110, 30);\n okBtn = new Button(okBtnComp, SWT.PUSH);\n okBtn.setText(\"OK\");\n okBtn.setLayoutData(bd);\n okBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n calculateDuration();\n shell.dispose();\n }\n });\n\n bd = new GridData(110, 30);\n cancelBtn = new Button(okBtnComp, SWT.PUSH);\n cancelBtn.setText(\"Close\");\n cancelBtn.setLayoutData(bd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n\n /*\n * (non-Javadoc)\n * \n * @see\n * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse\n * .swt.events.SelectionEvent)\n */\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(-1);\n close();\n }\n });\n }",
"private void MoodRatingAddNoteConfirmDialog() {\n final Dialog dialog = new Dialog(getActivity());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n // Include dialog.xml file\n dialog.setContentView(R.layout.lay_moodratings_addnote);\n // Set dialog TV_TITLE\n dialog.setTitle(\"Custom Dialog\");\n\n // set values for custom dialog components - text, image and button\n TextView _tvNo = (TextView) dialog.findViewById(R.id.tvNo);\n TextView _tvYes = (TextView) dialog.findViewById(R.id.tvYes);\n\n dialog.show();\n _tvNo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });\n\n _tvYes.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n MoodRatingAddNoteDialog();\n }\n });\n }",
"public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}",
"private void decorateCancelButton() {\n cancelButton.setVisible(false);\n ResourceUtils.resButton(cancelButton, Res.getString(\"cancel\"));\n cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196)));\n cancelButton.setForeground(new Color(73, 113, 196));\n cancelButton.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n \n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n cancelTransfer();\n }\n });\n \n cancelButton.addMouseListener(new MouseAdapter() {\n public void mouseEntered(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\n \n }\n \n public void mouseExited(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }\n });\n \n }",
"void generar_dialog_preguntas();",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Rechercher\", true);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, \"Annuler\", false);\r\n\t}",
"private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteAllBooks();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public void makeConfirmationDialog(View view) {\n new AlertDialog.Builder(this)\n .setTitle(\"Are you sure?\")\n .setCancelable(false)\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n startExperiment();\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n return;\n }\n }).show();\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID,\n\t\t\t\tIDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(\"关闭\");\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}",
"protected void createCancelButton(Composite parent) {\n\t\tcancel = createButton(parent, IDialogConstants.CANCEL_ID, \"取消\", true);\n\t\tcancel.setCursor(arrowCursor);\n\t\tsetOperationCancelButtonEnabled(true);\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t\tvalidate();\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the goal.\n deleteGoal();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}",
"protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the fruit.\n deleteFruit();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public void showConfirmDialog() {\n mDialogClickInterface = (DialogueInterface) mContext;\n final Dialog dialog = new Dialog(mContext);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialogue_modify);\n Button buttonCancel = dialog.findViewById(R.id.btn_cancel);\n Button buttonOK = dialog.findViewById(R.id.btn_ok);\n final RadioGroup radioGroupLanguage = dialog.findViewById(R.id.radio_group);\n\n\n\n\n dialog.setCancelable(true);\n dialog.show(); // if decline button is clicked, close the custom dialog\n buttonCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Close dialog\n mDialogClickInterface.onLanguageSelected(dialog);\n }\n });\n buttonOK.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Close dialog\n int selectedId = radioGroupLanguage.getCheckedRadioButtonId();\n\n switch (selectedId) {\n\n case R.id.rb_arabic:\n view.editItem(listModel,index);\n break;\n case R.id.rb_english:\n view.deleteItem(listModel);\n break;\n }\n mDialogClickInterface.onLanguageSelected(dialog);\n }\n });\n\n }",
"@Override\n public void onClick(View v) {\n builder.setMessage(\"Are you sure you want to delete this?\")\n .setTitle(\"Warning\");\n\n // Add the buttons\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK button\n Pokemon crtPokemon = database.PokemonDao().getEntries().get(index);\n database.PokemonDao().delete(crtPokemon);\n finish();\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // 3. Get the AlertDialog from create()\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }",
"public void cancelDialog() {dispose();}",
"@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n }",
"private void showDeleteDialog(String yesLabel, String noLabel, String messageText, final int parameterId){\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this,R.style.AppTheme_Dialog));\n builder.setMessage(messageText)\n .setPositiveButton(yesLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n new DeleteAquariumTask(parameterId).execute();\n }\n })\n .setNegativeButton(noLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n builder.create();\n builder.show();\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }",
"@Override\n public void onClick(View v) {\n builder.setMessage(R.string.dialog_message2).setTitle(R.string.dialog_title);\n\n //Setting message manually and performing action on button click\n builder.setMessage(\"Do you want to cancel?\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n Toast.makeText(getApplicationContext(), \"payment cancelled\",\n Toast.LENGTH_SHORT).show();\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n Toast.makeText(getApplicationContext(), \"payment not cancelled\",\n Toast.LENGTH_SHORT).show();\n }\n });\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"Cancel\");\n alert.show();\n }",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\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 \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(DialogStrings.RemoveUserDialog_RemoveButton);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}",
"public static int yesNoCancelPop(String title, String message, String yesButton, String noButton, String cancelButton) {\n\t\t\t//Custom button text\n\t\t\tObject[] options = {yesButton, noButton, cancelButton};\n\t\t\tint n = JOptionPane.showOptionDialog(null, message, title, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,\n\t\t\t options,\n\t\t\t options[2]);\n\t\t\t\n\t\t\treturn n;\n\t\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}",
"private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tm_bindingContext = initDataBindings();\n\t}",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n this.setCancelable(true);\n\n //NB! Må settes av kaller:\n Bundle bundle = this.getArguments();\n this.dialogTitle = bundle.getString(\"dialogTitle\");\n this.dialogText = bundle.getString(\"dialogText\");\n this.yesButtonText = bundle.getString(\"yesButtonText\");\n this.noButtonText = bundle.getString(\"noButtonText\");\n this.callback_id = bundle.getInt(\"callback_id\");\n int icon_drawable = bundle.getInt(\"icon_drawable\");\n\n //Bruker en styla dialog (se styles.xml):\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this.getActivity(), R.style.AlertDialogCustom));\n builder.setTitle(this.dialogTitle);\n builder.setIcon(icon_drawable);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.fragment_yesno_dialog, null);\n\n TextView tvDialogText = (TextView) view.findViewById(R.id.tvDialogText);\n tvDialogText.setText(dialogText);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n builder.setView(view)\n // Add action buttons\n .setPositiveButton(yesButtonText, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n //Lagre at tipset er sett...\n mListener.onDialogPositiveClick(YesNoDialog.this, callback_id);\n }\n })\n .setNegativeButton(noButtonText, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onDialogNegativeClick(YesNoDialog.this, callback_id);\n }\n });\n\n //Opprett og vis dialogen:\n Dialog dialog = builder.create();\n return dialog;\n }",
"private void showConfirmationDeleteDialog(\n DialogInterface.OnClickListener yesButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.are_you_sure);\n builder.setPositiveButton(R.string.yes, yesButtonClickListener);\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the Item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteEmployee();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public String btn_cancel_delete_action()\n {\n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n return null;\n }",
"private JButton addCancelButton(){\n\t\tJButton cancelButton = new JButton(\"Cancel\");\n\n\t\tcancelButton.addActionListener(arg0 -> setVisible(false));\n\t\treturn cancelButton;\n\t}",
"public interface YesNoDialogConfirmation {\n\n public void onYesClicked(int pos,String type);\n}",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.delete_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"void CloseOkDialog();",
"public void createTwoBtnAlert(Context mContext, String title, String msg, String positiveBtn, String negativeBtn, booleanCallback callback) {\n //Create the dialogue\n AlertDialog.Builder builder = new AlertDialog.Builder(mContext);\n\n // Set the message and title of the dialogue\n builder.setMessage(msg).setTitle(title);\n\n //Set the buttons of the dialogue\n builder.setPositiveButton(positiveBtn, (dialog, id) -> {\n callback.onReturn(true, \"\");\n dialog.cancel();\n });\n builder.setNegativeButton(negativeBtn, (dialog, id) -> {\n callback.onReturn(false, \"\");\n dialog.cancel();\n });\n\n //Create the dialogue\n AlertDialog dialog = builder.create();\n\n //Show to dialogue\n dialog.show();\n\n //Set button positioning\n Button btnPositive = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n Button btnNegative = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n\n LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) btnPositive.getLayoutParams();\n layoutParams.weight = 10;\n layoutParams.setMargins(10, 0, 10, 0);\n btnPositive.setLayoutParams(layoutParams);\n btnNegative.setLayoutParams(layoutParams);\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void initDialogs() {\n messageDialog = new MessageDialog(primaryStage, CLOSE_BUTTON_LABEL);\n yesNoCancelDialog = new YesNoCancelDialog(primaryStage);\n }",
"public interface ConfirmCallback {\r\n\r\n /**\r\n * This event is triggered when the OK button is pressed.\r\n */\r\n void ok();\r\n\r\n /**\r\n * This event is triggered when the CANCEL button is pressed.\r\n */\r\n void cancel();\r\n }",
"private JButton getJButtonCancel() {\n\t\tif (jButtonCancel == null) {\n\t\t\tjButtonCancel = new JButton();\n\t\t\tjButtonCancel.setText(\"I disagree\");\n\t\t\tjButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = false;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonCancel;\n\t}",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Add\",\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, Messages.BTN_ADD,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tMessages.BTN_FINISH, false);\r\n\t\tinitDataBindings();\r\n\t}",
"@Override\n protected Dialog onCreateDialog(int id) {\n if ((id == VM_RESPONSE_ERROR) || (id == VM_NOCHANGE_ERROR) ||\n (id == VOICEMAIL_DIALOG_CONFIRM)) {\n \n AlertDialog.Builder b = new AlertDialog.Builder(this);\n \n int msgId;\n int titleId = R.string.error_updating_title;\n switch (id) {\n case VOICEMAIL_DIALOG_CONFIRM:\n msgId = R.string.vm_changed;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_NOCHANGE_ERROR:\n // even though this is technically an error,\n // keep the title friendly.\n msgId = R.string.no_change;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_RESPONSE_ERROR:\n msgId = R.string.vm_change_failed;\n // Set Button 1\n b.setPositiveButton(R.string.close_dialog, this);\n break;\n default:\n msgId = R.string.exception_error;\n // Set Button 3, tells the activity that the error is\n // not recoverable on dialog exit.\n b.setNeutralButton(R.string.close_dialog, this);\n break;\n }\n \n b.setTitle(getText(titleId));\n b.setMessage(getText(msgId));\n b.setCancelable(false);\n AlertDialog dialog = b.create();\n \n // make the dialog more obvious by bluring the background.\n dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);\n \n return dialog;\n }\n \n return null;\n }",
"public void cancel() { Common.exitWindow(cancelBtn); }",
"@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }",
"@Override\n public void onClick(View v) {\n builder.setMessage(R.string.alertMessage)\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //buClick();\n //finish();\n dialog.cancel();\n calculat();\n\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n\n }\n });\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(R.string.alertTitle);\n alert.show();\n }",
"private ButtonPane()\r\n\t\t\t{ super(new String[]{\"OK\",\"Cancel\"},1,2); }",
"void btnCancel();",
"private void deleteDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.warmhint));\n\t\tbuilder.setMessage(getString(R.string.changequestion2));\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdeleteAllTag();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\tgetString(R.string.successdelete),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message\n // This also creates click listeners for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the phone.\n deletePhone();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the phone.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"protected abstract JDialog createDialog();",
"public void getConfirmDialog(String title, String msg, String positiveBtnCaption, String negativeBtnCaption, boolean isCancelable, final AlertMagnatic target) {\r\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n\t\tint imageResource = android.R.drawable.ic_dialog_alert;\r\n\t\tDrawable image = getResources().getDrawable(imageResource);\r\n\r\n\t\tbuilder.setTitle(title).setMessage(msg).setIcon(image).setCancelable(false).setPositiveIjoomerButton(positiveBtnCaption, new DialogInterface.OnClickListener() {\r\n\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\ttarget.PositiveMathod(dialog, id);\r\n\t\t\t}\r\n\t\t}).setNegativeIjoomerButton(negativeBtnCaption, new DialogInterface.OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\ttarget.NegativeMathod(dialog, id);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tAlertDialog alert = builder.create();\r\n\t\talert.setCancelable(isCancelable);\r\n\t\talert.show();\r\n\t}",
"void ShowOkDialog(String title, String message, OnClickListener listener);",
"@Override\r\n public void onClick(View v) {\n\t\t\t\tfinal Dialog confirmDialog = new Dialog(context, R.style.Dialog);\r\n\t\t\t\tconfirmDialog.setContentView(R.layout.question_delete);\r\n\t\t\t\tDisplay displaySize = ActivityUtil.getDisplaySize(getContext());\r\n\t\t\t\tconfirmDialog.getWindow().setLayout(displaySize.getWidth(), displaySize.getHeight());\r\n\t\t\t\tconfirmDialog.show();\r\n\t\t\t\t\r\n\t\t\t\t// Adding listeners on each button\r\n\t\t\t\tButton btCancel = (Button) confirmDialog.findViewById(R.id.bt_cancel);\r\n\t\t\t\tButton btConfirm = (Button) confirmDialog.findViewById(R.id.bt_confirm);\r\n \t\r\n btCancel.setOnClickListener(new CloseClickListenerUtil(confirmDialog));\r\n btConfirm.setOnClickListener(new Button.OnClickListener() {\r\n \t\r\n \tpublic void onClick(View v) {\r\n \t\t//\r\n // #91 XXX TODO: Add some error handling to check whether we really need to delete or not before we\r\n // incorrectly assume our REST call to the server worked.\r\n \t\ttry {\r\n\t\t\t\t\t\t\tSmilePlugServerManager spsm = new SmilePlugServerManager();\r\n String status = spsm.deleteQuestionInSessionByNumber(ip, context, currentQuestion);\r\n Toast.makeText(context, status, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t} catch (NetworkErrorException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n Toast.makeText(context, \"Error deleting question, reason: \" + e.getMessage(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t}\r\n \t\t\r\n \t\t\tconfirmDialog.dismiss();\r\n \t\t\tdetailsDialog.dismiss();\r\n \t\t\t\r\n \t\t\t// QuestionsManager.addDeletedQuestionInLocalFile(context, currentQuestion);\r\n\t\t\t\t\t};\r\n });\r\n \t }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the Product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }",
"protected void createSaveButtons() {\n Composite buttonComp = new Composite(shell, SWT.NONE);\n buttonComp.setLayout(new GridLayout(2, true));\n buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,\n false));\n\n int buttonWidth = 80;\n GridData gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button saveBtn = new Button(buttonComp, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleSaveAction();\n }\n });\n\n gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button cancelBtn = new Button(buttonComp, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(null);\n close();\n }\n });\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_book_warning);\r\n builder.setPositiveButton(R.string.delete_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n deletebook();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.cancel_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n if (dialogInterface != null) {\r\n dialogInterface.dismiss();\r\n }\r\n }\r\n });\r\n\r\n //show alert dialog upon deletion\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }",
"public void SessionConfirmationDialog() {\n sessiondetailConfirmationDialogBinding = DataBindingUtil.\n inflate(LayoutInflater.from(mContext), R.layout.sessiondetail_confirmation_dialog, (ViewGroup) addStudentScreenBinding.getRoot(), false);\n confimDialog = new Dialog(mContext, R.style.Theme_Dialog);\n Window window = confimDialog.getWindow();\n WindowManager.LayoutParams wlp = window.getAttributes();\n confimDialog.getWindow().getAttributes().verticalMargin = 0.20f;\n wlp.gravity = Gravity.TOP;\n window.setAttributes(wlp);\n\n // confimDialog.getWindow().setBackgroundDrawableResource(R.drawable.session_confirm);\n confimDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n confimDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n confimDialog.setCancelable(false);\n confimDialog.setContentView(sessiondetailConfirmationDialogBinding.getRoot());\n callSessionListApi();\n sessiondetailConfirmationDialogBinding.cancelTxt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n confimDialog.dismiss();\n }\n });\n sessiondetailConfirmationDialogBinding.confirmTxt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AppConfiguration.TeacherSessionIdStr = sessionIDStr;\n AppConfiguration.TeacherSessionContactIdStr = contatIDstr;\n AppConfiguration.UserName=firstNameStr+\" \"+lastNameStr;\n callSessioncapacityApi();\n confimDialog.dismiss();\n }\n });\n confimDialog.show();\n\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttableObjects.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tableObjects.getItem(data);\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Pack\", \"Are you sure delete all objects of this Pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\t\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\tObject rowId = tableObjects.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tableObjects.getContainerProperty(rowId,\"IdObject\").getValue();\r\n\t\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\tString cadena = \"DELETE ObjectBYPacks WHERE IDpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\t\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\ttableObjects.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Object deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\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 } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\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 } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\t\t\t\t\t\t\t\t}",
"private void showConfirmDeletionDialog(){\n //give builder our custom dialog fragment style\n new AlertDialog.Builder(this, R.style.dialogFragment_title_style)\n .setMessage(getString(R.string.powerlist_confirmRemoval))\n .setTitle(getString(R.string.powerList_confirmRemoval_title))\n .setPositiveButton(getString(R.string.action_remove),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n myActionListener.userDeletingPowersFromList(\n PowerListActivity.this.adapter.getSelectedSpells());\n deleteButton.setVisibility(View.GONE);\n //tell adapter to switch selection mode off\n PowerListActivity.this.adapter.endSelectionMode();\n }\n })\n .setNegativeButton(getString(R.string.action_cancel), null)\n .show();\n }",
"private void createOKButtons() {\n okAddButton = addOKButton(\"Add Shape\");\n okRemoveButton = addOKButton(\"Remove Shape\");\n okAddKeyframeButton = addOKButton(\"Add Keyframe\");\n okAddKeyframeTimeButton = addOKButton(\"Add Keyframe Time\");\n okRemoveKeyframeButton = addOKButton(\"Remove Keyframe\");\n okRemoveKeyframeTimeButton = addOKButton(\"Remove Keyframe Time\");\n okEditKeyframeButton = addOKButton(\"Edit Keyframe\");\n okEditKeyframeTimeButton = addOKButton(\"Edit Keyframe Time\");\n okEditKeyframeFinalButton = addOKButton(\"Edit Keyframe Final\");\n okClearShapeButton = addOKButton(\"Clear Shape\");\n }",
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\n }",
"@Override\r\n public void confirmDialogPositive(int callbackFunctionID) {\n \r\n }",
"HasClickHandlers getCancelButton();",
"private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, null);\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_dialog_msg);\r\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Delete\" button, so delete the pet.\r\n// deletePet();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Cancel\" button, so dismiss the dialog\r\n // and continue editing.\r\n if (dialog != null) {\r\n dialog.dismiss();\r\n }\r\n }\r\n });\r\n\r\n // Create and show the AlertDialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteBook();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg_course);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteCourse();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void init(final Shell shell) {\n\t\t\tshell.setText(\"Confirm overwrite\");\n\t\t\tshell.setLayout(new GridLayout(6, true));\n\n\t\t\t// Widgets of Wrapped Class\n\t\t\tLabel label = new Label(shell, SWT.None);\n\t\t\tGridData data = new GridData(GridData.FILL_HORIZONTAL);\n\t\t\tdata.horizontalSpan = 6;\n\t\t\tlabel.setLayoutData(data);\n\t\t\tlabel.setText(\"Follow files will be overwritten, are you sure?\");\n\n\t\t\torg.eclipse.swt.widgets.List lFilesList = new org.eclipse.swt.widgets.List(\n\t\t\t\t\tshell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\tdata = new GridData(GridData.FILL_BOTH);\n\t\t\tdata.horizontalSpan = 6;\n\t\t\tdata.verticalSpan = 5;\n\t\t\tlFilesList.setLayoutData(data);\n\t\t\tlFilesList.setItems(iFiles);\n\n\t\t\t// Separator\n\t\t\tlabel = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\t\tdata = new GridData(GridData.FILL_HORIZONTAL);\n\t\t\tdata.horizontalSpan = 6;\n\t\t\tlabel.setLayoutData(data);\n\n\t\t\t// Place holder\n\t\t\tlabel = new Label(shell, SWT.None);\n\t\t\tdata = new GridData(GridData.FILL_HORIZONTAL);\n\t\t\tdata.horizontalSpan = 3;\n\t\t\tlabel.setLayoutData(data);\n\n\t\t\t// Yes Button\n\t\t\tButton lBtnYES = new Button(shell, SWT.PUSH);\n\t\t\tlBtnYES.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\tlBtnYES.setText(Messages.getString(\"Dialog.YES\"));\n\t\t\tlBtnYES.addSelectionListener(new SelectionAdapter() {\n\t\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\t\tresult = YES;\n\t\t\t\t\t((Button) event.widget).getShell().dispose();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// NO Button\n\t\t\tButton lBtnNO = new Button(shell, SWT.PUSH);\n\t\t\tlBtnNO.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\tlBtnNO.setText(Messages.getString(\"Dialog.NO\"));\n\t\t\tlBtnNO.addSelectionListener(new SelectionAdapter() {\n\t\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\t\tresult = NO;\n\t\t\t\t\t((Button) event.widget).getShell().dispose();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Cancle Button\n\t\t\tButton lBtnCancel = new Button(shell, SWT.PUSH);\n\t\t\tlBtnCancel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\tlBtnCancel.setText(Messages.getString(\"Dialog.Cancel\"));\n\t\t\tlBtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\t\tresult = CANCEL;\n\t\t\t\t\t((Button) event.widget).getShell().dispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }",
"private JButton getOkButton() {\n if (okButton == null) {\n okButton = new JButton();\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n canceled = false;\n dispose();\n }\n });\n }\n return okButton;\n }",
"private void showConfirmClearDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());\n dialog.setTitle(res.getString(R.string.dialog_clear_sale));\n dialog.setPositiveButton(res.getString(R.string.no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n dialog.setNegativeButton(res.getString(R.string.clear), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n register.cancleSale();\n update();\n }\n });\n\n dialog.show();\n }",
"public static Button createCancelButton(Composite c,\n\t\t\tfinal Composite panel, final StackLayout layout) {\n\t\tButton cancelButton = new Button(c, SWT.PUSH);\n\t\tcancelButton.setText(\"Cancel\");\n\t\tcancelButton.setBounds(10, HEIGHT - 90, 100, 50);\n\t\tcancelButton.addListener(SWT.Selection, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tcancel = false;\n\t\t\t\tfinal Shell areYouSureShell = new Shell(display);\n\t\t\t\tareYouSureShell.setText(\"Cancel\");\n\t\t\t\tareYouSureShell.setSize(300, 200);\n\t\t\t\tcenter(areYouSureShell);\n\n\t\t\t\tLabel areYouSure = new Label(areYouSureShell, SWT.NONE);\n\t\t\t\tareYouSure.setLocation(40,50);\n\t\t\t\tareYouSure.setText(\"Are you sure you want to cancel?\");\n\t\t\t\tareYouSure.pack();\n\n\t\t\t\tButton yes = new Button(areYouSureShell, SWT.PUSH);\n\t\t\t\tyes.setBounds(10,130,130,30);\n\t\t\t\tyes.setText(\"Yes, Cancel\");\n\t\t\t\tyes.addListener(SWT.Selection, new Listener() {\n\t\t\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t\t\tcancel = true;\n\t\t\t\t\t\tareYouSureShell.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tButton no = new Button(areYouSureShell, SWT.PUSH);\n\t\t\t\tno.setBounds(160,130,130,30);\n\t\t\t\tno.setText(\"No, Don't Cancel\");\n\t\t\t\tno.addListener(SWT.Selection, new Listener() {\n\t\t\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t\t\tcancel = false;\n\t\t\t\t\t\tareYouSureShell.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tareYouSureShell.open();\n\t\t\t\twhile (!areYouSureShell.isDisposed()) {\n\t\t\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (cancel) {\n\t\t\t\t\tshell.close();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn cancelButton;\n\t}",
"private static void showTripleOptionDialog(Context c, int titleID, int messageID, int posButtonID, int neutralButtonID, int negButtonID, OnClickListener posListener, OnClickListener neutralListener, OnClickListener negListener){\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(c);\n\t\tbuilder.setTitle(titleID)\n\t\t.setPositiveButton(posButtonID, posListener)\n\t\t.setNeutralButton(neutralButtonID, neutralListener)\n\t\t.setNegativeButton(negButtonID, negListener);\n\t\tif(messageID > -1){\n\t\t\tbuilder.setMessage(messageID);\n\t\t}\n\n\t\tbuilder.create().show();\n\t}",
"private void createAlertDialog(String title, String message, final boolean shouldExit) {\n Collect.getInstance().getActivityLogger().logAction(this, \"createAlertDialog\", \"show\");\n mAlertDialog = new AlertDialog.Builder(this).create();\n mAlertDialog.setTitle(title);\n mAlertDialog.setMessage(message);\n DialogInterface.OnClickListener quitListener = new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int i) {\n switch (i) {\n case DialogInterface.BUTTON1: // ok\n Collect.getInstance().getActivityLogger().logAction(this, \"createAlertDialog\", \"OK\");\n // successful download, so quit\n if (shouldExit) {\n finish();\n }\n break;\n }\n }\n };\n mAlertDialog.setCancelable(false);\n mAlertDialog.setButton(getString(R.string.ok), quitListener);\n mAlertDialog.setIcon(android.R.drawable.ic_dialog_info);\n mAlertDialog.show();\n }",
"private JPanel initButtonPanel() {\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new FlowLayout(SwingUtilities.HORIZONTAL));\n\n completeButton = new JButton(new AbstractAction(\"Complete\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n task.setStatus(TaskStatus.COMPLETED);\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(completeButton);\n\n closeButton = new JButton(new AbstractAction(\"Close\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(closeButton);\n\n return buttonPanel;\n }"
]
| [
"0.7297035",
"0.694678",
"0.6911311",
"0.68040365",
"0.6780989",
"0.6767006",
"0.67411685",
"0.6721226",
"0.67059016",
"0.66301364",
"0.66184676",
"0.65576136",
"0.651968",
"0.65160275",
"0.6509972",
"0.65093356",
"0.6506683",
"0.6501243",
"0.6493202",
"0.6477847",
"0.64671826",
"0.6466167",
"0.64611953",
"0.6449715",
"0.6449715",
"0.6432055",
"0.64227253",
"0.6422471",
"0.64177954",
"0.6417509",
"0.64063776",
"0.6405039",
"0.6403012",
"0.6397383",
"0.6380556",
"0.6380556",
"0.6380556",
"0.6380556",
"0.63709176",
"0.6369454",
"0.6364794",
"0.63588357",
"0.63538116",
"0.63515216",
"0.63157254",
"0.63111824",
"0.6308444",
"0.63063234",
"0.6294912",
"0.6284763",
"0.62726754",
"0.6268144",
"0.62630844",
"0.6262184",
"0.62509483",
"0.6246303",
"0.6246044",
"0.62248075",
"0.6221945",
"0.62147635",
"0.62065244",
"0.6204696",
"0.62032163",
"0.61982375",
"0.61971295",
"0.6196614",
"0.61950606",
"0.6191051",
"0.61908066",
"0.61824745",
"0.61821693",
"0.61820734",
"0.6164722",
"0.61644906",
"0.6163918",
"0.6163657",
"0.6162226",
"0.6161921",
"0.61583877",
"0.6148392",
"0.61327094",
"0.6131802",
"0.6127596",
"0.6126479",
"0.6123278",
"0.61176014",
"0.61122704",
"0.61120826",
"0.6107628",
"0.610743",
"0.6089027",
"0.6088195",
"0.60862225",
"0.60786223",
"0.6068427",
"0.60653865",
"0.6064914",
"0.60638636",
"0.606108",
"0.60593134"
]
| 0.67349786 | 7 |
called when result confirm button is pressed. | private void onConfirmButtonPressed() {
disposeDialogAndCreateNewGame();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void actionPerformed(ActionEvent e) {\n Object source = e.getSource();\n if (source == confirmButton) {\n var newResult = new Result(result, name.getText());\n try {\n newResult.saveResult();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }\n }",
"private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }",
"public void confirm(String result) {\n mStringResult = result;\n confirm();\n }",
"void confirm();",
"@Override\r\n public void confirmClicked(boolean result, int id) {\r\n if (result == true) {\r\n deleteSelectedWaypoints();\r\n }\r\n\r\n // reset the current gui screen to be ourselves now that we are done\r\n // with the GuiYesNo dialog\r\n this.mc.displayGuiScreen(this);\r\n }",
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"private void handleConfirmEvent() {\n this.confirm = new Button(\"Add Food\");\n confirm.setOnAction(e2 -> {\n boolean valid = checkInputValidity();\n // if the inputs failed the validation test\n // return without calling refresh method to add a new food data\n if (valid == false)\n return;\n else\n addNewFoodItemRefresh(); // call the method to add a food item\n });\n\n }",
"private void btnConfirmActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }",
"private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}",
"public abstract boolean confirm();",
"public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}",
"public void confirmStudentUpdate(){\n\n String title =\"Confirm student information update\";\n String HeaderText = \"Confirm inserted data\";\n String ContentText = \"Are you sure you want to update this student's information?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n updateStudent();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }",
"@Override\n\tpublic void processConfirmItemButtonClick(ProcessConfirmItemObjectEvent e) {\n\t\t\n\t}",
"@Override\n public void handle(ActionEvent event) {\n alert = new Alert(AlertType.CONFIRMATION);\n //Optional title. If not used the standard title \"Confiramation\" will be displayed\n //To remove the title use alert.setTitle(null);\n alert.setTitle(\"Confirmation Dialog\");\n //Optional header.If not used the standard header \"Confiramation\" will be displayed\n //To remove the title use alert.setHeaderText(null); \n alert.setHeaderText(\"Please answer the question!\");\n alert.setContentText(initText);\n //Display the dialog and get the result from the user action\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n // the user clicked OK\n alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(\"Important message for you!\");\n alert.setContentText(\"Happiness is ephemeral!\");\n alert.showAndWait(); \n //the user clocked Cancel\n } else {\n // ... user chose CANCEL or closed the dialog\n //Warning Dialog\n alert = new Alert(AlertType.WARNING);\n alert.setTitle(\"Warning Dialog\");\n alert.setHeaderText(\"Read the Warning!\");\n alert.setContentText(\"You must like Java - Shall make you Happy!\");\n alert.showAndWait(); \n }\n }",
"private void gaVerder()\n {\n /**\n * Dialog tonen waarbij de gebruiker de keuze krijgt om al dan niet nog een spelbord te maken.\n */\n Alert keuze = new Alert(Alert.AlertType.CONFIRMATION);\n keuze.setTitle(ResourceHandling.getInstance().getString(\"Configureer.gaverder\"));\n keuze.setHeaderText(ResourceHandling.getInstance().getString(\"Knop.verder\"));\n\n ButtonType btnNieuw = new ButtonType(ResourceHandling.getInstance().getString(\"Spelbord.nieuw\"));\n ButtonType btnCancel = new ButtonType(ResourceHandling.getInstance().getString(\"Annuleer.knop\"));\n\n keuze.getButtonTypes().setAll(btnCancel, btnNieuw);\n Optional<ButtonType> result = keuze.showAndWait();\n\n if (result.get() == btnNieuw)\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new GaVerderSchermController(dc), 488, 213, this);\n } else\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new KiesConfigureerSchermController(dc), 300, 300, this);\n }\n }",
"protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}",
"public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n jlQuestion.setText(S_QUESTION_CONFIRMATION);\n jbNewOrderButton.setVisible(false);\n jbConfirm.setVisible(true);\n jbCancel.setVisible(true);\n }",
"public void handleUpdateCopyConfirmButtonAction(ActionEvent event) {\n try {\n String copyID = this.tempCopyID;\n String location = updateCopyLocation.getText();\n updateMgr.updateCopy(copyID, location);\n this.displaySuccess(\"Updated\", \"Copy information has successfully been updated\");\n this.clearUpdateCopyFields();\n } catch (SQLException | ClassNotFoundException ex) {\n this.displayWarning(\"Error\", ex.getMessage());\n } catch (Exception ex) {\n this.displayWarning(\"Error\", ex.getMessage());\n } \n }",
"public void confirmFAB_onClick(View view){\n formValidator.doVisualValidation();\n if(!formValidator.isValid()){\n new AndroidUtil(this).showToast(R.string.toast_invalidFields, Toast.LENGTH_LONG);\n return;\n }\n\n\n // *Building the new Answer object:\n String[] answerArray;\n if(eMultipleAnswerType == null){\n answerArray = new String[]{ textAnswerIn.getText().toString() };\n } else{\n answerArray = Answer.convertIntArray_AlphabetArray(compoundButtonController.getCheckedIndexes());\n }\n answer = new Answer(answerArray);\n\n\n // *Sending the OK result intent:\n Intent resultIntent = new Intent()\n .putExtra(QUESTION_INDEX_INTENT_KEY, index)\n .putExtra(ANSWER_INTENT_KEY, answer.toString());\n if (getParent() == null) {\n setResult(Activity.RESULT_OK, resultIntent);\n } else {\n getParent().setResult(Activity.RESULT_OK, resultIntent);\n }\n finish();\n }",
"private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }",
"@Override\n public void showConfirm() {\n calledMethods.add(\"showConfirm\");\n }",
"@Override\n\t\t\tpublic boolean onJsConfirm(WebView view, String url,\n\t\t\t\t\tString message, JsResult result) {\n\t\t\t\treturn super.onJsConfirm(view, url, message, result);\n\t\t\t}",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"@Test\n public void basicConfirmHandlingAcceptTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.accept();\n assertEquals(\"true\", confirmResult.getText());\n }",
"@Override\n public View.OnClickListener HandleConfirm() {\n return v -> {\n //If the form verification succeeded, we process the form\n if (FormVerification()) {\n //Apply the form changes to mLocation\n ApplyChangeToLocation();\n //Update the selected location inside the database\n mLocationLog.UpdateLocation(mLocation);\n //Refresh the activity state to show the changes\n mMainActivityState.RefreshState();\n //Close the dialog\n mCurrentDialog.dismiss();\n }\n };\n }",
"void okButtonClicked();",
"public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.putExtra(\"Yes_or_No\",\"No\");\n setResult(RESULT_OK, intent);\n finish();\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showConfirmDialog(null, \"BOTAO CLICADO\", \"VALOR\", JOptionPane.PLAIN_MESSAGE);\n\n\t\t}",
"@Override\n public void clickPositive() {\n meetingManager.undoConfirm(chosenTrade, chosenTrader);\n Toast.makeText(this, \"Successfully undo confirm\", Toast.LENGTH_SHORT).show();\n viewList();\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }",
"@Override\r\n public void confirmDialogPositive(int callbackFunctionID) {\n \r\n }",
"protected void handleResultSuccessful(final T result) {\n\t\tgetContentResultHolder().setVisible(true);\n\t}",
"public void handleUpdateCopyDeleteButtonAction(ActionEvent event) {\n confirmHeader.setText(\"Confirm delete action\");\n String text = \"are you sure you want to update this copy?\";\n confirmText.setText(text);\n confirmPane.setVisible(true);\n maskPane.setVisible(true);\n this.handleOnShowAnimation(confirmMessageHolderPane);\n }",
"public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }",
"public void clickedOk(View view) {\n \t\n \t// validate the data set\n \tif (!getData()) return;\n \t\n \t// confirm values that are in range, but possibly wrong\n \tif (!confirmData(0)) return;\n \t\n \t// success\n \t\treturnResult(Activity.RESULT_OK);\n }",
"public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}",
"private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public abstract void showConfirmationBox(String message, Consumer<Boolean> resultCallback);",
"private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}",
"public void confirmSelection() {\n\t\t//create and display an AlertDialog requesting a filename for the new capture\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setTitle(\"What did you hear?\");\n\t\tfinal EditText inputText = new EditText(context);\n\t\tinputText.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_CAP_SENTENCES|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);\n\t\tbuilder.setView(inputText);\n\n\t\tbuilder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() { \n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t// execute the capture operations:\n\t\t\t\tfilename = inputText.getText().toString().trim();\n\t\t\t\tnew CaptureTask(context).execute();\n\t\t\t}\n\t\t});\n\t\tbuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t});\n\t\tbuilder.show();\n\t}",
"private void confirmExit() {\n if (hasChanges()) {\n new AlertDialog.Builder(this).\n setMessage(R.string.dialog_discard_msg).\n setNegativeButton(R.string.dialog_discard_neg, (dialog, which) -> {}).\n setPositiveButton(R.string.dialog_discard_pos, (dialog, which) -> finish()).\n create().\n show();\n }\n else {\n showToast(R.string.toast_no_changes);\n finish();\n }\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttableObjects.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tableObjects.getItem(data);\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Pack\", \"Are you sure delete all objects of this Pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\t\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\tObject rowId = tableObjects.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tableObjects.getContainerProperty(rowId,\"IdObject\").getValue();\r\n\t\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\tString cadena = \"DELETE ObjectBYPacks WHERE IDpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\t\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\ttableObjects.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Object deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\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 } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\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 } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\t\t\t\t\t\t\t\t}",
"private void onOK() {\n isOkClicked = true;\n dispose();\n }",
"protected abstract boolean onOkClicked();",
"public void onYesButtonClicked() {\n changeAfterClientPick();\n }",
"public void confirmExit() {\n boolean confirmOnExit = getIntent().getExtras().getBoolean(MapsActivity.PARAMETERS.CONFIRM_ON_EXIT, true);\n if (confirmOnExit) {\n new AlertDialog.Builder(this).setTitle(R.string.button_confirm_exit_title)\n .setMessage(R.string.button_confirm_exit)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n finish();\n return;\n }\n }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n }).show();\n } else {\n finish();\n }\n }",
"public void handleUpdateItemDeleteButtonAction(ActionEvent event) {\n confirmHeader.setText(\"Confirm delete action\");\n String text = \"are you sure you want to update this item?\";\n confirmText.setText(text);\n confirmPane.setVisible(true);\n maskPane.setVisible(true);\n this.handleOnShowAnimation(confirmMessageHolderPane);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n\t\tprotected void onPostExecute(String result) {\n\t\t\tmDialog.cancel();\r\n\t\t\tIntent intent=new Intent();\r\n\t\t\tsetResult(11, intent);\r\n\t\t\tfinish();\r\n\t\t}",
"@Override\r\n\tprotected void onOkSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Ok button implementation\");\r\n\t}",
"@Override\r\n public void onClick(View v) {\n setResult(1);\r\n finish();\r\n }",
"public boolean onConfirmClicked(DialogActivity dialog)\n {\n return mApplyButton.performClick();\n }",
"public void verResultadoPrueba(PruebaCandidato pruebacselec)\r\n\t{\r\n\t\tresultadoprueba = new ResultadoPrueba(this, pruebacselec);\r\n\t\tresultadoprueba.setVisible(true);\r\n\t}",
"void resetConfirm(){\n\t\tconfirmed = false;\n\t}",
"public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t\tcon.setResult(btnName);\n\t\t\t}",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttablePacks.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tablePacks.getItem(data);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Objects by Pack\", \"Are you sure delete objects of this pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\t\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\tObject rowId = tablePacks.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tablePacks.getContainerProperty(rowId,\"IdPack\").getValue();\r\n\t\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\tString cadena = \"DELETE ObjectbyPacks WHERE idpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\t\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\ttablePacks.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Objects by Pack deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\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 } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\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 } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\r\n\t\t\t\t\t\t\t\t}",
"private void jConfirmActionPerformed(final ActionEvent evt)\n {\n if (jAdmin.getText().length() == 0)\n {\n JOptionPane.showMessageDialog(null, \"用户名不能为空!\");\n return;\n }\n if (DA.checkAdmin(jAdmin.getText()))\n {\n JOptionPane.showMessageDialog(null, \"用户名已经被使用!\");\n return;\n }\n if (jPassWord.getPassword().length == 0\n || jPassWordRepeat.getPassword().length == 0)\n {\n JOptionPane.showMessageDialog(null, \"密码不能为空!\");\n jPassWord.setText(\"\");\n jPassWordRepeat.setText(\"\");\n return;\n }\n final String password = new String(jPassWord.getPassword());\n final String passwordRepeat = new String(jPassWordRepeat.getPassword());\n // System.out.println(password+\" \"+passwordRepeat);\n if (password.equals(passwordRepeat) == false)\n {\n JOptionPane.showMessageDialog(null, \"两次密码输入不匹配,请重新输入!\");\n jPassWord.setText(\"\");\n jPassWordRepeat.setText(\"\");\n return;\n }\n\n final MD5 md5 = new MD5(password);\n final AdminData admin = new AdminData();\n admin.setAdmin(jAdmin.getText());\n admin.setPassWord(md5.get());\n\n DA.addAdmin(admin);\n JOptionPane.showMessageDialog(null, \"注册成功!\");\n dispose();\n }",
"public void setConfirmButtonListener() {\r\n Confirm.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n if(!NumberCheckUtil.checkIfStringIsNum(Age.getText().toString())) {\r\n displayInvalidNumberAlert(1);\r\n return;\r\n }\r\n\r\n age = Integer.parseInt(Age.getText().toString());\r\n\r\n if(age < 2) {\r\n displayInvalidNumberAlert(1);\r\n return;\r\n }\r\n\r\n if(!NumberCheckUtil.checkIfStringIsNum(Height.getText().toString())) {\r\n displayInvalidNumberAlert(2);\r\n return;\r\n }\r\n\r\n if(!NumberCheckUtil.checkIfStringIsNum(Weight.getText().toString())) {\r\n displayInvalidNumberAlert(3);\r\n return;\r\n }\r\n\r\n name = Name.getText().toString();\r\n height = Integer.parseInt(Height.getText().toString());\r\n weight = Integer.parseInt(Weight.getText().toString());\r\n gender = Gender.getSelectedItem().toString();\r\n selected = findViewById(ActivityLevel.getCheckedRadioButtonId());\r\n activityLevel = selected.getText().toString();\r\n\r\n Intent confirm = new Intent(MainActivity.this, StatsDisplayActivity.class);\r\n confirm.putExtra(\"name\", name);\r\n confirm.putExtra(\"age\", age);\r\n confirm.putExtra(\"gender\", gender);\r\n confirm.putExtra(\"activityLevel\", activityLevel);\r\n confirm.putExtra(\"height\", height);\r\n confirm.putExtra(\"weight\", weight);\r\n startActivity(confirm);\r\n }\r\n });\r\n }",
"public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }",
"@FXML\n\tpublic void handleConfirm(){\n\t\tif(chooseYear.getValue()!=null && chooseMonth.getValue()!=null && chooseDay.getValue()!=null){\n\t\t\tPlainDialog alert = new PlainDialog(AlertType.CONFIRMATION,\n\t\t\t\t\t\"请进行确认\",\"填写的生日将不可更改,确认不再修改吗\");\n\t\t\tOptional<ButtonType> result = alert.showDialog();\n\t\t\t\n\t\t\t//这里还要修改\n\t\t\tresult.ifPresent( ok -> {\n\t\t\t\taccessor.setBirthday(LocalDate.of(chooseYear.getValue(), chooseMonth.getValue(), chooseDay.getValue()));\n\t\t\t\tMemberAccountCourier.getInstance().register();\n\t\t\t\tcontroller.addSignInPane();\n\t\t\t});\n\t\t}else{\n\t\t\tPlainDialog alert = new PlainDialog(AlertType.INFORMATION,\n\t\t\t\t\t\"注册失败\",\"请输入你的完整的生日信息\");\n\t\t\talert.showDialog();\n\t\t}\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == btnCancel) {\n new AdminView().setVisible(true);\n this.dispose();\n } else if (e.getSource() == btnSearch) {\n clickSearch();\n } else if (e.getSource() == btnConfirm) {\n if (strMaMT != null && strMaTL != null) {\n clickConfirm();\n if (MuonTraDAO.getNumOfMuonTL(strMaMT) == MuonTraDAO.getNumOfTraTL(strMaMT)) {\n JOptionPane.showMessageDialog(rootPane, \"Đã trả hết mã '\" + strMaMT + \"' !\\nThanh toán tiền cọc!\\nSố tiền cọc là: \" \n + MuonTraDAO.getNumOfMuonTL(strMaMT) * 50000 + \"đ\");\n }\n } else {\n JOptionPane.showMessageDialog(rootPane, \"Chưa chọn Tài Liệu Muốn Trả\", \"ERROR\", JOptionPane.WARNING_MESSAGE);\n }\n } else if (e.getSource() == btnShowAll) {\n clickShowAll();\n } else if (e.getSource() == btnPrint) {\n getReport();\n// printResult();\n// new PrintTraTL().setVisible(true);\n// this.dispose();\n }\n }",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tsetResult(0x26, null);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}",
"public void OnOkClick()\r\n {\r\n\r\n }",
"public void handleUpdateItemConfirmButtonAction(ActionEvent event) {\n try{\n String itemID = this.tempItemID;\n String title = updateItemTitle.getText();\n String author = updateItemAuthor.getText();\n GregorianCalendar publishDate = parseDate(updateItemPublishDate.getText());\n String description = updateItemDescription.getText();\n String ISBN = updateItemISBN.getText();\n String genre = updateItemGenre.getText();\n if (title.length()>0 && author.length()>0 && description.length()>0 && ISBN.length()>0 && genre.length()>0){ \n updateMgr.updateBook(itemID, title, author, publishDate, description, ISBN, genre);\n this.displaySuccess(\"Updated\", \"Item information has successfully been updated\");\n this.clearUpdateItemFields();\n }\n else{ \n displayWarning(\"Item Information incomplete\", \"Please fill in the necessary fields\");\n } \n }\n catch(ArrayIndexOutOfBoundsException | NumberFormatException e){\n displayWarning(\"Sorry\",\"Date format is wrong\\n\" + e.getMessage());\n }\n catch(Exception e){\n displayWarning(\"Sorry\",\"One of the fields is wrong:\\n\" + e.getMessage());\n }\n }",
"protected void onConfirmation(int confirmationId, Object anObject) {\r\n\r\n\t}",
"private void answerResultAlert(String feedback){\n AlertDialog.Builder showResult = new AlertDialog.Builder(this);\n\n showResult.setTitle(feedback);\n showResult.setMessage(currentQuestion.getExplanation());\n showResult.setCancelable(false); //if this is not set, the user may click outside the alert, cancelling it. no cheating this way\n showResult.setNeutralButton(\"ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //only when the ok is clicked will continue to run the program\n setUpQuestions();\n }\n });\n showResult.create();\n showResult.show();\n }",
"@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}",
"public void onConfirmButtonClick(View v){\n // Read amount from field to variable\n int amount = Integer.parseInt(amountField.getText().toString());\n\n // Set Strings ready for reading\n String toAccount = \"\";\n String fromAccount = \"\";\n String transactionType = \"\";\n\n // Different read methods for different transaction types\n if (internalBtn.isChecked()){\n transactionType = \"Internal transfer\";\n toAccount = toSpinner.getSelectedItem().toString();\n fromAccount = fromSpinner.getSelectedItem().toString();\n }\n else if (externalBtn.isChecked()){\n transactionType = \"External transfer\";\n toAccount = toTextField.getText().toString();\n fromAccount = fromSpinner.getSelectedItem().toString();\n }\n else if (depositBtn.isChecked()){\n transactionType = \"Deposit\";\n toAccount = toSpinner.getSelectedItem().toString();\n }\n else {\n // If no radio button checked, just finish this activity\n finish();\n }\n\n // Create new Transaction instance from values read\n Transaction transaction = new Transaction(transactionType, fromAccount, toAccount, amount);\n\n // Create intent and put transaction to it as extra\n Intent i = new Intent();\n i.putExtra(\"trans\", transaction);\n\n // Set ok result and finish\n setResult(RESULT_OK, i);\n finish();\n }",
"DialogResult show();",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdatabseExecuteQuery(\"UPDATE userdetails SET verify=1 where username='\"+Username+\"'\");\n\t\t\t\t\n\t\t\t\t//after that make verifiacation GUI again \n\t\t\t\tnew Verification();\n\t\t\t}",
"@Override\n\tpublic void finish() {\n\t\t\n\t\tIntent i=new Intent();\n\t\tBundle b=new Bundle();\n\t\tb.putString(\"Button\", ReturnString);\n\t\ti.putExtras(b);\n\t\t\n\t\tsetResult(RESULT_OK, i);\n\t\tsuper.finish();\n\t}",
"public void confirmExit() {\n int resposta = JOptionPane.showConfirmDialog(this,\n \"Really exit?\", \"Exit\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n if (resposta == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }",
"public interface ConfirmCallback {\r\n\r\n /**\r\n * This event is triggered when the OK button is pressed.\r\n */\r\n void ok();\r\n\r\n /**\r\n * This event is triggered when the CANCEL button is pressed.\r\n */\r\n void cancel();\r\n }",
"@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}",
"protected void finishConfirmCredentials(boolean result) {\n\t\tLog.i(TAG, \"finishConfirmCredentials()\");\n\t\tfinal Account account = new Account(data.getmHost(), Constants.ACCOUNT_TYPE);\n\t\tdata.getmAccountManager().setPassword(account, data.getmPassword());\n\t\tfinal Intent intent = new Intent();\n\t\tintent.putExtra(AccountManager.KEY_BOOLEAN_RESULT, result);\n\t\tsetAccountAuthenticatorResult(intent.getExtras());\n\t\tsetResult(RESULT_OK, intent);\n\t\tfinish();\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent Ae) {\n\t\tif(Ae.getSource() == cancel)\n\t\t{\n\t\t\t\n\t\t}\n\t\tif(Ae.getSource() == confirm)\n\t\t{\n\t\t\tthis.frame.setVisible(false);\n\t\t\tnew AdminHome(con,admin).frame.setVisible(true);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\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 \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}",
"public void execute() {\n if (myItemSelection.getSize() > 0) {\n confirmationDialogbox = new ConfirmationDialogbox(constants.deleteRolesDialogbox(), patterns.deleteRolesWarn( myItemSelection.getSelectedItems().size()), constants.okButton(), constants.cancelButton());\n confirmationDialogbox.addCloseHandler(new CloseHandler<PopupPanel>(){\n public void onClose(CloseEvent<PopupPanel> event) {\n if(confirmationDialogbox.getConfirmation()){\n deleteSelectedItems();\n }\n }} );\n } else {\n if (myMessageDataSource != null) {\n myMessageDataSource.addWarningMessage(messages.noRoleSelected());\n }\n } \n \n }",
"@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }",
"@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //release_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }",
"public static void main(String[] args) {\n \n int result=JOptionPane.showConfirmDialog(null,\"Are you sure to Exit?\",\n \"My Question\",JOptionPane.YES_NO_OPTION);\n \n switch(result){\n case JOptionPane.YES_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do..\");\n break;\n \n case JOptionPane.NO_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do not..\");\n break;\n \n case JOptionPane.CANCEL_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we cancel it..\");\n }\n }",
"public void confirm(String toConfirm) {\n\t\t//confirm user addition gui\n\t\tif(toConfirm.equals(\"add\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Added Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" + user.getText() + \" has been added\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm user deleted gui\n\t\telse if(toConfirm.equals(\"del\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Deleted Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" + user.getText() + \" has been deleted\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm user rename gui\n\t\telse if(toConfirm.equals(\"rename\")) {\n\t\t\tif(scope == ALL) {\n\t\t\t\tframe.dispose();\n\t\t\t\tframe = new JFrame(\"User Reanmed Successfully\");\n\t\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\t\tpanel.add(new JLabel(\"The user \" +oldUser.getText() + \" is now \" + user.getText()));\n\t\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\t\tpanel.add(button);\n\t\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\t\tframe.setAlwaysOnTop(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tframe.dispose();\n\t\t\t\tframe = new JFrame(\"User Reanmed Successfully\");\n\t\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\t\tpanel.add(new JLabel(\"You are now \" + user.getText()));\n\t\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\t\tpanel.add(button);\n\t\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\t\tframe.setAlwaysOnTop(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t}\n\t\t//confirm user promotion gui\n\t\telse if(toConfirm.equals(\"promote\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Promoted Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" +user.getText() + \" is now an admin\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm user demotion gui\n\t\telse if(toConfirm.equals(\"demote\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Demoted Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" +user.getText() + \" is now a regular user\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm cc payment\n\t\telse if(toConfirm.equals(\"ccpayment\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"Payment Successful\");\n\t\t\tframe.setSize(390, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The payment of $\" + purch.getText() + \" on \" + card.getText() + \" is successfull\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\topenDrawer();\n\t\t\t\t}\n\t\t\t});\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm cash payment\n\t\telse if(toConfirm.equals(\"cpayment\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"Payment Successful\");\n\t\t\tframe.setSize(390, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The payment of $\" + purch.getText() + \" is successfull\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\topenDrawer();\n\t\t\t\t}\n\t\t\t});\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t}",
"@Override\n public void starryEyes(String result) {\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\",result);\n setResult(RESULT_OK,returnIntent);\n finish();\n }",
"@Test\n public void basicConfirmHandlingDismissTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.dismiss();\n assertEquals(\"false\", confirmResult.getText());\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onClick(View v) {\n Intent returnIntent = new Intent();\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }",
"@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}",
"public void confirmation() throws InterruptedException {\n Scanner scan = new Scanner(System.in);\n String confirm = \"\";\n confirm = InputValidation.regexValidate(scan, \"yn\");\n\n if (confirm.equalsIgnoreCase(\"Y\")) {\n entryCheck();\n computeResult();\n System.out.println(Pet.petCollection.get(Pet.getIndex()).getCompetition());\n }\n Competition.c.setOpponent(Pet.PetGenerator());\n }",
"@Override\n public void onResultClick(SearchResult result) {\n }",
"@Override\n public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {\n new AlertDialog.Builder(UrlActivity.this)\n .setTitle(\"JsConfirm\")\n .setMessage(message)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n result.confirm();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n result.cancel();\n }\n })\n .setCancelable(false)\n .show();\n // 返回布尔值:判断点击时确认还是取消\n // true表示点击了确认;false表示点击了取消;\n return true;\n\n\n }",
"@Override\r\n public void onClick(View v) {\n\t\t\t\tfinal Dialog confirmDialog = new Dialog(context, R.style.Dialog);\r\n\t\t\t\tconfirmDialog.setContentView(R.layout.question_delete);\r\n\t\t\t\tDisplay displaySize = ActivityUtil.getDisplaySize(getContext());\r\n\t\t\t\tconfirmDialog.getWindow().setLayout(displaySize.getWidth(), displaySize.getHeight());\r\n\t\t\t\tconfirmDialog.show();\r\n\t\t\t\t\r\n\t\t\t\t// Adding listeners on each button\r\n\t\t\t\tButton btCancel = (Button) confirmDialog.findViewById(R.id.bt_cancel);\r\n\t\t\t\tButton btConfirm = (Button) confirmDialog.findViewById(R.id.bt_confirm);\r\n \t\r\n btCancel.setOnClickListener(new CloseClickListenerUtil(confirmDialog));\r\n btConfirm.setOnClickListener(new Button.OnClickListener() {\r\n \t\r\n \tpublic void onClick(View v) {\r\n \t\t//\r\n // #91 XXX TODO: Add some error handling to check whether we really need to delete or not before we\r\n // incorrectly assume our REST call to the server worked.\r\n \t\ttry {\r\n\t\t\t\t\t\t\tSmilePlugServerManager spsm = new SmilePlugServerManager();\r\n String status = spsm.deleteQuestionInSessionByNumber(ip, context, currentQuestion);\r\n Toast.makeText(context, status, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t} catch (NetworkErrorException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n Toast.makeText(context, \"Error deleting question, reason: \" + e.getMessage(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t}\r\n \t\t\r\n \t\t\tconfirmDialog.dismiss();\r\n \t\t\tdetailsDialog.dismiss();\r\n \t\t\t\r\n \t\t\t// QuestionsManager.addDeletedQuestionInLocalFile(context, currentQuestion);\r\n\t\t\t\t\t};\r\n });\r\n \t }",
"public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tString title = I18N.getLocalizedMessage(\"Error\");\n\t\t\tJOptionPane.showMessageDialog(null, msg, title, JOptionPane.ERROR_MESSAGE);\n\t\t} else\n\t\t\tsuper.cmdOk();\n\t}",
"public void gotoConfirmCode(){\n try {\n FXMLPantallaReservaFinalController verPantallaFinal = (FXMLPantallaReservaFinalController) replaceSceneContent(\"FXMLPantallaReservaFinal.fxml\");\n verPantallaFinal.setApp(this);\n verPantallaFinal.setText();\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void jMenuItemSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSalirActionPerformed\n LOG.trace(evt.paramString());\n\n int opc = JOptionPane.showConfirmDialog(this, \"Seguro que desea salir\",\n this.getTitle(), JOptionPane.YES_NO_OPTION);\n if (opc == 0) {\n System.exit(0);\n }\n}",
"protected abstract void pressedOKButton( );"
]
| [
"0.77888775",
"0.74029833",
"0.72297204",
"0.7195985",
"0.7187094",
"0.6858582",
"0.68557906",
"0.6827552",
"0.6765959",
"0.67479634",
"0.6742232",
"0.6741583",
"0.6704463",
"0.66454804",
"0.6585683",
"0.6551039",
"0.6503229",
"0.6494244",
"0.64494574",
"0.6409486",
"0.6403293",
"0.63916826",
"0.63857937",
"0.63790214",
"0.6368385",
"0.63676655",
"0.63642704",
"0.6337908",
"0.6321705",
"0.63167876",
"0.63077986",
"0.6289651",
"0.6289212",
"0.62820345",
"0.6275067",
"0.6274557",
"0.6271406",
"0.6260415",
"0.6253934",
"0.6231402",
"0.6222753",
"0.6221595",
"0.6216544",
"0.6215995",
"0.6184611",
"0.6182274",
"0.61754936",
"0.6173707",
"0.6165461",
"0.6158184",
"0.6155993",
"0.6150298",
"0.61384124",
"0.6123118",
"0.6123021",
"0.6122572",
"0.6116842",
"0.6100368",
"0.6084762",
"0.60714805",
"0.6058717",
"0.6022008",
"0.60212207",
"0.601511",
"0.60144174",
"0.6009988",
"0.6005769",
"0.60054743",
"0.59945285",
"0.5991044",
"0.59872544",
"0.5983937",
"0.59754884",
"0.5971145",
"0.5970295",
"0.5966015",
"0.59631306",
"0.59628254",
"0.59566057",
"0.5956346",
"0.5956268",
"0.5955108",
"0.5954147",
"0.5952379",
"0.59458435",
"0.59444445",
"0.59419817",
"0.59413916",
"0.59391904",
"0.5934522",
"0.59325767",
"0.5926248",
"0.592617",
"0.59165454",
"0.59107554",
"0.58954275",
"0.58949673",
"0.5894916",
"0.589274",
"0.5887593"
]
| 0.6526701 | 16 |
Called when the cancel button is pressed. | private void onCancelButtonPressed() {
disposeDialogAndCreateNewGame(); // Reset board,
game.setCanPlaceMarks(false); // But don't start a new game.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onCancelClicked();",
"private void cancelButtonActionPerformed(ActionEvent e) {\n }",
"void onCancelButtonPressed();",
"public void cancel() { Common.exitWindow(cancelBtn); }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"@Override\n public void OnCancelButtonPressed() {\n }",
"public void onCancelClick()\r\n {\r\n\r\n }",
"@Override\n public void OnCancelButtonPressed() {\n }",
"void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }",
"@Override\n\tpublic void cancel() {\n\t\t\n\t}",
"@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"public void cancel()\n\t{\n\t}",
"public void onCancelClicked() {\n close();\n }",
"public void cancelButtonPressed(ActionEvent event) throws IOException {\n returnToMainScreen(event);\n }",
"public void onCancelButtonClick() {\n close();\n }",
"@Override\n public void cancel() {\n }",
"public void handleCancelButton(ActionEvent e) {\n\t\tclose();\n\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"private void cancelPressed() {\n\t\tVideoPlayer.mediaPlayer.stop();\n\t\tl.clear();\n\t\tpaths.clear();\n\t\tsizes.clear();\n\t\tcancelPlayingList.setEnabled(false);\n\t\tplayTheList.setEnabled(true);\n\t}",
"public void cancel() {\n btCancel().push();\n }",
"public void onCancel();",
"public void cancel() {\n\t}",
"public void onCancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\tpublic void onCancel() {\n\t\t}",
"@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}",
"@Override\r\n\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void onCancel() {\n\t\t\t\t\t}",
"public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void onCancel() {\n }",
"@Override\n\t\tpublic void onCancel() {\n \n \t}",
"public synchronized void cancel() {\n }",
"public void cancelButtonPressed(View view) {\r\n\t\tthis.finish();\r\n\t}",
"@Override\n public void cancel() {\n }",
"void onCancel(int key);",
"void onCancel();",
"public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}",
"private void onCancel()\n\t{\n\t\tdispose();\n\t}",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"protected abstract void onCancel();",
"public void cancel(){\n cancelled = true;\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"public void cancelButton() {\n this.setMultQuestionSet(null);\n this.setSingleQuestionSet(null);\n this.setTextQuestionSet(null);\n this.setDateQuestionSet(null);\n System.out.println(\"Done pressing cancel button\");\n }",
"@Override\n protected void onCancel() {\n }",
"private void onCancel() {\n\t\tdispose();\n\t}",
"public void cancel() {\n writeData(ESC.CMD_CANCEL);\n }",
"void btnCancel();",
"public void cancel() {\n\t\tcancelled = true;\n\t}",
"protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }",
"@Override\n public void onCancel() {\n\n }",
"@Override\n public void onCancel() {\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcancel();\n\t\t\t}",
"public void cancel() {\n\t\tcancel(false);\n\t}",
"protected abstract void handleCancel();",
"public void cancel(Button.ClickEvent event) {\n Notification.show(\"Cancelled\", Notification.Type.TRAY_NOTIFICATION);\n view.getContactList().select(null);\n }",
"public void onCancel() {\n }",
"@Override\n public void onCancel() {\n }",
"private void jButton_CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_CancelActionPerformed\n // TODO add your handling code here:\n }",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"private void actionCancel() {\n\t\tselectedDownload.cancel();\n\t\tupdateButtons();\n\t}",
"public void handleCancelButton(ActionEvent actionEvent) throws IOException {\n ScreenLoader.display(\"customerSearchScreen\",\"Customer Search\",actionEvent);\n }",
"public boolean cancel();",
"@Override\r\n\tprotected void onCancelActionSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Cancel button implementation\");\r\n\t}",
"@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}",
"public void onCancelPressed(View view) {\n finish();\n }",
"private void cancel() {\n\t\tfinish();\n\t}",
"@Override\n public void onCancel(DialogInterface arg0) {\n\n }",
"private void cancel(ActionEvent e){\r\n // Clear textfields\r\n clearFields();\r\n // If coming from appt management screen, go back there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n // Otherwise, set the current client to null and go to the landing page \r\n else {\r\n currClient = null;\r\n LandingPage.returnToLandingPage();\r\n }\r\n }",
"@Override\n public void onCancel() {\n\n }",
"@Override\n public void onCancel() {\n\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}",
"@Override\n public void onClick(View v) {\n buttonCancelClicked();\n }",
"public void cancelButtonClicked(View view){\n setResult(RESULT_CANCELED, null);\n finish();\n }",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}",
"private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed\n this.dispose();\n }",
"public abstract boolean cancel();",
"public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}",
"public void onCancelPressed(View v) {\n finish();\n }",
"public void cancel();",
"public void onCancel() {\n\n }",
"public void onCancel() {\r\n parentController.switchView();\r\n }",
"public void cancelDialog() {dispose();}",
"private void onCancel()\r\n {\n dispose();\r\n }",
"@Override\r\n public void onCancel(String callerTag) {\n }",
"@Override\n public void onCancel() {\n\n }",
"public void cancel( String reason );"
]
| [
"0.82805383",
"0.8276504",
"0.8179705",
"0.81485754",
"0.8119909",
"0.81037575",
"0.80904853",
"0.80826944",
"0.8051332",
"0.8039659",
"0.8036626",
"0.8029504",
"0.8029504",
"0.8029504",
"0.80178344",
"0.80174",
"0.8006326",
"0.799963",
"0.7973364",
"0.7929056",
"0.7899764",
"0.7897695",
"0.7897695",
"0.7897695",
"0.78945684",
"0.7880938",
"0.78738797",
"0.78730184",
"0.7870955",
"0.78652483",
"0.78620857",
"0.78616345",
"0.78576165",
"0.78455544",
"0.7840441",
"0.78388035",
"0.7836019",
"0.7835476",
"0.7833855",
"0.7831305",
"0.78198653",
"0.7818948",
"0.7800239",
"0.7790484",
"0.7788354",
"0.77832043",
"0.7769138",
"0.7769138",
"0.7769138",
"0.7769138",
"0.7769138",
"0.7769138",
"0.77540123",
"0.7732461",
"0.77179337",
"0.770706",
"0.77036065",
"0.77004004",
"0.7696849",
"0.76823056",
"0.7682139",
"0.764581",
"0.7631599",
"0.7631599",
"0.7631448",
"0.76179445",
"0.7605597",
"0.75976366",
"0.7589288",
"0.7571372",
"0.75568455",
"0.7547368",
"0.7547368",
"0.75414336",
"0.75355244",
"0.7525233",
"0.7521851",
"0.7516714",
"0.75064415",
"0.75012064",
"0.74957025",
"0.74940634",
"0.74927795",
"0.7482085",
"0.74770224",
"0.7471023",
"0.74702954",
"0.7468141",
"0.7446474",
"0.7432648",
"0.74326414",
"0.7429658",
"0.7427261",
"0.74259675",
"0.74256027",
"0.74206936",
"0.7417936",
"0.7415094",
"0.7400518",
"0.7382377",
"0.7380212"
]
| 0.0 | -1 |
Dispose this dialog instance and create a new game state using existing settings (essentially erasing the current one). | private void disposeDialogAndCreateNewGame() {
resultDialog.dispose();
Utilities.bringWindowToFront(parentFrame);
game.createNewGameState(game.getBoard().getRowLength(), game.getBoard().getColumnLength());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void newGamePreference() {\r\n\t\tboard.dispose();\r\n\t\tgameAlive = false;\r\n\t\topponentScoreLable.setVisible(false);\r\n\t\tplayerScoreLable.setVisible(false);\r\n\t\tplayerScore.setVisible(false);\r\n\t\topponentScore.setVisible(false);\r\n\t}",
"private void destroyGameInstance() {\n // Destroy Game\n this.model.setPuzzle(null);\n this.model.setHintsUsed(0);\n this.model.getTimer().stop();\n this.model.setTimer(null);\n view.getGamePanel().getHintBtn().setEnabled(true);\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n this.view.getGamePanel().getGrid().remove(cell);\n }\n }",
"@Override\n\tpublic void close() {\n\t\tframe = null;\n\t\tclassic = null;\n\t\trace = null;\n\t\tbuild = null;\n\t\tbt_classic = null;\n\t\tbt_race = null;\n\t\tbt_build = null;\n\t\tGameView.VIEW.removeDialog();\n\t}",
"private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n gameAlertDialog.dismiss();\n }",
"@Override\n public void onClick(View view) {\n getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n\n collectValuesForSettings();\n updateSettings();\n dismiss();\n }",
"private void presentationDisposed() {\r\n\t\tapiPreferences.dispose();\r\n\t\tthemePreferences.dispose();\r\n\r\n\t\tIterator iter = prefs.values().iterator();\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tPropertyMapAdapter next = (PropertyMapAdapter) iter.next();\r\n\t\t\tnext.dispose();\r\n\t\t}\r\n\r\n\t\tif (systemMenu != null) {\r\n\t\t\tsystemMenu.dispose();\r\n\t\t}\r\n\r\n\t\tif (partList != null) {\r\n\t\t\tpartList.dispose();\r\n\t\t}\r\n\r\n\t\tsystemMenu = null;\r\n\t\tpartList = null;\r\n\r\n\t}",
"private void onCancelButtonPressed() {\r\n disposeDialogAndCreateNewGame(); // Reset board,\r\n game.setCanPlaceMarks(false); // But don't start a new game.\r\n }",
"private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }",
"@Override\n public void hide() {\n if (!unit.player.isPlayerDead) {\n MyPreference.setIsNewGame(false);\n saves.Save();\n }\n GameController.allFalse();\n dispose();\n }",
"public void close() throws RemoteException {\r\n closed = true;\r\n informationsForDrawing.playerStates[ ownIndex ] = null;\r\n }",
"public void newGame_close(View view) {\n dialog_newGame.dismiss();\n }",
"private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }",
"public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}",
"public void reset(){\r\n\t\tdialogToDisplay=0;\r\n\t\tqueuedDialog=0;\r\n\t\toptionSelection=null;\r\n\t\tdone=false;\r\n\t}",
"@NonNull\n @Override\n public Dialog onCreateDialog(final Bundle savedInstanceState) {\n getActivity().getWindow().addFlags(\n WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);\n\n return new AlertDialogFactory(getActivity()).create(\n R.string.dialog_delete_preferences,\n R.string.dialog_delete_preferences_body,\n R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialog, final int which) {\n getPreferenceHandler().clearPreferences();\n getActivity().finish();\n }\n },\n R.string.cancel, null);\n }",
"public void onClick(DialogInterface dialog, int which) {\n SharedPreferences sp = getDefaultSharedPreferences(getApplicationContext());\n\n // save the preferences that must be kept\n boolean firstUse = sp.getBoolean(getString(R.string.KEY_FIRST_USE), false);\n int askForRate = sp.getInt(getString(R.string.KEY_ASK_FOR_RATE), getResources().getInteger(R.integer.askForRate_max_value));\n\n SharedPreferences.Editor editor = sp.edit();\n editor.clear();\n editor.putBoolean(getString(R.string.KEY_FIRST_USE), firstUse);\n editor.putInt(getString(R.string.KEY_ASK_FOR_RATE), askForRate);\n editor.apply();\n PreferenceManager.setDefaultValues(getApplicationContext(), R.xml.preferences, true);\n\n // Delete the old fragment and replace with a new one. This will update the summaries\n // (I couldn't find a smarter way to do that...)\n getFragmentManager().beginTransaction()\n .replace(android.R.id.content, new SettingsFragment(), fragment_tag)\n .commit();\n dialog.dismiss();\n }",
"private void unloadProject()\n {\n if (projectBuilder != null) {\n projectBuilder.database.close();\n projectBuilder = null;\n }\n\n if (projectSettingsPanel != null) {\n Container container = projectSettingsPanel.getParent();\n if (container != null)\n container.remove(projectSettingsPanel);\n projectSettingsPanel = null;\n }\n\n projectSettingsContainer.removeAll();\n generateButton.setEnabled(false);\n\n project = null;\n }",
"private void close() {\r\n this.dispose();\r\n MainClass.gamesPlayed++;\r\n Examples2018.menu();\r\n }",
"@Override\n\tpublic void dispose() {\n\t\tGdx.app.log(\"GameScreen\", \"Disposing\");\n\n\t}",
"@Override\n public void closeSettings() {\n \n }",
"private void startNewGame() {\n final GameSettingsPanel settings = new GameSettingsPanel();\n settings.addPropertyChangeListener(this);\n final int result = JOptionPane.showOptionDialog(null, settings, \"New Game Settings\",\n JOptionPane.DEFAULT_OPTION,\n JOptionPane.PLAIN_MESSAGE, null, null,\n null);\n\n if (result == 0) {\n settings.applyChanges();\n myWelcome = false;\n setPreferredSize(new Dimension(myWidth, myHeight));\n\n myBoardString = myBoard.toString();\n myGameOver = false;\n myTimer = new Timer(INITIAL_TIMER_DELAY, new TimerListener());\n\n myBoard.addObserver(this);\n firePropertyChange(\"new game\", null, myBoard);\n\n myTimer.start();\n myBoard.newGame();\n enableGamePlayKeys();\n\n }\n }",
"public static void closeNew() {\n\t\tDIALOG.dispose();\n\t\tDIALOG = null;\n\t}",
"public void perdio() {\n\t\tthis.juego = null;\n\t\thiloJuego = null;\n\t\tthis.panelJuego = null;\n\t\tthis.dispose();\n\t\tGameOver_Win go = new GameOver_Win(0);\n\t\tgo.setVisible(true);\n\t\t\n\t}",
"public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}",
"public void\tdeinitialize(Game game);",
"private void kill () {\n\t\t/*if (savingDlg != null) savingDlg.dispose();\n\t\tdialog.dispose();*/\n\t\tEngine.kill();\n\t}",
"public void reset(){\n newGame();\n removeAll();\n repaint();\n ended = false;\n }",
"public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }",
"public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}",
"@Override\n public void dispose()\n {\n ShellPreference.removeListener(this);\n super.dispose();\n }",
"public void dispose() {\r\n if (graphComponent != null) {\r\n // to cleanly dispose a GraphComponent, uninstall the main InputMode so that\r\n // modes that deal with the component hierarchy can reset the application state.\r\n graphComponent.setInputMode(null);\r\n }\r\n }",
"public void endGame() {\r\n if (state[0]) {\r\n if (state[1]) {\r\n frame.remove(pause);\r\n state[1] = false;\r\n }\r\n records.newRecord(game.map, game.end());\r\n frame.remove(game);\r\n records.saveRecords();\r\n state[0] = false;\r\n menu.setVisible(true);\r\n }\r\n }",
"@Override\n\tpublic void dispose()\n\t{\n\t\tsuper.dispose();\n\t\tm_pokemon = null;\n\t\tm_boxes = null;\n\t\tm_friends = null;\n\t\tm_bag = null;\n\t\tm_currentShop = null;\n\t\tm_battleField = null;\n\t}",
"public void clearGame() {\n\t\tselectedObjects.clear();\n\t}",
"public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }",
"private void finishReset() {\n DefenceField.fieldActivated = true;\n time.setPaused(false);\n nuiManager.closeScreen(DefenceUris.DEATH_SCREEN);\n }",
"void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}",
"private void dispose() {\n dialog.dispose();\n editManager.removeCharChangeListener(compCharChangeListener);\n selectionModel.removeListSelectionListener(compCharSelectListener);\n }",
"public Builder clearOpponent() {\n if (opponentBuilder_ == null) {\n opponent_ = null;\n onChanged();\n } else {\n opponent_ = null;\n opponentBuilder_ = null;\n }\n\n return this;\n }",
"public NewGame getNewGameDialog() {\n\t\treturn newGameDialog;\n\t}",
"protected void restorePrefs ()\n {\n final String p = getConfigKey();\n\n // restore/bind window bounds\n _eprefs.bindWindowBounds(p, this);\n\n // restore/bind the location of the divider\n _eprefs.bindDividerLocation(p + \"div\", _split);\n\n // restore/bind the selected group\n String cat = _prefs.get(p + \"group\", null);\n for (int tab = _tabs.getComponentCount() - 1; tab >= 0; tab--) {\n final JComboBox gbox = ((ManagerPanel)_tabs.getComponentAt(tab)).gbox;\n if (cat != null) {\n for (int ii = 0, nn = gbox.getItemCount(); ii < nn; ii++) {\n if (cat.equals(String.valueOf(gbox.getItemAt(ii)))) {\n gbox.setSelectedIndex(ii);\n break;\n }\n }\n }\n gbox.addActionListener(new ActionListener() {\n public void actionPerformed (ActionEvent event) {\n _prefs.put(p + \"group\", String.valueOf(gbox.getSelectedItem()));\n }\n });\n }\n\n // restore color\n setBackground(((ConfigEditorPrefs)_eprefs).getBackgroundColor());\n }",
"public void dispose()\n {\n if(petal_model.getSuperBox().isRootBox()) {\n int option = JOptionPane.showConfirmDialog(null,\n \"Do you like to save before quitting?\",\n \"Question\" ,\n JOptionPane.YES_NO_CANCEL_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n if (option == JOptionPane.YES_OPTION) {\n save(petal_model.getSuperBox().getParentModel() == null);\n super.dispose();\n }\n else if (option == JOptionPane.NO_OPTION) {\n super.dispose();\n }\n\n } else {\n setVisible(false);\n }\n }",
"public synchronized void dispose() {\n\n\t\tthis.direction = -1;\n\t\tGameMethods.playSound(\"spell_disolve.wav\");\n\t\tanimator.setAnimation(\"/images/weapons_sprites/spell_off.png\", 50, 11);\n\t}",
"public void dispose() {\n abandonTileImprovementPlan();\n super.dispose();\n }",
"final synchronized void close(VMWareCore graphics) {\n this.currentConfig = null;\n }",
"@Override\n public void dispose()\n {\n // Call super dispose first so that window is closed, before\n // disposing of the frame. This prevents a crash because of\n // trying to dry a disposed image.\n // Should really be at the end of this function. TODO:\n super.dispose();\n\n CogTool.selectionPhase.removeDelayedWork(delayedWidgetSelection);\n CogTool.repaintPhase.removeDelayedWork(delayedRepainting);\n\n uiModel.dispose();\n\n frameUI.removeAllHandlers(this);\n frame.removeAllHandlers(this);\n design.removeAllHandlers(this);\n\n undoManager.removeAllHandlers(this);\n selection.removeAllHandlers(this);\n }",
"private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"public void gano() {\n\t\t\n\t\tGameOver_Win win = new GameOver_Win(1);\n\t\thiloJuego = null;\n\t\tthis.panelJuego = null;\n\t\tthis.dispose();\n\t\tthis.juego = null;\n\t\twin.setVisible(true);\n\t\t\n\t}",
"private void onOK() {\n this.applySettings();\n dispose();\n }",
"public SettingsWindow()\n {\n House.seed = System.currentTimeMillis();\n initWindow();\n showWindows();\n }",
"protected void closeDialog() { setVisible(false); dispose(); }",
"@Override\n public void dispose() {\n background.dispose();\n logo.dispose();\n game.dispose();\n batch.dispose();\n mySkin.dispose();\n stage.dispose();\n }",
"@Override\r\n public void dispose()\r\n {\r\n\t_level.disposeData();\r\n\t_printText = null;\r\n\t_coin = null;\r\n\tSoundLibrary.getInstance().stop(MUSIC_LEVEL);\r\n\tCamera.getInstance().clearObservers();\r\n }",
"private void end() {\r\n isRunning = false;\r\n if( mineField.exploder.isRunning() ) mineField.exploder.stop();\r\n if( settingsOpen ) settingsFrame.dispose();\r\n }",
"void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}",
"@Override\n\tpublic void destroy() {\n\t\tgeneralServices.getCallbackApi().removeReplayOpsPopupMenuItem(\n\t\t\t\tshowSc2ConverterForPatternMiningItemHandler);\n\t}",
"@Override\n public void dispose()\n {\n super.dispose();\n if (_statusEditor!=null)\n {\n _statusEditor=null;\n }\n }",
"private void resetAfterGame() {\n }",
"void resetGame() {\r\n if (GameInfo.getInstance().isWin()) {\r\n GameInfo.getInstance().resetDots();\r\n MazeMap.getInstance().init();\r\n GameInfo.getInstance().resetFruitDisappearTime();\r\n MazeMap.getInstance().updateMaze(GameInfo.getInstance().getMode());\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.PACMAN)) {\r\n pcs.removePropertyChangeListener(Constants.PACMAN, pcl);\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.GHOSTS)) {\r\n pcs.removePropertyChangeListener(Constants.GHOSTS, pcl);\r\n }\r\n PacMan pacMan = initPacMan();\r\n initGhosts(pacMan);\r\n }",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tmenuDialog.dismiss();\n\t\tmenuDialogName.dismiss();\t\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstate = true;\n\t\t\t\tAskDialog.this.dispose();\n\t\t\t}",
"@Override\n public void dispose() {\n font.dispose();\n background.dispose();\n if (triggered) {\n stage.dispose();\n }\n }",
"@Override\n public void endState() {\n spells.clear();\n spellButtons.clear();\n }",
"public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }",
"public void resetScreen(){\n\t\tGame_Map_Manager.infoVisible= false;\n\t\tGame_PauseMenu.actorManager.open = false;\n\t\tPlayerGoals.open = false;\n\t\tGame_Shop.actorManager.open = false;\n\t\tTrainDepotUI.actorManager.open = false;\n\t\tGameScreenUI.resourcebarexpanded =false;\n\t\tGoalMenu.open= false;\n\t\t\n\t\t//CARDS\n\t\tGame_CardHand.actorManager.open=false;\n\t\tGame_CardHand.actorManager.cardactors.clear();;\n\t\t\n\t\t//Map\n\t\tGame_StartingSequence.reset();\n\t\tGame_Map_Manager.resetMap();\n\t}",
"private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n showCoordinates.setSelected(resetCoordinates);\n pieceFont.reset();\n }",
"public static void end() {\n\t\tif(firstTime)\r\n\t\t\tfirstTime=false;\r\n\t\tif (over) {\r\n\t\t\treset();\r\n\t\t\tover = false;\r\n\t\t}\r\n\t\tGUI.panel.changeGame();\r\n\t}",
"@Override\n public void disposeComponent() {\n ColorPairsConfigurationHandler.getMyInstance().saveConfig();\n }",
"private void returnScreen(){\r\n dispose();\r\n playScreen.combatExit();\r\n }",
"public void newGame() {\n disappear = false;\n topborder.clear();\n botborder.clear();\n effect.clear();\n enemy.clear();\n newEnemy.clear();\n thirdEnemy.clear();\n minBorderHeight = 5;\n maxBorderHeight = 30;\n newPlayer.resetAcceleration();\n newPlayer.setY(height / 2);\n\n calculateHighscores();\n resetBorders();\n\n\n gamenew = true;\n }",
"public void end()\n\t{\n\t\tStateManager.setState(StateManager.GameState.MAINMENU);\n\t\tStateManager.setGame(null);\n\t}",
"@Override\n protected void onSaveInstanceState(Bundle outState) {\n outState.putParcelable(GAME_TAG, game);\n outState.putBoolean(EXIT_ALERT_VISIBILITY, exitAlertVisible); // is EXIT AlertDialog shown?\n super.onSaveInstanceState(outState);\n }",
"@Override\n public void onPositive(MaterialDialog dialog) {\n getWindow().clearFlags(\n WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n finish();\n }",
"private void dispose() {\n theCar = null;\n win.dispose();\n }",
"public void dialogOver(){\r\n if(this.peek() instanceof DialogState)\r\n pop();\r\n }",
"public static void newGame(){\n\t\tsetUp.buildBoard(8,8);\n\t\tfor(int i = 0; i < boardBoundsRow * boardBoundsColumn; i++){\n\t\t\tJPanel selectedTile = (JPanel) userInterface.boardButtons.getComponent(i);\n\t\t\tselectedTile.removeAll();\n\t\t\tselectedTile.revalidate();\n\t\t}\n\t\tuserInterface.addBlackPiece();\n\t\tuserInterface.addWhitePiece();\n\t\tuserInterface.check.setText(\"You are not in check\");\n\t\tking.blackKingCheck = false;\n\t\tking.whiteKingCheck = false;\n\t\tturn = \"white\";\n\t\tString playerTurn = \"Player turn: \";\n\t\tuserInterface.turn.setText(playerTurn.concat(turn));\n\t\tundoMoveClass.clearStacks();\n\t}",
"public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}",
"public void clearGame() {\n\t\tthis.turnColor = null;\n\t\tthis.inPlay = false;\n\t\tthis.board = new Board();\n\t\tpieces.get(Chess.Color.WHITE).clear();\n\t\tpieces.get(Chess.Color.BLACK).clear();\n\t\tmoveStack.clear();\n\t}",
"public void dispose() {\n synchronized (getTreeLock()) {\n if (inputContext != null) {\n InputContext toDispose = inputContext;\n inputContext = null;\n toDispose.dispose();\n }\n synchronized (ownedWindows) {\n for (int i = 0; i < ownedWindows.size(); i++) {\n Window child = (Window) (ownedWindows.elementAt(i));\n if (child != null) {\n child.dispose();\n }\n }\n } \n hide();\n // 6182409: Window.pack does not work correctly.\n beforeFirstShow = true;\n removeNotify();\n if (parent != null) {\n Window parent = (Window) this.parent;\n parent.removeOwnedWindow(this);\n } \n postWindowEvent(WindowEvent.WINDOW_CLOSED);\n }\n }",
"public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }",
"public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }",
"public final void popState() {\n engine.getGameStateManager().popState();\n }",
"private void clearPreviousInstances() {\n DiscardedCards.clearInstance();\n Fireworks.clearInstance();\n History.clearInstance();\n SelectedSymbol.clearInstance();\n Tokens.clearInstance();\n HanabiCards.initDeck();\n }",
"private ConfigDialog(JFrame frame, GameScreen gameScreen) {\n super(frame, \"Configurations\", true);\n\n darkSquare = new SimpleColorChooser(\n new Color[]{new Color(0, 0, 0), new Color(40, 40, 60),\n new Color(0, 0, 60), new Color(0, 60, 0), new Color(0, 60, 60),\n new Color(22, 49, 119), new Color(100, 23, 18),\n new Color(55, 55, 0), new Color(90, 90, 90)});\n lightSquare = new SimpleColorChooser(\n new Color[]{Color.WHITE, new Color(255, 255, 204),\n new Color(255, 204, 204), new Color(255, 225, 174),\n new Color(255, 204, 102), new Color(204, 255, 255),\n new Color(218, 218, 218), new Color(255, 202, 169),\n new Color(255, 223, 236)});\n background = new SimpleColorChooser(\n new Color[]{Color.WHITE, Color.BLACK, Color.DARK_GRAY,\n new Color(255, 204, 51), new Color(0, 102, 255),\n new Color(51, 255, 0)});\n border = new SimpleColorChooser(\n new Color[]{Color.RED, Color.MAGENTA, Color.PINK, Color.ORANGE, Color.BLUE,\n Color.YELLOW, Color.CYAN, new Color(189, 37, 141),\n new Color(74, 204, 47)});\n\n showCoordinates = new JCheckBox(\"Show coordinates\");\n showCoordinates.setSelected(true);\n showCoordinates.setFont(font);\n resetCoordinates = true;\n JPanel coord = new JPanel(new FlowLayout(FlowLayout.LEFT));\n coord.add(showCoordinates);\n\n pieceFont = new FontChooser();\n JPanel choosePieces = new JPanel();\n choosePieces.add(pieceFont);\n\n JButton okButton = new JButton(\"OK\");\n okButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n gameScreen.setBackground(background.getSelectedColor());\n gameScreen.setChessboardColor(border.getSelectedColor());\n gameScreen.setLightSquareColor(lightSquare.getSelectedColor());\n gameScreen.setDarkSquareColor(darkSquare.getSelectedColor());\n gameScreen.setCoordinateDrawing(showCoordinates.isSelected());\n gameScreen.setPieceFont(pieceFont.getPieceFont());\n gameScreen.repaint();\n resetCoordinates = showCoordinates.isSelected();\n setVisible(false);\n }\n });\n\n JButton cancelButton = new JButton(\"CANCEL\");\n cancelButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n reset();\n setVisible(false);\n }\n });\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 8, 8));\n buttonPanel.add(okButton);\n buttonPanel.add(cancelButton);\n\n JPanel borderPanel = new JPanel(new BorderLayout());\n borderPanel.add(coord, BorderLayout.SOUTH);\n borderPanel.add(border, BorderLayout.CENTER);\n\n JTabbedPane tabbed = new JTabbedPane();\n tabbed.setTabPlacement(JTabbedPane.LEFT);\n tabbed.setFont(font);\n tabbed.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));\n tabbed.addTab(\"Light Square Color\", lightSquare);\n tabbed.addTab(\"Dark Square Color\", darkSquare);\n tabbed.addTab(\"Border Color\", borderPanel);\n tabbed.addTab(\"Background Color\", background);\n tabbed.addTab(\"Piece Style\", pieceFont);\n\n JPanel content = new JPanel(new BorderLayout());\n content.add(buttonPanel, BorderLayout.SOUTH);\n content.add(tabbed, BorderLayout.CENTER);\n setContentPane(content);\n pack();\n setResizable(false);\n int xp = frame.getX() + (frame.getWidth() - getWidth()) / 2;\n int yp = frame.getY() + (frame.getHeight() - getHeight()) / 2;\n setLocation(xp, yp);\n }",
"private void restoreSettings() {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n getWindow().getDecorView().setSystemUiVisibility(systemUiVisibilitySetting);\n\n }",
"@Override\n\tpublic void dispose() \n\t{\n\t\tbackground.dispose();\n\t\tplayBtn.dispose();\t\n\t}",
"private SettingsModel() {\n difficulty = EASY_DIFFICULTY;\n duration = 60;\n open = false;\n }",
"private void showEndGameResults() {\n EndGameDialog endGameDialog = new EndGameDialog(this, stats, playerOne, playerTwo, (e) -> {\n dispose();\n\n this.start();\n });\n\n\n }",
"public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}",
"@Override\r\n public void dispose() {\r\n map.dispose();\r\n player.dispose();\r\n enemy.dispose();\r\n }",
"public static void saveOptions() {\r\n\t\tMain.bagValue = GameOptions.bagValue.getSelectedItem();\r\n\t\tMain.nilValue = GameOptions.nilValueTextField.getText();\r\n\t\tMain.doubleNilValue = GameOptions.doubleNilValueTextField.getText();\r\n\t\tMain.winScore = GameOptions.winScoreTextField.getText();\r\n\t\tMain.loseScore = GameOptions.loseScoreTextField.getText();\r\n\t}",
"public void dispose() {\n\t\tglfwFreeCallbacks(window);\n\t\tglfwDestroyWindow(window);\n\t\tsuper.dispose();\n\t}",
"private void destroyDisplayEditOverlay() {\n\t}",
"private void gameOverDialog() {\n AlertDialog dialog = _dialogFactory.createDialog(this, R.string.lost, R.string.game_over);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n gotoGameEnd(IGameConstants.GAME_OVER);\n }\n });\n\n dialog.setCancelable(false);\n _dialogActive = true;\n dialog.show();\n }",
"void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}",
"@Override\n protected void onRestoreInstanceState(Bundle savedInstanceState) {\n super.onRestoreInstanceState(savedInstanceState);\n game = savedInstanceState.getParcelable(GAME_TAG);\n exitAlertVisible = savedInstanceState.getBoolean(EXIT_ALERT_VISIBILITY);\n initViews();\n updateState();\n if (exitAlertVisible) gameAlertDialog.show(\"EXIT\");\n }",
"public void reset() {\r\n\r\n\t\tassets.allocateMusic(\"audio/SomniTrack.mp3\");\r\n\t\tassets.allocateMusic(\"audio/PhobiaTrack.mp3\");\r\n\t\tassets.allocateMusic(\"audio/CombinedTrack.mp3\");\r\n//\t\tJsonValue sounds = assets.get(\"sounds\");\r\n//\t\tsomniTrackPath = sounds.get(\"somniTrack\").asString();\r\n//\t\tphobiaTrackPath = sounds.get(\"phobiaTrack\").asString();\r\n//\t\tcombinedTrackPath = sounds.get(\"combinedTrack\").asString();\r\n\r\n\t\tsomniTrackPath = \"audio/SomniTrack.mp3\";\r\n\t\tphobiaTrackPath = \"audio/PhobiaTrack.mp3\";\r\n\t\tcombinedTrackPath = \"audio/CombinedTrack.mp3\";\r\n\r\n\t\tgameScreenActive = true;\r\n\t\tVector2 gravity = new Vector2(world.getGravity() );\r\n\t\tfor(Obstacle obj : objects) {\r\n\t\t\tobj.deactivatePhysics(world);\r\n\t\t}\r\n\t\tfor(Obstacle obj : sharedObjects) {\r\n\t\t\tobj.deactivatePhysics(world);\r\n\t\t}\r\n\t\tfor(Obstacle obj : darkObjects) {\r\n\t\t\tobj.deactivatePhysics(world);\r\n\t\t}\r\n\t\tfor(Obstacle obj : lightObjects) {\r\n\t\t\tobj.deactivatePhysics(world);\r\n\t\t}\r\n\t\tobjects.clear();\r\n\t\tsharedObjects.clear();\r\n\t\tlightObjects.clear();\r\n\t\tdarkObjects.clear();\r\n\t\tmovingObjects.clear();\r\n\t\tplatformController.currRainingPlatforms.clear();\r\n\t\tplatformController.respawningPlatforms.clear();\r\n\t\taddQueue.clear();\r\n\t\tworld.dispose();\r\n\t\tdisposeStages();\r\n\r\n\t\tworld = new World(gravity,false);\r\n\t\tsetComplete(false);\r\n\t\tsetFailure(false);\r\n\t\tfirstTimeRendered=true;\r\n\t\tpopulateLevel();\r\n\r\n\t\tcamera = canvas.getCamera();\r\n\t\tpauseButtonStage = new Stage(new ScreenViewport(camera));\r\n\t\tpauseMenuStage = new Stage(new ScreenViewport(camera));\r\n\t\tstage = new Stage(new ScreenViewport(camera));\r\n\t\twinMenuStage = new Stage(new ScreenViewport(camera));\r\n\t\tfailMenuStage = new Stage(new ScreenViewport(camera));\r\n\r\n\t\tCamera camera = canvas.getCamera();\r\n\t\tVector2 leadPos = somni.getPosition();\r\n\t\tfloat newX = leadPos.x * canvas.PPM;\r\n\t\tnewX = Math.min(newX, widthUpperBound);\r\n\t\tnewX = Math.max(canvas.getWidth() / 2, newX );\r\n\t\tcamera.position.x = newX;\r\n\r\n\t\tfloat newY = leadPos.y * canvas.PPM;\r\n\t\tnewY = Math.min(newY, heightUpperBound);\r\n\t\tnewY = Math.max(canvas.getHeight() / 2, newY );\r\n\t\tcamera.position.y = newY;\r\n\r\n\t\tcamera.update();\r\n\r\n\t\tholdingHands = false;\r\n\r\n\t\tmovementController = new MovementController(somni, phobia, combined, goalDoor, objects, sharedObjects,\r\n\t\t\t\tlightObjects, darkObjects, this);\r\n\t\tmovementController.setCurrRainingPlatforms(currRainingPlatforms);\r\n\t\tworld.setContactListener(movementController);\r\n\r\n\t\tmovementController.setAvatar(somni);\r\n\t\tmovementController.setLead(somni);\r\n\r\n\t\tcreateModalWindow(camera.position.x, camera.position.y);\r\n\t\tcreatePauseButton();\r\n\t\tcreateSliders();\r\n\t\tcreateFailWindow(camera.position.x, camera.position.y);\r\n\t\tcreateWinWindow(camera.position.x, camera.position.y);\r\n\r\n\r\n\t\tplatformController.setMovingObjects(movingObjects);\r\n\t\tplatformController.setLightObjects(lightObjects);\r\n\t\tplatformController.setDarkObjects(darkObjects);\r\n\t\tplatformController.setSharedObjects(sharedObjects);\r\n\t\tplatformController.setCurrRainingPlatforms(currRainingPlatforms);\r\n\r\n\t\tmaskLeader = phobia;\r\n\t\tswitching = false;\r\n\t\tmaskWidth = MIN_MASK_DIMENSIONS.x;\r\n\t\tmaskHeight = MIN_MASK_DIMENSIONS.y;\r\n\t\talphaAmount = 0;\r\n\r\n\r\n\t\tif(!MusicController.getInstance().isActive(\"somniTrack\")) {\r\n\t\t\tMusicController.getInstance().stopAll();\r\n\t\t\tSoundController.getInstance().stop(\"failTrack\");\r\n\t\t\tSoundController.getInstance().stop(\"winTrack\");\r\n\t\t\tMusicController.getInstance().play(\"somniTrack\", somniTrackPath, volume, true);\r\n\t\t\tMusicController.getInstance().play(\"phobiaTrack\", phobiaTrackPath, 0, true);\r\n\t\t\tMusicController.getInstance().play(\"combinedTrack\", combinedTrackPath, 0, true);\r\n\r\n\t\t}\r\n\r\n\t\tif (movementController.isHoldingHands()){\r\n\t\t\tMusicController.getInstance().setVolume(volume, \"combinedTrack\");\r\n\t\t}\r\n\t\telse if (movementController.getAvatar()==somni){\r\n\t\t\tMusicController.getInstance().setVolume(volume, \"somniTrack\");\r\n\t\t}\r\n\t\telse if (movementController.getAvatar()==phobia){\r\n\t\t\tMusicController.getInstance().setVolume(volume, \"phobiaTrack\");\r\n\t\t}\r\n\r\n\r\n\t}",
"private void cleanUpDialog() {\n\t\tfinal Dialog dialog = new Dialog(this);\n\n\t\t// inflate the layout, this is important otherwise spinner throws\n\t\t// null pointer exception\n\t\tLayoutInflater inflater = (LayoutInflater) this\n\t\t\t\t.getSystemService(LAYOUT_INFLATER_SERVICE);\n\n\t\tView layout = inflater.inflate(R.layout.dlg_delete_homework_options,\n\t\t\t\tnull);\n\n\t\tdialog.setContentView(layout);\n\t\tdialog.setTitle(R.string.dlg_delete_options);\n\t\tdialog.setCancelable(true);\n\t\tdialog.getWindow().setBackgroundDrawableResource(R.drawable.gradient_dialog_bg);\n\n\t\t// set up the what spinner\n\t\tfinal Spinner whatSpinner = (Spinner) dialog\n\t\t\t\t.findViewById(R.id.spn_delete_what);\n\n\t\tfinal String[] whatDisplay = new String[] {\n\t\t\t\tgetResources().getString(R.string.dlg_delete_option_completed),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_option_by_subject),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_option_all) };\n\n\t\tArrayAdapter<String> whatAdapter = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, whatDisplay);\n\t\twhatAdapter\n\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n\t\twhatSpinner.setAdapter(whatAdapter);\n\t\t\n\t\t// set up the subject spinner\n\t\tfinal Spinner subjectSpinner = (Spinner) dialog\n\t\t\t\t.findViewById(R.id.spn_delete_by_subject);\n\n\t\t// create the array adapter for it\n\t\tfinal SubjectArrayList subjectEntries = db.getArrayOfSubjects(this);\n\n\t\tfinal String[] subjectDisplay = subjectEntries.getStringsOfHomework();\n\n\t\tArrayAdapter<String> subjectAdapter = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, subjectDisplay);\n\t\tsubjectAdapter\n\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n\t\tsubjectSpinner.setAdapter(subjectAdapter);\n\n\t\t// set up the when spinner\n\t\tfinal Spinner whenSpinner = (Spinner) dialog\n\t\t\t\t.findViewById(R.id.spn_delete_when);\n\n\t\tfinal String[] whenDisplay = new String[] {\n\t\t\t\tgetResources().getString(R.string.dlg_delete_time_1),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_time_2),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_time_3),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_time_4),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_time_5),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_time_6),\n\t\t\t\tgetResources().getString(R.string.dlg_delete_time_7) };\n\n\t\tArrayAdapter<String> whenAdapter = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, whenDisplay);\n\t\twhenAdapter\n\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n\t\twhenSpinner.setAdapter(whenAdapter);\n\n\t\t// show or hide the subject options\n\t\twhatSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {\n\t\t\t@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint position, long arg3) {\n\t\t\t\t// show the subject spinner if selected\n\t\t\t\tif (position == 1) {\n\t\t\t\t\t// show it\n\t\t\t\t\tsubjectSpinner.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// hide it\n\t\t\t\t\tsubjectSpinner.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set up the buttons\n\t\t// set up cancel button\n\t\tfinal Button buttonCancel = (Button) dialog\n\t\t\t\t.findViewById(R.id.btn_delete_cancel);\n\n\t\t// when cancelled, dismiss the dialog\n\t\tbuttonCancel.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\n\t\t// set up confirm button\n\t\tfinal Button buttonDelete = (Button) dialog\n\t\t\t\t.findViewById(R.id.btn_delete_confirm);\n\n\t\t// delete accordingly\n\t\tbuttonDelete.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// pass the spinner settings to a delete method and dismiss dialog\n\t\t\t\tint subjectDatabaseID = subjectEntries.getSubjectAtListPosition(subjectSpinner.getSelectedItemPosition()).getDatabaseID();\n\t\t\t\t\n\t\t\t\tdeleteSelection(\n\t\t\t\t\t\twhatSpinner.getSelectedItemPosition(),\n\t\t\t\t\t\tsubjectDatabaseID,\n\t\t\t\t\t\twhenSpinner.getSelectedItemPosition());\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\n\t\tdialog.show();\n\n\t}",
"private void resetGame() {\r\n\t\t\r\n\t\tif(easy.isSelected()) {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\t\t\t\r\n\t\t} else if(medium.isSelected()) {\r\n\t\t\tGRID_SIZE = 15;\r\n\t\t\tlbPits = 8;\r\n\t\t\tubPits = 12;\r\n\t\t} else if(hard.isSelected()) {\r\n\t\t\tGRID_SIZE = 20;\r\n\t\t\tlbPits = 35;\r\n\t\t\tubPits = 45;\r\n\t\t} else {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tvisited = new boolean[GRID_SIZE][GRID_SIZE];\r\n\t\tGameMapFactory mf = new GameMapFactory(new Obstacle[GRID_SIZE][GRID_SIZE], new Random(), GRID_SIZE, lbPits, ubPits);\r\n\t\tmf.setupMap();\r\n\t\tgame.resetGame(GRID_SIZE, mf.getGameMap(), visited, mf.getHunterPosition());\r\n\t\t\r\n\t}"
]
| [
"0.6241155",
"0.60593665",
"0.5906681",
"0.58572465",
"0.57539105",
"0.56153524",
"0.55713433",
"0.55583173",
"0.55337995",
"0.54863864",
"0.5459037",
"0.54473",
"0.54350924",
"0.54216534",
"0.5374085",
"0.53615004",
"0.5355545",
"0.5350536",
"0.53336513",
"0.52814764",
"0.52810174",
"0.52720565",
"0.52559286",
"0.5253128",
"0.5246697",
"0.52396363",
"0.52332085",
"0.5217371",
"0.5209117",
"0.5196461",
"0.5195832",
"0.51631886",
"0.51502883",
"0.5148945",
"0.51424754",
"0.51278114",
"0.5124908",
"0.5118295",
"0.51104826",
"0.51049376",
"0.5099689",
"0.5096513",
"0.50928956",
"0.50917023",
"0.5088951",
"0.50831735",
"0.50799465",
"0.50694644",
"0.5068488",
"0.5060815",
"0.505851",
"0.50536364",
"0.504985",
"0.50418687",
"0.5039478",
"0.5035248",
"0.50278896",
"0.5027334",
"0.5016873",
"0.50153255",
"0.50144696",
"0.5013537",
"0.5009442",
"0.50089467",
"0.50064987",
"0.5002729",
"0.5002222",
"0.5000414",
"0.49997836",
"0.49996704",
"0.499601",
"0.49914783",
"0.4988814",
"0.49836868",
"0.49821123",
"0.49783435",
"0.49588013",
"0.49539715",
"0.49517196",
"0.49509636",
"0.49504372",
"0.49469453",
"0.49413723",
"0.4940056",
"0.49391907",
"0.49364996",
"0.49303645",
"0.49296424",
"0.4928623",
"0.49254003",
"0.4925363",
"0.4923482",
"0.49126887",
"0.49068305",
"0.49064353",
"0.49060383",
"0.49059516",
"0.48913115",
"0.4888953",
"0.48876014"
]
| 0.73871726 | 0 |
Creates a new Ishaped shape, as in 3 blocks stacked vertically | public IShape(Position position, boolean magic) {
super(position, magic, true);
Position position1 = new Position(position.row() + 1, position.col());
Position position2 = new Position(position1.row() + 1, position1.col());
super.setCell(new Cell(new Block(Color.CYAN, magic), position),
new Cell(new Block(Color.CYAN, false), position1), new Cell(new Block(Color.CYAN, false), position2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void initShape() {\n\t\tgetPositions().putAll(createSymmetricLines(0, 1.5, .5, 1.1, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//->upper corner\r\n\t\tgetPositions().putAll(createSymmetricLines(.5, 1.1, 1, .7, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower outer corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .7, 1.1, .3, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower inner corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1.1, .3, .7, .25, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> middle\r\n\t\tgetPositions().putAll(createSymmetricLines(.7, .25, .2, 1.35, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//inner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .5, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricLines(0.8, .4, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricPoints(0.9, .5, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_RIGHT, WingPart.INNER_RIGHT));\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_LEFT, WingPart.INNER_LEFT));\r\n\t}",
"private static Shape m25217a(int i) {\n r0 = new float[8];\n i = (float) i;\n r0[0] = i;\n r0[1] = i;\n r0[2] = i;\n r0[3] = i;\n r0[4] = i;\n r0[5] = i;\n r0[6] = i;\n r0[7] = i;\n return new RoundRectShape(r0, null, null);\n }",
"private static Object[] formatShapedGrid(Object[] itemStacksRaw, int width, int height) {\n int rawIndex = 0;\n Object[] itemStacks = new Object[9];\n for(int y = 0; y < height; y++) {\n for(int x = 0; x < width; x++) {\n itemStacks[y * 3 + x] = itemStacksRaw[rawIndex++];\n if(rawIndex >= itemStacksRaw.length) break;\n }\n if(rawIndex >= itemStacksRaw.length) break;\n }\n return itemStacks;\n }",
"public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }",
"public static void test1() {\n int n1 = 100, n2 = 100, n3 = 100;\n float v = 1.0f, d = 20.0f;\n float[][][] paint = new float[n3][n2][n1];\n /*\n for (int i3=0; i3<n3; ++i3) {\n for (int i2=0; i2<n2; ++i2) {\n for (int i1=0; i1<n1; ++i1) {\n if (i3<n3/2) cae.paint[i3][i2][i1] = 1.0f;\n }\n }\n }\n */\n Painting3Group p3g = new Painting3Group(paint);\n SphereBrush pb = new SphereBrush();\n Painting3 p3 = p3g.getPainting3();\n// p3.paintAt(50,60,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n p3.paintAt(50,50,50,v,d,pb);\n Contour c = p3.getContour(v);\n\n SimpleFrame sf = new SimpleFrame();\n sf.setTitle(\"Formation\");\n World world = sf.getWorld();\n TriangleGroup tg = new TriangleGroup(c.i,c.x);\n world.addChild(tg);\n sf.setSize(1250,900);\n }",
"private TransformGroup createBox(\n\t\tfloat x,\n\t\tfloat z,\n\t\tfloat size,\n\t\tfloat height,\n\t\tColor3f col) {\n\n\t\t//quadrilatere\n\t\tQuadArray quad =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\tquad.setCoordinate(0, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t1,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(2, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(3, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(4, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t5,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t6,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t7,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\n\t\tquad.setCoordinate(8, new Point3f(0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(9, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t10,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(11, new Point3f(0.001f, height - 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(\n\t\t\t12,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t13,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t14,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(15, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(16, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t17,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(18, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(19, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(20, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t21,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t22,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t23,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\tquad.setColor(i, col);\n\n\t\t//dessine les aretes\n\n\t\t//quadrilatere\n\t\tQuadArray aretes =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\taretes.setCoordinate(0, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(1, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(2, new Point3f(size, height, 0.0f));\n\t\taretes.setCoordinate(3, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(4, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(5, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(6, new Point3f(size, height, size));\n\t\taretes.setCoordinate(7, new Point3f(0.0f, height, size));\n\n\t\taretes.setCoordinate(8, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(9, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(10, new Point3f(0.0f, height, size));\n\t\taretes.setCoordinate(11, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(12, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(13, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(14, new Point3f(size, height, size));\n\t\taretes.setCoordinate(15, new Point3f(size, height, 0.0f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\taretes.setColor(i, new Color3f(1f, 1f, 1f));\n\n\t\t// move the box\n\t\tTransform3D translate = new Transform3D();\n\t\ttranslate.set(new Vector3f(x, 0.0f, z));\n\n\t\tTransformGroup tg = new TransformGroup(translate);\n\n\t\t// create the box\n\t\ttg.addChild(new Shape3D(quad));\n\t\ttg.addChild(new Shape3D(aretes, lineApp()));\n\t\treturn tg;\n\t}",
"public void paintComponent(Graphics g){\n \t\tsuper.paintComponent(g);\r\n \r\n \t\tint numOfRows = (int)blockShape.getResolution().x;\r\n \t\tint numOfCols = (int)blockShape.getResolution().y;\r\n \t\tint gridSize = (int)(SHAPE_WIN_SIZE/numOfRows);\r\n \t\t\r\n \t\t//1st: paint each element in the BlockShape -> shape(Color[][])\r\n \t\tfor(int i=0; i< numOfRows;i++){\r\n \t\t\tfor(int j=0; j< numOfCols; j++){\r\n \t\t\t\tg.setColor(blockShape.getShapeElement(i, j));\r\n \r\n \t\t\t\tif(i == numOfRows-1 || j == numOfCols-1){\r\n \t\t\t\t\t//the last row and last column is a bit wider because of the type casting =_=\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize+10, gridSize+10);\r\n \t\t\t\t}else{\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize, gridSize);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t//2nd: paint the grid corresponding to the resolution of blockShape\r\n \t\tg.setColor(Color.orange);\r\n \t\tfor (int row = 0; row < numOfRows; row++) {\r\n \t\t\tg.drawLine(0,row*gridSize ,SHAPE_WIN_SIZE, row*gridSize);\r\n \t\t}\r\n \t\tg.drawLine(0,SHAPE_WIN_SIZE, SHAPE_WIN_SIZE, SHAPE_WIN_SIZE);\r\n \r\n \t\tfor (int col = 0; col < numOfCols; col++) {\r\n \t\t\tg.drawLine(col*gridSize, 0 , col*gridSize , SHAPE_WIN_SIZE);\r\n \t\t}\r\n \t\tg.drawLine(SHAPE_WIN_SIZE-1, 0, SHAPE_WIN_SIZE-1, SHAPE_WIN_SIZE);\r\n \t}",
"private static void addShaped()\n {}",
"Block create(int xpos, int ypos);",
"private BranchGroup createBranchGroup() {\n BranchGroup bg = new BranchGroup();\n\n TransformGroup tg = new TransformGroup();\n tg.addChild(new ColorCube(0.3f));\n\n // creo un'istanza Transform3D per ogni asse\n Transform3D rotationX = new Transform3D();\n Transform3D rotationY = new Transform3D();\n Transform3D rotationZ = new Transform3D();\n\n // applico le trasformazioni tramite \"rotX\", \"rotY\" e \"rotZ\"\n rotationX.rotX(Math.PI * 0.2d);\n rotationY.rotY(Math.PI * 0.2d);\n\n // Unisco le trasformazioni\n rotationY.mul(rotationX);\n rotationZ.rotZ(Math.PI * 0.2d);\n rotationZ.mul(rotationY);\n\n // applico la trasformazione al TransformGroup e la aggiungo al branchgroup\n tg.setTransform(rotationZ); \n bg.addChild(tg);\n\n return bg;\n }",
"private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}",
"public static DeformableMesh3D createRectangleMesh(double width, double height, double depth, double segment_size){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n //For the complete length there will be n+1 nodes\n int nx = (int)(width/segment_size + 0.5) + 1;\n int ny = (int)(height/segment_size+0.5) + 1;\n int nz = (int)(depth/segment_size+0.5) + 1;\n double actual_w = (nx-1)*segment_size;\n double actual_h = (ny-1)*segment_size;\n double actual_z = (nz-1)*segment_size;\n\n int dex;\n\n //top face x-y @ actual_z/2\n int top_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n dex = top_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex-1\n });\n }\n }\n }\n\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n actual_z/2\n });\n //first\n int a_dex = top_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = top_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = top_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = top_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, a_dex, b_dex});\n triangles.add(new int[]{dex, b_dex, c_dex});\n triangles.add(new int[]{dex, c_dex, d_dex});\n triangles.add(new int[]{dex, d_dex, a_dex});\n\n }\n }\n\n\n //bottom face x-y @ -actual_z/2\n int bottom_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n\n dex = bottom_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n -actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n //bottom face\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n -actual_z/2\n });\n //first\n int a_dex = bottom_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = bottom_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = bottom_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = bottom_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n\n //left face y-z @ -actual_x/2\n int left_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = left_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n -actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n\n //left face connections\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i,\n left_starting_dex + i*(nz-2)\n });\n\n }\n\n //left face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = left_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = left_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = left_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = left_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //left face merging triangles\n for(int i = 1; i<ny; i++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i-1;\n int b_dex = bottom_starting_dex + i;\n int c_dex = left_starting_dex + i*(nz-2);\n int d_dex = left_starting_dex + (i-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i;\n b_dex = top_starting_dex + i-1;\n c_dex = left_starting_dex + (i-1)*(nz-2) + (nz-3);\n d_dex = left_starting_dex + (i)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //right face y-z @ actual_x/2\n int right_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = right_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2)\n });\n\n }\n\n //right face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = right_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = right_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = right_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = right_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //right face merging triangles\n for(int i = 1; i<ny; i++){\n /*\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n */\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i + ny*(nx-1);\n int b_dex = bottom_starting_dex + i-1 + ny*(nx-1);\n int c_dex = right_starting_dex + (i-1)*(nz-2);\n int d_dex = right_starting_dex + (i)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i-1 + ny*(nx-1);\n b_dex = top_starting_dex + i + ny*(nx-1);\n c_dex = right_starting_dex + (i)*(nz-2) + (nz-3);\n d_dex = right_starting_dex + (i-1)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n\n //front face x-z @ -actual_y/2\n int front_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n -actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny\n });\n\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny\n });\n\n }\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n front_starting_dex + (j-1),\n left_starting_dex + j - 1\n });\n\n connections.add(new int[]{\n front_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1\n });\n }\n\n //front face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = front_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = front_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = front_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //front face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (i-2)*(nz - 2);\n int b_dex = front_starting_dex + (i-1)*(nz - 2);\n int c_dex = bottom_starting_dex + i*ny;\n int d_dex = bottom_starting_dex + (i-1)*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = front_starting_dex + (i-1)*(nz - 2) + (nz-3);\n b_dex = front_starting_dex + (i-2)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i-1)*ny;\n d_dex = top_starting_dex + i*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //front face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (j-1);\n int b_dex = front_starting_dex + (j-2);\n int c_dex = left_starting_dex + j - 2;\n int d_dex = left_starting_dex + j - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = front_starting_dex + (j-2) + (nz-2)*(nx-3);\n b_dex = front_starting_dex + (j-1) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 1;\n d_dex = right_starting_dex + j - 2;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //front triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = front_starting_dex;\n b_dex = bottom_starting_dex + ny;\n c_dex = bottom_starting_dex;\n d_dex = left_starting_dex;\n } else{\n a_dex = front_starting_dex + nz-3;\n b_dex = left_starting_dex + nz-3;\n c_dex = top_starting_dex;\n d_dex = top_starting_dex + ny;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = front_starting_dex + (nx-3)*(nz - 2);\n b_dex = right_starting_dex;\n c_dex = bottom_starting_dex + (nx-1)*(ny);\n d_dex = bottom_starting_dex + (nx-2)*(ny);\n } else{\n a_dex = front_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = top_starting_dex + (nx-2)*(ny);\n c_dex = top_starting_dex + (nx-1)*(ny);\n d_dex = right_starting_dex + nz-3;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n\n //back plane\n int back_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny + ny-1\n });\n\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny + ny-1\n });\n\n }\n\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n back_starting_dex + (j-1),\n left_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n\n connections.add(new int[]{\n back_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n }\n\n //back face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = back_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = back_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = back_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //back face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (i-1)*(nz - 2);\n int b_dex = back_starting_dex + (i-2)*(nz - 2);\n int c_dex = bottom_starting_dex + (i-1)*ny + ny - 1;\n int d_dex = bottom_starting_dex + (i)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = back_starting_dex + (i-2)*(nz - 2) + (nz-3);\n b_dex = back_starting_dex + (i-1)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i)*ny + ny - 1;\n d_dex = top_starting_dex + (i-1)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //back face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (j-2);\n int b_dex = back_starting_dex + (j-1);\n int c_dex = left_starting_dex + j - 1 + (ny-1)*(nz-2);\n int d_dex = left_starting_dex + j - 2 + (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = back_starting_dex + (j-1) + (nz-2)*(nx-3);\n b_dex = back_starting_dex + (j-2) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 2+ (ny-1)*(nz-2);\n d_dex = right_starting_dex + j - 1+ (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //back triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = back_starting_dex;\n b_dex = left_starting_dex + (ny-1)*(nz-2);\n c_dex = bottom_starting_dex + ny -1;\n d_dex = bottom_starting_dex + 2*ny - 1;\n } else{\n a_dex = back_starting_dex + nz-3;\n b_dex = top_starting_dex + 2*ny - 1;\n c_dex = top_starting_dex + ny - 1;\n d_dex = left_starting_dex + (ny)*(nz-2) - 1 ;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = back_starting_dex + (nx-3)*(nz - 2);\n b_dex = bottom_starting_dex + (nx-1)*(ny) - 1;\n c_dex = bottom_starting_dex + (nx)*(ny) - 1;\n d_dex = right_starting_dex + (nz-2)*(ny-1);\n } else{\n a_dex = back_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = right_starting_dex + (nz-2)*(ny-1) + nz - 3;\n c_dex = top_starting_dex + (nx)*(ny) -1;\n d_dex = top_starting_dex + (nx-1)*(ny) -1;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n final DeformableMesh3D mesh = new DeformableMesh3D(pts, connections, triangles);\n\n return mesh;\n }",
"GeomLayout.IGeomLayoutCreateFromNode geomLayoutCreator();",
"public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark blue\n rect(0,110,600,215);\n rect(0,380,600,215);\n}",
"private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }",
"public static PShape createIcosahedronGrouped(PApplet p, int level, PImage img, int fillColor, int strokeColor, float strokeWeight) {\n\t\tIcosahedron ico = new Icosahedron(level);\n\t\tp.textureMode(P.NORMAL); // set textureMode to normalized (range 0 to 1);\n\t\tPShape mesh = p.createShape(P.GROUP); // create the initial PShape\n\t\t\n\t\t\n\t\t// put all the vertices, uv texture coordinates and normals into the PShape\n\t\tPShape triangle = null;\n\t\tfor (int i=0; i<ico.positions.size(); i++) {\n\t\t\tif(i % 3 == 0) {\n\t\t\t\ttriangle = p.createShape();\n\t\t\t\ttriangle.beginShape(P.TRIANGLE); // define the PShape type: TRIANGLES\n\t\t\t\tif(fillColor != -1) {\n\t\t\t\t\ttriangle.strokeWeight(strokeWeight);\n\t\t\t\t\ttriangle.stroke(strokeColor);\n\t\t\t\t\ttriangle.fill(fillColor);\n\t\t\t\t}\n\t\t\t\tif(img != null) mesh.texture(img);\n\t\t\t}\n\t\t\tPVector pos = ico.positions.get(i);\n\t\t\tPVector t = ico.texCoords.get(i);\n\t\t\tPVector n = ico.normals.get(i);\n\t\t\ttriangle.normal(n.x, n.y, n.z);\n\t\t\ttriangle.vertex(pos.x, pos.y, pos.z, t.x, t.y);\n\t\t\t\n\t\t\tif(i % 3 == 2) {\n\t\t\t\ttriangle.endShape();\n\t\t\t\tmesh.addChild(triangle);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mesh;\n\t}",
"public abstract PaintObject[][] separate(Rectangle _r);",
"protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }",
"public static DeformableMesh3D createTestBlock(double w, double h, double depth){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n\n pts.add(new double[]{-w/2, -h/2, depth/2});\n pts.add(new double[]{-w/2, h/2, depth/2});\n pts.add(new double[]{w/2, h/2, depth/2});\n pts.add(new double[]{w/2, -h/2, depth/2});\n\n pts.add(new double[]{-w/2, -h/2, -depth/2});\n pts.add(new double[]{-w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, -h/2, -depth/2});\n\n //back face\n connections.add(new int[]{0, 4});\n connections.add(new int[]{0, 1});\n connections.add(new int[]{1, 5});\n connections.add(new int[]{5, 4});\n\n //front face\n connections.add(new int[]{3, 7});\n connections.add(new int[]{2, 3});\n connections.add(new int[]{2, 6});\n connections.add(new int[]{6, 7});\n\n //front-back connections.\n connections.add(new int[]{3, 0});\n connections.add(new int[]{1, 2});\n connections.add(new int[]{5, 6});\n connections.add(new int[]{7, 4});\n\n //top\n triangles.add(new int[]{0, 2, 1});\n triangles.add(new int[]{0,3,2});\n //top-diagonal\n connections.add(new int[]{0, 2});\n\n //back\n triangles.add(new int[]{0, 1, 5});\n triangles.add(new int[]{0,5,4});\n connections.add(new int[]{0, 5});\n\n //right\n triangles.add(new int[]{1,2,5});\n triangles.add(new int[]{5,2,6});\n connections.add(new int[]{5, 2});\n\n //front\n triangles.add(new int[]{2,3,6});\n triangles.add(new int[]{6,3,7});\n connections.add(new int[]{3, 6});\n\n //left\n triangles.add(new int[]{3,0,4});\n triangles.add(new int[]{3,4,7});\n connections.add(new int[]{3, 4});\n\n //bottom\n triangles.add(new int[]{4,5,6});\n triangles.add(new int[]{4,6,7});\n connections.add(new int[]{4, 6});\n return new DeformableMesh3D(pts, connections, triangles);\n\n }",
"@Override\n public List<Block> blocks() {\n int columns = 15, width = 51, height = 30;\n Color darkGreen = new Color(29, 101, 51);\n List<Block> blocks = new ArrayList<>();\n for (int j = 0; j < columns; j++) {\n blocks.add(new Block(new arkanoid.geometry.Rectangle(new Point(20 + width * j, 110 + height),\n width, height), darkGreen));\n }\n return blocks;\n }",
"@Override\n void drawShape(BufferedImage image, int color) {\n Point diem2 = new Point(diem.getX()+canh, diem.getY());\n Point td = new Point(diem.getX()+canh/2, diem.getY());\n \n \n Point dinh = new Point(td.getX(), td.getY()+h);\n \n Point diem_thuc = Point.convert(diem);\n Point diem_2_thuc = Point.convert(diem2);\n Point dinh_thuc = Point.convert(dinh);\n Point td_thuc = Point.convert(td);\n \n Line canh1=new Line(dinh_thuc, diem_thuc);\n canh1.drawShape(image, ColorConstant.BLACK_RGB);\n Line canh2=new Line(diem_thuc, diem_2_thuc);\n canh2.drawShape(image, ColorConstant.BLACK_RGB);\n Line canh3=new Line(diem_2_thuc, dinh_thuc);\n canh3.drawShape(image, ColorConstant.BLACK_RGB);\n int k =5;\n for(int i =canh1.getPoints().size()-5;i>=5;i--){\n \n for(int j = 0;j<canh*5/2-5;j++){\n \n Point ve = new Point(td_thuc.getX()-canh*5/2+j+5, td_thuc.getY()-k);\n if(ve.getX()>canh1.getPoints().get(i).getX()+5){\n Point.putPoint(ve, image, color);\n }\n }\n k++;\n }\n k=5;\n for(int i =canh3.getPoints().size()-5;i>=5;i--){\n \n for(int j = 0;j<canh*5/2-5;j++){\n Point ve = null;\n \n ve = new Point(td_thuc.getX()+canh*5/2-j-5, td_thuc.getY()-k);\n if(ve.getX()<canh3.getPoints().get(i).getX()-5){\n Point.putPoint(ve, image, color);\n }\n }\n k++;\n }\n }",
"public abstract void constructHull();",
"private void addStackBlocks() {\n\n for (int x = numBlocks; x > 0; x--) {\n\n double blockHeight = totalBLockHeight / numBlocks;\n double blockWidthChange = (maxBlockWidth - minBlockWidth) / numBlocks;\n double blockWidth = minBlockWidth + ((x - 1) * blockWidthChange);\n\n TowerBlock newBlock = new TowerBlock(blockWidth, blockHeight, x);\n towerOne.push(newBlock);\n\n }\n addBlocks = false;\n\n }",
"private void createRegions() {\n\t\t// create pitch regions\n\t\tfor (int column = 0; column < REGION_COLUMNS; column++) {\n\t\t\tfor (int row = 0; row < REGION_ROWS; row++) {\n\t\t\t\tthis.regions.add(new Rectangle(column * REGION_WIDTH_IN_PX, row * REGION_HEIGHT_IN_PX,\n\t\t\t\t\t\t REGION_WIDTH_IN_PX, REGION_HEIGHT_IN_PX));\n\t\t\t}\n\t\t}\n\t}",
"AREA createAREA();",
"public OutlineZigzagEffect(int width, Color color) {\n/* 89 */ super(width, color);\n/* */ }",
"public void circulos() {\n pushMatrix();\n translate(width/2, height/2);\n rotate(-h);\n noFill();\n strokeWeight(5);\n stroke(255);\n ellipse(10, 10, 20, 20);\n popMatrix();\n\n h = h + 0.3f;\n }",
"void addShape(IShape shape);",
"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 void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {}",
"public abstract WorldImage drawRow(int blocks);",
"Board createLayout();",
"@Override\n protected void populate()\n {\n for (int i = 0; i < getHeight(); i++)\n {\n add(new Tile(), 1, i);\n add(new Block(), 2, i);\n add(new Tile(), 3, i);\n }\n for (int i = 2; i < 5; i++)\n {\n add(new LightableTile(), 4, i);\n }\n }",
"public abstract int[] getShape();",
"public Container createInterface(){\n\t\tChartTypeInterface.setLayout(new GridLayout(4,2,20,20));\n\t\t\n\t\tMakePie();\n\t\tMakeXYSpline();\n\t\tMakeStacked();\n\t\tMakeScatter();\n\t\tMakeLine();\n\t\tMakeBubble();\n\t\tMakeBar();\n\t\tMakeBar3D();\n\t\t\t\t\t\n\t\treturn ChartTypeInterface;\n\t}",
"public static void test2() {\n String dataDir = \"/Data/cteam/tp/csm/seismicz/subz_401_4_600/\";\n String dataFile = \"tpets.dat\";\n int n1 = 401, n2 = 357, n3 = 161;\n float v = 1.0f, d = 30.0f;\n EigenTensors3 et = loadTensors(dataDir+dataFile);\n System.out.println(et);\n float[][][] paint = new float[n3][n2][n1];\n Painting3Group p3g = new Painting3Group(paint);\n PaintBrush pb = new PaintBrush(n1,n2,n3,et);\n pb.setSize(30);\n Painting3 p3 = p3g.getPainting3();\n for (int i3=0; i3<10; ++i3)\n for (int i2=0; i2<10; ++i2)\n for (int i1=0; i1<1; ++i1) {\n p3.paintAt(n1/2+i1,n2/2+i2,n3/2+i3,v,d,pb);\n }\n\n Contour c = p3.getContour(v);\n\n SimpleFrame sf = new SimpleFrame();\n sf.setTitle(\"Formation\");\n World world = sf.getWorld();\n TriangleGroup tg = new TriangleGroup(c.i,c.x);\n world.addChild(tg);\n }",
"private void setUpBlocks() {\n\t\tdouble xStart=0;\n\t\tdouble midPoint = getWidth()/2;\n\t\tint yStart = BRICK_Y_OFFSET;\t\n\t\t\n\t\tfor(int i = 0; i < NBRICK_ROWS; i++) {\n\t\t\t\n\t\t\txStart = midPoint - (NBRICKS_PER_ROW/2 * BRICK_WIDTH) - BRICK_WIDTH/2;\n\t\t\tlayRowOfBricks(xStart, yStart, i);\n\t\t\tyStart += BRICK_HEIGHT + BRICK_SEP;\n\t\t}\t\n\t}",
"Layer createLayer();",
"private void createShape() {\n if (shape == null) {\n float firstItemMargin = noxConfig.getNoxItemMargin();\n float firstItemSize = noxConfig.getNoxItemSize();\n int viewHeight = getMeasuredHeight();\n int viewWidth = getMeasuredWidth();\n int numberOfElements = noxItemCatalog.size();\n ShapeConfig shapeConfig =\n new ShapeConfig(numberOfElements, viewWidth, viewHeight, firstItemSize, firstItemMargin);\n shape = ShapeFactory.getShapeByKey(defaultShapeKey, shapeConfig);\n } else {\n shape.setNumberOfElements(noxItemCatalog.size());\n }\n shape.calculate();\n }",
"private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }",
"@Override\n\tpublic void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4) {\n\t\t\n\t}",
"protected ItemStack createStackedBlock(int par1) {\n\t\treturn new ItemStack(this.blockID, 1, par1);\n\t}",
"public MultiShapeLayer() {}",
"public void startImage() {\r\n\t\tm_blocks = new Vector<BlockList>();\r\n\t\tm_feature.clear();\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tBlockList blockList = new BlockList();\r\n\t\t\tm_blocks.add(blockList);\r\n\t\t}\r\n\t}",
"private void boxCreator(int[] pos, int width, int height) {\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1]] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height; y++) {\n tiles[pos[0]][y] = Tileset.WALL;\n }\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1] + height] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height + 1; y++) {\n tiles[pos[0] + width][y] = Tileset.WALL;\n }\n for (int y = pos[1] + 1; y < pos[1] + height; y++) {\n for (int x = pos[0] + 1; x < pos[0] + width; x++) {\n tiles[x][y] = Tileset.FLOWER;\n }\n }\n }",
"public void preSetup(){\n // Any of your pre setup before the loop starts should go here\n \n // border\n blocks[0] = new Rectangle(0, 0, 25, 600);\n blocks[1] = new Rectangle(775, 0, 25, 600);\n blocks[2] = new Rectangle(0, 0, 800, 25);\n blocks[3] = new Rectangle(0, 575, 800, 25);\n \n // starting room\n // right wall\n blocks[5] = new Rectangle(WIDTH / 2 + 75, 400, 25, 150);\n // left wall\n blocks[10] = new Rectangle(WIDTH / 2 - 100, 400, 25, 150);\n // centre\n blocks[7] = new Rectangle(WIDTH / 2 - 10, 450, 20, 150);\n // top wall\n blocks[11] = new Rectangle(WIDTH / 2 - 50, 400, 100, 25);\n \n \n // remember to copy to the other side\n // cover (west)\n blocks[4] = new Rectangle(200, 200, 25, 75);\n blocks[6] = new Rectangle(200 , 400, 25, 75);\n blocks[8] = new Rectangle(200, 310, 25, 50);\n blocks[9] = new Rectangle(200, 0, 25, 170);\n blocks[17] = new Rectangle(200 - 50, 145, 70, 25);\n blocks[23] = new Rectangle(0, 60, 100, 24);\n blocks[24] = new Rectangle(70, 500, 24, 100);\n blocks[25] = new Rectangle(70, 500, 80, 24);\n blocks[26] = new Rectangle();\n \n \n // cover (east)\n blocks[15] = new Rectangle(WIDTH - 225, 200, 25, 75);\n blocks[14] = new Rectangle(WIDTH - 225 , 400, 25, 75);\n blocks[13] = new Rectangle(WIDTH - 225, 310, 25, 50);\n blocks[12] = new Rectangle(WIDTH - 225, 0, 25, 170);\n blocks[16] = new Rectangle(WIDTH - 225, 145, 70, 25);\n blocks[27] = new Rectangle(WIDTH - 100, 60, 100, 24);\n blocks[28] = new Rectangle(WIDTH - 94, 500, 24, 100);\n blocks[29] = new Rectangle(WIDTH - 94 - (80-24), 500, 80, 24);\n blocks[30] = new Rectangle();\n \n // cover (middle)\n // vertical\n blocks[18] = new Rectangle(WIDTH/ 2 - 10, 150, 20, 125);\n blocks[22] = new Rectangle(WIDTH/ 2 - 10, 300, 20, 50);\n // horizontal\n blocks[19] = new Rectangle(WIDTH/ 2 - 100, 175, 200, 20);\n blocks[20] = new Rectangle(WIDTH/ 2 - 100, 225, 200, 20);\n blocks[21] = new Rectangle(WIDTH/ 2 - 100, 350, 200, 20);\n \n \n // extras\n blocks[31] = new Rectangle();\n blocks[32] = new Rectangle();\n \n // flag on the level\n flag[0] = new Rectangle((int)(Math.random()*((WIDTH - 40) - 40 + 1)) + 40, (int)(Math.random()*((HEIGHT - 40) - 40 + 1)) + 40, 35, 26);\n flagPole[0] = new Rectangle(flag[0].x, flag[0].y, 4, 45);\n flagLogo[0] = new Rectangle(flag[0].x + 15, flag[0].y + (13/2), 20, 15);\n \n }",
"ShapeGroup(){\n children = new ArrayList<IShape>();\n }",
"public Node createGrid() {\n\t\tGroup gridGroup = new Group();\n\t\tgridGroup.getChildren().addAll(buildXYPlane());\n\t\t/*\n\t\t * XXX extend the grid\n\t\t * \n\t\t * here it would be possible to extend the grid, e.g. with a graph\n\t\t * or another plane with a grid (XZ, YZ, ...).\n\t\t * \n\t\t * it would look like this:\n\t\t * gridGroup.getChildren().addAll(buildGraph());\n\t\t */\n\t\treturn gridGroup;\n\t}",
"@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }",
"private c a(c blk, int i) {\n/* 450 */ int w = blk.g;\n/* 451 */ int h = blk.h;\n/* */ \n/* */ \n/* */ \n/* 455 */ if (i >= 0 && i <= 2) {\n/* */ int j;\n/* 457 */ if (blk.a() != 3) {\n/* 458 */ if (this.j == null || this.j.a() != 3) {\n/* 459 */ this.j = (c)new e();\n/* */ }\n/* 461 */ this.j.g = w;\n/* 462 */ this.j.h = h;\n/* 463 */ this.j.e = blk.e;\n/* 464 */ this.j.f = blk.f;\n/* 465 */ blk = this.j;\n/* */ } \n/* */ \n/* */ \n/* 469 */ int[] outdata = (int[])blk.b();\n/* */ \n/* */ \n/* 472 */ if (outdata == null || outdata.length < h * w) {\n/* 473 */ outdata = new int[h * w];\n/* 474 */ blk.a(outdata);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 480 */ if (this.m == null)\n/* 481 */ this.m = new e(); \n/* 482 */ if (this.n == null)\n/* 483 */ this.n = new e(); \n/* 484 */ if (this.o == null)\n/* 485 */ this.o = new e(); \n/* 486 */ this.o.g = blk.g;\n/* 487 */ this.o.h = blk.h;\n/* 488 */ this.o.e = blk.e;\n/* 489 */ this.o.f = blk.f;\n/* */ \n/* */ \n/* */ \n/* 493 */ this.m = (e)this.e.getInternCompData((c)this.m, 0);\n/* 494 */ int[] data0 = (int[])this.m.b();\n/* 495 */ this.n = (e)this.e.getInternCompData((c)this.n, 1);\n/* 496 */ int[] data1 = (int[])this.n.b();\n/* 497 */ this.o = (e)this.e.getInternCompData((c)this.o, 2);\n/* 498 */ int[] bdata = (int[])this.o.b();\n/* */ \n/* */ \n/* 501 */ blk.k = (this.m.k || this.n.k || this.o.k);\n/* */ \n/* 503 */ blk.i = 0;\n/* 504 */ blk.j = w;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 509 */ int k = w * h - 1;\n/* 510 */ int k0 = this.m.i + (h - 1) * this.m.j + w - 1;\n/* 511 */ int k1 = this.n.i + (h - 1) * this.n.j + w - 1;\n/* 512 */ int k2 = this.o.i + (h - 1) * this.o.j + w - 1;\n/* */ \n/* 514 */ switch (i) {\n/* */ case 0:\n/* 516 */ for (j = h - 1; j >= 0; j--) {\n/* 517 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--)\n/* */ {\n/* */ \n/* 520 */ outdata[k] = data0[k] + 2 * data1[k] + bdata[k] >> 2;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 525 */ k0 -= this.m.j - w;\n/* 526 */ k1 -= this.n.j - w;\n/* 527 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ case 1:\n/* 532 */ for (j = h - 1; j >= 0; j--) {\n/* 533 */ for (int mink = k - w; k > mink; k--, k1--, k2--)\n/* */ {\n/* */ \n/* 536 */ outdata[k] = bdata[k2] - data1[k1];\n/* */ }\n/* */ \n/* 539 */ k1 -= this.n.j - w;\n/* 540 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ case 2:\n/* 545 */ for (j = h - 1; j >= 0; j--) {\n/* 546 */ for (int mink = k - w; k > mink; k--, k0--, k1--)\n/* */ {\n/* */ \n/* 549 */ outdata[k] = data0[k0] - data1[k1];\n/* */ }\n/* */ \n/* 552 */ k0 -= this.m.j - w;\n/* 553 */ k1 -= this.n.j - w;\n/* */ } \n/* */ break;\n/* */ } \n/* */ \n/* */ } else {\n/* 559 */ if (i >= 3)\n/* */ {\n/* */ \n/* 562 */ return this.e.getInternCompData(blk, i);\n/* */ }\n/* */ \n/* */ \n/* 566 */ throw new IllegalArgumentException();\n/* */ } \n/* 568 */ return blk;\n/* */ }",
"@Override\n public void generateShape() {\n AffineTransform tx = new AffineTransform();\n tx.rotate(-this.getRotation(), this.getX(), this.getY());\n this.shape = tx.createTransformedShape(new Ellipse2D.Double(\n this.getX() + this.getWidth() / 2 - D / 2,\n this.getY() + this.getHeight() / 2 - D / 2,\n D, D));\n }",
"public void fillTheLayout() {\n for (int i = 0; i < ROW_COUNT; i++) {\n //these are horizontal linear layouts that will be part of the vertical linear layout, shown in XML\n LinearLayout sublinearLayout = new LinearLayout(this);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 1;\n\n sublinearLayout.setLayoutParams(layoutParams);\n //center align the contents\n sublinearLayout.setGravity(Gravity.CENTER);\n sublinearLayout.setPadding(PADDING, PADDING, PADDING, PADDING);\n\n for (int j = 0; j < COLUMN_COUNT; j++) {\n\n// Add the gifImageViews to the linear layout created above\n GifImageView gifImageView = new GifImageView(this);\n LinearLayout.LayoutParams imageViewlayoutParam = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n imageViewlayoutParam.weight = 1;\n\n gifImageView.setLayoutParams(imageViewlayoutParam);\n //this padding helps in showing the white boundaries\n gifImageView.setPadding(PADDING, PADDING, PADDING, PADDING);\n //Similar to storing in row-major form, used that logic to set id's\n gifImageView.setId(i * COLUMN_COUNT + j);\n //main activity implements the onClick\n gifImageView.setOnClickListener(this);\n Block block = new Block(gifImageView);\n block.display();\n arrayList.add(block);\n sublinearLayout.addView(gifImageView);\n\n }\n linearLayout.addView(sublinearLayout);\n }\n //change grid's color, after initialising the layout\n changeColor();\n }",
"public UIShape(Color color, Vec2f position, Shape parent, String type, Vec2i size) {\n\t\tsuper(color, position, parent, type, size);\n\t}",
"public static BufferedImage sharpenByMatrix3(BufferedImage img) {\n\t\tint width = img.getWidth();\n\t\tint height = img.getHeight();\n\t\tint[] pixels = new int[width*height];\n\t\timg.getRGB(0, 0, width, height, pixels, 0, width);\n\t\tint[][] pixelArr = quantize.changeDimension2(pixels, width);\n\t\tint[][] newArr = new int[height][width];\n\t\tfor (int i = 0 ;i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tnewArr[j][i] = getNewData(pixelArr, coefficient9, i, j);\n\t\t\t}\n\t\t}\n\t\tBufferedImage image = new BufferedImage(width, height, img.getType());\n\t\timage.setRGB(0, 0, width, height, quantize.changeDimension1(newArr), 0, width);\n\t\treturn image;\n\t}",
"EdgeLayout createEdgeLayout();",
"@Override\n\t\t public Shape clone()\n\t\t {\n\t\t SZShape s = (SZShape)super.clone();\n\t\t s.position = new Position(position);\n\t\t s.cells = new Cell[cells.length];\n\t\t for(int i = 0; i < cells.length; i++)\n\t\t {\n\t\t \t s.cells[i] = new Cell(cells[i]);\n\t\t }\n\t\t return s;\n\t\t }",
"public BranchGroup blocksScene(){\n\t\t\n\t\tIterator iterator = blocks.iterator();\n\t\t\n\t\twhile(iterator.hasNext()){\n\t\t\tbg.addChild(((Block) iterator.next()).boxGridScene());\n\t\t}\n\t\treturn bg;\n\t}",
"public BlockGroup(int[] ids, int width, int height, double angle, Vec2 position, double scale, Vec2 velocity) {\n\t\tBodyDef def = new BodyDef();\n\t\tdef.position = position;\n\t\tdef.angle = angle;\n\t\tdef.linearVelocity = velocity;\n\t\tdef.type = BodyType.DYNAMIC;\n\n\t\tinnit(def);\n\t\tGame.getWorld().createBody(this);\n\n\t\tfixtures = new Fixture[(width + 2) * (height + 2)][];\n\n\t\tblocks = ids;\n\t\theat = new double[ids.length];\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.scale = scale;\n\t\tnumber = 1;\n\t\tFixtureDef[] fd = null;\n\n\t\t//(0, 0) is at 1, 1\n\t\tint[] sensors = new int[(width + 2) * (height + 2)];\n\n\t\tfor(int i = 0; i < ids.length; i++) {\n\t\t\tBlock b = Block.getBlock(id(i));\n\t\t\tnumber += b.getTextureLayers(x(i), y(i), this);\n\n\t\t\tif(b.canBePlaced(Direction.RIGHT, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i) + 1, y(i))] |= 1;\n\t\t\tif(b.canBePlaced(Direction.LEFT, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i) - 1, y(i))] |= 1;\n\t\t\tif(b.canBePlaced(Direction.UP, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i), y(i) + 1)] |= 1;\n\t\t\tif(b.canBePlaced(Direction.DOWN, 0, x(i), y(i), this))\n\t\t\t\tsensors[fi(x(i), y(i) - 1)] |= 1;\n\n\t\t\tfd = b.getPhysics(x(i), y(i), this);\n\n\t\t\tif(fd != null) {\n\t\t\t\tcreateFixture(fd);\n\t\t\t\tsensors[fi(x(i), y(i))] = 2;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < sensors.length; i++) {\n\t\t\tif(sensors[i] == 1) {\n\t\t\t\tcreateSensor((i % (width + 2)) - 1, (i / (width + 2)) - 1);\n\t\t\t}\n\t\t}\n\t}",
"Ingredient[] shape(IRecipe recipe);",
"@Override\n\tprotected void createInitial()\n\t{\n\t\tLoop<Bar> loop = new Loop();\n\t\tedges.add( loop );\n\n\t\tfor ( Pair<Point2d, Point2d> pair : new ConsecutivePairs<Point2d>( Arrays.asList(\n\t\t\t\tnew Point2d( 250, 100 ),\n\t\t\t\tnew Point2d( 350, 100 ),\n\t\t\t\tnew Point2d( 350, 250 ),\n\t\t\t\tnew Point2d( 500, 250 ),\n\t\t\t\tnew Point2d( 500, 350 ),\n\t\t\t\tnew Point2d( 350, 350 ),\n\t\t\t\tnew Point2d( 350, 500 ),\n\t\t\t\tnew Point2d( 250, 500 ),\n\t\t\t\tnew Point2d( 250, 350 ),\n\t\t\t\tnew Point2d( 100, 350 ),\n\t\t\t\tnew Point2d( 100, 250 ),\n\t\t\t\tnew Point2d( 250, 250 ) ), true ) )\n\t\t{\n\t\t\tBar b = new Bar( pair.first(), pair.second() );\n\t\t\tloop.append( b );\n\t\t\tsetup(b, 0.7);\n\t\t}\n\n\t\tLoop<Bar> loop2 = new Loop();\n\t\tedges.add( loop2 );\n\n\t\tfor ( Pair<Point2d, Point2d> pair : new ConsecutivePairs<Point2d>( Arrays.asList(\n\t\t\t\tnew Point2d( 330, 330),\n\t\t\t\tnew Point2d( 330, 270 ),\n\t\t\t\tnew Point2d( 270, 270 ),\n\t\t\t\tnew Point2d( 270, 330 )\n\t\t), true ) )\n\t\t{\n\t\t\tBar b = new Bar( pair.first(), pair.second() );\n\t\t\tloop2.append( b );\n\t\t\tsetup(b, 0.7);\n\t\t}\n\t}",
"public mGrid(float width) {\r\n\t\tthis.width = width;\r\n\t\tthis.pos = new mPoint3(0,0,0);\r\n\t\tmPoint3[] points = new mPoint3[17];\r\n\t\tpoints[0] = pos;\r\n\t\tfor(int i=-2;i<=2;i++){\r\n\t\t\tpoints[2*i+5] = new mPoint3(2*width,i*width,0);\r\n\t\t\tpoints[2*i+6] = new mPoint3(-2*width,i*width,0);\r\n\t\t}\r\n\t\tfor(int i=-1;i<=1;i++){\r\n\t\t\tpoints[2*i+13] = new mPoint3(i*width,2*width,0);\r\n\t\t\tpoints[2*i+14] = new mPoint3(i*width,-2*width,0);\r\n\t\t}\r\n\t\tthis.shape = new mShape();\r\n\t\tshort[][] lp = new short[2][10];\r\n\t\tshort i;\r\n\t\tfor(i=0;i<5;i++){\r\n\t\t\tlp[0][i] = (short)(i*2+1);\r\n\t\t\tlp[1][i] = (short)(2*i+2);\r\n\t\t}\r\n\t\tlp[0][5] = 2;\r\n\t\tlp[1][5] = 10;\r\n\t\tlp[0][9] = 1;\r\n\t\tlp[1][9] = 9;\r\n\t\tfor(i=0;i<3;i++){\r\n\t\t\tlp[0][i+6] = (short)(2*i+11);\r\n\t\t\tlp[1][i+6] = (short)(2*i+12);\r\n\t\t}\r\n\t\tshort[][] tp = new short[1][0];\r\n\t\tthis.shape.set(points,lp,tp);\r\n\t}",
"private static ArrayImg< UnsignedByteType, ByteArray > createLargeRectangularImage() {\n\t\tArrayImg< UnsignedByteType, ByteArray > img = ArrayImgs.unsignedBytes( 1024, 512 );\n\t\tfor ( int i = 0; i < 3; i++ ) {\n\t\t\tlong[] xmin = new long[] { 199 + i * 200, 0 };\n\t\t\tlong[] xmax = new long[] { 299 + i * 200, 511 };\n\t\t\tIntervalView< UnsignedByteType > iview = Views.interval( img, xmin, xmax );\n\t\t\tiview.forEach( pixel -> pixel.set( ( byte ) 255 ) );\n\t\t}\n\t\treturn img;\n\t}",
"private void drawBox(Graphics2D g2d, int y, int wid, int hei) {\n g2d.setColor(Dark_Gray);\n Triangle triangle1 = new Triangle(new Point(wid / 3, y), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle1.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle2 = new Triangle(new Point(2 * wid / 3, y + hei / 10), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid / 3, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10 - 8));\n triangle3.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle4 = new Triangle(new Point(2 * wid / 3, y), new Point(2 * wid / 3 - 8, y), new Point(2 * wid / 3 - 8, y + 8));\n triangle4.fill(g2d);\n g2d.setColor(Color.BLACK);\n g2d.fillRect(wid / 3 + 4, y + 4, wid / 3 - 8, hei / 10 - 8);\n }",
"private void createRenderables()\n {\n this.gridElements = new ArrayList<GridElement>();\n\n ArrayList<Position> positions = new ArrayList<Position>();\n double step = sector.getDeltaLatDegrees() / this.divisions;\n\n // Generate meridians with labels\n double lon = sector.getMinLongitude().degrees + (this.level == 0 ? 0 : step);\n while (lon < sector.getMaxLongitude().degrees - step / 2)\n {\n Angle longitude = Angle.fromDegrees(lon);\n // Meridian\n positions.clear();\n positions.add(new Position(this.sector.getMinLatitude(), longitude, 0));\n positions.add(new Position(this.sector.getMaxLatitude(), longitude, 0));\n\n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n this.sector.getMinLatitude().degrees, this.sector.getMaxLatitude().degrees, lon, lon);\n String lineType = lon == this.sector.getMinLongitude().degrees ?\n GridElement.TYPE_LINE_WEST : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lon;\n this.gridElements.add(ge);\n\n // Increase longitude\n lon += step;\n }\n\n // Generate parallels\n double lat = this.sector.getMinLatitude().degrees + (this.level == 0 ? 0 : step);\n while (lat < this.sector.getMaxLatitude().degrees - step / 2)\n {\n Angle latitude = Angle.fromDegrees(lat);\n positions.clear();\n positions.add(new Position(latitude, this.sector.getMinLongitude(), 0));\n positions.add(new Position(latitude, this.sector.getMaxLongitude(), 0));\n \n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n lat, lat, this.sector.getMinLongitude().degrees, this.sector.getMaxLongitude().degrees);\n String lineType = lat == this.sector.getMinLatitude().degrees ?\n GridElement.TYPE_LINE_SOUTH : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lat;\n this.gridElements.add(ge);\n\n // Increase latitude\n lat += step;\n }\n }",
"public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}",
"private static LinearLayout FuckIntoShape(Context context, View view)\n {\n // Re-arrange completely shitty checkbox layout.\n // The summary must be last item in layout. Icon,\n // title and checkbox need to be in one layout.\n //\n\n //\n // Step one: move all items into new horizontal linear layout.\n //\n\n LinearLayout newlayout = new LinearLayout(context);\n newlayout.setOrientation(LinearLayout.HORIZONTAL);\n newlayout.setLayoutParams(new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.WRAP_CONTENT));\n\n ViewGroup vg = (ViewGroup) view;\n\n while (vg.getChildCount() > 0)\n {\n newlayout.addView(Simple.removeFromParent(vg.getChildAt(0)));\n }\n\n vg.addView(newlayout);\n\n //\n // Step two: fuck top level layout to be vertical match parent.\n //\n\n ((LinearLayout) vg).setOrientation(LinearLayout.VERTICAL);\n\n ImageView icon = (ImageView) view.findViewById(android.R.id.icon);\n\n if ((icon != null) && (icon.getParent() instanceof LinearLayout))\n {\n LinearLayout icon_frame = (LinearLayout) icon.getParent();\n icon_frame.setLayoutParams(new LinearLayout.LayoutParams(Simple.WC, Simple.MP));\n icon_frame.setPadding(0, 0, 0, 0);\n }\n\n //\n // Step three: remove summary from horizontal layout and add\n // to top layout now beeing vertical.\n //\n\n TextView summary = (TextView) view.findViewById(android.R.id.summary);\n\n vg.addView(Simple.removeFromParent(summary));\n\n //\n // Step four: do not forget to fuck stupid max lines on summary.\n //\n\n summary.setMaxLines(50);\n summary.setPadding(0, 0, 16, 16);\n\n //\n // Fucked into shape.\n //\n\n return newlayout;\n }",
"public @NotNull Image flipH()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n if (this.format != ColorFormat.RGBA)\n {\n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n // OPTION 1: Move pixels with memCopy()\n long src = Integer.toUnsignedLong(y * this.width + this.width - 1 - x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, bytesPerLine);\n \n // OPTION 2: Just copy data pixel by pixel\n // output.put(y * this.width + x, this.data.getBytes(y * this.width + (this.width - 1 - x)));\n }\n }\n \n this.data.free();\n \n this.data = output;\n }\n else\n {\n // OPTION 3: Faster implementation (specific for 32bit pixels)\n // NOTE: It does not require additional allocations\n IntBuffer ptr = this.data.toBuffer().asIntBuffer();\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width / 2; x++)\n {\n int backup = ptr.get(y * this.width + x);\n ptr.put(y * this.width + x, ptr.get(y * this.width + this.width - 1 - x));\n ptr.put(y * this.width + this.width - 1 - x, backup);\n }\n }\n }\n this.mipmaps = 1;\n }\n \n return this;\n }",
"public Group shapes() {\n Group group = new Group();\n\n Rectangle square = new Rectangle();\n square.setHeight(_size * 2.0);\n square.setWidth(_size * 2.0);\n square.setX(-_size);\n square.setY(-_size);\n square.setFill(_fill);\n square.setOpacity(0.2);\n group.getChildren().add(square);\n\n return group;\n }",
"private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}",
"private TailoredImage doProcess(BufferedImage sourceImg) throws IOException {\n\t\tint width = sourceImg.getWidth();\n\t\tint height = sourceImg.getHeight();\n\t\t// Check maximum effective width height\n\t\tisTrue((width <= sourceMaxWidth && height <= sourceMaxHeight),\n\t\t\t\tString.format(\"Source image is too big, max limits: %d*%d\", sourceMaxWidth, sourceMaxHeight));\n\t\tisTrue((width >= sourceMinWidth && height >= sourceMinHeight),\n\t\t\t\tString.format(\"Source image is too small, min limits: %d*%d\", sourceMinWidth, sourceMinHeight));\n\n\t\t// 创建背景图,TYPE_4BYTE_ABGR表示具有8位RGBA颜色分量的图像(支持透明的BufferedImage),正常取bufImg.getType()\n\t\tBufferedImage primaryImg = new BufferedImage(sourceImg.getWidth(), sourceImg.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);\n\t\t// 创建滑块图\n\t\tBufferedImage blockImg = new BufferedImage(sourceImg.getWidth(), sourceImg.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);\n\t\t// 随机截取的坐标\n\t\tint maxX0 = width - blockWidth - (circleR + circleOffset);\n\t\tint maxY0 = height - blockHeight;\n\t\tint blockX0 = current().nextInt((int) (maxX0 * 0.25), maxX0); // *0.25防止x坐标太靠左\n\t\tint blockY0 = current().nextInt(circleR, maxY0); // 从circleR开始是为了防止上边的耳朵显示不全\n\t\t// Setup block borders position.\n\t\tinitBorderPositions(blockX0, blockY0, blockWidth, blockHeight);\n\n\t\t// 绘制生成新图(图片大小是固定,位置是随机)\n\t\tdrawing(sourceImg, blockImg, primaryImg, blockX0, blockY0, blockWidth, blockHeight);\n\t\t// 裁剪可用区\n\t\tint cutX0 = blockX0;\n\t\tint cutY0 = Math.max((blockY0 - circleR - circleOffset), 0);\n\t\tint cutWidth = blockWidth + circleR + circleOffset;\n\t\tint cutHeight = blockHeight + circleR + circleOffset;\n\t\tblockImg = blockImg.getSubimage(cutX0, cutY0, cutWidth, cutHeight);\n\n\t\t// Add watermark string.\n\t\taddWatermarkIfNecessary(primaryImg);\n\n\t\t// 输出图像数据\n\t\tTailoredImage img = new TailoredImage();\n\t\t// Primary image.\n\t\tByteArrayOutputStream primaryData = new ByteArrayOutputStream();\n\t\tImageIO.write(primaryImg, \"PNG\", primaryData);\n\t\timg.setPrimaryImg(primaryData.toByteArray());\n\n\t\t// Block image.\n\t\tByteArrayOutputStream blockData = new ByteArrayOutputStream();\n\t\tImageIO.write(blockImg, \"PNG\", blockData);\n\t\timg.setBlockImg(blockData.toByteArray());\n\n\t\t// Position\n\t\timg.setX(blockX0);\n\t\timg.setY(blockY0 - circleR >= 0 ? blockY0 - circleR : 0);\n\t\treturn img;\n\t}",
"public OutlineShape(final Vertex.Factory<? extends Vertex> factory) {\r\n this.vertexFactory = factory;\r\n this.outlines = new ArrayList<Outline>(3);\r\n this.outlines.add(new Outline());\r\n this.outlineState = VerticesState.UNDEFINED;\r\n this.bbox = new AABBox();\r\n this.triangles = new ArrayList<Triangle>();\r\n this.vertices = new ArrayList<Vertex>();\r\n this.addedVerticeCount = 0;\r\n this.dirtyBits = 0;\r\n this.sharpness = DEFAULT_SHARPNESS;\r\n }",
"public void renderInvBlock(bbb renderblocks, int md)\r\n/* 73: */ {\r\n/* 74: 72 */ this.block.f();\r\n/* 75: */ \r\n/* 76: 74 */ this.context.setDefaults();\r\n/* 77: 75 */ this.context.setPos(-0.5D, -0.5D, -0.5D);\r\n/* 78: 76 */ this.context.useNormal = true;\r\n/* 79: 77 */ this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);\r\n/* 80: */ \r\n/* 81: 79 */ RenderLib.bindTexture(\"/eloraam/machine/machine1.png\");\r\n/* 82: 80 */ baz tessellator = baz.a;\r\n/* 83: */ \r\n/* 84: 82 */ tessellator.b();\r\n/* 85: 83 */ this.context.useNormal = true;\r\n/* 86: */ \r\n/* 87: */ \r\n/* 88: 86 */ this.context.setTex(28, 28, 26, 26, 26, 26);\r\n/* 89: */ \r\n/* 90: 88 */ this.context.renderBox(60, 0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D);\r\n/* 91: 89 */ this.context.renderBox(60, 0.6240000128746033D, 0.9990000128746033D, 0.6240000128746033D, 0.3759999871253967D, 0.001000000047497451D, 0.3759999871253967D);\r\n/* 92: 90 */ renderFlanges(3, 27);\r\n/* 93: */ \r\n/* 94: 92 */ tessellator.a();\r\n/* 95: 93 */ RenderLib.unbindTexture();\r\n/* 96: 94 */ this.context.useNormal = false;\r\n/* 97: */ }",
"private void createLayers(boolean bl, int[] arrn) {\n ILayer[] arriLayer = this.mLayers;\n if (bl) {\n for (int i = -1 + this.mLayerCount; i >= 0; --i) {\n arriLayer[i] = new FixedCapacityLayer(arrn[i]);\n }\n return;\n }\n for (int i = -1 + this.mLayerCount; i >= 0; --i) {\n arriLayer[i] = new DynamicCapacityLayer(arrn[i]);\n }\n }",
"public WorldImage drawRow(int blocks) {\r\n return new EmptyImage();\r\n }",
"void addShape(IShape shape, int appear, int disappear);",
"public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }",
"public abstract WorldImage drawCell(int blocks);",
"public List<Block> blocks() {\r\n List<Block> list = new ArrayList<Block>();\r\n double width = 50;\r\n for (int i = 0; i < 7; ++i) {\r\n Color c = new Color(0, 0, 0);\r\n switch (i) {\r\n case 0:\r\n c = Color.gray;\r\n break;\r\n case 1:\r\n c = Color.red;\r\n break;\r\n case 2:\r\n c = Color.yellow;\r\n break;\r\n case 3:\r\n c = Color.green;\r\n break;\r\n case 4:\r\n c = Color.white;\r\n break;\r\n case 5:\r\n c = Color.pink;\r\n break;\r\n default:\r\n c = Color.cyan;\r\n break;\r\n }\r\n for (int j = 0; j < 15; ++j) {\r\n Block b = new Block(new Rectangle(new Point(\r\n 25 + j * width, 100 + i * 20), width, 20));\r\n if (i == 0) {\r\n b.setHitPoints(2);\r\n } else {\r\n b.setHitPoints(1);\r\n }\r\n list.add(b);\r\n }\r\n }\r\n return list;\r\n }",
"private Parent create() {\n root.setPrefSize(600,600);\r\n\r\n for(int i = 0; i < 3; ++i) {\r\n for(int j = 0; j < 3; ++j) {\r\n Tile tile = new Tile();\r\n tile.setTranslateX(j * 200);\r\n tile.setTranslateY(i * 200);\r\n\r\n root.getChildren().add(tile);\r\n board[j][i] = tile;\r\n }\r\n }\r\n\r\n // horizontal strikes\r\n for(int i = 0; i < 3; ++i) {\r\n comboList.add(new Combination(board[0][i], board[1][i], board[2][i]));\r\n }\r\n\r\n // vertical strikes\r\n for(int j = 0; j < 3; ++j) {\r\n comboList.add(new Combination(board[j][0], board[j][1], board[j][2]));\r\n }\r\n\r\n // diagonal strikes\r\n comboList.add(new Combination(board[0][0], board[1][1], board[2][2]));\r\n comboList.add(new Combination(board[2][0], board[1][1], board[0][2]));\r\n\r\n return root;\r\n }",
"public void fill()\n\t{\n\t\tColor[] colors = Color.values();\n\t\tFigure rf;\n\t\ton_stack.clear();\n\t\t\n\t\t// create regular rummikub figures\n\t\tfor (int n=1;n<14;n++)\n\t\t{\n\t\t\tfor(int c=0;c<4;c++)\n\t\t\t{\n\t\t\t\trf = new Figure();\n\t\t\t\trf.setColor(colors[c]);\n\t\t\t\ttry {\n\t\t\t\t\trf.setNumber(n);\n\t\t\t\t\trf.setInstance(1);\n\t\t\t\t} catch (GeneralException e) {\n\t\t\t\t}\n\t\t\t\trf.setPlacement(Placement.ON_STACK);\n\t\t\t\tthis.on_stack.add(rf);\n\t\t\t\t\n\t\t\t\trf = new Figure();\n\t\t\t\trf.setColor(colors[c]);\n\t\t\t\ttry {\n\t\t\t\t\trf.setNumber(n);\n\t\t\t\t\trf.setInstance(2);\n\t\t\t\t} catch (GeneralException e) {\n\t\t\t\t}\n\t\t\t\trf.setPlacement(Placement.ON_STACK);\n\t\t\t\tthis.on_stack.add(rf);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// create jokers\n\t\trf = new Figure();\n\t\ttry {\n\t\t\trf.setInstance(3);\n\t\t} catch (GeneralException e) {\n\t\t}\n\t\tthis.on_stack.add(rf);\n\t\trf = new Figure();\n\t\ttry {\n\t\t\trf.setInstance(4);\n\t\t} catch (GeneralException e) {\n\t\t}\n\t\tthis.on_stack.add(rf);\n\t\t\n\t}",
"public NewShape() {\r\n\t\tsuper();\r\n\t}",
"private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Cube222 () {\n\t\tstate_ = new Cubie[8];\n\t\tstate_[0] = new Cubie('O','W','G',0); // front, clockwise\n\t\tstate_[1] = new Cubie('O','W','B',1);\n\t\tstate_[2] = new Cubie('R','W','B',2);\n\t\tstate_[3] = new Cubie('R','W','G',3);\n\t\tstate_[4] = new Cubie('O','Y','G',4); // back, behind front\n\t\tstate_[5] = new Cubie('O','Y','B',5);\n\t\tstate_[6] = new Cubie('R','Y','B',6);\n\t\tstate_[7] = new Cubie('R','Y','G',7);\n\t}",
"private ZigzagStroke() {}",
"public ArrayList<Integer> getNewImage() {\n int centerPatternOffset = -Math.round(slice.size() / 2); // The offset needed to make sure that the center of the slice is located at the first index\n float repeatSliceOffset;\n int thisNumRepeats;\n if (doRepeat) {\n if (doEqualSpacedRepeats) {\n repeatSliceOffset = (float) thisNumLEDs / (float)numRepeats; // The offset between the centers of each repeat of the pattern\n } else {\n repeatSliceOffset = slice.size();\n }\n thisNumRepeats = numRepeats;\n } else {\n repeatSliceOffset = 0;\n thisNumRepeats = 1;\n }\n\n // Create a thisNumLEDs size array out of the slice, depending on how it should be repeated. Simultaneously generate the selected array, which should be selected for all colors in the pattern/slice\n // TO_DO: If/when pattern is not properly rotated, fix it here. Probably need to add a round(thisNumLEDs/4) offset?\n ArrayList<Integer> newImage = new ArrayList<>(originalImage); // Initialize the newImage as the original image sent to this fragment in the beginning. Overwrite it with the \"processed\" slice to produce the new image\n\n for (int repeatNum = 0; repeatNum < thisNumRepeats; repeatNum++) {\n // Go through each repeat of the slice\n // TO_DO: Add error-checking for overlap? Meh...\n int thisStartInd = ROTATION_OFFSET + centerPatternOffset + (int)((float)repeatNum * repeatSliceOffset) + getRotation(); // Where to start this pattern\n for (int sliceInd = 0; sliceInd < slice.size(); sliceInd++) {\n // \"Inlay\" this repeat of the slice into the newImage\n\n // Modulus thisStartInd + sliceInd into newImage.size (requires 2 lines because Java is stupid)\n int newInd = (thisStartInd + sliceInd) % newImage.size();\n if (newInd < 0) newInd += newImage.size();\n\n newImage.set(newInd, slice.get(sliceInd));\n }\n }\n\n return newImage;\n }",
"@Override\r\n\tpublic void create() {\n\t\tsuper.create();\r\n\t\t// Ground\r\n\t\tBodyDef groundBodyDef = new BodyDef();\r\n\t\tgroundBody = world.createBody(groundBodyDef);\r\n\t\tEdgeShape edgeShape = new EdgeShape();\r\n\t\tedgeShape.set(new Vector2(50.0f, 0.0f), new Vector2(50.0f, 0.0f));\r\n\t\tgroundBody.createFixture(edgeShape, 0.0f);\r\n \r\n\t\tcreateFirstGroupShape();\r\n\t\t// the second group\r\n\t\tcreateSecondGroupShape();\r\n\t}",
"Region region();",
"Region region();",
"Region region();",
"Region region();",
"public void composeOtherNodes() {\n final PNode myCompositeFace = PPath.createRectangle(0, 0, 100, 80);\n\n // create parts for the face.\n final PNode eye1 = PPath.createEllipse(0, 0, 20, 20);\n eye1.setPaint(Color.YELLOW);\n final PNode eye2 = (PNode) eye1.clone();\n final PNode mouth = PPath.createRectangle(0, 0, 40, 20);\n mouth.setPaint(Color.BLACK);\n\n // add the face parts\n myCompositeFace.addChild(eye1);\n myCompositeFace.addChild(eye2);\n myCompositeFace.addChild(mouth);\n\n // don't want anyone grabbing out our eye's.\n myCompositeFace.setChildrenPickable(false);\n\n // position the face parts.\n eye2.translate(25, 0);\n mouth.translate(0, 30);\n\n // set the face bounds so that it neatly contains the face parts.\n final PBounds b = myCompositeFace.getUnionOfChildrenBounds(null);\n myCompositeFace.setBounds(b.inset(-5, -5));\n\n // opps it to small, so scale it up.\n myCompositeFace.scale(1.5);\n\n getCanvas().getLayer().addChild(myCompositeFace);\n }",
"void computeNewLayout();",
"public SZShape(Position givenPosition, boolean magic)\n\t\t{\n\t\t\tsuper(givenPosition);\n\t\t\tcells = new Cell[4];\n\t\t\tposition = givenPosition;\n\t\t\tcells[0] = new Cell(new Block(Color.GREEN, magic), position);\n\t\t\tPosition position1 = new Position(givenPosition.row() + 1, givenPosition.col());\n\t\t\tcells[1] = new Cell(new Block(Color.GREEN, false), position1);\n\t\t\tPosition position2 = new Position(givenPosition.row() + 1, givenPosition.col()+1);\n\t\t\tcells[2] = new Cell(new Block(Color.GREEN, false), position2);\n\t\t\tPosition position3 = new Position(givenPosition.row() + 2, givenPosition.col()+1);\n\t\t\tcells[3] = new Cell(new Block(Color.GREEN, false), position3);\n\t\t\tsuper.setCells(cells);\n\t\t}",
"public void create()\n/* 342: */ {\n/* 343:422 */ setupPlainVariables_xjal();\n/* 344: */ \n/* 345:424 */ this.presentation = new ShapeTopLevelPresentationGroup(this, true, 0.0D, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 346:425 */ this.icon = new ShapeGroup(this, true, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 347: */ \n/* 348: */ \n/* 349:428 */ assignInitialConditions_xjal();\n/* 350:429 */ onCreate();\n/* 351: */ }",
"protected RMShape createDivideShapeRemainder(byte anEdge) { return clone(); }",
"public WorldImage drawRow(int blocks) {\r\n return new BesideImage(this.drawCell(blocks), this.right.drawRow(blocks));\r\n }",
"public DynamicModelPart addCuboids() {\n for (int i = 0; i < this.x.length; i++) {\n this.addCuboid(this.x[i], this.y[i], this.z[i], this.sizeX[i], this.sizeY[i],\n this.sizeZ[i], this.extra[i], this.u[i], this.v[i]);\n }\n return this;\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 35;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 36; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next Shape:\", d.width*13/20, d.width/8);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width*5/8);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*7/8);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*9/8);\n }",
"public abstract WorldImage drawBoard(int blocks);",
"IShape getCurrentShape();"
]
| [
"0.5509142",
"0.54436755",
"0.5399537",
"0.52684546",
"0.5237657",
"0.51693994",
"0.51628006",
"0.5143192",
"0.5078373",
"0.50047463",
"0.50032383",
"0.4988567",
"0.4983822",
"0.49833822",
"0.49812043",
"0.49787736",
"0.49784738",
"0.49384448",
"0.49359572",
"0.49186456",
"0.49152926",
"0.49059388",
"0.48933744",
"0.48860046",
"0.48806047",
"0.48755887",
"0.4872342",
"0.4869941",
"0.4863917",
"0.4840271",
"0.4818964",
"0.48168972",
"0.48116565",
"0.4810608",
"0.48092407",
"0.48091993",
"0.4799826",
"0.47914758",
"0.47881955",
"0.47787598",
"0.476643",
"0.47645828",
"0.47594923",
"0.47233525",
"0.4714824",
"0.47138074",
"0.47109383",
"0.4708447",
"0.47067222",
"0.4706336",
"0.47060525",
"0.47053048",
"0.47016582",
"0.46823382",
"0.46819344",
"0.46792808",
"0.46765542",
"0.4671732",
"0.46660522",
"0.4664406",
"0.46621937",
"0.46500456",
"0.46498728",
"0.46380404",
"0.4634286",
"0.4633038",
"0.46309733",
"0.4628835",
"0.4626998",
"0.46199936",
"0.46169046",
"0.46056846",
"0.46040276",
"0.4597368",
"0.45968747",
"0.45967767",
"0.458971",
"0.4581771",
"0.45778084",
"0.45706064",
"0.45693243",
"0.45631394",
"0.45616382",
"0.4561527",
"0.4556655",
"0.4556025",
"0.4551145",
"0.4551145",
"0.4551145",
"0.4551145",
"0.4550752",
"0.4546938",
"0.4539832",
"0.45365244",
"0.4536277",
"0.45352775",
"0.45337173",
"0.4533488",
"0.45328838",
"0.4525911"
]
| 0.46769878 | 56 |
TODO Autogenerated method stub | public static void main(String[] args) {
TreeNode root = new TreeNode(2);
TreeNode left = new TreeNode(0);
TreeNode right = new TreeNode(0);
root.left = left;
root.right = right;
System.out.println(sumRootToLeaf.sumNumbers(root));
} | {
"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 |
write your code here | public static int[] solution(String str1, String str2) {
int[] ans = new int[2];
int n = str1.length(), m = str2.length();
int[][] dp = new int[m + 1][n];
for (int k = 0; k < n; k++) {
for (int i = 0, j = k; j < n; i++, j++) {
if (k == 0)
dp[i][j] = str1.charAt(j) - '0';
else if (k == 1) {
int a = str1.charAt(i) - '0', b = str1.charAt(j) - '0';
if (str2.charAt(i) == '+')
dp[i][j] = a + b;
else
dp[i][j] = a * b;
} else {
int min = Integer.MAX_VALUE;
for (int x = i; x < j; x++) {
if (str2.charAt(x) == '+')
min = Math.min(min, dp[i][x] + dp[x + 1][j]);
else
min = Math.min(min, dp[i][x] * dp[x + 1][j]);
}
dp[i][j] = min;
}
}
}
ans[0] = dp[0][n - 1];
for (int k = 0; k < n; k++) {
for (int i = 0, j = k; j < n; i++, j++) {
if (k == 0)
dp[i][j] = str1.charAt(j) - '0';
else if (k == 1) {
int a = str1.charAt(i) - '0', b = str1.charAt(j) - '0';
if (str2.charAt(i) == '+')
dp[i][j] = a + b;
else
dp[i][j] = a * b;
} else {
int max = Integer.MIN_VALUE;
for (int x = i; x < j; x++) {
if (str2.charAt(x) == '+')
max = Math.max(max, dp[i][x] + dp[x + 1][j]);
else
max = Math.max(max, dp[i][x] * dp[x + 1][j]);
}
dp[i][j] = max;
}
}
}
ans[1] = dp[0][n - 1];
return ans;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"public static void generateCode()\n {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void ganar() {\n // TODO implement here\n }",
"public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }",
"CD withCode();",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void baocun() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"public void furyo ()\t{\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"public void themesa()\n {\n \n \n \n \n }",
"Programming(){\n\t}",
"@Override\n\tvoid output() {\n\t\t\n\t}",
"private void yy() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }",
"private void kk12() {\n\n\t}",
"public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}",
"public static void main(String[] args) {\n\t// write your code here\n }",
"private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}",
"@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}",
"protected void mo6255a() {\n }",
"public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public void working()\n {\n \n \n }",
"@Override\n\tprotected void postRun() {\n\n\t}",
"public void perder() {\n // TODO implement here\n }",
"public void smell() {\n\t\t\n\t}",
"protected void execute() {\n\t\t\n\t}",
"public void mo55254a() {\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\n\tpublic void orgasm() {\n\t\t\n\t}",
"public void cocinar(){\n\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void run() {\n\t\t\t\t\n\t\t\t}",
"protected void execute() {\n\n\n \n }",
"@Override\n public void execute() {\n \n \n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"protected void display() {\n\r\n\t}",
"private void sout() {\n\t\t\n\t}",
"private static void oneUserExample()\t{\n\t}",
"public void nhapdltextlh(){\n\n }",
"public void miseAJour();",
"protected void additionalProcessing() {\n\t}",
"private void sub() {\n\n\t}",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}",
"@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}",
"void mo67924c();",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }",
"public void mo5382o() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"public void mo3376r() {\n }",
"public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }",
"void kiemTraThangHopLi() {\n }",
"public void skystonePos5() {\n }",
"public final void cpp() {\n }",
"public final void mo51373a() {\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"This is the main class of this project\");\r\n\t\tSystem.out.println(\"how about this\");\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"new push\");\r\n\r\n\t\t//how to update this line\r\n\t\t\r\n\t\tSystem.out.println(\"hello there\");\r\n\r\n\t\tSystem.out.println(\"zen me shuoXXXXXXXXXXXKKKKkKKKKKKXXXXXXXX\");\r\n\r\n\t\tSystem.out.println(\"eventually we succeeded!\");\r\n\t\t//wa!!!\r\n\t\t\r\n\r\n\r\n\t\t//hen shu fu !\r\n\t\t\r\n\t\t//it is a good day\r\n\t\t\r\n\t\t//testing\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"hope it works\");\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}"
]
| [
"0.61019534",
"0.6054925",
"0.58806974",
"0.58270746",
"0.5796887",
"0.56999695",
"0.5690986",
"0.56556827",
"0.5648637",
"0.5640487",
"0.56354505",
"0.56032085",
"0.56016207",
"0.56006724",
"0.5589654",
"0.5583692",
"0.55785793",
"0.55733466",
"0.5560209",
"0.55325305",
"0.55133164",
"0.55123806",
"0.55114794",
"0.5500045",
"0.5489272",
"0.5482718",
"0.5482718",
"0.5477585",
"0.5477585",
"0.54645246",
"0.5461012",
"0.54548836",
"0.5442613",
"0.5430592",
"0.5423748",
"0.5419415",
"0.5407118",
"0.54048806",
"0.5399331",
"0.539896",
"0.5389593",
"0.5386248",
"0.5378453",
"0.53751254",
"0.5360644",
"0.5357343",
"0.5345515",
"0.53441405",
"0.5322276",
"0.5318302",
"0.53118485",
"0.53118485",
"0.53085434",
"0.530508",
"0.53038436",
"0.5301922",
"0.5296964",
"0.52920514",
"0.52903354",
"0.5289583",
"0.5287506",
"0.52869135",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.52859664",
"0.52849185",
"0.52817136",
"0.52791214",
"0.5278664",
"0.5278048",
"0.5276269",
"0.52728665",
"0.5265451",
"0.526483",
"0.526005",
"0.5259683",
"0.52577406",
"0.5257731",
"0.5257731",
"0.52560073",
"0.5255759",
"0.5255707",
"0.5250705",
"0.5246863",
"0.5243053",
"0.52429926",
"0.5242727",
"0.52396125",
"0.5239378",
"0.5232576",
"0.5224529",
"0.52240705",
"0.52210563",
"0.52203166",
"0.521787",
"0.52172214"
]
| 0.0 | -1 |
TODO Makes Group ViewModel | Group(String name) {
this(name, new ArrayList<>());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set getGroups() { return this.groups; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public void setGroup(entity.Group value);",
"public int getIdGroup() {\n return idGroup;\n }",
"public interface Group {\n\n void saveGroup(ServiceCallback<Group> callback);\n\n String getId();\n\n String getName();\n\n void setName(String name);\n\n String getCoverUrl();\n\n void setCoverImage(Bitmap bitmap);\n\n List<User> getUsers();\n\n void fetchUsers(ServiceCallback<Group> callback);\n\n List<User> getAdmins();\n\n void fetchAdmins(ServiceCallback<Group> callback);\n}",
"public interface EditGroupContract {\n\n interface Model extends BaseModel {\n /**\n * 获取群聊成员\n *\n * @param groupId\n * @return\n */\n Observable<List<ContactEntity>> getGroupMembers(Context context, int groupId, int index, int size);\n }\n\n interface View extends BaseView {\n void showContent(List<ContactItem> list);\n }\n\n abstract class GroupPresenter extends BasePresenter<Model, View> {\n public abstract void initContent();\n\n public abstract void leaveGroup(final String easeId);\n\n }\n}",
"public abstract Collection getGroups();",
"public void addGroup(Group group) {\r\n System.out.println(\"conectado con model ---> metodo addGroup\");\r\n //TODO\r\n }",
"public Group getGroup() {\n return _group;\n }",
"public GroupFragment() {\n groupList= new ArrayList<String>();\n //The group list should come from the server\n groupList.add(\"Lordaeron\");\n groupList.add(\"Institute of War\");\n groupList.add(\"BJTU-LOL\");\n groupList.add(\"High school\");\n groupList.add(\"We are a team\");\n groupList.add(\"Killing\");\n groupList.add(\"Less is more\");\n groupList.add(\"Come on baby\");\n groupList.add(\"Breaking the news\");\n groupList.add(\"DL\");\n groupList.add(\"Taste my blade\");\n groupList.add(\"Little\");\n groupList.add(\"Double kill\");\n groupList.add(\"Victory \");\n groupList.add(\"Huskar\");\n groupList.add(\"First blood\");\n groupList.add(\"Ironwood Branch\");\n groupList.add(\"Medusa\");\n groupList.add(\"Slithice\");\n groupList.add(\"Zeus\");\n groupList.add(\"It's lucky time\");\n }",
"public Group getGroup() {\n return group;\n }",
"public Group(){\n\n }",
"public String getGroupName();",
"@Override\n public NavigationDrawerRecyclerViewAdapter.GroupsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n return new GroupsViewHolder(LayoutInflater.from(context).inflate(R.layout.item_group_layout,parent,false));\n }",
"@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}",
"@Override\n public ModelInputDisplayItemType getDisplayItemType() {\n return ModelInputDisplayItemType.GROUP;\n }",
"public ProductGroup beProductGroup();",
"public void newGroup() {\n addGroup(null, true);\n }",
"public Group() {\n\n }",
"public Group getGroup_1() { return cGroup_1; }",
"public Group getGroup_1() { return cGroup_1; }",
"public Group getGroup_1() { return cGroup_1; }",
"public Group getGroup_1() { return cGroup_1; }",
"public Group getGroup_1() { return cGroup_1; }"
]
| [
"0.6665294",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66531765",
"0.66088796",
"0.6487884",
"0.6440112",
"0.62670696",
"0.6262398",
"0.62285256",
"0.61967486",
"0.6176873",
"0.6168687",
"0.61492425",
"0.613476",
"0.6127859",
"0.61177605",
"0.6113187",
"0.6094101",
"0.60748094",
"0.6065567",
"0.6050656",
"0.6050656",
"0.6050656",
"0.6050656",
"0.6050656"
]
| 0.60702914 | 94 |
set up GUI components | public void init()
{
// obtain content pane and change its layout to
// a FlowLayout
Container container = getContentPane();
container.setLayout( new FlowLayout() );
// create label and text field for die 1
die1Label = new JLabel( "Die 1" );
container.add( die1Label );
die1Field = new JTextField( 10 );
die1Field.setEditable( false );
container.add( die1Field );
// create label and text field for die 2
die2Label = new JLabel( "Die 2" );
container.add( die2Label );
die2Field = new JTextField( 10 );
die2Field.setEditable( false );
container.add( die2Field );
// create label and text field for sum
sumLabel = new JLabel( "Sum is" );
container.add( sumLabel );
sumField = new JTextField( 10 );
sumField.setEditable( false );
container.add( sumField );
// create label and text field for point
pointLabel = new JLabel( "Point is" );
container.add( pointLabel );
pointField = new JTextField( 10 );
pointField.setEditable( false );
container.add( pointField );
wonLabel=new JLabel(" Money");
container.add(wonLabel);
wonMoney=new JTextField(10);
wonMoney.setEditable(false);
container.add(wonMoney);
wonLabel=new JLabel("$");
container.add(wonLabel);
// create button user clicks to roll dice
rollButton = new JButton( "Roll Dice" );
rollButton.addActionListener( this );
container.add( rollButton );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupGUI() {\r\n\t\tPaperToolkit.initializeLookAndFeel();\r\n\t\tgetMainFrame();\r\n\t}",
"public void initGUI(){\n\t\t\n\t\t//the layout is a new BorderLayout\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t//the label will be north\t\n\t\tadd(createHeroList(), BorderLayout.NORTH);\n\t\t\n\t\t//the questions will be displayed center\t\t\n\t\tadd(createQuestions(), BorderLayout.CENTER);\n\t\t//the button panel should be south\n\t\tadd(createAnswerButtonPanel(), BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t \n\t}",
"private void setGUI()\r\n\t{\r\n\t\tbubblePB = setProgressBar(bubblePB);\r\n\t\tinsertionPB = setProgressBar(insertionPB);\r\n\t\tmergePB = setProgressBar(mergePB);\r\n\t\tquickPB = setProgressBar(quickPB);\r\n\t\tradixPB = setProgressBar(radixPB);\r\n\t\t\r\n\t\tsetLabels();\r\n\t\tsetPanel();\r\n\t\tsetLabels();\r\n\t\tsetFrame();\r\n\t}",
"private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}",
"public GUI() {\n\t\tinitComponents();\n\t}",
"protected void initializeGUI() {\n\n\t}",
"private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}",
"private void setUpGUI() {\n \n removePrecursorPeakCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n enzymeTypeCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n useFlankingCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n removePrecursorPeakCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n monoPrecursorCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n peptideListCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n decoyFormatCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n keepTerminalAaCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n removeMethionineCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n exactPvalueCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n spScoreCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n chargesCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n useNeutralLossCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n outputFormatCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n removeTempFoldersCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n \n minPepLengthTxt.setEditable(editable);\n minPepLengthTxt.setEnabled(editable);\n maxPepLengthTxt.setEditable(editable);\n maxPepLengthTxt.setEnabled(editable);\n minPrecursorMassTxt.setEditable(editable);\n minPrecursorMassTxt.setEnabled(editable);\n maxPrecursorMassTxt.setEditable(editable);\n maxPrecursorMassTxt.setEnabled(editable);\n monoPrecursorCmb.setEnabled(editable);\n removeMethionineCmb.setEnabled(editable);\n //minPtmsPerPeptideTxt.setEditable(editable);\n //minPtmsPerPeptideTxt.setEnabled(editable);\n maxPtmsPerPeptideTxt.setEditable(editable);\n maxPtmsPerPeptideTxt.setEnabled(editable);\n maxVariablePtmsPerTypeTxt.setEditable(editable);\n maxVariablePtmsPerTypeTxt.setEnabled(editable);\n enzymeTypeCmb.setEnabled(editable);\n peptideListCmb.setEnabled(editable);\n decoyFormatCombo.setEnabled(editable);\n keepTerminalAaCombo.setEnabled(editable);\n decoySeedTxt.setEditable(editable);\n decoySeedTxt.setEnabled(editable);\n removeTempFoldersCmb.setEnabled(editable);\n exactPvalueCombo.setEnabled(editable);\n spScoreCombo.setEnabled(editable);\n minSpectrumMzTxt.setEditable(editable);\n minSpectrumMzTxt.setEnabled(editable);\n maxSpectrumMzTxt.setEditable(editable);\n maxSpectrumMzTxt.setEnabled(editable);\n minPeaksTxt.setEditable(editable);\n minPeaksTxt.setEnabled(editable);\n chargesCombo.setEnabled(editable);\n removePrecursorPeakCombo.setEnabled(editable);\n removePrecursorPeakToleranceTxt.setEditable(editable);\n removePrecursorPeakToleranceTxt.setEnabled(editable);\n useFlankingCmb.setEnabled(editable);\n useNeutralLossCmb.setEnabled(editable);\n mzBinWidthTxt.setEditable(editable);\n mzBinWidthTxt.setEnabled(editable);\n mzBinOffsetTxt.setEditable(editable);\n mzBinOffsetTxt.setEnabled(editable);\n numberMatchesTxt.setEditable(editable);\n numberMatchesTxt.setEnabled(editable);\n outputFormatCombo.setEnabled(editable);\n \n }",
"public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }",
"private void $$$setupUI$$$()\n {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(6, 1, new Insets(20, 20, 20, 20), -1, -1));\n panel.setAutoscrolls(true);\n buttonSettings = new JButton();\n buttonSettings.setEnabled(true);\n buttonSettings.setText(\"Open Application Settings\");\n panel.add(buttonSettings,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonStartGit = new JButton();\n buttonStartGit.setEnabled(true);\n buttonStartGit.setText(\"Start Git Management\");\n panel.add(buttonStartGit,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n null, new Dimension(500, 500), null, 0, false));\n textPaneConsole = new JTextPane();\n textPaneConsole.setEditable(false);\n scrollPane1.setViewportView(textPaneConsole);\n buttonOpenBenchmarkDialog = new JButton();\n buttonOpenBenchmarkDialog.setText(\"Open YCSB Benchmark Dialog\");\n panel.add(buttonOpenBenchmarkDialog,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonShowGitSettings = new JButton();\n buttonShowGitSettings.setEnabled(true);\n buttonShowGitSettings.setText(\"Open Git Management\");\n panel.add(buttonShowGitSettings,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Console Output\");\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,\n null, null, 0, false));\n }",
"private static void initAndShowGUI() {\n }",
"private void initComponents() {\n\t\tthis.setTitle(\"Boggle\");\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setMinimumSize(new Dimension(600, 575));\n\t\t\n\t\tinitMenuBar();\n\t\tinitDiceGridPanel();\n\t\tinitInputPanel();\n\t\tinitInfoPanel();\n\t\taddPanels();\n\t\t\n\t\tthis.setVisible(true);\n\t}",
"private void initComponents() {\n\t\t\n\t}",
"private void initComponents() {\n\t\t\n\t}",
"private void initGUI() {\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\t// This is the story we took from Wikipedia.\n\t\tString story = \"The Internet Foundation Classes (IFC) were a graphics \"\n\t\t\t\t+ \"library for Java originally developed by Netscape Communications \"\n\t\t\t\t+ \"Corporation and first released on December 16, 1996.\\n\\n\"\n\t\t\t\t+ \"On April 2, 1997, Sun Microsystems and Netscape Communications\"\n\t\t\t\t+ \" Corporation announced their intention to combine IFC with other\"\n\t\t\t\t+ \" technologies to form the Java Foundation Classes. In addition \"\n\t\t\t\t+ \"to the components originally provided by IFC, Swing introduced \"\n\t\t\t\t+ \"a mechanism that allowed the look and feel of every component \"\n\t\t\t\t+ \"in an application to be altered without making substantial \"\n\t\t\t\t+ \"changes to the application code. The introduction of support \"\n\t\t\t\t+ \"for a pluggable look and feel allowed Swing components to \"\n\t\t\t\t+ \"emulate the appearance of native components while still \"\n\t\t\t\t+ \"retaining the benefits of platform independence. This feature \"\n\t\t\t\t+ \"also makes it easy to have an individual application's appearance \"\n\t\t\t\t+ \"look very different from other native programs.\\n\\n\"\n\t\t\t\t+ \"Originally distributed as a separately downloadable library, \"\n\t\t\t\t+ \"Swing has been included as part of the Java Standard Edition \"\n\t\t\t\t+ \"since release 1.2. The Swing classes are contained in the \"\n\t\t\t\t+ \"javax.swing package hierarchy.\\n\\n\";\n\t\t// We create the TextArea and pass the story in as an argument.\n\t\tJTextArea storyArea = new JTextArea(story);\n\t\tstoryArea.setEditable(true);\n\t\tstoryArea.setWrapStyleWord(true);\n\t\t// We create the ScrollPane and instantiate it with the TextArea as an argument\n\t\tJScrollPane area = new JScrollPane(storyArea);\t\t\t\n\t\tmainPanel.add(area);\t\n\t\tthis.setContentPane(mainPanel);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setSize(350, 300);\n\t\tthis.setVisible(true);\n\t}",
"private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }",
"private void setupComponents() {\n\t\tframe.setLayout(null);\r\n\r\n\t\t\r\n\t\t\r\n\t\t// Add label for title ..\r\n\t\tJLabel titleField = new JLabel();\r\n\t\ttitleField.setBounds(50, 10, 300, 30);// x, y, width, height - (pixels)\r\n\t\ttitleField.setText(\"Simple Swing Application\");\r\n\t\ttitleField.setFont(new Font(\"Arial\", Font.BOLD, 24));\r\n\t\ttitleField.setForeground(Color.red);\r\n\t\ttitleField.setVisible(true);\r\n\t\tframe.add(titleField);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Add label for output message ..\r\n\t\tJLabel textField = new JLabel();\r\n\t\ttextField.setBounds(50, 200, 300, 30);\r\n\t\ttextField.setVisible(true);\r\n\t\tframe.add(textField);\r\n\r\n\t\t// Add a YES button ..\r\n\t\tJButton yesButton = new JButton(\"Yes\");\r\n\t\tyesButton.setBounds(50, 150, 90, 30);\r\n\t\tyesButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(yesButton);\r\n\r\n\t\t// Add a NO button ..\r\n\t\tJButton noButton = new JButton(\"No\");\r\n\t\tnoButton.setBounds(150, 150, 90, 30);\r\n\t\tnoButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(noButton);\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"private void setUpGUI() {\r\n\r\n\t\t// All the components to the panel\r\n\t\tuserName = new JTextField();\r\n\t\tpassword = new JPasswordField();\r\n\t\tuserNameLabel = new JLabel(\"UserName\");\r\n\t\tpasswordLabel = new JLabel(\"Password\");\r\n\t\tloginButton = new JButton(\"Login\");\r\n\t\tregisterButton = new JButton(\"Register\");\r\n\r\n\t\t// Null layout for custom layout\r\n\t\tthis.setLayout(null);\r\n\r\n\t\t// Sets the size and location of all the labels, fields, and buttons\r\n\t\tuserNameLabel.setLocation(labelXLocation, labelYLocation);\r\n\t\tuserNameLabel.setSize(labelXSize, labelYSize);\r\n\r\n\t\tuserName.setLocation(labelXLocation + xFieldOffset, labelYLocation);\r\n\t\tuserName.setSize(textFieldXSize, textFieldYSize);\r\n\r\n\t\tpasswordLabel.setLocation(labelXLocation, labelYLocation + labelYSize\r\n\t\t\t\t+ buffer);\r\n\t\tpasswordLabel.setSize(labelXSize, labelYSize);\r\n\r\n\t\tpassword.setLocation(labelXLocation + xFieldOffset, labelYLocation\r\n\t\t\t\t+ yFieldOffset);\r\n\t\tpassword.setSize(textFieldXSize, textFieldYSize);\r\n\r\n\t\tloginButton.setLocation(labelXLocation, labelYLocation + labelYSize\r\n\t\t\t\t+ textFieldYSize + buffer * 3);\r\n\t\tloginButton.setSize(xButtonSize, yButtonSize);\r\n\r\n\t\tregisterButton.setLocation(labelXLocation + xFieldOffset + buffer\r\n\t\t\t\t+ buffer, labelYLocation + labelYSize + textFieldYSize + buffer\r\n\t\t\t\t* 3);\r\n\t\tregisterButton.setSize(xButtonSize, yButtonSize);\r\n\r\n\t\t\r\n\t\t// Adds everything to the panel\r\n\t\tthis.add(userNameLabel);\r\n\t\tthis.add(userName);\r\n\t\tthis.add(passwordLabel);\r\n\t\tthis.add(password);\r\n\t\tthis.add(loginButton);\r\n\t\tthis.add(registerButton);\r\n\t\tthis.repaint();\r\n\t}",
"private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"private void initGUI() {\n\t\tContainer cp = getContentPane();\n\t\tcp.setLayout(new BorderLayout());\n\t\t\n\t\tJPanel top = new JPanel(new GridLayout(0, 1));\n\t\tcp.add(top, BorderLayout.PAGE_START);\n\t\t\n\t\ttop.add(createMenuBar());\n\n\t\tJTabbedPane tabs = new JTabbedPane();\n\t\ttabs.add(\"Encryptor\", encryptorPanel);\n\t\ttabs.add(\"Decryptor\", decryptorPanel);\n\t\ttabs.setSelectedComponent(encryptorPanel);\n\t\t\n\t\tcp.add(tabs);\n\t}",
"public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }",
"private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }",
"private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}",
"private void setupGUI()\n\t{\n\t\t//initializes labelNumberOfASCII and adds to frame \n\t\tlabelNumberOfASCII = new JLabel();\n\t\tlabelNumberOfASCII.setLocation(12, 8);\n\t\tlabelNumberOfASCII.setSize(191,26);\n\t\tlabelNumberOfASCII.setText(\"Number of ASCII characters used\");\n\t\tgetContentPane().add(labelNumberOfASCII);\n\t\t\n\t\t//initialized comboCharSet and adds to frame\n\t\tString comboCharSet_tmp[]={\"Small\", \"Medium\", \"Large\"};\n\t\tcomboCharSet = new JComboBox<String>(comboCharSet_tmp);\n\t\tcomboCharSet.setLocation(294, 12);\n\t\tcomboCharSet.setSize(96, 25);\n\t\tcomboCharSet.setEditable(true);\n\t\tcomboCharSet.addActionListener(this);\n\t\tgetContentPane().add(comboCharSet);\n\n\t\t//initializes labelNumberofPixels and adds to frame\n\t\tlabelNumberOfPixels = new JLabel();\n\t\tlabelNumberOfPixels.setLocation(12,28);\n\t\tlabelNumberOfPixels.setSize(240,51);\n\t\tlabelNumberOfPixels.setText(\"Number of pixels per ASCII character: \");\n\t\tgetContentPane().add(labelNumberOfPixels);\n\t\t\n\t\t//initializes comboNumberOfPixels and adds to frame\n\t\tString comboNumberOfPixels_tmp[]={\"1\",\"3\",\"5\",\"7\",\"10\"};\n\t\tcomboNumberOfPixels = new JComboBox<String>(comboNumberOfPixels_tmp);\n\t\tcomboNumberOfPixels.setLocation(294,40);\n\t\tcomboNumberOfPixels.setSize(96,25);\n\t\tcomboNumberOfPixels.setEditable(true);\n\t\tcomboNumberOfPixels.addActionListener(this);\n\t\tgetContentPane().add(comboNumberOfPixels);\n\n\t\t//initializes outputPathLabel and adds to frame\n\t\toutputPathLabel = new JLabel();\n\t\toutputPathLabel.setLocation(12, 55);\n\t\toutputPathLabel.setText(\"Output folder:\");\n\t\toutputPathLabel.setSize(218, 51);\n\t\toutputPathLabel.setVisible(true);\n\t\tgetContentPane().add(outputPathLabel);\n\n\t\t//initializes outputPathTextField and adds to frame\n\t\toutputPathTextField = new JTextField();\n\t\tString initPath;\n\t\t//sets default output to default directory, created in Main.java. looks according to operating system.\n\t\tif (OSUtils.isUnixOrLinux())\n\t\t\tinitPath = System.getProperty(\"user.home\") + \"/.picture-to-ascii/output\";\n\t\telse if (OSUtils.isWindows())\n\t\t\tinitPath = System.getProperty(\"user.home\") + \"\\\\My Documents\\\\picture-to-ascii\\\\output\";\n\t\telse\n\t\t\tinitPath = \"(output path)\";\n\t\t//if the directory failed to create for reasons other than incompatible OS, we want (output path).\n\t\tif (!new File(initPath).isDirectory())\n\t\t\tinitPath = \"(output path)\";\n\n\t\toutputPathTextField.setLocation(150, 70);\n\t\toutputPathTextField.setSize(240,25);\n\t\toutputPathTextField.setText(initPath);\n\t\tgetContentPane().add(outputPathTextField);\n\n\t\tfontSizeTextField = new JTextField();\n\t\tfontSizeTextField.setLocation(150, 100);\n\t\tfontSizeTextField.setSize(240,25);\n\t\tfontSizeTextField.setText(\"5\");\n\t\tgetContentPane().add(fontSizeTextField);\n\n\t\tfontSizeLabel = new JLabel();\n\t\tfontSizeLabel.setText(\"Font size:\");\n\t\tfontSizeLabel.setSize(125, 51);\n\t\tfontSizeLabel.setLocation(12, 85);\n\t\tfontSizeLabel.setVisible(true);\n\t\tgetContentPane().add(fontSizeLabel);\n\t}",
"public GUI() {\n\t\t// sets up file choosers\n\t\tsetFileChoosers();\n\t\t// initialises JFrame\n\t\tsetContent();\n\t\t// sets default window attributes\n\t\tthis.setDefaultAttributes();\n\t\t// instantiates controller object\n\t\tsetController();\n\t\t// sets toolbar to go over frame\n\t\tJPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\t\tToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);\n\t\t// sets antialiasing\n\t\t((Graphics2D) this.getGraphics()).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n\t\t\t\tRenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\t}",
"public GUI() {\n initComponents();\n }",
"public GUI() {\n initComponents();\n }",
"public MediaLibraryGUI() {\r\n initializeFields();\r\n\r\n makeMenu();\r\n\r\n makeCenter();\r\n\r\n makeSouth();\r\n\r\n startGUI();\r\n }",
"public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }",
"private void initGui()\n {\n setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.WHITE));\n\n setLayout(new GridBagLayout());\n\n GridBagConstraints gbc = new GridBagConstraints();\n\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n\n this.add(lblHint, gbc);\n }",
"private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}",
"public History_GUI(){\n super();\n InitializeComponents();\n ConfigureWin();\n\n }",
"public MHTYGUI() {\n\t\t\tinitComponents();\n\t\t}",
"public BBDJPAAdminGUI() {\n initComponents();\n\n myInit();\n }",
"public GUI()\n {\n //Initializes the variables and UI aspects\n UI.initialise();\n UI.addTextField(\"Search Title/Director/Genre\", this::searchEither);\n UI.addButton(\"Add Movie\", this::newMovie);\n UI.addButton(\"Rate Movie\", this::rateMovie);\n UI.addButton(\"Show All Movies\", this::printAll);\n UI.addButton(\"Recommend Movies\", this::recommendMovie);\n UI.setMouseListener(r::manageMouse);\n UI.addButton(\"Quit\", UI::quit);\n \n // Sets the size of the whole window and the divider\n UI.setWindowSize(CANVASWIDTH, CANVASHEIGHT);\n UI.setDivider(0.4);\n this.drawMain();\n }",
"public void initComponents() {\n\t\taddButton = new JButton(addFlightText);\n\t\tdelayButton = new JButton(delayFlightText);\n\t\tquitButton = new JButton(quitText);\n\t\t// TODO: Add button instanciations for other operations\n\n\t\t// Initialize display area\n\t\tdisplayArea = new JTextArea(LINE_COUNT, LINE_SIZE);\n\t\tdisplayArea.setEditable(false);\n\t\tscrollPane = new JScrollPane(displayArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t}",
"private void initComponents() {\n LOOGER.info(\"Get init components\");\n this.loadButton = new JButton(\"Load\");\n this.fillButton = new JButton(\"Fill\");\n this.deleteButton = new JButton(\"Delete\");\n this.setLayout(new FlowLayout());\n LOOGER.info(\"components exit\");\n }",
"protected void setupUI() {\r\n this.setLayout(new GridLayout((this.needDefaultValue) ? 3 : 2, 2));\r\n\r\n this.nameLabel = new JLabel(this.nameLabelText);\r\n this.add(this.nameLabel);\r\n this.add(this.nameTextField);\r\n\r\n this.typeLabel = new JLabel(this.typeLabelText);\r\n this.add(this.typeLabel);\r\n this.add(this.typeDropDown);\r\n\r\n if (this.needDefaultValue) {\r\n this.defValLabel = new JLabel(this.defValLabelText);\r\n this.add(this.defValLabel);\r\n this.add(this.defValueTextField);\r\n }\r\n }",
"public gui() {\n initComponents();\n }",
"public gui() {\n initComponents();\n }",
"private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }",
"private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}",
"public void buildGUI(){\n\n\t\tsetLayout(new BorderLayout());//Setting a borderlayout for the frame\n\t\toptionsPane.setBorder(BorderFactory.createLineBorder(Color.black));//This sets a border around the options panel\n\t\tadd(disclaimer, BorderLayout.SOUTH);//Adds the disclaimer panel to the frame\n\t\tadd(optionsPane, BorderLayout.LINE_START);//Adds the options panel to the frame\n\t\tadd(scrollbar);//Adds the scrollbar to the frame (contains the search frame)\n\t\toptionsPane.add(jpCmbBoxes, BorderLayout.NORTH);//Adds the combo boxes to the options pane\n\t\toptionsPane.add(pic, BorderLayout.SOUTH);//Adds the picture to the options pane\n\t\tdisclaimer.add(disclaim, BorderLayout.LINE_START);//Adds the disclaimer text to the disclaimer panel\n\t\t\n\t\t/*Sets borders around each of the combo boxes, buttons and the disclaimer text */\n\t\ttrackingRange.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tgenderBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tstageofLifeBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\ttagLocationBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchButton.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tdisclaimer.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchByName.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tsearchResults.setLayout((new BoxLayout(searchResults, BoxLayout.PAGE_AXIS)));//Setting the layout for search results panel\n\t\tsearchResults.setBorder(BorderFactory.createLineBorder(Color.black));//Sets a border around the panel\n\t\t/*Adding components to the combo boxes panel */\n\t\tjpCmbBoxes.setLayout(new BoxLayout(jpCmbBoxes, BoxLayout.Y_AXIS));//Sets the layout for this panel\n\t\tjpCmbBoxes.add(subTitle);\n\t\tjpCmbBoxes.add(trackingRangeLabel);\n\t\tjpCmbBoxes.add(trackingRange);\n\t\tjpCmbBoxes.add(genderLabel);\n\t\tjpCmbBoxes.add(genderBox);\n\t\tjpCmbBoxes.add(stageOfLifeLabel);\n\t\tjpCmbBoxes.add(stageofLifeBox);\n\t\tjpCmbBoxes.add(tagLocationLabel);\n\t\tjpCmbBoxes.add(tagLocationBox);\n\t\tjpCmbBoxes.add(searchButton);\n\t\tjpCmbBoxes.add(searchByName);\n\t\t\n\t\ttry {//Importing the image for this panel\n\t\t\tsharkImage = ImageIO.read(new File(\"source/images/shark2.png\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJLabel image = new JLabel(new ImageIcon(sharkImage));//Creating a label and adding the image to the label\n\t\tpic.add(image);//adding the label to the panel\n\t}",
"public PropsGUI() {\n initComponents();\n }",
"@Override\n public void initGUI() {\n\n }",
"private void initGui(){\n // TODO: add code for GUI initialization for a given auction\n }",
"private void setupGUI() {\n\t\tcollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbarLayout);\n\t\tlogo = (SmartImageView) findViewById(R.id.logoo);\n\t\tnomePosto = (TextView) findViewById(R.id.nomeposto);\n\t\tdescrizione = (TextView) findViewById(R.id.descrizioneposto);\n\t\twebsite = (TextView) findViewById(R.id.websiteposto);\n\t\tnumtelefono = (TextView) findViewById(R.id.telefonoposto);\n\t\tcitta = (TextView) findViewById(R.id.cittaposto);\n\t\tbtnMappa = (FloatingActionButton) findViewById(R.id.fabbuttonmappa);\n\t\tgallery = (LinearLayout) findViewById(R.id.gallery);\n\t\tgalleryContainer = (CardView) findViewById(R.id.cv1);\n\t\t// rvofferte = (RecyclerView) findViewById(R.id.rvofferte);\n\t\t// LinearLayoutManager llm = new\n\t\t// LinearLayoutManager(DetPlaActivity.this);\n\t\t// rvofferte.setLayoutManager(llm);\n\t\t// rvofferte.setSaveEnabled(false);\n\t}",
"public void setUpComponents() {\n for (int i = 1; i <= 31; i++) {\n cmbDay.addItem(String.format(\"%02d\", i));\n }\n\n for (int i = 0; i <= 11; i++) {\n cmbMonth.addItem(monthNames[i]);\n }\n\n updateTimeComboBox();\n\n updateDurationComboBox();\n\n cmbDay.setSelectedIndex(initialDay.getDay() - 1);\n cmbMonth.setSelectedIndex(initialDay.getMonth());\n\n if (formType.equals(\"Edit\")) {\n txtName.setText(eventToEdit.getName());\n cmbTime.setSelectedIndex(eventToEdit.getStartTime() - usedTimes.size());\n cmbDuration.setSelectedIndex(eventToEdit.getDuration() - 1);\n }\n\n cmbTime.addItemListener(new MyItemListener());\n cmbDay.addItemListener(new MyItemListener());\n cmbMonth.addItemListener(new MyItemListener());\n radAutoTime.addActionListener(new TimeHandler());\n radSelectTime.addActionListener(new TimeHandler());\n\n buttonGroup.add(radSelectTime);\n buttonGroup.add(radAutoTime);\n\n frame.setLayout(new GridBagLayout());\n gbc.insets = new Insets(5, 5, 5, 5);\n addComponents();\n\n btnSubmit.addActionListener(new EventHandler());\n frame.getRootPane().setDefaultButton(btnSubmit);\n\n buildFrame();\n }",
"public static void prepareGUI() {\n\t\tframe = new JFrame(\"Solid Adventure : Catch All Virtumon\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Driver demo = new Driver();\n demo.addComponentToPane(frame.getContentPane());\n\n //Display the window.\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\t}",
"private void makeComponents() {\n Font font = new Font(\"Open Sans\", Font.PLAIN, 14);\n\n //Create The buttons and configure their visual design.\n searchArea.setFont(font);\n searchArea.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(4, 7, 4, 7, DrawAttribute.lightblue), BorderFactory.createRaisedBevelBorder()));\n searchArea.setBounds(20, 20, 300, 37);\n searchArea.setActionCommand(\"searchAreaInput\");\n\n makeFrontGUIButtons();\n }",
"void initGUI(){\n\t\t// use border layout for our main frame\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t// create a new TitlePage and add it to the GUI. This is initially the only instantiated item\n\t\ttitlePage = new TitlePage(this);\n\t\tadd(titlePage);\n\t\t\n\t\tsetBackground( new Color(30, 130, 76) );\t// set a green background\n\t\tsetResizable(false); \t\t\t\t\t\t// User can't change the window's size.\n\t\tsetDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\t// exit when we close\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\t\t\t\t\t// set size of JFrame\n\t\t// set it to visible\n\t\tsetVisible(true);\n\t}",
"private void setUpGUI()\n\t{\n\t\tgetContentPane().setLayout(new BorderLayout());\n\n\t\t//center panel (project and developer dropdown lists, and state of\n\t\t//server label)\n\t\tJPanel centerPanel = new JPanel();\n\t\tcenterPanel.setLayout(new GridLayout(3, 2));\n\n\t\tcenterPanel.add(new JLabel(\"Choose a project\"));\n\t\tprojectsComboBox = new JComboBox<String>(selectADBString);\n\t\tcenterPanel.add(projectsComboBox);\n\n\t\tcenterPanel.add(new JLabel(\"Choose a developer group\"));\n\t\tdevNamesComboBox = new JComboBox<String>(selectADBString);\n\t\tcenterPanel.add(devNamesComboBox);\n\n\t\tstateOfServerLabel = new JLabel(\"The server is NOT running\");\n\t\tcenterPanel.add(stateOfServerLabel);\n\n\t\tgetContentPane().add(centerPanel, BorderLayout.CENTER);\n\n\t\t//south panel (start the server)\n\t\tJPanel southPanel = new JPanel();\n\t\tsouthPanel.setLayout(new FlowLayout());\n\n\t\tstartStopServerButton = new JButton(START_SERVER_BUTTON_TEXT);\n\t\tstartStopServerButton.addActionListener(this);\n\n\t\topenPlaybackInBrowserCheckbox = new JCheckBox(\"Open the playback in the browser?\");\n\n\t\tsouthPanel.add(startStopServerButton);\n\t\tsouthPanel.add(openPlaybackInBrowserCheckbox);\n\n\t\tgetContentPane().add(southPanel, BorderLayout.SOUTH);\n\n\t\t//create the north panel by looking for the last used db file\n\t\tJPanel northPanel = createNorthPanel();\n\n\t\tgetContentPane().add(northPanel, BorderLayout.NORTH);\n\n\t\t//window controls\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetSize(800, 250);\n\t\tsetVisible(true);\n\t}",
"private void setupUI() {\n\t\tpanel1 = new JPanel();\n\t\tpanel1.setLayout(new BorderLayout(0, 0));\n\t\tfinal JPanel panel2 = new JPanel();\n\t\tpanel2.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2));\n\t\tpanel2.setBackground(Color.BLACK);\n\t\tpanel2.setPreferredSize(new Dimension(800, 34));\n\t\tpanel1.add(panel2, BorderLayout.SOUTH);\n\t\tstopButton = new JButton();\n\t\tstopButton.setText(\"STOP\");\n\t\tstopButton.setPreferredSize(new Dimension(82, 30));\n\t\tpanel2.add(stopButton);\n\t\tclsButton = new JButton();\n\t\tclsButton.setPreferredSize(new Dimension(82, 30));\n\t\tclsButton.setText(\"CLS\");\n\t\tpanel2.add(clsButton);\n\t\trunButton = new JButton();\n\t\trunButton.setPreferredSize(new Dimension(82, 30));\n\t\trunButton.setText(\"RUN\");\n\t\tpanel2.add(runButton);\n\t\tcaretLabel = new JLabel();\n\t\tcaretLabel.setPreferredSize(new Dimension(82, 30));\n\t\tcaretLabel.setForeground(Color.pink);\n\t\tpanel2.add(caretLabel);\n\t\tmainTextArea = new ShellTextComponent(this);\n\t\tmainTextArea.setCaretColor(new Color(Colors.COLORS[14]));\n\t\tfinal JScrollPane scrollPane1 = new JScrollPane(mainTextArea);\n\n\t\tpanel1.add(scrollPane1, BorderLayout.CENTER);\n\t\tpanel1.setPreferredSize(new Dimension(800, 600));\n\t}",
"private void initializeComponents()\r\n\t{\n\t\tmain = (JPanel) this.getContentPane();\r\n\t\tmain.setLayout(new BorderLayout());\r\n\t\t\r\n\t\tpanelNorth = new JPanel(new FlowLayout());\r\n\t\tpanelSouth = new JPanel(new FlowLayout());\r\n\t\t\r\n\t\tlbKiez = new JLabel(\"Kiez quiz lijst\");\r\n\t\tcbxRapporten = new JComboBox<String>(new String[]{\"OpdrachtenPerCategorie\", \"QuizzenSorteerd\"});\r\n\t\ttxtRapport = new JTextArea();\r\n\t\tchbDatumDecor = new JCheckBox(\"Add datum\");\r\n\t\tchbAuteurDecor = new JCheckBox(\"Add auteur\");\r\n\t\t\r\n\t\tpanelNorth.add(lbKiez);\r\n\t\tpanelNorth.add(cbxRapporten);\r\n\t\t\r\n\t\tpanelSouth.add(chbDatumDecor);\r\n\t\tpanelSouth.add(chbAuteurDecor);\r\n\t\t\r\n\t\tmain.add(panelNorth, BorderLayout.NORTH);\r\n\t\tmain.add(txtRapport, BorderLayout.CENTER);\r\n\t\tmain.add(panelSouth, BorderLayout.SOUTH);\r\n\t}",
"protected void setupUI() {\n\n }",
"public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new FormLayout(\"fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow\", \"center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow\"));\n panel.add(panel1);\n panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null));\n final JLabel label1 = new JLabel();\n label1.setHorizontalAlignment(11);\n label1.setText(\"<html><b>Directory</b></html>\");\n label1.setToolTipText(\"The start directory containing child directories (or raw files directly) that will be processed\");\n CellConstraints cc = new CellConstraints();\n panel1.add(label1, cc.xy(1, 1));\n final JLabel label2 = new JLabel();\n label2.setHorizontalAlignment(11);\n label2.setText(\"<html><b>File name regex</b></html>\");\n label2.setDisplayedMnemonic('R');\n label2.setDisplayedMnemonicIndex(19);\n label2.setToolTipText(\"A regular expression used to match the file name of the raw files that need to be processed\");\n panel1.add(label2, cc.xy(1, 3));\n final JLabel label3 = new JLabel();\n label3.setHorizontalAlignment(11);\n label3.setText(\"Starting date\");\n label3.setToolTipText(\"Only files with a modification date later then the starting date will be processed\");\n panel1.add(label3, cc.xy(1, 5));\n final JLabel label4 = new JLabel();\n label4.setHorizontalAlignment(11);\n label4.setText(\"<html>Number of threads</html>\");\n label4.setDisplayedMnemonic('T');\n label4.setDisplayedMnemonicIndex(16);\n label4.setToolTipText(\"The number of worker threads used for collecting the raw files and processing them\");\n panel1.add(label4, cc.xy(1, 7));\n panel1.add(spinnerThreads, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new BorderLayout(1, 0));\n panel1.add(panel2, cc.xy(3, 1));\n labelDirectory = new JLabel();\n labelDirectory.setIcon(new ImageIcon(getClass().getResource(\"/images/nok.png\")));\n labelDirectory.setInheritsPopupMenu(false);\n labelDirectory.setMaximumSize(new Dimension(350, 16));\n labelDirectory.setMinimumSize(new Dimension(350, 16));\n labelDirectory.setPreferredSize(new Dimension(350, 16));\n labelDirectory.setText(\"<html><i>no directory configured</i></html>\");\n panel2.add(labelDirectory, BorderLayout.CENTER);\n buttonDirectory = new JButton();\n buttonDirectory.setHorizontalTextPosition(0);\n buttonDirectory.setIcon(new ImageIcon(getClass().getResource(\"/images/add.png\")));\n buttonDirectory.setMaximumSize(new Dimension(24, 24));\n buttonDirectory.setMinimumSize(new Dimension(24, 24));\n buttonDirectory.setPreferredSize(new Dimension(24, 24));\n buttonDirectory.setText(\"\");\n panel2.add(buttonDirectory, BorderLayout.EAST);\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new BorderLayout(1, 0));\n panel1.add(panel3, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n textFieldRegex = new JTextField();\n textFieldRegex.setText(\"^.*\\\\.raw$\");\n panel3.add(textFieldRegex, BorderLayout.CENTER);\n buttonRegex = new JButton();\n buttonRegex.setHorizontalTextPosition(0);\n buttonRegex.setIcon(new ImageIcon(getClass().getResource(\"/images/search.png\")));\n buttonRegex.setMaximumSize(new Dimension(24, 24));\n buttonRegex.setMinimumSize(new Dimension(24, 24));\n buttonRegex.setPreferredSize(new Dimension(24, 24));\n buttonRegex.setText(\"\");\n panel3.add(buttonRegex, BorderLayout.EAST);\n panelDate = new JPanel();\n panelDate.setLayout(new BorderLayout(0, 0));\n panel1.add(panelDate, cc.xy(3, 5));\n checkBoxUnique = new JCheckBox();\n checkBoxUnique.setText(\"Enforce unique run names\");\n checkBoxUnique.setMnemonic('U');\n checkBoxUnique.setDisplayedMnemonicIndex(8);\n panel1.add(checkBoxUnique, cc.xyw(1, 9, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n label2.setLabelFor(textFieldRegex);\n label4.setLabelFor(spinnerThreads);\n }",
"public GUI() {\n initComponents();\n this.setVisible(true);\n }",
"public orgGui() {\n initComponents();\n }",
"@Override\n public void initGui()\n {\n super.initGui();\n }",
"private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tqueryButton = new JButton(\"query\");\n\t\tthis.add(queryButton);\n\t\tthis.add(displayPane);\n\t\tdisplayArea = new JTextArea(10,30);\n\t\tadd(displayArea);\n\t\t\n\t\t\n\t}",
"public mainUI() {\n initComponents();\n }",
"public Gui() { \n preInitComponents(); \n initComponents();\n postInitComponents(); \n setVisible(true);\n appInitialization();\n }",
"public mainGUI() {\n initComponents();\n setSize(Toolkit.getDefaultToolkit().getScreenSize());\n }",
"private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}",
"private void makeGUI() {\n //Create the canvas and Components for GUI.\n canvas = new Canvas();\n\n canvas.setBounds(0, 0, getWidth(), getHeight());\n getContentPane().setBackground(DrawAttribute.whiteblue);\n searchArea = new JTextField();\n searchArea.setForeground(Color.GRAY);\n searchArea.setText(promptText);\n\n //Make the components for the frame.\n makeComponents();\n addComponentsToLayers();\n }",
"private void $$$setupUI$$$ ()\n {\n contentPane = new JPanel();\n contentPane.setLayout(new BorderLayout(0, 0));\n contentPane.setBackground(new Color(-16777216));\n contentPane.setPreferredSize(new Dimension(300, 100));\n contentPane.setRequestFocusEnabled(false);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n panel1.setBackground(new Color(-16777216));\n panel1.setPreferredSize(new Dimension(200, 50));\n contentPane.add(panel1, BorderLayout.SOUTH);\n buttonOK = new JButton();\n buttonOK.setPreferredSize(new Dimension(100, 31));\n buttonOK.setText(\"OK\");\n panel1.add(buttonOK);\n final JLabel label1 = new JLabel();\n label1.setPreferredSize(new Dimension(30, 10));\n label1.setText(\"\");\n panel1.add(label1);\n buttonCancel = new JButton();\n buttonCancel.setPreferredSize(new Dimension(100, 31));\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel);\n textField1 = new JTextField();\n textField1.setBackground(new Color(-15987184));\n Font textField1Font = Tools.getFont(\"Arial\", -1, 20, textField1.getFont());\n if (textField1Font != null)\n {\n textField1.setFont(textField1Font);\n }\n textField1.setForeground(new Color(-1));\n textField1.setHorizontalAlignment(0);\n textField1.setOpaque(false);\n textField1.setPreferredSize(new Dimension(300, 50));\n contentPane.add(textField1, BorderLayout.CENTER);\n final JLabel label2 = new JLabel();\n label2.setPreferredSize(new Dimension(11, 11));\n label2.setText(\" \");\n contentPane.add(label2, BorderLayout.WEST);\n final JLabel label3 = new JLabel();\n label3.setPreferredSize(new Dimension(11, 11));\n label3.setText(\" \");\n contentPane.add(label3, BorderLayout.EAST);\n final JLabel label4 = new JLabel();\n label4.setPreferredSize(new Dimension(11, 11));\n label4.setText(\"\");\n contentPane.add(label4, BorderLayout.NORTH);\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n content.setLayout(new BorderLayout(0, 0));\n content.setMinimumSize(new Dimension(1024, 576));\n content.setPreferredSize(new Dimension(1024, 576));\n panel1.setLayout(new BorderLayout(0, 0));\n content.add(panel1, BorderLayout.SOUTH);\n panel1.setBorder(BorderFactory.createTitledBorder(null, \"\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));\n dwadawdTextField = new JTextField();\n dwadawdTextField.setText(\"dwadawd\");\n panel1.add(dwadawdTextField, BorderLayout.CENTER);\n button1 = new JButton();\n button1.setText(\"Button\");\n panel1.add(button1, BorderLayout.EAST);\n panel2 = new JPanel();\n panel2.setLayout(new BorderLayout(0, 0));\n content.add(panel2, BorderLayout.CENTER);\n final JScrollPane scrollPane1 = new JScrollPane();\n panel2.add(scrollPane1, BorderLayout.CENTER);\n textPane1 = new JTextPane();\n scrollPane1.setViewportView(textPane1);\n }",
"private void initComponents() {\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n setTitle(title());\r\n setMinimumSize(new java.awt.Dimension(1000, 500));\r\n\r\n toolsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\r\n\r\n channelComboBox.setMinimumSize(new java.awt.Dimension(75, 20));\r\n channelComboBox.setPreferredSize(new java.awt.Dimension(100, 20));\r\n channelComboBox.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n channelComboBox_actionPerformed(evt);\r\n }\r\n });\r\n toolsPanel.add(channelComboBox);\r\n\r\n getContentPane().add(toolsPanel, java.awt.BorderLayout.NORTH);\r\n getContentPane().add(tabsPanel, java.awt.BorderLayout.CENTER);\r\n\r\n valuesPanel.setLayout(new javax.swing.BoxLayout(valuesPanel, javax.swing.BoxLayout.Y_AXIS));\r\n getContentPane().add(valuesPanel, java.awt.BorderLayout.EAST);\r\n\r\n pack();\r\n }",
"public void guiSetup(Container pane)\n {\n \t/*\n \t * How it's organized:\n \t * 3 separate columns\n \t * Components in column one are small\n \t * Main grid component in column 2 takes up multiple spaces\n \t * Found word components in column 3 takes up multiple spaces as well\n \t */\n\t\tpane.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.weighty = 0.5;\n\t\t\n\t\t/*\n\t\t * First column GUI components\n\t\t */\n\t\tc.weightx = 0.25;\n\t\tc.gridx = 0;\n\t\t\n\t\tFont f = new Font( \"SansSerif\", Font.ITALIC, 34 );\n\t\ttitle = new JLabel( \"Boggle\" );\n\t\ttitle.setFont( f );\n\t\tc.gridy = 0;\n\t\tpane.add(title, c);\n\t\t\n\t\tscoreLabel = new JLabel( \"Score: 0\" );\n\t\tf = new Font( \"Serif\", Font.PLAIN, 24 );\n\t\tscoreLabel.setFont( f );\n\t\tc.gridy = 1;\n\t\tpane.add(scoreLabel, c);\n\t\n\t\ttimerLabel = new JLabel( \"Timer: 3:00\" );\n\t\ttimerLabel.setFont( f );\n\t\tc.gridy = 2;\n\t\tpane.add(timerLabel, c);\n\t\n\t\tmessagesLabel = new JLabel( \"Enter word: \" );\n\t\tf = new Font( \"Serif\", Font.PLAIN, 20 );\n\t\tmessagesLabel.setFont( f );\n\t\tf = new Font( \"Serif\", Font.PLAIN, 24 );\n\t\tc.gridy = 3;\n\t\tc.fill = GridBagConstraints.VERTICAL;\n\t\tpane.add(messagesLabel, c);\n\t\tc.fill = GridBagConstraints.NONE;\n\t\t\n\t\trestart = new JButton( \"Restart\" );\n\t\trestart.addActionListener( this );\n\t\t\n\t\tc.gridy = 4;\n\t\tpane.add(restart, c);\n\t\t\n\t\tpause = new JButton( \"Pause\" );\n\t\tpause.addActionListener( this );\n\t\t\n\t\tc.gridy = 5;\n\t\tpane.add(pause, c);\n\t\t\n\t\texit = new JButton( \"Exit\" );\n\t\texit.addActionListener( this );\n\t\t\n\t\tc.gridy = 6;\n\t\tpane.add(exit, c);\n\t\t\n\t\t/*\n\t\t * Second column\n\t\t */\n\t\tc.gridx = 1;\n\t\tc.weightx = 0.75;\n\t\t\n\t\tguiGrid = new JPanel( new GridLayout( BOARD_SIZE, BOARD_SIZE ) );\n\t\tgridButtons = new JButton[BOARD_SIZE][BOARD_SIZE];\n\t\tg = new Grid( BOARD_SIZE );\n\t\t\n\t\tfor( int i = 0; i < BOARD_SIZE; i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < BOARD_SIZE; j++ )\n\t\t\t{\n\t\t\t\tgridButtons[i][j] = new JButton( Character.toString( g.charAt( i, j ) ) );\n\t\t\t\tgridButtons[i][j].addActionListener( this );\n\t\t\t\tgridButtons[i][j].setFont( f );\n\t\t\t\tguiGrid.add( gridButtons[i][j] );\n\t\t\t}\n\t\t}\n\t\t\n\t\tc.gridx = 1;\n\t\tc.gridheight = 3;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tc.gridy = 1;\n\t\tpane.add(guiGrid, c);\n\t\tc.gridheight = 1;\n\t\tc.fill = GridBagConstraints.NONE;\n\t\t\n\t\tnewWord = new JButton( \"New word\" );\n\t\tnewWord.addActionListener( this );\n\t\tc.gridy = 5;\n\t\tpane.add( newWord, c );\n\t\t\n\t\tguessWordArea = new JTextArea( 1, 1 );\n\t\tguessWordArea.setEditable( false );\n\t\tguessWordArea.setBorder(BorderFactory.createEtchedBorder());\n\t\t\n\t\tc.gridy = 6;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tpane.add(guessWordArea, c);\n\t\tc.fill = GridBagConstraints.NONE;\n\t\t\n\t\tsubmitWord = new JButton( \"Submit word\" );\n\t\tsubmitWord.addActionListener( this );\n\t\t\n\t\tc.gridx = 1;\n\t\tc.gridy = 7;\n\t\tpane.add( submitWord, c );\n\t\t\n\t\t/*\n\t\t * Third column\n\t\t */\n\t\tc.gridx = 2;\n\t\tc.weightx = 0.25;\n\t\t\n\t\tJLabel foundTitle = new JLabel( \"Found words:\" );\n\t\tfoundTitle.setFont( f );\n\t\tc.gridy = 1;\n\t\tpane.add( foundTitle, c);\n\t\t\n\t\tfoundWordsArea = new JTextArea( 10, 16 );\n\t\tfoundWordsArea.setEditable( false );\n\t\tc.gridx = 2;\n\t\tc.gridy = 2;\n\t\tc.gridheight = 2;\n\t\tInsets in = new Insets( 25, 25, 25, 25 );\n\t\tfoundWordsArea.setMargin( in );\n\t\tfoundWordsArea.setBorder(BorderFactory.createEtchedBorder()); \n\t\tpane.add( foundWordsArea, c);\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n this.$$$loadButtonText$$$(buttonCancel, ResourceBundle.getBundle(\"strings\").getString(\"cancel\"));\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"strings\").getString(\"resource-name\"));\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n nameField = new JTextField();\n panel3.add(nameField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label2 = new JLabel();\n this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle(\"strings\").getString(\"resource-availability\"));\n panel3.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel3.add(scrollPane1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(availabilitiesList);\n label1.setLabelFor(nameField);\n }",
"public ExecutantGui() {\n initComponents();\n }",
"private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}",
"public void GUISetup(){\n simTime.setText(\"50\");\n qMean.setText(\"24\");\n dMean.setText(\"45\");\n pMean.setText(\"55\");\n changeNorth.add(simTime2);\n changeNorth.add(simTime);\n changeNorth.add(pMean2);\n changeNorth.add(pMean);\n changeNorth.add(dMean2);\n changeNorth.add(dMean);\n changeNorth.add(qMean2);\n changeNorth.add(qMean);\n changeSouth.add(okay);\n \n resultDisplay.setEditable(false);\n descriptionDisplay.setEditable(false);\n \n changeFrame.add(changeNorth, BorderLayout.NORTH);\n changeFrame.add(changeSouth, BorderLayout.SOUTH);\n \n center.add(totalCus, BorderLayout.CENTER);\n center.add(doorCus, BorderLayout.CENTER);\n center.add(phoneCus, BorderLayout.CENTER);\n center.add(unhelped, BorderLayout.CENTER);\n\n help.add(programDescription);\n menuBar.add(help);\n north.add(menuBar);\n \n frame.setBounds(650, 400, 500, 200);\n changeFrame.setBounds(500, 400, 1100, 145);\n resultFrame.setBounds(500, 200, 600, 500);\n dFrame.setBounds(500, 200, 600, 500);\n frame.add(north, BorderLayout.NORTH);\n frame.add(south, BorderLayout.SOUTH);\n frame.add(center, BorderLayout.CENTER);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n resultFrame.add(scroll);\n dFrame.add(dScroll);\n showDetails.setEnabled(false);\n \n south.add(runSim);\n south.add(showDetails);\n south.add(changeSimProp);\n \n time = simTime.getText();\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n frame.setVisible(true);\n buttonFunctions();\n }",
"public GUI() {\n initComponents();\n this.jComboBox1.setEnabled(false);\n this.jButton2.setEnabled(false);\n this.jButton3.setEnabled(false);\n this.jTextArea1.setEnabled(false);\n getContentPane().setBackground(java.awt.Color.getHSBColor((float) 0.62, (float) 0.55, (float) 0.55));\n }",
"private void initGUI() {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetTitle(\"Patient Menu\");\n\t\tsetPreferredSize(new Dimension(800, 700));\n\t\tsetIconImage(new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/heisenbug.png\")).getImage());\n\t\t\n\t\tlblPatient = new JLabel(\"Patient Menu\");\n\t\tlblPatient.setFont(new Font(\"Tahoma\", Font.PLAIN, 40));\n\t\t\n\t\t// A panel for the buttons are defined\n\t\tJPanel buttonsPanel = new JPanel();\n\t\tbuttonsPanel.setLayout(new GridBagLayout());\n\t\t\n\t\t// buttons\n\t\tJButton btnSearch = new JButton(\"Search Patient\");\n\t\tImage searchImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/search.png\")).getImage();\n\t\tbtnSearch.setIcon(new ImageIcon(searchImg));\n\t\tbtnSearch.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnSearch.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnRegister = new JButton(\"Register Patient\");\n\t\tImage registerImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/register.png\")).getImage();\n\t\tbtnRegister.setIcon(new ImageIcon(registerImg));\n\t\tbtnRegister.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnRegister.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnMove = new JButton(\"Move Between Departs\");\n\t\tImage moveImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/move.png\")).getImage();\n\t\tbtnMove.setIcon(new ImageIcon(moveImg));\n\t\tbtnMove.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnMove.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnEdit = new JButton(\"Edit Patient\");\n\t\tImage editImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/edit.png\")).getImage();\n\t\tbtnEdit.setIcon(new ImageIcon(editImg));\n\t\tbtnEdit.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnEdit.setHorizontalTextPosition(SwingConstants.CENTER); \n\t\t\n\t\tJButton btnDischarge = new JButton(\"Discharge Patient\");\n\t\tImage dischargeImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/discharge.png\")).getImage();\n\t\tbtnDischarge.setIcon(new ImageIcon(dischargeImg));\n\t\tbtnDischarge.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnDischarge.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnAdmit = new JButton(\"Admit Patient\");\n\t\tImage admitImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/admit.png\")).getImage();\n\t\tbtnAdmit.setIcon(new ImageIcon(admitImg));\n\t\tbtnAdmit.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnAdmit.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnMoveBed = new JButton(\"Move Between Beds\");\n\t\tImage moveBedImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/movebed.png\")).getImage();\n\t\tbtnMoveBed.setIcon(new ImageIcon(moveBedImg));\n\t\tbtnMoveBed.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnMoveBed.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\t\n\t\tJButton btnBack = new JButton(\"Back\");\n\t\tbtnBack.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnBack.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\t//Listeners:\n\t\tbtnBack.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.Back2Main();\n\t\t\t}\n\t\t});\n\t\tbtnAdmit.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToAdmit();\n\t\t\t}\n\t\t});\n\t\tbtnMoveBed.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToMoveBed();\n\t\t\t}\n\t\t});\n\t\tbtnEdit.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToEdit();\n\t\t\t}\n\t\t});\n\t\tbtnRegister.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToRegister();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnSearch.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToSearch();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnMove.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToDepartmentMove();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnDischarge.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToDischarge();\n\t\t\t}\n\t\t});\n\t\t\n\t\tmenuTop.btnAdd.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToAddPassword();\n\t\t\t}\n\t\t});\n\t\t\n\t\tmenuTop.btnChange.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tcontroller.ToChangePassword();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Buttons are added to the button panel and the users clearance is checked\n\t\tbuttonsPanel.add(btnEdit, GridBagLayoutUtils.constraint(1, 1, 0, 0, 0,10,50,10));\n\t\t\n\t\tif(clear == JobTypes.Nurse || clear == JobTypes.ICTOfficer || clear == JobTypes.Clerk ) {\n\t\tbuttonsPanel.add(btnRegister, GridBagLayoutUtils.constraint(2, 1, 0, 0, 0,10,50,10));}\n\t\t\n\t\tif(clear == JobTypes.Clerk || clear == JobTypes.ICTOfficer ) {\n\t\tbuttonsPanel.add(btnAdmit, GridBagLayoutUtils.constraint(2, 2, 0, 0, 0,10,50,10));}\n\n\t\tif(clear == JobTypes.Doctor || clear == JobTypes.ICTOfficer || clear == JobTypes.Nurse ) {\n\t\tbuttonsPanel.add(btnMove, GridBagLayoutUtils.constraint(4, 1, 0, 0, 0,10,50,10));\n\t\tbuttonsPanel.add(btnSearch, GridBagLayoutUtils.constraint(3, 1, 0, 0, 0,10,50,10));\n\t\tbuttonsPanel.add(btnDischarge, GridBagLayoutUtils.constraint(1, 2, 0, 0, 0,10,50,10));\n\t\tbuttonsPanel.add(btnMoveBed, GridBagLayoutUtils.constraint(3, 2, 0, 0, 0,10,50,10));\t\n\t\t}\n\t\t\n\t\t\n\t\t// all the components are added to the frame\n\t\tadd(buttonsPanel, BorderLayout.CENTER);\n\t\tadd(menuTop, BorderLayout.NORTH);\n\t\tadd(btnBack, BorderLayout.SOUTH);\n\t\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t\t\n\t}",
"protected void createComponents() {\n sampleText = new JTextField(20);\n displayArea = new JLabel(\"\");\n displayArea.setPreferredSize(new Dimension(200, 75));\n displayArea.setMinimumSize(new Dimension(200, 75));\n }",
"private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }",
"public adivinaGUI() {\n initComponents();\n }",
"private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n lblPlatform = new javax.swing.JLabel();\n platformComboBox = new javax.swing.JComboBox();\n btnManagePlatforms = new javax.swing.JButton();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 100), new java.awt.Dimension(0, 0));\n progressLabel = new javax.swing.JLabel();\n progressPanel = new javax.swing.JPanel();\n\n setLayout(new java.awt.GridBagLayout());\n\n lblPlatform.setLabelFor(platformComboBox);\n lblPlatform.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_ComboBox\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 12);\n add(lblPlatform, gridBagConstraints);\n lblPlatform.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_labelPlatform\")); // NOI18N\n lblPlatform.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_labelPlatform\")); // NOI18N\n\n platformComboBox.setModel(platformsModel);\n platformComboBox.setRenderer(platformsCellRenderer);\n platformComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n platformComboBoxItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.weightx = 0.1;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);\n add(platformComboBox, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnManagePlatforms, org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_PanelOptions_Manage_Button\")); // NOI18N\n btnManagePlatforms.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManagePlatformsActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_TRAILING;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n add(btnManagePlatforms, gridBagConstraints);\n btnManagePlatforms.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_buttonManagePlatforms\")); // NOI18N\n btnManagePlatforms.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_buttonManagePlatforms\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.weighty = 0.1;\n add(filler1, gridBagConstraints);\n\n progressLabel.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_Progress\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n add(progressLabel, gridBagConstraints);\n progressLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_platformProgress\")); // NOI18N\n progressLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_platformProgress\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n add(progressPanel, gridBagConstraints);\n }",
"private GUI()\n {\n makeGUI();\n }",
"public AplicationGUI() {\n initComponents();\n }",
"public GUI() {\n initComponents();\n }",
"public GUI()\n\t{\n\t\tsetSize(550,200);\n\t\tsetTitle(\"cs206sp2012 Project\");\n\t\tsetResizable(false);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tinputPanel = new JPanel (new FlowLayout());\n\t\t\n\t\taddNumberOfIterationsField();\n\t\taddNumberOfFinalSolutionsField();\n\t addNumberOfRulesPerSolutionField();\n\t\taddSampleSummaryUrlField();\n\t addMetrixFileUrlField();\n\t addRunButton();\n\t integrateComponents();\n\t}",
"private void makeGUI() {\r\n\t\tInstrument[] instruments = getAvailableInstruments();\r\n\r\n\t\tJPanel channels = new JPanel();\r\n\t\tchannels.setLayout(new BoxLayout(channels, BoxLayout.Y_AXIS));\r\n\r\n\t\tcomboBoxes = new JComboBox[16];\r\n\t\tfor (int chan = 0; chan < 16; chan++) {\r\n\t\t\tJPanel channelPanel = new JPanel();\r\n\t\t\tchannelPanel\r\n\t\t\t\t\t.setLayout(new BoxLayout(channelPanel, BoxLayout.X_AXIS));\r\n\t\t\tJLabel label = new JLabel(\"Channel \" + chan);\r\n\t\t\tlabel.setPreferredSize(LABEL_DIMENSION);\r\n\t\t\tchannelPanel.add(label);\r\n\t\t\tJComboBox cb = new JComboBox(instruments);\r\n\t\t\tcb.setMaximumRowCount(25);\r\n\t\t\tint program = pianoRollPanel.getProgram(chan);\r\n\t\t\tcb.setSelectedIndex(program);\r\n\t\t\tchannelPanel.add(cb);\r\n\t\t\tcomboBoxes[chan] = cb;\r\n\t\t\tchannels.add(channelPanel);\r\n\t\t}\r\n\t\tadd(channels, BorderLayout.CENTER);\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tJButton okButton = new JButton(OK);\r\n\t\tokButton.setActionCommand(OK);\r\n\t\tokButton.setMnemonic('O');\r\n\t\tokButton.addActionListener(this);\r\n\t\tJButton cancelButton = new JButton(CANCEL);\r\n\t\tcancelButton.setActionCommand(CANCEL);\r\n\t\tcancelButton.setMnemonic('C');\r\n\t\tcancelButton.addActionListener(this);\r\n\t\tbuttonPanel.add(okButton);\r\n\t\tbuttonPanel.add(cancelButton);\r\n\t\tadd(buttonPanel, BorderLayout.SOUTH);\r\n\t}",
"private void initializeGUI() {\n\n\t\t// system's main frame and its properties\n\t\tframeSystem = new JFrame(\"NBodies System Configuration\");\n\t\tframeSystem.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframeSystem.setResizable(false);\n\t\tframeSystem.setBackground(Color.white);\n\n\t\t// number of bodies controls and their properties\n\t\tlblNBodies = new JLabel(\" Insert the system bodies's number: \");\n\t\tlblNBodies.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\ttxtNBodies = new JTextField(\"0\");\n\t\ttxtNBodies.setAlignmentX(JTextField.CENTER_ALIGNMENT);\n\n\t\t// time controls and their properties\n\t\tlblTime = new JLabel(\" Insert the system's evolution time: \");\n\t\tlblTime.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\ttxtTime = new JTextField(\"0\");\n\t\ttxtTime.setAlignmentX(JTextField.CENTER_ALIGNMENT);\n\n\t\t// number of bodies console and its properties and internal controls\n\t\tnumberBodiesControlConsole = new JPanel();\n\t\tnumberBodiesControlConsole.setBounds(0, 0, 550, 28);\n\t\tnumberBodiesControlConsole.setBackground(Color.white);\n\t\tLayoutManager numberLayout = new BorderLayout();\n\t\tnumberBodiesControlConsole.setLayout(numberLayout);\n\t\tnumberBodiesControlConsole.add(lblNBodies, BorderLayout.WEST);\n\t\tnumberBodiesControlConsole.add(txtNBodies, BorderLayout.CENTER);\n\n\t\t// time console and its properties and internal controls\n\t\ttimeControlConsole = new JPanel();\n\t\ttimeControlConsole.setBounds(0, 28, 550, 30);\n\t\ttimeControlConsole.setBackground(Color.white);\n\t\tLayoutManager timeLayout = new BorderLayout();\n\t\ttimeControlConsole.setLayout(timeLayout);\n\t\ttimeControlConsole.add(lblTime, BorderLayout.WEST);\n\t\ttimeControlConsole.add(txtTime, BorderLayout.CENTER);\n\n\t\t// start and communication console and its properties and internal\n\t\t// controls\n\t\tstartAndCommunicationConsole = new JPanel();\n\t\tstartAndCommunicationConsole.setBounds(0, 56, 550, 58);\n\t\tstartAndCommunicationConsole.setBackground(Color.white);\n\t\tLayoutManager startLayout = new BorderLayout();\n\t\tstartAndCommunicationConsole.setLayout(startLayout);\n\n\t\t// master panel and its layout's properties\n\t\tmasterPanel = new JPanel();\n\t\tmasterPanel.setLayout(null);\n\t\tmasterPanel.add(numberBodiesControlConsole);\n\t\tmasterPanel.add(timeControlConsole);\n\t\tmasterPanel.add(startAndCommunicationConsole);\n\n\t\t// button to start the n-bodies system and its properties\n\t\tbtnStartSystem = new JButton(\"Start the n-bodies system\");\n\t\tstartAndCommunicationConsole.add(btnStartSystem, BorderLayout.CENTER);\n\n\t\tbtnOpenFileConfig = new JButton(\n\t\t\t\t\"Start System from a Configuration File\");\n\t\tSystemConfigurationViewController controller = new SystemConfigurationViewController(\n\t\t\t\tthis);\n\t\tstartAndCommunicationConsole.add(btnOpenFileConfig, BorderLayout.NORTH);\n\t\tbtnOpenFileConfig.addActionListener(controller\n\t\t\t\t.getChooseConfigurationFileListener());\n\t\tbtnStartSystem.addActionListener(controller.getStartListener());\n\n\t\t// view's main frame and its properties\n\t\tframeSystem.setContentPane(masterPanel);\n\n\t\t// label to show errors and its properties\n\t\tlblCommunication = new JLabel(\n\t\t\t\t\" Please insert the n-bodies system's configuration values.\");\n\t\tlblCommunication.setBounds(0, 114, 550, 36);\n\t\tmasterPanel.add(lblCommunication);\n\t\tlblCommunication.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\tlblCommunication.setForeground(Color.BLUE);\n\t\tframeSystem.setSize(new Dimension(550, 181));\n\t\tframeSystem.setLocationRelativeTo(null);\n\t\tframeSystem.setVisible(true);\n\t}",
"private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }",
"public void manageComponent() {\n menu = new JMenuBar();\n mainbox = new JScrollPane();\n toolbox = new JPanel();\n paintBox = new JPanel();\n optionbox = new JPanel();\n statusbar = new JPanel();\n paintModule = new PaintModule();\n\n // component setting\n createToolBox(toolbox);\n createMenu(menu);\n createOptionBox(optionbox);\n createStatusBar(statusbar);\n this.setLayout(new BorderLayout());\n\n // add component to container\n paintBox.add(paintModule);\n mainbox.setViewportView(paintBox);\n\n\n this.add(menu, BorderLayout.NORTH);\n this.add(mainbox, BorderLayout.CENTER);\n this.add(toolbox, BorderLayout.WEST);\n this.add(optionbox, BorderLayout.EAST);\n this.add(statusbar, BorderLayout.SOUTH);\n\n }",
"public GUI() {\n \n initComponents();\n custIDError.setVisible(false);\n custNameError.setVisible(false);\n custLoginError.setVisible(false);\n custPasswordError.setVisible(false);\n prodIDError.setVisible(false);\n prodNameError.setVisible(false);\n prodDescriptionError.setVisible(false);\n prodCostError.setVisible(false);\n \n }",
"public GUI() {\n \n \n initComponents();\n this.setLocationRelativeTo(null);\n \n \n }",
"private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }",
"private void initComponents() {\n // Create the RGB and the HSB radio buttons.\n createRgbHsbButtons();\n\n \n \n ColorData initial = new ColorData(new RGB(255, 255, 255), 255);\n\n // Create the upper color wheel for the display.\n upperColorWheel = new ColorWheelComp(shell, this, upperWheelTitle);\n // upperColorWheel.setColor(colorArray.get(0));\n upperColorWheel.setColor(initial);\n\n // Create the color bar object that is displayed\n // in the middle of the dialog.\n colorBar = new ColorBarViewer(shell, this, sliderText, cmapParams);\n\n // Create the lower color wheel for the display.\n lowerColorWheel = new ColorWheelComp(shell, this, lowerWheelTitle);\n // lowerColorWheel.setColor(colorArray.get(colorArray.size() - 1));\n lowerColorWheel.setColor(initial);\n\n // Create the bottom control buttons.\n createBottomButtons();\n }",
"private void initComponents() {\n\n\t\tkDefLabel = new javax.swing.JLabel();\n\t\tjSeparator1 = new javax.swing.JSeparator();\n\t\tcancelButton = new javax.swing.JButton();\n\t\tkLabel = new javax.swing.JLabel();\n\t\tsaveButton = new javax.swing.JButton();\n\t\tTitleLabel = new javax.swing.JLabel();\n\t\tjSeparator2 = new javax.swing.JSeparator();\n\t\tkTextField = new javax.swing.JTextField();\n\t\tkLabel1 = new javax.swing.JLabel();\n\t\tkTextField1 = new javax.swing.JTextField();\n\t\tkDefLabel1 = new javax.swing.JLabel();\n\n\t\t//setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\t\tsetTitle(\"Configuración de Algoritmo\");\n\n\t\tkDefLabel.setText(\"(default = 10)\");\n\n\t\tcancelButton.setText(\"Cancelar\");\n\t\tcancelButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\n\t\tkLabel.setText(\"Número de reglas a buscar:\");\n\n\t\tkLabel1.setText(\"Confianza mínima de una regla: \");\n\n\t\tsaveButton.setText(\"Guardar\");\n\t\tsaveButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGlobalData.getInstance().setCurrentTechnique(FuzzyDataMining.MODEL_FUZZY_APRIORI);\n\t\t\t\tHashMap<String, Object> options = new HashMap<String, Object>();\n\t\t\t\tif(!kTextField.getText().isEmpty())\n\t\t\t\t\toptions.put(\"nr\", kTextField.getText());\n\t\t\t\telse\n\t\t\t\t\toptions.put(\"nr\", \"10\");\n\t\t\t\tif(!kTextField1.getText().isEmpty())\n\t\t\t\t\toptions.put(\"mc\", kTextField1.getText());\n\t\t\t\telse\n\t\t\t\t\toptions.put(\"mc\", \"0.9\");\n\t\t\t\tGlobalData.getInstance().setConfiguredTechnique(options);\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\n\t\tTitleLabel.setText(\"Configuración de Apriori Difuso\");\n\n\t\tkDefLabel1.setText(\"(default = 0.9)\");\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n\t\tgetContentPane().setLayout(layout);\n\t\tlayout.setHorizontalGroup(\n\t\t\t\tlayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addComponent(jSeparator1)\n\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t\t\t\t\t\t\t.addComponent(TitleLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(kLabel1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(kLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(kTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(kDefLabel1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(kTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(kDefLabel)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0, 9, Short.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jSeparator2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\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.addGap(0, 0, Short.MAX_VALUE)\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.addComponent(saveButton)\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.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\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.addComponent(cancelButton)\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.addContainerGap())))\n\t\t\t\t);\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(TitleLabel)\n\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(kLabel)\n\t\t\t\t\t\t\t\t.addComponent(kTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(kDefLabel))\n\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(kLabel1)\n\t\t\t\t\t\t\t\t\t\t.addComponent(kTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(kDefLabel1))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(cancelButton)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(saveButton))\n\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t);\n\n\t\tpack();\n\t}",
"public ChampionSelectGUI() {\n\t\tsetupPanel();\n\t\tsetupScroll();\n\t\tsetupCenterPanel();\n\t\tsetupBottomPanel();\n\t\tsetupSidePanels();\n\t\taddWindowListener(this);\n\t}",
"private void initComponents(){\n\t\n\t\tthis.setLayout(null);\n\t\t\n\t\tscreensize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\n\t\tlogo = new JLabel(getLogoIcon(), JLabel.CENTER); // 500x50\n\t\t\n\t\toptionList = new JComboBox();\n\t\t\n\t\tcreate = new JButton(\"Create\");\n\t\tclose = new JButton(\"Close\");\n\t\t\n\t\tcreate.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcreateActionPerformed(evt);\n\t\t\t}\n\t\t});\n\t\t\n\t\tclose.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcloseActionPerformed(evt);\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public void buildGui() {\n\t}",
"public EindopdrachtGUI() {\n initComponents();\n }",
"private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }",
"public DesktopGUI() {\n initComponents();\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setForeground(new Color(-1));\n sectionTitle = new JLabel();\n Font sectionTitleFont = this.$$$getFont$$$(\"Droid Sans\", Font.BOLD, 18, sectionTitle.getFont());\n if (sectionTitleFont != null) sectionTitle.setFont(sectionTitleFont);\n this.$$$loadLabelText$$$(sectionTitle, ResourceBundle.getBundle(\"language\").getString(\"title_resources\"));\n panel.add(sectionTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n resourceList.setModel(defaultListModel1);\n resourceList.setSelectionMode(1);\n scrollPane1.setViewportView(resourceList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n publishButton = new JButton();\n publishButton.setEnabled(false);\n this.$$$loadButtonText$$$(publishButton, ResourceBundle.getBundle(\"language\").getString(\"button_publishResource\"));\n panel1.add(publishButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n pullButton = new JButton();\n pullButton.setEnabled(false);\n this.$$$loadButtonText$$$(pullButton, ResourceBundle.getBundle(\"language\").getString(\"button_pullResource\"));\n panel1.add(pullButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"public void constructComponents() {\n // taking care of window setup //\n /////////////////////////////////\n\n\tsetLayout(new GridBagLayout());\n\tsetTitle(\"HMusicController\");\n\n\tsetResizable(false);\n\n\tsetMinimumSize( new Dimension( WIDTH, HEIGHT ) );\n\n\tconstraints = new GridBagConstraints();\n\n\t\n\t////////////////////////////////\n // adjustment for stellacaeli //\n ////////////////////////////////\n\n\tcaeliLabel = new Label( \"star density\" );\n\tsetConstraints( 0, 0, 1, 1 );\n\tadd( caeliLabel, constraints );\n\n\tcaeliScroll = new Scrollbar( Scrollbar.VERTICAL, 9, 1, 0, 10 );\n\tcaeliScroll.setMinimumSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tcaeliScroll.setPreferredSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tcaeliScroll.addAdjustmentListener( this );\n\tsetConstraints( 0, 1, 1, 1 );\n\tadd( caeliScroll, constraints );\n\n\tcaeliValueLabel = new Label( \"\"+((caeliScroll.getMaximum() - caeliScroll.getValue())/100.0) );\n\tsetConstraints( 0, 2, 1, 1 );\n\tadd( caeliValueLabel, constraints );\n\n\t\n\t/////////////////////////////////\n // adjustment for planet count //\n /////////////////////////////////\n\n\tplanetLabel = new Label( \"planet count\" );\n\tsetConstraints( 1, 0, 1, 1 );\n\tadd( planetLabel, constraints );\n\n\tplanetScroll = new Scrollbar( Scrollbar.VERTICAL, 9, 1, 0, 10 );\n\tplanetScroll.setMinimumSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tplanetScroll.setPreferredSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tplanetScroll.addAdjustmentListener( this );\n\tsetConstraints( 1, 1, 1, 1 );\n\tadd( planetScroll, constraints );\n\n\tplanetValueLabel = new Label( \"\"+(planetScroll.getMaximum() - planetScroll.getValue()));\n\tsetConstraints( 1, 2, 1, 1 );\n\tadd( planetValueLabel, constraints );\n\n\n\t////////////////////////////////////////\n // adjustment for triangle thresholds //\n ////////////////////////////////////////\n\n\ttriSizeLabel = new Label( \"coarse T size\" );\n\tsetConstraints( 2, 0, 1, 1 );\n\tadd( triSizeLabel, constraints );\n\n\ttriSizeScroll = new Scrollbar( Scrollbar.VERTICAL, 99000, 100, 100, 100000 );\n\ttriSizeScroll.setMinimumSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\ttriSizeScroll.setPreferredSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\ttriSizeScroll.addAdjustmentListener( this );\n\tsetConstraints( 2, 1, 1, 1 );\n\tadd( triSizeScroll, constraints );\n\n\ttriSizeValueLabel = new Label( \"\"+(triSizeScroll.getMaximum() - triSizeScroll.getValue()));\n\tsetConstraints( 2, 2, 1, 1 );\n\tadd( triSizeValueLabel, constraints );\n\n\t// ---------------------------------------- //\n\n\ttriFineSizeLabel = new Label( \"fine T size\" );\n\tsetConstraints( 3, 0, 1, 1 );\n\tadd( triFineSizeLabel, constraints );\n\n\ttriFineSizeScroll = new Scrollbar( Scrollbar.VERTICAL, 5000, 100, 0, 10000 );\n\ttriFineSizeScroll.setMinimumSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\ttriFineSizeScroll.setPreferredSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\ttriFineSizeScroll.addAdjustmentListener( this );\n\tsetConstraints( 3, 1, 1, 1 );\n\tadd( triFineSizeScroll, constraints );\n\n\ttriFineSizeValueLabel = new Label( \"\"+(triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue()));\n\tsetConstraints( 3, 2, 1, 1 );\n\tadd( triFineSizeValueLabel, constraints );\n\n\n\t////////////////////////////////////////\n // adjustment for triangle thresholds //\n ////////////////////////////////////////\n\n\tattDistLabel = new Label( \"att. dist.\" );\n\tsetConstraints( 4, 0, 1, 1 );\n\tadd( attDistLabel, constraints );\n\n\tattDistanceScroll = new Scrollbar( Scrollbar.VERTICAL, 3200, 100, 100, 4000 );\n\tattDistanceScroll.setMinimumSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tattDistanceScroll.setPreferredSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tattDistanceScroll.addAdjustmentListener( this );\n\tsetConstraints( 4, 1, 1, 1 );\n\tadd( attDistanceScroll, constraints );\n\n\tattDistValueLabel = new Label( \"\"+(attDistanceScroll.getMaximum() - attDistanceScroll.getValue()));\n\tsetConstraints( 4, 2, 1, 1 );\n\tadd( attDistValueLabel, constraints );\n\n\t// ---------------------------------------- //\n\n\tattStrnLabel = new Label( \"att. strn.\" );\n\tsetConstraints( 5, 0, 1, 1 );\n\tadd( attStrnLabel, constraints );\n\n\tattStrengthScroll = new Scrollbar( Scrollbar.VERTICAL, 90000, 1000, 1000, 100000 );\n\tattStrengthScroll.setMinimumSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tattStrengthScroll.setPreferredSize( new Dimension( 30, SCROLL_HEIGHT ) );\n\tattStrengthScroll.addAdjustmentListener( this );\n\tsetConstraints( 5, 1, 1, 1 );\n\tadd( attStrengthScroll, constraints );\n\n\tattStrnValueLabel = new Label( \"\"+(attStrengthScroll.getMaximum() - attStrengthScroll.getValue()));\n\tsetConstraints( 5, 2, 1, 1 );\n\tadd( attStrnValueLabel, constraints );\n\n\t// ---------------------------------------- //\n\n\t// Add MIDI choice\n\tLabel midiLabel = new Label(\"Select MIDI device\");\n\tsetConstraints( 0, 3, 2, 1 );\n\tadd( midiLabel, constraints );\n\tsetConstraints( 2, 3, 3, 1 );\n\tadd( midiDevices, constraints );\n\n\tpack();\n }"
]
| [
"0.8123114",
"0.79761887",
"0.78933847",
"0.78501236",
"0.78379244",
"0.78128666",
"0.7796101",
"0.7792491",
"0.7784886",
"0.77514154",
"0.77452636",
"0.7742125",
"0.77079725",
"0.77079725",
"0.76943254",
"0.76900655",
"0.7646045",
"0.7637622",
"0.76370996",
"0.76193166",
"0.7596977",
"0.75943863",
"0.7590768",
"0.75857514",
"0.75814885",
"0.75813967",
"0.75813967",
"0.7576119",
"0.7575365",
"0.75703305",
"0.75668126",
"0.75657684",
"0.75582486",
"0.7546759",
"0.75403255",
"0.7540119",
"0.7535919",
"0.7532797",
"0.75302553",
"0.75302553",
"0.75228226",
"0.75204057",
"0.75082797",
"0.7506894",
"0.7489402",
"0.7481056",
"0.7477016",
"0.74739873",
"0.7472791",
"0.74577504",
"0.74338347",
"0.74220896",
"0.74208665",
"0.7415935",
"0.7413069",
"0.74095744",
"0.7407577",
"0.7400724",
"0.7400669",
"0.73984003",
"0.73979425",
"0.7392693",
"0.73807704",
"0.73782885",
"0.73779213",
"0.73766446",
"0.73693216",
"0.73674685",
"0.7363374",
"0.7349401",
"0.7345348",
"0.73389435",
"0.73387444",
"0.73281693",
"0.73276126",
"0.732711",
"0.73171467",
"0.73139435",
"0.73128045",
"0.7311342",
"0.73096156",
"0.73092216",
"0.73078656",
"0.7305585",
"0.7300262",
"0.7296495",
"0.72879946",
"0.7282448",
"0.72822654",
"0.7282124",
"0.7278725",
"0.7278454",
"0.7275985",
"0.7267786",
"0.7265233",
"0.72591215",
"0.7258447",
"0.72573733",
"0.7247589",
"0.7244177",
"0.7240256"
]
| 0.0 | -1 |
first roll of dice | public void actionPerformed( ActionEvent actionEvent )
{
if ( firstRoll ) {
sumOfDice = rollDice(); // roll dice
wonMoney.setText(""+money);
switch ( sumOfDice ) {
// win on first roll
case 7: case 11:
gameStatus = WON;
money=money+40;
wonMoney.setText(""+money);
pointField.setText( "" );
// clear point field
break;
// lose on first roll
case 2: case 3: case 12:
gameStatus = LOST;
money=0;
pointField.setText( "" );
wonMoney.setText(""+money);
rollButton.setEnabled(false);
// clear point field
break;
// remember point
default:
gameStatus = CONTINUE;
myPoint = sumOfDice;
pointField.setText( Integer.toString( myPoint ) );
money=money-20;
if(money<0)
{ money=0;
wonMoney.setText(""+money);
rollButton.setEnabled(false);
}
else wonMoney.setText(""+money);
firstRoll = false;
break;
} // end switch structure
} // end if structure body
// subsequent roll of dice
else {
sumOfDice = rollDice(); // roll dice
// determine game status
if ( sumOfDice == myPoint ){ // win by making point
gameStatus = WON;
money=money+60;
wonMoney.setText(""+money);
}
else if(sumOfDice == 7){
// lose by rolling 7
gameStatus = LOST;
money=0;
pointField.setText( "" );
wonMoney.setText(""+money);
rollButton.setEnabled(false);
}
money=money-20;
wonMoney.setText(""+money);
if(money==0){
gameStatus = LOST;
rollButton.setEnabled(false);
}
if(money<0)
{ money=0;
wonMoney.setText(""+money);
rollButton.setEnabled(false);
}
}
// display message indicating game status
displayMessage();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }",
"public static int diceRoll() {\n Random roller = new Random();//Create a random number generator\r\n return roller.nextInt(6) + 1;//Generate a number between 0-5 and add 1 to it\r\n }",
"private void firstRoll(int playerName) {\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\tdiceResults[i] = dice;\n\t\t}\n\t\t// program will tell witch players turn it is.\n\t\tdisplay.printMessage(playerNames[playerName - 1]\n\t\t\t\t+ \"'s turn! Click the \" + '\\\"' + \"Roll Dice\" + '\\\"'\n\t\t\t\t+ \" button to roll the dice.\");\n\t\t// program will wait until player clicks \"roll dice\" button.\n\t\tdisplay.waitForPlayerToClickRoll(playerName);\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}",
"public int rollDice() {\n\t\td1 = (int)rand.nextInt(6)+1;\n\t\td2 = (int)rand.nextInt(6)+1;\n\t\treturn d1+d2;\n\t}",
"int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }",
"public int roll_the_dice() {\n Random r = new Random();\n int number = r.nextInt(6) + 1;\n\n return number;\n }",
"public int roll() {\n Random r;\n if (hasSeed) {\n r = new Random();\n }\n else {\n r = new Random();\n }\n prevRoll = r.nextInt(range) + 1;\n return prevRoll;\n }",
"public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}",
"public static int rollDice()\n\t{\n\t\tint roll = (int)(Math.random()*6)+1;\n\t\t\n\t\treturn roll;\n\n\t}",
"public static int rollDice(){\n return (int)(Math.random()*6) + 1;\n // Math.random returns a double number >=0.0 and <1.0\n }",
"private int rollDie() {\r\n final SecureRandom random = new SecureRandom();\r\n return random.nextInt(6 - 1) + 1;\r\n }",
"public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }",
"public static int diceRoll() {\n\t\t\n\t\t//the outcome of the die is stored as an integer and returned\n\t\t\n\t\tint diceNumber = (int)((6 * (Math.random())) + 1);\n\t\treturn diceNumber;\n\t}",
"public int roll() {\n if(!debug)\n this.result = random.nextInt(6) + 1;\n else{\n scanner = new Scanner(showInputDialog(\"Enter dice value (1-6):\"));\n try{int res = scanner.nextInt()%7;\n this.result = res!=0? res:6;\n }\n catch(NoSuchElementException ne){this.result=6;} \n }\n return this.result;\n }",
"public int roll() {\n return random.nextInt(6) + 1;\n }",
"public int rollDie() {\n\t\treturn (int) (Math.random()*6)+1;\n\t}",
"public int roll() {\n this.assuerNN_random();\n //Roll once\n int result = random.nextInt(this.sides)+1;\n //TODO Save the roll somewhere\n\n //Return the roll\n return result;\n }",
"public int rollDice();",
"public int roll(int dices){\n int faces[] = new int[dices];\n int total = 0;\n Dice dice = new Dice();\n for(int i = 0; i < dices; i++){\n faces[i] = (dice.rand.nextInt(6) + 1);\n }\n for(int i = 0; i < faces.length-1; i++){\n if(faces[i] != faces[i+1]){\n this.isDouble = false;\n break;\n }\n else{\n this.isDouble = true;\n }\n }\n if(this.isDouble == true){\n this.twiceCounter++;\n }\n for(int i = 1; i < faces.length+1; i++){\n System.out.print(\"The \" + i + \". dice: \" + faces[i-1] + \" \");\n total += faces[i-1];\n }\n System.out.println(\" and the sum is \" + total);\n\n return total;\n }",
"public Dice getFirstDice() {\n diceIterator = dicesList.listIterator();\n Dice firstDice = diceIterator.next();\n diceIterator.previous();\n return firstDice;\n }",
"private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }",
"public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }",
"@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}",
"int roll();",
"public static void roll()\n {\n Random no = new Random();\n Integer dice = no.nextInt(7);\n System.out.println(dice);\n }",
"private int diceRoll(int sides) {\n return (int) ((Math.random() * sides) + 1);\n }",
"static int roll() {\n\t\tRandom rand = new Random();\t\t\t\t//get large random number\n\t\tint num2 = rand.nextInt();\t\t\t\t//convert from long to int\n\t\treturn Math.abs(num2%6)+1;\t\t\t\t//num between 1 and 6\n\t}",
"public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}",
"public void roll()\r\n\t{\r\n\t\tRandom rand = new Random();\r\n\r\n\t\trollNumber = rand.nextInt(numOfSides) + 1;\r\n\t}",
"public static int rollFairDie(){\n\t\t\n\t\tdouble rand = Math.random();\n\t\tint roll = (int) (rand * 6); // [0,5] what above code does.\n\t\treturn roll + 1;\n\t}",
"void rollDice();",
"public static int rollDie() {\n int n = ThreadLocalRandom.current().nextInt(1, 7);\n return n;\n }",
"public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }",
"public int roll()\n {\n int r = (int)(Math.random() * sides) + 1;\n return r;\n }",
"public static int diceRoll() {\n int max = 20;\n int min = 1;\n int range = max - min + 1;\n int rand = (int) (Math.random() * range) + min;\n return rand;\n }",
"public static int diceRoll(){\n Random rd = new Random();\n int dice1, dice2;\n\n dice1 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 1\n dice2 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 2\n\n System.out.println(\"You rolled \" + dice1 + \" + \" + dice2 + \" = \" + (dice1+dice2)); //print result\n\n return dice1 + dice2; //returns sum of dice rolls\n\n }",
"public void roll()\r\n\t{\r\n\t\tthis.value = rnd.nextInt(6) + 1;\r\n\t}",
"public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n die1Rand = (int)(Math.random()*6) + 1;\n die2Rand = (int)(Math.random()*6) + 1;\n }",
"public int generateRoll() {\n\t\tint something = (int) (Math.random() * 100) + 1;\n\t\tif (something <= 80) {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2 - 1;\n\t\t\treturn roll;\n\t\t} else {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2;\t\t\n\t\t\treturn roll;\n\t\t}\n\t}",
"public int takeTurn(Dice theDice){\n \n this.turnCounter++;\n \n return(theDice.rollDice());\n \n }",
"public int tossDice(){\n\t\tRandom r = new Random();\n\t\tdiceValue = r.nextInt(6)+1;\n\t\tdiceTossed = true;\n\t\treturn diceValue;\n\t}",
"public int roll() {\n Random random = new Random();\n faceValue = random.nextInt(sides)+1;\n return faceValue;\n }",
"public void roll(){\n currentValue = rand.nextInt(6)+1;\n }",
"public void roll() {\n\t\tthis.faceValue = (int)(NUM_SIDES*Math.random()) + 1;\n\t}",
"public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}",
"public int roll(){\r\n myFaceValue = (int)(Math.random() * myNumSides) + 1;\r\n return myFaceValue;\r\n }",
"void rollNumber(int d1, int d2);",
"public int roll3D6()\n {\n Random random1 = new Random();\n int r = random1.nextInt(6) +1;\n r += random1.nextInt(6) +1;\n r += random1.nextInt(6) +1;\n return r;\n }",
"public int throwDice() {\n //create new random number between 1 and 6\n int nr = ThreadLocalRandom.current().nextInt(1, 6 + 1);\n //throw the number\n throwDice(nr);\n //return number\n return nr;\n }",
"public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}",
"public abstract int rollDice();",
"public int diceValue()\r\n\t{\r\n\t\treturn rollNumber;\r\n\t}",
"public void roll() {\n\t\tthis.currentValue = ThreadLocalRandom.current().nextInt(1, this.numSides + 1);\n\t}",
"public static int OneDice( int rTotal ) // Static method\n {\n \tint rollTotal = rTotal;\n \treturn rollTotal * 2;\n }",
"private void nextTurnRoll() {\n Log.d(\"nextTurnRoll\", \"next player please roll\");\n m_currentTurn++;\n if(m_currentTurn >= m_numPlayers){\n m_currentTurn = 0;\n }\n convertTextToSpeech(players.get(m_currentTurn).getName() + \"please roll the dice\");\n }",
"public int roll() {\n\t\treturn 3;\n\t}",
"private static byte roll6SidedDie() {\n\t\tint test = (int)Math.floor(Math.random() * 6) + 1;\n\t\tbyte roll = (byte)test;\n\t\treturn roll;\n\t}",
"void roll(int noOfPins);",
"public Dice nextDice(){\n\n if(diceIterator.hasNext())\n return diceIterator.next();\n else\n return null;\n\n }",
"public int rollDice(int amount) {\r\n int randomNum = ThreadLocalRandom.current().nextInt(1, amount + 1);\r\n return randomNum;\r\n }",
"public static void main(String[] args) {\n CDice dice = new CDice();\n dice.init(1, 2, 3, 4, 5, 6);\n int random = dice.roll();\n System.out.println(\"dice roll side number: \"+random);\n }",
"RollingResult roll(Player player);",
"public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }",
"private void rollDie() {\n if (mTimer != null) {\n mTimer.cancel();\n }\n mTimer = new CountDownTimer(1000, 100) {\n public void onTick(long millisUntilFinished) {\n die.roll();\n showDice();\n }\n public void onFinish() {\n afterRoll();\n }\n }.start();\n }",
"public int attackRoll(){\r\n\t\treturn (int) (Math.random() * 100);\r\n\t}",
"public int throwDice() {\n Double randNumber = 1 + Math.random() * 5;\n this.face = randNumber.intValue();\n return this.face;\n }",
"float getRoll();",
"float getRoll();",
"public boolean rollTheDice() {\n\t\tboolean result;\n\t\tint randomDiceRoll = (int)(Math.random() * 6) + 1;\n\t\tif(randomDiceRoll>=5) {\n\t\t\tresult=true;\n\t\t}\n\t\telse {\n\t\t\tresult=false;\n\t\t}\n\t\treturn result;\n\t}",
"public void roll ()\n {\n //sets faceValue to an int between 1 - numFaces (both inclusive)\n faceValue = (int)(Math.random() * numFaces + 1);\n }",
"@Override\n public void run() {\n n =r.nextInt(6)+1;\n rollDieFace(n);\n }",
"public String throwDice() {\n if (timesThrown < 3) {\n for (Die die : dice) {\n if (timesThrown == 0) {\n die.setChosen(false);\n }\n if (die.getChosen() == false) {\n int random = (int) (Math.random() * 6 + 1);\n die.setValue(random);\n }\n }\n return writeTimesThrown();\n }\n return null;\n }",
"public void rollDie(){\r\n\t\tthis.score = score + die.roll();\r\n\t}",
"public void roll() { \n this.value = (int)(Math.random() * this.faces()) + 1; \n }",
"public void setPlayerRoll10()\r\n {\r\n \r\n roll1 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE10 + LOWEST_DIE_VALUE10);\r\n }",
"private void roll() {\n value = (int) (Math.random() * MAXVALUE) + 1;\n }",
"public int getDie1Rand()\n {\n // Set a value for the die1Rand field and return this field as a value.\n // When method called, overwrite the default value for die1Rand\n // \tand insert a new value; value in variable die1 will be the new value for die1Rand.\n\n // Return the number showing on the first die.\n return die1Rand;\n }",
"public int rollNumber() throws ClientException{\n\t\t//if(canRollNumber()){\n\t\t\thasRolled = true;\n\t\t\tRandom rand = new Random();\n\t\t\tint roll = rand.nextInt(6)+1;\n\t\t\troll += rand.nextInt(6)+1;\n\t\t\treturn roll == 7 ? 6:roll;\n\n\t}",
"public Dice() {\n\t\td1 = 0;\n\t\td2 = 0;\n\t}",
"public void roll() {\n int number = new Random().nextInt(MAXIMUM_FACE_NUMBER);\n FaceValue faceValue = FaceValue.values()[number];\n setFaceValue(faceValue);\n }",
"protected final long seedRoll() {\r\n Long time = System.currentTimeMillis();\r\n String hexSeed = String.format(\"%x\", new BigInteger(1, mGame.getSeed().getBytes()));\r\n Long seed = Long.parseLong(hexSeed, 16);\r\n\r\n return time + seed;\r\n }",
"public DiceFace drawDice() {\n\n if(dicesDrawn >= Settings.MAX_DICE_PER_COLOR * GameColor.values().length) throw new IllegalStateException(this.getClass().getCanonicalName() + \": Attempting to draw one more dice, but already drawn 90\");\n\n int color = random.nextInt(GameColor.values().length);\n int number = random.nextInt(6) + 1;\n GameColor[] values = GameColor.values();\n\n while(counter.get(values[color]) >= Settings.MAX_DICE_PER_COLOR){\n color = random.nextInt(GameColor.values().length);\n }\n\n counter.put(values[color], counter.get(values[color]) + 1);\n dicesDrawn += 1;\n return new DiceFace(GameColor.values()[color], number);\n\n }",
"private void setLoaded1() {\r\n\t\tdiceRoll1 = (int) (Math.random() * 6) + 1;\r\n\t}",
"public void reRoll() {\n this.result = this.roll();\n this.isSix = this.result == 6;\n }",
"public int randomWithRange(){\n\r\n\t\tint[] diceRolls = new int[4];//roll four 6-sided dices\r\n\t\tint range;\r\n\t\tfor(int i = 0; i<diceRolls.length;i++) {\r\n\t\t\t//add each dice i rolled into an array\r\n\t\t\trange = 6;\r\n\t\t\tdiceRolls[i] = (int)(Math.random() * range) + 1;//assign a number btw 1-6\r\n\t\t}\r\n\t\tint smallest=diceRolls[0];\r\n\t\tfor(int i = 1; i<diceRolls.length; i++) {//will check for the smallest rolled dice\r\n\t\t\tif(diceRolls[i]<smallest) \r\n\t\t\t\tsmallest=diceRolls[i];\t\t\r\n\t\t}\r\n\t\tint sum=0;\r\n\t\tfor(int i = 0; i<diceRolls.length;i++) {//adds up all the sum\r\n\t\t\tsum = sum+diceRolls[i];\r\n\t\t}\r\n\t\treturn sum-smallest;//subtract by the smallest dice from the sum\r\n\t}",
"public static int roll(int c, int s, int m){\n int sum = m;\n for(int i = 0; i < c; i++)\n sum += Rand.getInt(1, s);\n return sum;\n }",
"public static void main(String[] args) {\n\t\tRandom ricoDude = new Random();\r\n\t\tint x = ricoDude.nextInt(20) + 1;\r\n\t\t// the dice will have arange of 0-5 to make it 1-6 , + 1 to the end of it\r\n\t\t\r\n\t\tSystem.out.println(\"You rolled a: \" + x);\r\n\t\tint a = 1, b= 2,k;\r\n\t\tk = a + b + a++ + b++;\r\n\t\tSystem.out.println(k);\r\n\t\t\r\n\t}",
"public int getDice(){\n\t\treturn diceValue;\n\t\t\n\t}",
"private void otherRolls() {\n\t\t// program tells that player should select dices to re-roll.\n\t\tdisplay.printMessage(\"Select the dice you wish to re-roll and click \"\n\t\t\t\t+ '\\\"' + \"Roll Again\" + '\\\"');\n\t\t// program will wait until player clicks \"roll again\" button.\n\t\tdisplay.waitForPlayerToSelectDice();\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tif (display.isDieSelected(i) == true) {\n\t\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\t\tdiceResults[i] = dice;\n\t\t\t}\n\t\t}\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}",
"public Integer aiAction() {\r\n\t\t//if the first dice is less then six, throw the second dice \r\n\t\t//if the both throws > 10 the ai has lost, and will return 0\r\n\t\t//if the first dice == 7, return first dice\r\n\t\tInteger totalSum = 0;\r\n\t\tRandom aiRandom = new Random();\r\n\t\tInteger firstDice = aiRandom.nextInt(7) + 1;\r\n\t\tSystem.out.println(\"First dice: \" + (totalSum += firstDice));\r\n\t\tif (firstDice < 6) {\r\n\t\t\tInteger secondDice = aiRandom.nextInt(7) + 1;\r\n\t\t\tSystem.out.println(\"Second dice value is: \" + secondDice);\r\n\t\t\tSystem.out.println(\"Sum of both throws: \" + (totalSum += secondDice));\r\n\t\t\tif(totalSum > 10){\r\n\t\t\t\treturn 0;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn totalSum;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Ai scored :\" + (firstDice));\r\n\t\t\treturn firstDice;\r\n\t\t}\r\n\r\n\t}",
"public void throwDice() {\n\n Random r = new Random();\n\n if (color == DiceColor.NEUTRAL) {\n this.value = 0;\n } else {\n this.value = 1 + r.nextInt(6);\n }\n\n }",
"public void roll(boolean [] which){\n for(int i = 0; i < HAND_SIZE; ++i){\n if(which[i]){\n dice[i].roll();\n }\n }\n }",
"public void roll(){\n roll(new boolean[]{true,true,true,true,true});\n }",
"public ArrayList<Dice> rollAllDice()\n {\n ArrayList<Dice> array = getDiceArray();\n for(Dice dice : array)\n {\n if(dice.getReroll())\n {\n dice.rollDice();\n dice.setReroll(false, \"\"); //resets all reroll flags to false\n }\n }\n \n return array;\n }",
"public void rollDice(int pIndex) {\n this.pIndex = pIndex;\n this.result = this.roll();\n this.isSix = this.result == 6;\n resetCoordinates();\n this.tickCounter=0;\n this.vel=1;\n this.diceRollCount++;\n }",
"public void setPlayerRoll20()\r\n {\r\n \r\n roll2 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE20 + LOWEST_DIE_VALUE20);\r\n \r\n }",
"public void rollAtk() {\n rollAtk = roll();\n }",
"DiceRoll modifyRoll(DiceRoll roll, Die die);",
"public int rollAttack()\n {\n Random random2 = new Random();\n int atk = random2.nextInt(20) +1 + attackBonus;\n return atk;\n }",
"public void roll() {\n if(!frozen) {\n this.value = ((int)(Math.random() * numSides + 1));\n }\n }",
"public int roll(int roll) {\n \t\tappendAction(R.string.player_roll, Integer.toString(roll));\n \t\tboard.roll(roll);\n \n \t\treturn roll;\n \t}"
]
| [
"0.7782089",
"0.7557232",
"0.74733657",
"0.7438434",
"0.7379827",
"0.73787886",
"0.73748946",
"0.7347384",
"0.7330954",
"0.7300113",
"0.7206466",
"0.717639",
"0.7137749",
"0.71347624",
"0.71315366",
"0.71188426",
"0.7096947",
"0.7086374",
"0.7085411",
"0.7069055",
"0.7068643",
"0.7067486",
"0.70519245",
"0.70252085",
"0.7007076",
"0.6994386",
"0.69549376",
"0.6933407",
"0.69318116",
"0.6929268",
"0.69157124",
"0.6870814",
"0.6865139",
"0.6860513",
"0.685524",
"0.67769986",
"0.67645615",
"0.67275447",
"0.672693",
"0.6700026",
"0.66946566",
"0.6684537",
"0.6630581",
"0.66190034",
"0.6592824",
"0.65881765",
"0.65765584",
"0.6562043",
"0.65086204",
"0.6453663",
"0.64494544",
"0.6434983",
"0.64064795",
"0.63919204",
"0.63737535",
"0.6351739",
"0.6328862",
"0.63059884",
"0.62852633",
"0.62789935",
"0.6261287",
"0.61877656",
"0.61733764",
"0.61644983",
"0.61578274",
"0.61399686",
"0.6129432",
"0.6129432",
"0.61162585",
"0.6116035",
"0.61045665",
"0.6101156",
"0.6085289",
"0.6084971",
"0.6072814",
"0.6071419",
"0.60494304",
"0.60243523",
"0.60020757",
"0.59902114",
"0.59725964",
"0.5950056",
"0.5945329",
"0.5935424",
"0.59288186",
"0.5927197",
"0.5917026",
"0.5908634",
"0.59047765",
"0.5900861",
"0.5894402",
"0.58939457",
"0.58666945",
"0.58567244",
"0.5848995",
"0.58350545",
"0.5832282",
"0.58266664",
"0.58220583",
"0.5814949",
"0.5806753"
]
| 0.0 | -1 |
end method actionPerformed roll dice, calculate sum and display results | public int rollDice()
{
int die1, die2, sum;
// pick random die values
die1 = 1 + ( int ) ( Math.random() * 6 );
die2 = 1 + ( int ) ( Math.random() * 6 );
sum = die1 + die2; // sum die values
// display results
die1Field.setText( Integer.toString( die1 ) );
die2Field.setText( Integer.toString( die2 ) );
sumField.setText( Integer.toString( sum ) );
return sum; // return sum of dice
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}",
"private void rollButtonClicked()\n {\n try\n {\n //Retrieve the user's values from the input areas and use them to roll dice\n //then display the result to the user\n lblRollResult.setText(dice.roll(Integer.parseInt(txtNumber.getText()), Integer.parseInt(txtDie.getText()), Integer.parseInt(txtBonus.getText()))+\"\");\n }\n catch (NumberFormatException e)\n {\n //If any of the user's input aren't a number display \"ERROR\" where the result would be\n lblRollResult.setText(\"ERROR\");\n }\n }",
"public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}",
"void rollDice();",
"public int roll(int dices){\n int faces[] = new int[dices];\n int total = 0;\n Dice dice = new Dice();\n for(int i = 0; i < dices; i++){\n faces[i] = (dice.rand.nextInt(6) + 1);\n }\n for(int i = 0; i < faces.length-1; i++){\n if(faces[i] != faces[i+1]){\n this.isDouble = false;\n break;\n }\n else{\n this.isDouble = true;\n }\n }\n if(this.isDouble == true){\n this.twiceCounter++;\n }\n for(int i = 1; i < faces.length+1; i++){\n System.out.print(\"The \" + i + \". dice: \" + faces[i-1] + \" \");\n total += faces[i-1];\n }\n System.out.println(\" and the sum is \" + total);\n\n return total;\n }",
"public int rollDice();",
"public void actionPerformed(ActionEvent e) {\n\t\tif (!table.diceAreRolling()) table.rollDice();\n\t}",
"public void actionPerformed(ActionEvent arg0) \n\t\t\t{\n\t\t\t\tif (btnPlay.getText().equals(\"Come-out Roll\"))\n\t\t\t\t{\n\t\t\t\t\t// roll dice\n\t\t\t\t\td1.roll();\n\t\t\t\t\td2.roll();\n\t\t\t\t\ttotalRolls++;\n\t\t\t\t\t\n\t\t\t\t\t// assign dice numbers to variables\n\t\t\t\t\tint num1 = d1.getValue();\n\t\t\t\t\tint num2 = d2.getValue();\n\t\t\t\t\t\n\t\t\t\t\t// put dice numbers in text boxes\n\t\t\t\t\ttxtDie1.setText(Integer.toString(num1));\n\t\t\t\t\ttxtDie2.setText(Integer.toString(num2));\n\t\t\t\t\t\n\t\t\t\t\t//initially set the point value box and label invisible\n\t\t\t\t\ttxtPointValue.setVisible(false);\n\t\t\t\t\tlblPointValue.setVisible(false);\n\t\t\t\t\t\n\t\t\t\t\t// if roll equals 2, 3, or 12.....Lose and reset\n\t\t\t\t\tif (num1 + num2 == 2 || num1 + num2 == 3 || num1 + num2 == 12)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Loser!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t// if roll equals 7 or 11...Win and reset\n\t\t\t\t\telse if (num1 + num2 == 7 || num1 + num2 == 11)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Winner!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\ttotalWins++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t//If neither win nor lose on first roll.....assign point value to text box and move on\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tbtnPlay.setText(\"Point Roll\");\n\t\t\t\t\t\tlblMessage.setText(\"Game in Progress...\");\n\t\t\t\t\t\tpointValue = num1 + num2;\n\t\t\t\t\t\ttxtPointValue.setVisible(true);\n\t\t\t\t\t\tlblPointValue.setVisible(true);\n\t\t\t\t\t\ttxtPointValue.setText(Integer.toString(pointValue));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if button label equals point roll\n\t\t\t\telse if (btnPlay.getText().equals(\"Point Roll\"))\n\t\t\t\t{\n\t\t\t\t\t// roll dice again\n\t\t\t\t\td1.roll();\n\t\t\t\t\td2.roll();\n\t\t\t\t\ttotalRolls++;\n\t\t\t\t\t\n\t\t\t\t\t//re-assign numbers\n\t\t\t\t\tint num1 = d1.getValue();\n\t\t\t\t\tint num2 = d2.getValue();\n\t\t\t\t\t\n\t\t\t\t\t//put new numbers in text box\n\t\t\t\t\ttxtDie1.setText(Integer.toString(num1));\n\t\t\t\t\ttxtDie2.setText(Integer.toString(num2));\n\t\t\t\t\t\n\t\t\t\t\t// if dice numbers equal point value......Win and reset\n\t\t\t\t\tif (num1 + num2 == pointValue)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Winner!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\ttotalWins++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// if dice numbers equal 7......Lose and reset\n\t\t\t\t\telse if (num1 + num2 == 7)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Loser!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"public void init()\n{\n // obtain content pane and change its layout to \n // a FlowLayout\n Container container = getContentPane();\n container.setLayout( new FlowLayout() ); \n \n\n // create label and text field for die 1\n die1Label = new JLabel( \"Die 1\" );\n container.add( die1Label );\n die1Field = new JTextField( 10 );\n die1Field.setEditable( false );\n container.add( die1Field );\n\n // create label and text field for die 2\n die2Label = new JLabel( \"Die 2\" );\n container.add( die2Label );\n die2Field = new JTextField( 10 );\n die2Field.setEditable( false );\n container.add( die2Field );\n\n // create label and text field for sum\n sumLabel = new JLabel( \"Sum is\" );\n container.add( sumLabel );\n sumField = new JTextField( 10 );\n sumField.setEditable( false );\n container.add( sumField );\n\n // create label and text field for point\n pointLabel = new JLabel( \"Point is\" );\n container.add( pointLabel );\n pointField = new JTextField( 10 );\n pointField.setEditable( false );\n container.add( pointField );\n \n\n\n \n wonLabel=new JLabel(\" Money\");\n container.add(wonLabel);\n\n wonMoney=new JTextField(10);\n wonMoney.setEditable(false);\n container.add(wonMoney);\n \n wonLabel=new JLabel(\"$\");\n container.add(wonLabel);\n \n \n \n \n\n // create button user clicks to roll dice\n rollButton = new JButton( \"Roll Dice\" );\n rollButton.addActionListener( this );\n container.add( rollButton );\n}",
"public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }",
"public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}",
"public void rollDice() {\n try {\n if (numOfDices != Integer.parseInt(numOfDicesText.getText().toString())) {\n init();\n }\n }\n catch (Exception e) {\n System.out.println(e);\n numOfDicesText.setText(\"1\");\n init();\n }\n int rolledNumber;\n for (int i = 0; i < numOfDices; i++) {\n rolledNumber = dices.get(i).roll();\n textViews.get(i).setText(\"Dice \" + (i+1) + \" rolled a \" + rolledNumber);\n imageViews.get(i).setImageBitmap(DiceImages.getImage(rolledNumber));\n }\n }",
"private void otherRolls() {\n\t\t// program tells that player should select dices to re-roll.\n\t\tdisplay.printMessage(\"Select the dice you wish to re-roll and click \"\n\t\t\t\t+ '\\\"' + \"Roll Again\" + '\\\"');\n\t\t// program will wait until player clicks \"roll again\" button.\n\t\tdisplay.waitForPlayerToSelectDice();\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tif (display.isDieSelected(i) == true) {\n\t\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\t\tdiceResults[i] = dice;\n\t\t\t}\n\t\t}\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}",
"public void rollDices(Dice dice1, Dice dice2) {\n\n while (true) {\n // click to roll\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if(roll == pN)\n // player and npcs that bet 1 win\n if (sum == pN) {\n player.playerWin();\n System.out.println(\"You rolled \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n break;\n }\n // if(roll == out7)\n else if (sum == OUT7) {\n player.playerLose();\n System.out.println(\"You hit the out 7.\" + LMESSAGE + \"\\nYou have a total of \" + player.getWins()\n + \" wins and \" + player.getLoses() + \" loses.\");\n\n break;\n } else {\n System.out.println(\"\\nYour total roll is \" + sum + \"\\nYou need to hit \" + pN +\n \" to win.\" + \"\\n\\nContinue rolling\\n\");\n }\n\n\n }\n\n }",
"@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}",
"public void actionPerformed( ActionEvent actionEvent )\n{\n if ( firstRoll ) { \n sumOfDice = rollDice(); // roll dice \n wonMoney.setText(\"\"+money);\n switch ( sumOfDice ) {\n\n // win on first roll\n case 7: case 11: \n gameStatus = WON;\n money=money+40;\n wonMoney.setText(\"\"+money);\n pointField.setText( \"\" );\n // clear point field\n break;\n\n // lose on first roll\n case 2: case 3: case 12: \n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n // clear point field\n break;\n\n // remember point\n default: \n gameStatus = CONTINUE;\n myPoint = sumOfDice;\n pointField.setText( Integer.toString( myPoint ) );\n money=money-20;\n if(money<0)\n {\tmoney=0;\n \t wonMoney.setText(\"\"+money);\n \t rollButton.setEnabled(false);\n \t }\n else wonMoney.setText(\"\"+money);\n firstRoll = false;\n break;\n\n } // end switch structure\n\n } // end if structure body\n\n\n // subsequent roll of dice\n else {\n sumOfDice = rollDice(); // roll dice\n \n // determine game status\n if ( sumOfDice == myPoint ){ // win by making point\n gameStatus = WON;\n money=money+60;\n wonMoney.setText(\"\"+money);\n }\n else if(sumOfDice == 7){\n // lose by rolling 7\n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n \n \n }\n \n money=money-20;\n wonMoney.setText(\"\"+money);\n if(money==0){\n\t gameStatus = LOST;\n\t rollButton.setEnabled(false);\n }\n if(money<0)\n {\tmoney=0;\n \twonMoney.setText(\"\"+money);\n \t\n \t rollButton.setEnabled(false);\n \t }\n \n \n }\n // display message indicating game status\n displayMessage();\n\n}",
"public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }",
"public void updateDice() {\n keepAll = true;\n for (JToggleButton die : diceButtons) { // check to see if the user wants to keep all of their dice\n if (!die.isSelected()) {\n keepAll = false;\n break;\n }\n }\n if (player.getCurrentTurn() <= player.getNumOfTurns() && !keepAll) { // reroll\n for (int i = 0; i < player.getPlayerHand().getSizeOfHand(); i++) {\n if (!diceButtons.get(i).isSelected())\n player.rollNewDie(i);\n diceButtons.get(i).setText(String.valueOf(player.getPlayerHand().getHand().get(i).getSideUp()));\n diceButtons.get(i).setSelected(false);\n diceImages.get(i).setIcon(new ImageIcon(player.getPlayerHand().getHand().get(i).getSideUp()+\"up.png\"));\n diceImages.get(i).setSelected(false);\n }\n player.setCurrentTurn(player.getCurrentTurn() + 1);\n setVisible(true);\n if (player.getNumOfTurns()+1 == player.getCurrentTurn() || player.getNumOfTurns() == 1) {\n makeScoringOptions();\n }\n }\n else {\n makeScoringOptions(); // go to scoring options frame\n }\n }",
"public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n die1Rand = (int)(Math.random()*6) + 1;\n die2Rand = (int)(Math.random()*6) + 1;\n }",
"public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }",
"private void afterRoll() {\n if (die.getNumber() == 1) {\n round_score = 0;\n round_score_view.setText(String.valueOf(round_score));\n game.changeTurn();\n String label;\n if (game.isPlayer_turn()) {\n game.incrementRound();\n label = \"Round \" + game.getRound() + \" - Player's Turn\";\n }\n else {\n label = \"Round \" + game.getRound() + \" - Banker's Turn\";\n }\n round_label.setText(label);\n }\n else {\n round_score += die.getNumber();\n round_score_view.setText(String.valueOf(round_score));\n }\n if (!game.isPlayer_turn())\n doBankTurn();\n }",
"public int rollDice() {\n\t\td1 = (int)rand.nextInt(6)+1;\n\t\td2 = (int)rand.nextInt(6)+1;\n\t\treturn d1+d2;\n\t}",
"private void diceSum(int dice, int desiredSum) {\r\n\t\tdiceSumHelper(dice, desiredSum, 0, new ArrayList<Integer>());\r\n\t\tSystem.out.println(calls);\r\n\t}",
"public String rollResult() {\n\t\treturn String.format(\"Your rolled a %s and a %s, giving a sum of %s\", die1.getFaceValue(), die2.getFaceValue(),\n\t\t\t\tsumOfDies());\n\t}",
"public int roll() {\n if(!debug)\n this.result = random.nextInt(6) + 1;\n else{\n scanner = new Scanner(showInputDialog(\"Enter dice value (1-6):\"));\n try{int res = scanner.nextInt()%7;\n this.result = res!=0? res:6;\n }\n catch(NoSuchElementException ne){this.result=6;} \n }\n return this.result;\n }",
"public void comeOutRoll(Dice dice1, Dice dice2) {\n\n setExit(false);\n System.out.println(\"***This is the come out roll***\" +\n \"\\nIf you roll 7 or 11 you win.\\nBut if you roll 2,3 or 12\" +\n \" you lose.\");\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if (winCon.contains(roll)) player wins, npcs that bet 1 wins\n\n if (sum == OUT7 || sum == 11) {\n player.playerWin();\n System.out.println(\"Your total is \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n setExit(true);\n\n }\n // if (failCon.contains(roll)) player loses, npcs with bet 2 wins\n else if (sum == 2 || sum == 3 || sum == 12) {\n player.playerLose();\n System.out.println(\"Your total is \" + sum + LMESSAGE + \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n\n setExit(true);\n\n }\n // else set pN // cannot be winCon or failCon\n else {\n System.out.println(\"\\nYour total is \" + sum + \" this is your point number, hit this to win\");\n setPN(sum);\n }\n }",
"public int setRollResult(int diceAmount, int diceSides) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < diceAmount; i++) {\n\t\t\tresult += diceBag.rollDice(diceSides);\n\t\t}\n\t\treturn result;\n\t}",
"public abstract int rollDice();",
"public static int diceRoll(){\n Random rd = new Random();\n int dice1, dice2;\n\n dice1 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 1\n dice2 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 2\n\n System.out.println(\"You rolled \" + dice1 + \" + \" + dice2 + \" = \" + (dice1+dice2)); //print result\n\n return dice1 + dice2; //returns sum of dice rolls\n\n }",
"public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}",
"public void rollDie(){\r\n\t\tthis.score = score + die.roll();\r\n\t}",
"private void reactToRoll(){\r\n\t\troll.setEnabled(false);\r\n\t\tsubmit.setEnabled(true);\r\n\t\tagain.setEnabled(false);\r\n\t\tnoMore.setEnabled(false);\r\n\t\tif(!didBust){\r\n\t\t\tstatusLabel.setText(\"Choose your first dice pair!\");\r\n\t\t} else {\r\n\t\t\tstatusLabel.setText(\"Oh no! Better luck next time.\");\r\n\t\t\tsubmit.setText(\"Oops! Busted!\");\r\n\t\t}\r\n\t\tupdate();\r\n\t}",
"public void chooseWhichDieToRoll(ActionEvent e){\n \tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getTotDiceTossLeft() !=3){\n\t\t\tJButton btnDie = (JButton)e.getSource();\n\t\t\tint index = Integer.parseInt(btnDie.getName());\n \t\n\t\t\t//Change Icon on die depending on user interaction \n\t \tswitch(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getDieNumber(index)){\n\t\t\t\tcase 1:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][6]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][0]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][7]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][1]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][8]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][2]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][9]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][3]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][10]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][4]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][11]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][5]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t \t}\n \t}\n }",
"private void rollDie() {\n if (mTimer != null) {\n mTimer.cancel();\n }\n mTimer = new CountDownTimer(1000, 100) {\n public void onTick(long millisUntilFinished) {\n die.roll();\n showDice();\n }\n public void onFinish() {\n afterRoll();\n }\n }.start();\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] totals = new int[11];\r\n\t\tint dice;\r\n\t\tint diceTwo;\r\n\t\tint total;\r\n\r\n\t\t\r\n\r\n\t\tfor (int i = 0; i < 10000; i++) {\r\n\t\t\tdice = (int) (Math.random() * 6) + 1;\r\n\t\t\tdiceTwo = (int) (Math.random() * 6) + 1;\r\n\t\t\ttotal = dice + diceTwo; \r\n\t\t\tif (total == 2) {\r\n\r\n\t\t\t\ttotals[0]++;\r\n\t\t\t}\r\n\r\n\t\t\telse if (total == 3) {\r\n\r\n\t\t\t\ttotals[1]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 4) {\r\n\r\n\t\t\t\ttotals[2]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 5) {\r\n\r\n\t\t\t\ttotals[3]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 6) {\r\n\r\n\t\t\t\ttotals[4]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 7) {\r\n\r\n\t\t\t\ttotals[5]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 8) {\r\n\r\n\t\t\t\ttotals[6]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 9) {\r\n\r\n\t\t\t\ttotals[7]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 10) {\r\n\r\n\t\t\t\ttotals[8]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 11) {\r\n\r\n\t\t\t\ttotals[9]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 12) {\r\n\r\n\t\t\t\ttotals[10]++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Total - Number of Rolls\");\r\n\t\tSystem.out.println(\"2 \" + totals[0] );\r\n\t\tSystem.out.println(\"3 \" + totals[1] );\r\n\t\tSystem.out.println(\"4 \" + totals[2] );\r\n\t\tSystem.out.println(\"5 \" + totals[3] );\r\n\t\tSystem.out.println(\"6 \" + totals[4] );\r\n\t\tSystem.out.println(\"7 \" + totals[5] );\r\n\t\tSystem.out.println(\"8 \" + totals[6] );\r\n\t\tSystem.out.println(\"9 \" + totals[7] );\r\n\t\tSystem.out.println(\"10 \" + totals[8] );\r\n\t\tSystem.out.println(\"11 \" + totals[9] );\r\n\t\tSystem.out.println(\"12 \" + totals[10] );\r\n\t}",
"public static int diceRoll() {\n Random roller = new Random();//Create a random number generator\r\n return roller.nextInt(6) + 1;//Generate a number between 0-5 and add 1 to it\r\n }",
"public void manipulaDice() {\n\n\t\t//Criando frame para selecao do dado\n\t\tJFrame frame = new JFrame();\n\n\t\t//Criando botao para enviar escolha do dado\n\t\tJButton b = new JButton(\"Submit\");\n\n\t\t//Criando e configurando opcoes de radio button\n\t\tButtonGroup g = new ButtonGroup();\n\t\tJRadioButton option1 = new JRadioButton(\"1\");\n\t JRadioButton option2 = new JRadioButton(\"2\");\n\t JRadioButton option3 = new JRadioButton(\"3\");\n\t JRadioButton option4 = new JRadioButton(\"4\");\n\t JRadioButton option5 = new JRadioButton(\"5\");\n\t JRadioButton option6 = new JRadioButton(\"6\");\n\t \n\t //Configurando o nome do cabecalho do Frame\n\t frame.setTitle(\"MANIPULAR DADO\");\n\t \t\t\n\t //Formatando o tamanho do frame\n\t frame.setSize(450, 300);\n\t \t\t\t \t\t\n\t //Evitando que o frame possa ser redimensionado\n\t frame.setResizable(false); \n\n\t //Fecha frame ao clicar no X\n\t frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); \n\t \t\t\n\t //Centralizando o frame na tela\n\t frame.setLocationRelativeTo(null);\n\n\t \t//Configurando fundo como Preto\t\t \t\t\t\t\n\t frame.getContentPane().setBackground(Color.BLACK);\n\t \t\t\t \t\t\n\t \t//Configurando texto do radio button\n\t option1.setForeground(Color.WHITE);\n\t option1.setFont(new Font(\"Courier\", Font.ITALIC, 16));\n\t option2.setForeground(Color.WHITE);\n\t option2.setFont(new Font(\"Courier\", Font.ITALIC, 16));\n\t option3.setForeground(Color.WHITE);\n\t option3.setFont(new Font(\"Courier\", Font.ITALIC, 16));\n\t option4.setForeground(Color.WHITE);\n\t option4.setFont(new Font(\"Courier\", Font.ITALIC, 16));\n\t option5.setForeground(Color.WHITE);\n\t option5.setFont(new Font(\"Courier\", Font.ITALIC, 16));\n\t option6.setForeground(Color.WHITE);\n\t option6.setFont(new Font(\"Courier\", Font.ITALIC, 16));\n\t \n\t //Adicionando tips no botao de envio de escolha\n\t b.setToolTipText(\"Cique aqui para definir dado e realizar movimento\");\n\n\t //Realizacao de tratador de evento\n\t b.addActionListener(new ActionListener() { \n\t \tpublic void actionPerformed(ActionEvent event) \n\t \t{\n\t \t\tif (option1.isSelected())\n\t \t\t{\n\t \t\t\t((DicePanel) Dice).displayRoll(1);\n\t \t\t\t((BoardPanel) Board).callMove(1);\n\t \t\t\tframe.dispose();\n\t \t\t}\n\t \t\tif (option2.isSelected())\n\t \t\t{\n\t \t\t\t((DicePanel) Dice).displayRoll(2);\n\t \t\t\t((BoardPanel) Board).callMove(2);;\n\t \t\t\tframe.dispose();\n\t \t\t}\n\t \t\tif (option3.isSelected())\n\t \t\t{\n\t \t\t\t((DicePanel) Dice).displayRoll(3);\n\t \t\t\t((BoardPanel) Board).callMove(3);\n\t \t\t\tframe.dispose();\n\t \t\t}\n\t \t\tif (option4.isSelected())\n\t \t\t{\n\t \t\t\t((DicePanel) Dice).displayRoll(4);\n\t \t\t\t((BoardPanel) Board).callMove(4);\n\t \t\t\tframe.dispose();\n\t \t\t}\n\t \t\tif (option5.isSelected())\n\t \t\t{\n\t \t\t\t((DicePanel) Dice).displayRoll(5);\n\t \t\t\t((BoardPanel) Board).callMove(5);\n\t \t\t\tframe.dispose();\n\t \t\t}\n\t \t\tif (option6.isSelected())\n\t \t\t{\n\t \t\t\t((DicePanel) Dice).displayRoll(6);\n\t \t\t\t((BoardPanel) Board).callMove(6);\n\t \t\t\tframe.dispose();\n\t \t\t}\n\t \t}\n\t });\n\t \t\n\t \t//Adicionando Radio Button no grupo\t \n\t g.add(option1);\n\t g.add(option2);\n\t g.add(option3);\n\t g.add(option4);\n\t g.add(option5);\n\t g.add(option6);\n\t \n\t //Configurando layout do grupo\n\t frame.setLayout(new FlowLayout());\n\t \n\t //Adicionando botoes no frame\n\t frame.add(option1);\n\t frame.add(option2);\n\t frame.add(option3);\n\t frame.add(option4);\n\t frame.add(option5);\n\t frame.add(option6);\n\t \n\t //Adicionando botao no frame\n\t frame.add(b); \n\n\t //Tornando frame do tamanho ideal\n\t frame.pack();\n\t \n\t //Mostrando frame na tela\n\t frame.setVisible(true);\n\t}",
"int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }",
"public void throwDice()\n {\n System.out.println( name + \"'s Turn \" + (turnNumber + 1) + \" Results for Round \" + round + \": \");\n turnScores[turnNumber] = 0;\n System.out.print(\"Dice Throws: \");\n for (int diceNumber = 0; diceNumber < diceThrows[turnNumber].length; diceNumber++)\n {\n int diceThrow = r.nextInt(6) + 1;\n diceThrows[turnNumber][diceNumber] = diceThrow;\n turnScores[turnNumber] += diceThrow;\n totalScore += diceThrow;\n System.out.print(diceThrows[turnNumber][diceNumber] + \" \");\n }\n System.out.print(\" Score This Turn: \" + turnScores[turnNumber] + \" \");\n System.out.println(\" \" + name + \"'s Running Total Score: \" + totalScore + \"\\n\");\n \n turnNumber++;\n }",
"private void roll2(DiceModel player1, DiceModel player2) {\n\t\t\n\t\tint random;\t\n\t\t\n\t\t// enables the dice to be kept\n\t\tenableDice();\n\t\t\n\t\t// reset text if player previously failed to select a die\n\t\tif (roundChanger == 2) {\n\t\t\ttextAreaInstructions.setText(rollToBeat);\n\t\t} else {\n \ttextAreaInstructions.setText(\"Start by clicking\" + \"\\n\" + \"Roll Dice button!\");\n \t}\n\t\t\n\t\t// display round number\n\t\ttextFieldRound.setText(Integer.toString(round));\n\t\t\n\t\t// if we are on the first roller, count up rolls till they end turn\n\t\tif (roundChanger == 1) {\n\t\t\trollsTaken = rollsTaken + 1;\n\t\t}\n\t\t\n\t\t// turn should increment for both rollers\n\t\tturn = turn + 1;\n\t\t\n\t\t// if all three die are selected then end turn\n\t\tif (togglebtnD1.isSelected() == true && togglebtnD2.isSelected() == true &&\n\t\t\t\ttogglebtnD3.isSelected() == true) {\n\t\t\tendTurn();\n\t\t}\n\t\t\n\t\t// determines who has the current roll\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tString stringPlayer1 = \"Player1\";\n\t\t\n\t\t// enforces player requirement of having at least 1 die selected per roll\n\t\tif (turn != 1 && togglebtnD1.isSelected() == false && togglebtnD2.isSelected() == false &&\n \ttogglebtnD3.isSelected() == false) {\n \t\tif (roundChanger == 1) {\n \t\tturn = turn - 1;\n \t\trollsTaken = rollsTaken - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t} else if (roundChanger == 2 && turn == 0){\n \t\t\ttextAreaInstructions.setText(rollToBeat);\n \t\t}else {\n \t\tturn = turn - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t}\n \t} else {\n\t\t\t// only get new values for dice that haven't been kept\t\t\n\t\t\tif (togglebtnD1.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\t displayDie(random, togglebtnD1);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie1(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie1(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD2.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD2);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie2(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie2(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD3.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD3);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie3(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie3(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\n\t\t\t// limit second rollers turns to as many turns as first roller had\n\t\t\tif (turn == rollsTaken && roundChanger == 2) {\n\t\t\t\tendTurn();\n\t\t\t}\n\n\t\t\tif (turn == 3) { \n\t\t\t\tendTurn();\n\t\t\t}\n\t\t}\t\n\t\n\t}",
"private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }",
"public static void roll()\n {\n Random no = new Random();\n Integer dice = no.nextInt(7);\n System.out.println(dice);\n }",
"public void handle(Event event) {\n showDiceResult();\n }",
"public void rollBackTotal( int turnQuit )\n {\n totalScore -= turnScores[turnQuit];\n }",
"public int diceSum(Die[] dice) {\n int sum = 0;\n for (Die d : dice) {\n sum += d.getFace();\n }\n return sum;\n }",
"private static void displayDice(Shaker shaker) {\n int faceValue1 = shaker.getDice()[0].getFaceValue();\n int faceValue2 = shaker.getDice()[1].getFaceValue();\n\n\n // Displays the dice on the board\n InterfaceController.setDice(faceValue1, faceValue2);\n }",
"private void firstRoll(int playerName) {\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\tdiceResults[i] = dice;\n\t\t}\n\t\t// program will tell witch players turn it is.\n\t\tdisplay.printMessage(playerNames[playerName - 1]\n\t\t\t\t+ \"'s turn! Click the \" + '\\\"' + \"Roll Dice\" + '\\\"'\n\t\t\t\t+ \" button to roll the dice.\");\n\t\t// program will wait until player clicks \"roll dice\" button.\n\t\tdisplay.waitForPlayerToClickRoll(playerName);\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}",
"public static int rollDice(){\n return (int)(Math.random()*6) + 1;\n // Math.random returns a double number >=0.0 and <1.0\n }",
"public Integer aiAction() {\r\n\t\t//if the first dice is less then six, throw the second dice \r\n\t\t//if the both throws > 10 the ai has lost, and will return 0\r\n\t\t//if the first dice == 7, return first dice\r\n\t\tInteger totalSum = 0;\r\n\t\tRandom aiRandom = new Random();\r\n\t\tInteger firstDice = aiRandom.nextInt(7) + 1;\r\n\t\tSystem.out.println(\"First dice: \" + (totalSum += firstDice));\r\n\t\tif (firstDice < 6) {\r\n\t\t\tInteger secondDice = aiRandom.nextInt(7) + 1;\r\n\t\t\tSystem.out.println(\"Second dice value is: \" + secondDice);\r\n\t\t\tSystem.out.println(\"Sum of both throws: \" + (totalSum += secondDice));\r\n\t\t\tif(totalSum > 10){\r\n\t\t\t\treturn 0;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn totalSum;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Ai scored :\" + (firstDice));\r\n\t\t\treturn firstDice;\r\n\t\t}\r\n\r\n\t}",
"public void throwDices() throws DiceException {\n /**generator of random numbers(in this case integer numbers >1)*/\n Random generator = new Random();\n /**mode of logic*/\n String mode = this.getMode();\n\n if (!mode.equals(\"sum\") && !mode.equals(\"max\")) {\n throw new DiceException(\"Wrong throw mode!!! Third argument should be 'max' or 'sum'!\");\n } else if (this.getNumOfDices() < 1) {\n throw new DiceException(\"Wrong numeber of dices!!! Number of dices should equals 1 or more!\");\n } else if (this.getNumOfWalls() < 4) {\n throw new DiceException(\"Wrong numeber of walls!!! Number of walls should equals 4 or more!\");\n } else {\n if (mode.equals(\"sum\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n result += (generator.nextInt(this.getNumOfWalls()) + 1);\n }\n } else if (mode.equals(\"max\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n int buff = (generator.nextInt(this.getNumOfWalls()) + 1);\n if (this.result < buff) {\n this.result = buff;\n }\n }\n }\n }\n }",
"public int takeTurn(Dice theDice){\n \n this.turnCounter++;\n \n return(theDice.rollDice());\n \n }",
"public void roll()\r\n\t{\r\n\t\tRandom rand = new Random();\r\n\r\n\t\trollNumber = rand.nextInt(numOfSides) + 1;\r\n\t}",
"public int getDiceTotal()\r\n {\r\n return diceTotal;\r\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\t// rollButton was clicked\n\t\tif (e.getSource() == this.game.getRollButton()) {\n\t\t\t\t// roll all dice\n\t\t\t\tthis.game.rollAllDice();\n\t\t\t\n\t\t\t// field was clicked\n\t\t} else if (e.getSource() instanceof FieldE) {\n\t\t\tthis.game.enterPoints((FieldE) e.getSource());\n\t\t}\n\t\n\t}",
"public static int rollDice()\n\t{\n\t\tint roll = (int)(Math.random()*6)+1;\n\t\t\n\t\treturn roll;\n\n\t}",
"private int diceRoll(int sides) {\n return (int) ((Math.random() * sides) + 1);\n }",
"public void onRollAgainClick(View view) {\n rollDie();\n }",
"public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }",
"public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }",
"DiceRoll modifyRoll(DiceRoll roll, Die die);",
"public void haveGo(int roundsTaken)\n {\n int diceRolls = 0;\n boolean madeChoice = false;\n\n while(diceRolls <= 1){\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n boolean firstMove = false;\n boolean secondMove = true;\n\n if(diceRolls == 0){\n //Roll dice cleanly and print related information\n System.out.println(\"\\n\\t--------------------------\\n\\t\" + this.name + \"'s Go!\\n\\t--------------------------\\n\\nRoll One...\");\n diceRoll = dice.cleanRoll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n\n }\n else if(diceRolls == 1)\n {\n //Roll dice based on previous preferences\n System.out.println(\"\\nRoll Two...\");\n diceRoll = dice.roll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n secondMove = false;\n firstMove = true;\n }\n //Make first action\n while(!firstMove)\n {\n boolean repeat = false;\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,5);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n scorecard.update();\n scorer.update();\n gameFinisher.exitSequence(filename,name, diceRoll, saveString,roundsTaken, 1);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n*********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n firstMove = true;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"\\nRow to Fill...\");\n int category = GameManager.makeValidChoice(-1,14);\n scorer.findPossibilities(diceRoll, scorecard.getFreeCategories());\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) \n {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n\n }\n diceRolls = 2;\n firstMove = true;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n }\n }\n\n while(!secondMove)\n {\n boolean repeat = false;\n //Print Menu \n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\\n\\t5) Hold and Roll Dice\");\n System.out.println(\"\\t--------------\\n\");\n System.out.println(\"Enter Choice...\");\n\n int choice = GameManager.makeValidChoice(-1,6);\n\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString,roundsTaken, 2);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n else if(choice == 5)\n {\n //Get Holdings preferences from Player\n System.out.println(\"\\n\\t--------------------------\");\n System.out.println(\"\\tDice Holder\\n\\t-----\\n\\t[0) Leave [1) Hold\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(diceRoll);\n System.out.println(\"---------------\");\n System.out.print(\"[\" + diceRoll.get(0) + \"]\");\n boolean one = toHold();\n System.out.print(\"[\" + diceRoll.get(1) + \"]\");\n boolean two = toHold();\n System.out.print(\"[\" + diceRoll.get(2) + \"]\");\n boolean three = toHold();\n System.out.print(\"[\" + diceRoll.get(3) + \"]\");\n boolean four = toHold();\n System.out.print(\"[\" + diceRoll.get(4) + \"]\");\n boolean five = toHold();\n //Send Preferences to Dice()\n ArrayList<Boolean> newState = new ArrayList<Boolean>();\n newState.add(one);\n newState.add(two);\n newState.add(three);\n newState.add(four);\n newState.add(five);\n dice.setDiceHoldState(newState);\n System.out.println(\"\\n\\t--------------------------\\n\\tDice Held\\n\\t-----\\n\\tRolling Dice...\\n\\t--------------------------\");\n diceRolls++;\n secondMove = true;\n }\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n secondMove = true;\n madeChoice = false;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n repeat = false;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n\n }\n }\n }\n ArrayList<Integer> diceRoll = dice.roll(); \n while(!madeChoice)\n {\n System.out.println(\"\\nFinal Roll...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,4);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString, roundsTaken, 3);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n }\n\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n }\n }\n }",
"public void throwDice() {\r\n\t\tfor( DiceGroup diceGroup:dice.values() ) {\r\n\t\t\tdiceGroup.throwDice(); //.setResult( (int) Math.random()*die.getSize() + 1);\r\n\t\t}\r\n\t}",
"static public void showDice(List<Die> dice) {\n System.out.println(\"----Your Hand----\");\n for (var die : dice) {\n System.out.print(die.getNumberOnDie() + \" \");\n }\n System.out.println(\"\\n\");\n }",
"private void allowNewRoll(){\r\n\t\tdidBust = false;\r\n\t\tgameOver = false;\r\n\t\troll.setEnabled(true);\r\n\t\tsubmit.setEnabled(false);\r\n\t\tagain.setEnabled(false);\r\n\t\tnoMore.setEnabled(false);\r\n\t\tfor(int i = 0; i < rolls.length; i++){\r\n\t\t\trolls[i] = 0;\r\n\t\t\tselectedDice[i] = false;\r\n\t\t}\r\n\t\tstatusLabel.setText(\"Roll the dice!\");\r\n\t\tupdate();\r\n\t}",
"public void playRollingADie() {\n\t\tSystem.out.print(\"The pirates ask you to play 'Rolling a Die'. You have to predict what is the outcome. \" + \"\\n\" + \"You can choose between: \");\n\t\tArrayList<String> gameElements2 = new ArrayList<String>(3);\n\t\tgameElements2.add(\"Even\");\n\t\tgameElements2.add(\"Odd\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"(1) Even\");\n\t\t\tSystem.out.println(\"(2) Odd\");\n\t\t\ttry { \n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tint decision = game.determineWinnningRollingADie();\n\t\t\t\tint piratesThrows = game.getWhatPiratesThrowRD(decision, gameElements2.get(selectedAction-1));\n\t\t\t\tSystem.out.println(\"The die is showing \" + piratesThrows);\n\t\t\t\tif (decision == 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tint piratesDemand = game.getPiratesDemand();\n\t\t\t\t\tSystem.out.println(\"You lose! Pirates demands: \" + piratesDemand + \" coins\");\n\t\t\t\t\tif (game.checkPirateSatisfaction()) {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tint money = game.getMoney();\n\t\t\t\t\t\tgame.updateMoney(money * -1);\n\t\t\t\t\t\tgame.gameOver(\"You lose play rock paper scissor game! \\nthe pirate took all of your money and your items in your ship!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tSystem.out.println(\"You Win!! You can Continue your journey to your destination!\");\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public static int diceRoll() {\n\t\t\n\t\t//the outcome of the die is stored as an integer and returned\n\t\t\n\t\tint diceNumber = (int)((6 * (Math.random())) + 1);\n\t\treturn diceNumber;\n\t}",
"public void setSum(Dice dice1, Dice dice2) {\n sum = dice1.getValue() + dice2.getValue();\n }",
"int roll();",
"void roll(int noOfPins);",
"public int getDice(){\n\t\treturn diceValue;\n\t\t\n\t}",
"private void calculateButtonActionPerformed(ActionEvent evt) {\r\n\t\tlogger.info(\"Calculate button clicked\");\r\n\t\t// clear the text area before calculation.\r\n\t\toutputScoreTextArea.setText(\"\");\r\n\t\t// get the source of button\r\n\t\tObject source = evt.getSource();\r\n\t\tif (source == calcButton) {\r\n\t\t\tlogger.info(\"Initializing and starting the application...\");\r\n\t\t\tList<String> rollStringList = new ArrayList<String>();\r\n\t\t\t// Add the rolls to a List that will be evaluated. We choose a List so that\r\n\t\t\t// later if application need to be made for multiplayer then multiple Strings\r\n\t\t\t// can be passed\r\n\t\t\trollStringList.add(inputTextField.getText());\r\n\t\t\tlogger.debug(\"The roll getting passed is \" + rollStringList);\r\n\t\t\t// Initialize Kind of Objects we need to run this Game. We can choose different\r\n\t\t\t// Kind if we later wants to add Multiplayer game, with many Lines and many\r\n\t\t\t// Rounds\r\n\t\t\tGame game = new SinglePlayerGame();\r\n\t\t\tLine line = new TenRoundLine();\r\n\t\t\tRound round = new TwoRollRound();\r\n\t\t\tBowlingContext context = new BowlingContext(line, round, game);\r\n\t\t\t// Run the Game to evaluate Score\r\n\t\t\tList<Score> scoreList = game.evaluate(context, rollStringList);\r\n\t\t\t// Display Score on output textArea\r\n\t\t\tscoreList.stream().forEach(score -> {\r\n\t\t\t\toutputScoreTextArea.append(\"SCORE = \" + score.getScoreList().get(0) + \"\\n\");\r\n\t\t\t\toutputScoreTextArea.append(\"MESSAGE = \" + score.getMessage() + \"\\n\");\r\n\t\t\t\toutputScoreTextArea.append(\"SUCCESS= \" + score.isSuccess() + \"\\n\");\r\n\t\t\t});\r\n\t\t}\r\n\t}",
"public static String diceRoll () {\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Enter the number of sides for a pair of dice: \");\n String userInput = scanner.nextLine();\n int numberOfSides = Integer.parseInt(userInput);\n numberOfSides /= 2;\n\n boolean userAgain = true;\n\n do {\n\n double randomRollOne = Math.random() * numberOfSides + 1;\n double randomRollTwo = Math.random() * numberOfSides + 1;\n int diceOne = (int) randomRollOne;\n int diceTwo = (int) randomRollTwo;\n\n System.out.println(\"You rolled a \" + diceOne + \" and a \" + diceTwo + \".\");\n\n System.out.println(\"Do you want to roll again? y/n: \");\n String yesOrNo = scanner.nextLine();\n\n if (yesOrNo.equals(\"n\")) {\n userAgain = false;\n }\n\n } while (userAgain);\n\n return \"Goodbye.\";\n }",
"public void rollAllDices() {\n for(int i = 0; i < dicesList.size(); i++) {\n dicesList.get(i).roll();\n }\n }",
"public static void main(String[] args){\n if(args.length>0){\r\n //Create an array here in which all values stored are zero\r\n int[] valueOfRolls={0,0,0,0,0,0};\r\n //Convert input to int\r\n int amountOfRolls=Integer.parseInt(args[0]);\r\n //loop to control the spins, rolls by the amount of rolls user typed in\r\n for(int i=0; i<amountOfRolls;i++){\r\n //print the number for each random spin\r\n \tint randomSpin=(int)(Math.random()*6)+1;\r\n valueOfRolls[randomSpin-1]++;\r\n \r\n }\r\n //gets each value in the array and prints them out\r\n \r\n for(int i=0; i<6; i++){\r\n System.out.println( (i+1)+ \" was thrown \"+ valueOfRolls[i]+\" times.\");\r\n }\r\n }\r\n //executed if the user just types in \"java DiceTester\" in the command prompt\r\n else{\r\n System.out.print(\"Usage: java DiceTester [number of throws]\");\r\n }\r\n }",
"public void roll()\r\n\t{\r\n\t\tthis.value = rnd.nextInt(6) + 1;\r\n\t}",
"public static void main(String[] args)\n {\n Die dice_1 = new Die();\n Die dice_2 = new Die();\n Scanner in = new Scanner(System.in);\n\n while (true)\n {\n System.out.println(\"Time for some Craps!\");\n\n System.out.println(\"Hit [Enter] to roll both dice:\");\n in.nextLine();\n\n int roll_1 = dice_1.roll();\n int roll_2 = dice_2.roll();\n int totalroll = roll_1 + roll_2;\n System.out.println(\"You rolled a \" + roll_1 + \" and a \" + roll_2);\n System.out.println(\"Which combine for a total roll of \" + totalroll);\n\n // time to set up if statements to determine whether the player has won, lost, or still plays.\n\n if (totalroll == 7 || totalroll == 11)\n {\n System.out.println(\"Congrats! You won! :D \");\n }\n\n else if (totalroll == 2 || totalroll == 3 || totalroll == 12)\n {\n System.out.println(\"Sorry! You lost! :( \");\n } \n\n else\n {\n // we now need a point for the player to attempt to roll for\n int point = totalroll;\n\n // boolean needed here to keep the game continuous after the first roll\n boolean keepplaying = true;\n\n while(keepplaying) \n {\n // same code from above needed for the game to continue\n System.out.println(\"Hit [Enter] to roll both dice:\");\n in.nextLine();\n\n roll_1 = dice_1.roll();\n roll_2 = dice_2.roll();\n totalroll = roll_1 + roll_2;\n System.out.println(\"You rolled a \" + roll_1 + \" and a \" + roll_2);\n System.out.println(\"Which combine for a total roll of \" + totalroll);\n\n // now we check to see if they rolled the point\n if (totalroll == point)\n {\n System.out.println(\"You matched the point. You win! :D\");\n keepplaying = false;\n }\n\n else if (totalroll == 7)\n {\n System.out.println(\"You rolled a 7. You lost! :(\");\n keepplaying = false;\n } \n }\n } \n System.out.println(\"Play again?\");\n String playAgain = in.nextLine();\n if (playAgain.equals(\"\"))\n {\n }\n if (playAgain.substring(0,1).equals(\"n\"))\n {\n break;\n } \n }\n System.out.println(\"Thanks for playing Craps!\");\n }",
"void rollNumber(int d1, int d2);",
"public void rollStats() {\n\t\tRandom roll = new Random();\n\t\tint rolled;\n\t\tint sign;\n\t\t\n\t\t\n\t\trolled = roll.nextInt(4);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetMaxHealth(getMaxHealth() + rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t} else {\n\t\t\tsetMaxHealth(getMaxHealth() - rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetAttack(getAttack() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetAttack(getAttack() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetDefense(getDefense() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetDefense(getDefense() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetSpeed(getSpeed() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetSpeed(getSpeed() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t}",
"public void rollDice(int pIndex) {\n this.pIndex = pIndex;\n this.result = this.roll();\n this.isSix = this.result == 6;\n resetCoordinates();\n this.tickCounter=0;\n this.vel=1;\n this.diceRollCount++;\n }",
"public int sumDice(Die[] dice, int value){\n int subTotal = 0;\n\n // facevalue is getting the dice now\n for(Die die: dice){\n int facevalue = die.getFaceValue();\n\n // If facevalue equals to the value then subtotal will be returnable as long as there is a matched int\n if(facevalue == value){\n\n\n // subTotal will be greater or equals to faceValue then\n subTotal += facevalue;\n }}return subTotal;}",
"public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }",
"public ArrayList<Dice> rollAllDice()\n {\n ArrayList<Dice> array = getDiceArray();\n for(Dice dice : array)\n {\n if(dice.getReroll())\n {\n dice.rollDice();\n dice.setReroll(false, \"\"); //resets all reroll flags to false\n }\n }\n \n return array;\n }",
"public void buttonRoll() {\n\t\troll2(player1, player2);\n\t\t}",
"public static void main(String[] args) {\n CDice dice = new CDice();\n dice.init(1, 2, 3, 4, 5, 6);\n int random = dice.roll();\n System.out.println(\"dice roll side number: \"+random);\n }",
"private void nextTurnRoll() {\n Log.d(\"nextTurnRoll\", \"next player please roll\");\n m_currentTurn++;\n if(m_currentTurn >= m_numPlayers){\n m_currentTurn = 0;\n }\n convertTextToSpeech(players.get(m_currentTurn).getName() + \"please roll the dice\");\n }",
"public int roll(int roll) {\n \t\tappendAction(R.string.player_roll, Integer.toString(roll));\n \t\tboard.roll(roll);\n \n \t\treturn roll;\n \t}",
"private int rollDie() {\r\n final SecureRandom random = new SecureRandom();\r\n return random.nextInt(6 - 1) + 1;\r\n }",
"public int diceValue()\r\n\t{\r\n\t\treturn rollNumber;\r\n\t}",
"public int roll_the_dice() {\n Random r = new Random();\n int number = r.nextInt(6) + 1;\n\n return number;\n }",
"public static void main(String[] args) {\n\t\tRandom coiso = new Random();\n\t\tList<Integer> stats = new ArrayList<Integer>();\n\t\tList<Integer> rolls = new ArrayList<Integer>();\n\t\tint soma = 0;\n\t\t\n\t\t\n\t\t/*for (int i=0;i<10;i++)\n\t\t\tSystem.out.println(1+coiso.nextInt(19));*/\n\t\tfor (int j=0;j<6;j++) {\n\t\t\tfor (int s=0;s<4;s++) {\n\t\t\t\trolls.add(1+coiso.nextInt(6));\n\t\t\t}\n\t\t\trolls.sort(new Comparator<Integer>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\trolls.remove(0);\n\t\t\tfor (int v=0;v<3;v++)\n\t\t\t\tsoma += rolls.get(v);\n\t\t\tstats.add(soma);\n\t\t\trolls.clear();\n\t\t\tsoma=0;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(stats);\n\t\tfor (int i=0;i<6;i++)\n\t\t\tsoma+=stats.get(i);\n\t\tSystem.out.println(soma);\n\n\t}",
"public void showDiceResult() {\n int number1 = getRandomsNumber();\n int number2 = getRandomsNumber();\n // remove some Nodes\n enterFirstPlayerName.getChildren().remove(forFirstAndSecond);\n enterFirstPlayerName.getChildren().remove(writeNote);\n // setting som new attributes\n diceResultFirstPlayer.setText(\"The First Player \" + firstName.toUpperCase() + \" : \" + \" Got \" + number1);\n diceResultFirstPlayer.setFont(Font.font(\"Arial\", FontWeight.BOLD, 32));\n diceResultSecondPlayer.setText(\"The Second Player \" + secondName.toUpperCase() + \" : \" + \" Got \" + number2);\n diceResultSecondPlayer.setFont(Font.font(\"Arial\", FontWeight.BOLD, 32));\n gotToFightBoard.setPadding(new Insets(10, 30, 10, 30));\n diceResult.setFont(Font.font(\"Arial\", FontWeight.BOLD, 40));\n vBoxForDiceResult.setMargin(diceResultFirstPlayer, new Insets(10, 0, 15, 0));\n vBoxForDiceResult.setMargin(diceResultSecondPlayer, new Insets(30, 0, 15, 0));\n vBoxForDiceResult.setMargin(diceResult, new Insets(30, 0, 20, 0));\n vBoxForDiceResult.getChildren().addAll(diceResultFirstPlayer, diceResultSecondPlayer, diceResult, gotToFightBoard);\n vBoxForDiceResult.setAlignment(Pos.BASELINE_CENTER);\n enterFirstPlayerName.setCenter(vBoxForDiceResult);\n // select the player from our function\n chooseWhoStartsFirst(number1,number2);\n gotToFightBoard.setOnAction(new EventHandler() {\n public void handle(Event event) {\n //Go to fightBoard\n int number = chooseWhoStartsFirst(number1,number2);\n shootEachOther(number);\n }\n });\n }",
"float getRoll();",
"float getRoll();",
"public static void main(String[] args) {\n\t\tRandom ricoDude = new Random();\r\n\t\tint x = ricoDude.nextInt(20) + 1;\r\n\t\t// the dice will have arange of 0-5 to make it 1-6 , + 1 to the end of it\r\n\t\t\r\n\t\tSystem.out.println(\"You rolled a: \" + x);\r\n\t\tint a = 1, b= 2,k;\r\n\t\tk = a + b + a++ + b++;\r\n\t\tSystem.out.println(k);\r\n\t\t\r\n\t}",
"@Override\n public void initDiceRoller() {\n debug(\"initDiceRoller\");\n\n setContentView(getDiceRollerLayout());\n setDiceRollerButtons();\n }",
"public void animateDice() {\n pos += vel*tickCounter + ACC*tickCounter*tickCounter/2;\n if(pos<(TILE_SIZE*15-DICE_SIZE)/2){\n if(this.pIndex%3==0)\n diceImg = diceAnimation[tickCounter%diceAnimation.length];\n else\n diceImg = diceAnimation[diceAnimation.length-1-(tickCounter%diceAnimation.length)];\n tickCounter++;\n vel += ACC;}\n else{\n diceImg = dice[result-1];\n pos=(TILE_SIZE*15-DICE_SIZE)/2;}\n setCoordinates(pos);\n //System.out.println(\"dice pos \"+pos);\n }",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount2;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount2 );\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint dice1, dice2;\n\t\tint sum;\n\t\t\n\t\twhile (true)\n\t\t{\n\t\t\tdice1 = (int)(Math.random()*6) +1;\n\t\t\tdice2 = (int)(Math.random()*6) +1;\n\t\t\tsum = dice1 + dice2;\n\t\t\t\n\t\t\tif (sum == 5)\n\t\t\t{break;}\n\t\t\t\n\t\t\tSystem.out.printf(\"Roll the dice! Now we've got %d, %d. The summation is %d.\\n\", dice1, dice2, sum);\n\t\t}\n\t\n\t\tSystem.out.printf(\"Roll the dice! Now we've got %d, %d. The summation is %d.\\n\", dice1, dice2, sum);\n\t\tSystem.out.println(\"Now we have 5, and it's completed.\");\n\t}",
"private void getSum() {\n double sum = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n sum = sum + parseDouble(remindersTable.getValueAt(i, 3).toString());\n }\n String rounded = String.format(\"%.2f\", sum);\n ledgerTxtField.setText(rounded);\n }",
"public void reRoll() {\n this.result = this.roll();\n this.isSix = this.result == 6;\n }"
]
| [
"0.73485994",
"0.7126785",
"0.70847934",
"0.7040428",
"0.6957334",
"0.67824155",
"0.674745",
"0.67449296",
"0.6719182",
"0.67033535",
"0.6668928",
"0.6625324",
"0.6587951",
"0.6568244",
"0.65185094",
"0.65079075",
"0.6499884",
"0.64746916",
"0.64534366",
"0.6450396",
"0.6443001",
"0.64350766",
"0.6431735",
"0.6387283",
"0.63865954",
"0.63714296",
"0.63542527",
"0.63365895",
"0.6299304",
"0.6281409",
"0.6241597",
"0.6191215",
"0.61764663",
"0.6164428",
"0.61540055",
"0.6136406",
"0.6119949",
"0.61091477",
"0.60959643",
"0.60958534",
"0.6095248",
"0.6090318",
"0.6041773",
"0.60357904",
"0.60313064",
"0.6028446",
"0.602426",
"0.6018434",
"0.6017599",
"0.60012025",
"0.59992933",
"0.59875184",
"0.5950059",
"0.59489655",
"0.59368414",
"0.5921055",
"0.5899474",
"0.5898346",
"0.5896285",
"0.5886637",
"0.58630437",
"0.5847746",
"0.58464617",
"0.5836965",
"0.5828355",
"0.58198094",
"0.58189225",
"0.5806607",
"0.5779517",
"0.5768373",
"0.5758734",
"0.57503545",
"0.57439625",
"0.5740179",
"0.57381153",
"0.5737952",
"0.5728214",
"0.57090753",
"0.5707185",
"0.5705154",
"0.56958646",
"0.56958574",
"0.5690626",
"0.5679175",
"0.567367",
"0.56699306",
"0.5659827",
"0.563452",
"0.56319106",
"0.56318927",
"0.5631407",
"0.56235045",
"0.56235045",
"0.5599535",
"0.5588404",
"0.5585276",
"0.5584413",
"0.5574767",
"0.5557602",
"0.5556109"
]
| 0.72825867 | 1 |
end method rollDice determine game status and display appropriate message in status bar | public void displayMessage()
{
// game should continue
if ( gameStatus == CONTINUE )
showStatus( "Roll again." );
// game won or lost
else {
if ( gameStatus == WON )
showStatus( "Player wins. " +
"Click Roll Dice to play again." );
else
showStatus( "Player loses. " +
"Click Roll Dice to play again." );
// next roll is first roll of new game
firstRoll = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }",
"void rollDice();",
"private void reactToRoll(){\r\n\t\troll.setEnabled(false);\r\n\t\tsubmit.setEnabled(true);\r\n\t\tagain.setEnabled(false);\r\n\t\tnoMore.setEnabled(false);\r\n\t\tif(!didBust){\r\n\t\t\tstatusLabel.setText(\"Choose your first dice pair!\");\r\n\t\t} else {\r\n\t\t\tstatusLabel.setText(\"Oh no! Better luck next time.\");\r\n\t\t\tsubmit.setText(\"Oops! Busted!\");\r\n\t\t}\r\n\t\tupdate();\r\n\t}",
"public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}",
"private void afterRoll() {\n if (die.getNumber() == 1) {\n round_score = 0;\n round_score_view.setText(String.valueOf(round_score));\n game.changeTurn();\n String label;\n if (game.isPlayer_turn()) {\n game.incrementRound();\n label = \"Round \" + game.getRound() + \" - Player's Turn\";\n }\n else {\n label = \"Round \" + game.getRound() + \" - Banker's Turn\";\n }\n round_label.setText(label);\n }\n else {\n round_score += die.getNumber();\n round_score_view.setText(String.valueOf(round_score));\n }\n if (!game.isPlayer_turn())\n doBankTurn();\n }",
"public int rollDice();",
"public void actionPerformed( ActionEvent actionEvent )\n{\n if ( firstRoll ) { \n sumOfDice = rollDice(); // roll dice \n wonMoney.setText(\"\"+money);\n switch ( sumOfDice ) {\n\n // win on first roll\n case 7: case 11: \n gameStatus = WON;\n money=money+40;\n wonMoney.setText(\"\"+money);\n pointField.setText( \"\" );\n // clear point field\n break;\n\n // lose on first roll\n case 2: case 3: case 12: \n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n // clear point field\n break;\n\n // remember point\n default: \n gameStatus = CONTINUE;\n myPoint = sumOfDice;\n pointField.setText( Integer.toString( myPoint ) );\n money=money-20;\n if(money<0)\n {\tmoney=0;\n \t wonMoney.setText(\"\"+money);\n \t rollButton.setEnabled(false);\n \t }\n else wonMoney.setText(\"\"+money);\n firstRoll = false;\n break;\n\n } // end switch structure\n\n } // end if structure body\n\n\n // subsequent roll of dice\n else {\n sumOfDice = rollDice(); // roll dice\n \n // determine game status\n if ( sumOfDice == myPoint ){ // win by making point\n gameStatus = WON;\n money=money+60;\n wonMoney.setText(\"\"+money);\n }\n else if(sumOfDice == 7){\n // lose by rolling 7\n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n \n \n }\n \n money=money-20;\n wonMoney.setText(\"\"+money);\n if(money==0){\n\t gameStatus = LOST;\n\t rollButton.setEnabled(false);\n }\n if(money<0)\n {\tmoney=0;\n \twonMoney.setText(\"\"+money);\n \t\n \t rollButton.setEnabled(false);\n \t }\n \n \n }\n // display message indicating game status\n displayMessage();\n\n}",
"private void otherRolls() {\n\t\t// program tells that player should select dices to re-roll.\n\t\tdisplay.printMessage(\"Select the dice you wish to re-roll and click \"\n\t\t\t\t+ '\\\"' + \"Roll Again\" + '\\\"');\n\t\t// program will wait until player clicks \"roll again\" button.\n\t\tdisplay.waitForPlayerToSelectDice();\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tif (display.isDieSelected(i) == true) {\n\t\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\t\tdiceResults[i] = dice;\n\t\t\t}\n\t\t}\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}",
"private void rollDie() {\n if (mTimer != null) {\n mTimer.cancel();\n }\n mTimer = new CountDownTimer(1000, 100) {\n public void onTick(long millisUntilFinished) {\n die.roll();\n showDice();\n }\n public void onFinish() {\n afterRoll();\n }\n }.start();\n }",
"public void comeOutRoll(Dice dice1, Dice dice2) {\n\n setExit(false);\n System.out.println(\"***This is the come out roll***\" +\n \"\\nIf you roll 7 or 11 you win.\\nBut if you roll 2,3 or 12\" +\n \" you lose.\");\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if (winCon.contains(roll)) player wins, npcs that bet 1 wins\n\n if (sum == OUT7 || sum == 11) {\n player.playerWin();\n System.out.println(\"Your total is \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n setExit(true);\n\n }\n // if (failCon.contains(roll)) player loses, npcs with bet 2 wins\n else if (sum == 2 || sum == 3 || sum == 12) {\n player.playerLose();\n System.out.println(\"Your total is \" + sum + LMESSAGE + \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n\n setExit(true);\n\n }\n // else set pN // cannot be winCon or failCon\n else {\n System.out.println(\"\\nYour total is \" + sum + \" this is your point number, hit this to win\");\n setPN(sum);\n }\n }",
"public abstract int rollDice();",
"public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }",
"@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}",
"public void rollStats() {\n\t\tRandom roll = new Random();\n\t\tint rolled;\n\t\tint sign;\n\t\t\n\t\t\n\t\trolled = roll.nextInt(4);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetMaxHealth(getMaxHealth() + rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t} else {\n\t\t\tsetMaxHealth(getMaxHealth() - rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetAttack(getAttack() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetAttack(getAttack() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetDefense(getDefense() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetDefense(getDefense() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetSpeed(getSpeed() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetSpeed(getSpeed() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t}",
"private void allowNewRoll(){\r\n\t\tdidBust = false;\r\n\t\tgameOver = false;\r\n\t\troll.setEnabled(true);\r\n\t\tsubmit.setEnabled(false);\r\n\t\tagain.setEnabled(false);\r\n\t\tnoMore.setEnabled(false);\r\n\t\tfor(int i = 0; i < rolls.length; i++){\r\n\t\t\trolls[i] = 0;\r\n\t\t\tselectedDice[i] = false;\r\n\t\t}\r\n\t\tstatusLabel.setText(\"Roll the dice!\");\r\n\t\tupdate();\r\n\t}",
"public int roll(int roll) {\n \t\tappendAction(R.string.player_roll, Integer.toString(roll));\n \t\tboard.roll(roll);\n \n \t\treturn roll;\n \t}",
"public void playRollingADie() {\n\t\tSystem.out.print(\"The pirates ask you to play 'Rolling a Die'. You have to predict what is the outcome. \" + \"\\n\" + \"You can choose between: \");\n\t\tArrayList<String> gameElements2 = new ArrayList<String>(3);\n\t\tgameElements2.add(\"Even\");\n\t\tgameElements2.add(\"Odd\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"(1) Even\");\n\t\t\tSystem.out.println(\"(2) Odd\");\n\t\t\ttry { \n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tint decision = game.determineWinnningRollingADie();\n\t\t\t\tint piratesThrows = game.getWhatPiratesThrowRD(decision, gameElements2.get(selectedAction-1));\n\t\t\t\tSystem.out.println(\"The die is showing \" + piratesThrows);\n\t\t\t\tif (decision == 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tint piratesDemand = game.getPiratesDemand();\n\t\t\t\t\tSystem.out.println(\"You lose! Pirates demands: \" + piratesDemand + \" coins\");\n\t\t\t\t\tif (game.checkPirateSatisfaction()) {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tint money = game.getMoney();\n\t\t\t\t\t\tgame.updateMoney(money * -1);\n\t\t\t\t\t\tgame.gameOver(\"You lose play rock paper scissor game! \\nthe pirate took all of your money and your items in your ship!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tSystem.out.println(\"You Win!! You can Continue your journey to your destination!\");\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}",
"private void nextTurnRoll() {\n Log.d(\"nextTurnRoll\", \"next player please roll\");\n m_currentTurn++;\n if(m_currentTurn >= m_numPlayers){\n m_currentTurn = 0;\n }\n convertTextToSpeech(players.get(m_currentTurn).getName() + \"please roll the dice\");\n }",
"public int takeTurn(Dice theDice){\n \n this.turnCounter++;\n \n return(theDice.rollDice());\n \n }",
"public void rollDices(Dice dice1, Dice dice2) {\n\n while (true) {\n // click to roll\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if(roll == pN)\n // player and npcs that bet 1 win\n if (sum == pN) {\n player.playerWin();\n System.out.println(\"You rolled \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n break;\n }\n // if(roll == out7)\n else if (sum == OUT7) {\n player.playerLose();\n System.out.println(\"You hit the out 7.\" + LMESSAGE + \"\\nYou have a total of \" + player.getWins()\n + \" wins and \" + player.getLoses() + \" loses.\");\n\n break;\n } else {\n System.out.println(\"\\nYour total roll is \" + sum + \"\\nYou need to hit \" + pN +\n \" to win.\" + \"\\n\\nContinue rolling\\n\");\n }\n\n\n }\n\n }",
"private void roll2(DiceModel player1, DiceModel player2) {\n\t\t\n\t\tint random;\t\n\t\t\n\t\t// enables the dice to be kept\n\t\tenableDice();\n\t\t\n\t\t// reset text if player previously failed to select a die\n\t\tif (roundChanger == 2) {\n\t\t\ttextAreaInstructions.setText(rollToBeat);\n\t\t} else {\n \ttextAreaInstructions.setText(\"Start by clicking\" + \"\\n\" + \"Roll Dice button!\");\n \t}\n\t\t\n\t\t// display round number\n\t\ttextFieldRound.setText(Integer.toString(round));\n\t\t\n\t\t// if we are on the first roller, count up rolls till they end turn\n\t\tif (roundChanger == 1) {\n\t\t\trollsTaken = rollsTaken + 1;\n\t\t}\n\t\t\n\t\t// turn should increment for both rollers\n\t\tturn = turn + 1;\n\t\t\n\t\t// if all three die are selected then end turn\n\t\tif (togglebtnD1.isSelected() == true && togglebtnD2.isSelected() == true &&\n\t\t\t\ttogglebtnD3.isSelected() == true) {\n\t\t\tendTurn();\n\t\t}\n\t\t\n\t\t// determines who has the current roll\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tString stringPlayer1 = \"Player1\";\n\t\t\n\t\t// enforces player requirement of having at least 1 die selected per roll\n\t\tif (turn != 1 && togglebtnD1.isSelected() == false && togglebtnD2.isSelected() == false &&\n \ttogglebtnD3.isSelected() == false) {\n \t\tif (roundChanger == 1) {\n \t\tturn = turn - 1;\n \t\trollsTaken = rollsTaken - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t} else if (roundChanger == 2 && turn == 0){\n \t\t\ttextAreaInstructions.setText(rollToBeat);\n \t\t}else {\n \t\tturn = turn - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t}\n \t} else {\n\t\t\t// only get new values for dice that haven't been kept\t\t\n\t\t\tif (togglebtnD1.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\t displayDie(random, togglebtnD1);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie1(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie1(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD2.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD2);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie2(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie2(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD3.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD3);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie3(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie3(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\n\t\t\t// limit second rollers turns to as many turns as first roller had\n\t\t\tif (turn == rollsTaken && roundChanger == 2) {\n\t\t\t\tendTurn();\n\t\t\t}\n\n\t\t\tif (turn == 3) { \n\t\t\t\tendTurn();\n\t\t\t}\n\t\t}\t\n\t\n\t}",
"public void rollDice() {\n try {\n if (numOfDices != Integer.parseInt(numOfDicesText.getText().toString())) {\n init();\n }\n }\n catch (Exception e) {\n System.out.println(e);\n numOfDicesText.setText(\"1\");\n init();\n }\n int rolledNumber;\n for (int i = 0; i < numOfDices; i++) {\n rolledNumber = dices.get(i).roll();\n textViews.get(i).setText(\"Dice \" + (i+1) + \" rolled a \" + rolledNumber);\n imageViews.get(i).setImageBitmap(DiceImages.getImage(rolledNumber));\n }\n }",
"public static void main(String[] args)\n {\n Die dice_1 = new Die();\n Die dice_2 = new Die();\n Scanner in = new Scanner(System.in);\n\n while (true)\n {\n System.out.println(\"Time for some Craps!\");\n\n System.out.println(\"Hit [Enter] to roll both dice:\");\n in.nextLine();\n\n int roll_1 = dice_1.roll();\n int roll_2 = dice_2.roll();\n int totalroll = roll_1 + roll_2;\n System.out.println(\"You rolled a \" + roll_1 + \" and a \" + roll_2);\n System.out.println(\"Which combine for a total roll of \" + totalroll);\n\n // time to set up if statements to determine whether the player has won, lost, or still plays.\n\n if (totalroll == 7 || totalroll == 11)\n {\n System.out.println(\"Congrats! You won! :D \");\n }\n\n else if (totalroll == 2 || totalroll == 3 || totalroll == 12)\n {\n System.out.println(\"Sorry! You lost! :( \");\n } \n\n else\n {\n // we now need a point for the player to attempt to roll for\n int point = totalroll;\n\n // boolean needed here to keep the game continuous after the first roll\n boolean keepplaying = true;\n\n while(keepplaying) \n {\n // same code from above needed for the game to continue\n System.out.println(\"Hit [Enter] to roll both dice:\");\n in.nextLine();\n\n roll_1 = dice_1.roll();\n roll_2 = dice_2.roll();\n totalroll = roll_1 + roll_2;\n System.out.println(\"You rolled a \" + roll_1 + \" and a \" + roll_2);\n System.out.println(\"Which combine for a total roll of \" + totalroll);\n\n // now we check to see if they rolled the point\n if (totalroll == point)\n {\n System.out.println(\"You matched the point. You win! :D\");\n keepplaying = false;\n }\n\n else if (totalroll == 7)\n {\n System.out.println(\"You rolled a 7. You lost! :(\");\n keepplaying = false;\n } \n }\n } \n System.out.println(\"Play again?\");\n String playAgain = in.nextLine();\n if (playAgain.equals(\"\"))\n {\n }\n if (playAgain.substring(0,1).equals(\"n\"))\n {\n break;\n } \n }\n System.out.println(\"Thanks for playing Craps!\");\n }",
"public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }",
"public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }",
"static void UniversalShake() {\n if (!Sounds.getIsMute()) diceShakeSound.start();\n\n diceNum = GameFunctions.rollDice(\"Pigdice\", dice);\n\n if (diceNum == 1) {\n if (playerTurn == 1) {\n endTurn(currentScorePlayer1);\n } else {\n endTurn(currentScorePlayer2);\n }\n } else {\n if (playerTurn == 1)\n currentScorePlayer1.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer1.getText().toString()) + diceNum));\n\n else\n currentScorePlayer2.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer2.getText().toString()) + diceNum));\n }\n }",
"public int roll(int dices){\n int faces[] = new int[dices];\n int total = 0;\n Dice dice = new Dice();\n for(int i = 0; i < dices; i++){\n faces[i] = (dice.rand.nextInt(6) + 1);\n }\n for(int i = 0; i < faces.length-1; i++){\n if(faces[i] != faces[i+1]){\n this.isDouble = false;\n break;\n }\n else{\n this.isDouble = true;\n }\n }\n if(this.isDouble == true){\n this.twiceCounter++;\n }\n for(int i = 1; i < faces.length+1; i++){\n System.out.print(\"The \" + i + \". dice: \" + faces[i-1] + \" \");\n total += faces[i-1];\n }\n System.out.println(\" and the sum is \" + total);\n\n return total;\n }",
"public void checkResult(){\n\t\tif(throwNum == 0){\n\t\t\tthis.firstThrow = this.sumOfDice;\n\t\t}\n\n\t\tif((this.sumOfDice == 7 || this.sumOfDice==11) && throwNum==0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse if(this.sumOfDice ==2 || this.sumOfDice== 3 ||this.sumOfDice==12){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.game == gameStatus.CONTINUE && this.sumOfDice == 7)){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.sumOfDice== this.firstThrow) && throwNum!=0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse{\n\t\t\tthis.game = gameStatus.CONTINUE;\n\t\t}\n\t}",
"public void haveGo(int roundsTaken)\n {\n int diceRolls = 0;\n boolean madeChoice = false;\n\n while(diceRolls <= 1){\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n boolean firstMove = false;\n boolean secondMove = true;\n\n if(diceRolls == 0){\n //Roll dice cleanly and print related information\n System.out.println(\"\\n\\t--------------------------\\n\\t\" + this.name + \"'s Go!\\n\\t--------------------------\\n\\nRoll One...\");\n diceRoll = dice.cleanRoll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n\n }\n else if(diceRolls == 1)\n {\n //Roll dice based on previous preferences\n System.out.println(\"\\nRoll Two...\");\n diceRoll = dice.roll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n secondMove = false;\n firstMove = true;\n }\n //Make first action\n while(!firstMove)\n {\n boolean repeat = false;\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,5);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n scorecard.update();\n scorer.update();\n gameFinisher.exitSequence(filename,name, diceRoll, saveString,roundsTaken, 1);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n*********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n firstMove = true;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"\\nRow to Fill...\");\n int category = GameManager.makeValidChoice(-1,14);\n scorer.findPossibilities(diceRoll, scorecard.getFreeCategories());\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) \n {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n\n }\n diceRolls = 2;\n firstMove = true;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n }\n }\n\n while(!secondMove)\n {\n boolean repeat = false;\n //Print Menu \n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\\n\\t5) Hold and Roll Dice\");\n System.out.println(\"\\t--------------\\n\");\n System.out.println(\"Enter Choice...\");\n\n int choice = GameManager.makeValidChoice(-1,6);\n\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString,roundsTaken, 2);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n else if(choice == 5)\n {\n //Get Holdings preferences from Player\n System.out.println(\"\\n\\t--------------------------\");\n System.out.println(\"\\tDice Holder\\n\\t-----\\n\\t[0) Leave [1) Hold\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(diceRoll);\n System.out.println(\"---------------\");\n System.out.print(\"[\" + diceRoll.get(0) + \"]\");\n boolean one = toHold();\n System.out.print(\"[\" + diceRoll.get(1) + \"]\");\n boolean two = toHold();\n System.out.print(\"[\" + diceRoll.get(2) + \"]\");\n boolean three = toHold();\n System.out.print(\"[\" + diceRoll.get(3) + \"]\");\n boolean four = toHold();\n System.out.print(\"[\" + diceRoll.get(4) + \"]\");\n boolean five = toHold();\n //Send Preferences to Dice()\n ArrayList<Boolean> newState = new ArrayList<Boolean>();\n newState.add(one);\n newState.add(two);\n newState.add(three);\n newState.add(four);\n newState.add(five);\n dice.setDiceHoldState(newState);\n System.out.println(\"\\n\\t--------------------------\\n\\tDice Held\\n\\t-----\\n\\tRolling Dice...\\n\\t--------------------------\");\n diceRolls++;\n secondMove = true;\n }\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n secondMove = true;\n madeChoice = false;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n repeat = false;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n\n }\n }\n }\n ArrayList<Integer> diceRoll = dice.roll(); \n while(!madeChoice)\n {\n System.out.println(\"\\nFinal Roll...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,4);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString, roundsTaken, 3);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n }\n\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n }\n }\n }",
"public void updateDice() {\n keepAll = true;\n for (JToggleButton die : diceButtons) { // check to see if the user wants to keep all of their dice\n if (!die.isSelected()) {\n keepAll = false;\n break;\n }\n }\n if (player.getCurrentTurn() <= player.getNumOfTurns() && !keepAll) { // reroll\n for (int i = 0; i < player.getPlayerHand().getSizeOfHand(); i++) {\n if (!diceButtons.get(i).isSelected())\n player.rollNewDie(i);\n diceButtons.get(i).setText(String.valueOf(player.getPlayerHand().getHand().get(i).getSideUp()));\n diceButtons.get(i).setSelected(false);\n diceImages.get(i).setIcon(new ImageIcon(player.getPlayerHand().getHand().get(i).getSideUp()+\"up.png\"));\n diceImages.get(i).setSelected(false);\n }\n player.setCurrentTurn(player.getCurrentTurn() + 1);\n setVisible(true);\n if (player.getNumOfTurns()+1 == player.getCurrentTurn() || player.getNumOfTurns() == 1) {\n makeScoringOptions();\n }\n }\n else {\n makeScoringOptions(); // go to scoring options frame\n }\n }",
"private void firstRoll(int playerName) {\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\tdiceResults[i] = dice;\n\t\t}\n\t\t// program will tell witch players turn it is.\n\t\tdisplay.printMessage(playerNames[playerName - 1]\n\t\t\t\t+ \"'s turn! Click the \" + '\\\"' + \"Roll Dice\" + '\\\"'\n\t\t\t\t+ \" button to roll the dice.\");\n\t\t// program will wait until player clicks \"roll dice\" button.\n\t\tdisplay.waitForPlayerToClickRoll(playerName);\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}",
"public void rollDie(){\r\n\t\tthis.score = score + die.roll();\r\n\t}",
"private void rollButtonClicked()\n {\n try\n {\n //Retrieve the user's values from the input areas and use them to roll dice\n //then display the result to the user\n lblRollResult.setText(dice.roll(Integer.parseInt(txtNumber.getText()), Integer.parseInt(txtDie.getText()), Integer.parseInt(txtBonus.getText()))+\"\");\n }\n catch (NumberFormatException e)\n {\n //If any of the user's input aren't a number display \"ERROR\" where the result would be\n lblRollResult.setText(\"ERROR\");\n }\n }",
"public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n die1Rand = (int)(Math.random()*6) + 1;\n die2Rand = (int)(Math.random()*6) + 1;\n }",
"private void endTurn() {\n\t\t\n\t\tif (roundChanger == 1) {\n\t\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3();\n\t\t\t} else {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3();\n\t\t\t} \n\t\t\tchangeCurrentPlayerText();\n\t\t\tturn = 0;\n\t\t\troundChanger = 2;\n\t\t} else {\n\t\t\tString winningPlayer = calculateScore(player1, player2);\n\t\t\ttextFieldCurrentPlayer.setText(winningPlayer);\n\t\t\troundChanger = 1;\n\t\t\trollsTaken = 0;\n\t\t\tround = round + 1;\n\t\t\ttextFieldPlayerOneScore.setText(Integer.toString(player1.getPoints()));\n\t\t\ttextFieldPlayerTwoScore.setText(Integer.toString(player2.getPoints()));\n\t\t\ttextAreaInstructions.setText(\"Try to get the highest roll possible!\");\n\t\t\tcheckForGameOver();\n\t\t}\n\t\ttogglebtnD1.setSelected(false);\n\t\ttogglebtnD2.setSelected(false);\n\t\ttogglebtnD3.setSelected(false);\n\t\tdisableDice();\n\t\tturn = 0;\n\t}",
"int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }",
"public abstract boolean isRolling(int turnTotal, int opponentScore);",
"@Override\n public void onRoll(Die die, RollData rolls, Exception exception) {\n super.onRoll(die, rolls, exception);\n\n Log.d(TAG, \"Roll: \" + rolls.face);\n\n final int face = rolls.face;\n\n Player currentPlayer = players.get(m_currentTurn);\n int pos = currentPlayer.getCurrentPosition();\n\n if(pos+face <= 8){\n String number = String.valueOf(pos+face);\n moveMotor(number);\n }\n\n player = (TextView) findViewById(R.id.player);\n if(m_manageFunds) {\n funds = (TextView) findViewById(R.id.funds);\n }\n currentPosition = (TextView) findViewById(R.id.currentPosition);\n rollResult = (TextView) findViewById(R.id.rollResult);\n updatedPosition = (TextView) findViewById(R.id.updatedPosition);\n locationType = (TextView) findViewById(R.id.locationType);\n recognizedSpeech = (TextView) findViewById(R.id.recognizedSpeech);\n\n GamePlay.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n String method = \"onRoll\";\n\n Player currentPlayer = players.get(m_currentTurn);\n int pos = currentPlayer.getCurrentPosition();\n player.setText(currentPlayer.getName());\n\n Log.d(method, \"*****IT IS \" + currentPlayer.getName().toUpperCase()\n + \"'S TURN*****\");\n Log.d(method, \"Current Position:\" + pos + \", \" +\n m_board.getSquare(pos).getName());\n\n if(m_manageFunds) {\n Log.d(method, \"Current Funds: \" + String.valueOf(currentPlayer.getMoney()));\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n }\n\n currentPosition.setText(\"Position before dice roll \" + pos + \", \" +\n m_board.getSquare(pos).getName());\n\n rollResult.setText(\"\" + face);\n\n updatedPosition.setText(\"Updated Position:\");\n\n locationType.setText(\"\");\n\n recognizedSpeech.setText(\"\");\n\n if (currentPlayer.getJail()) {\n jailRoll(face, currentPlayer);\n } else {\n normalRoll(face, pos, currentPlayer);\n }\n }\n });\n }",
"public String rollResult() {\n\t\treturn String.format(\"Your rolled a %s and a %s, giving a sum of %s\", die1.getFaceValue(), die2.getFaceValue(),\n\t\t\t\tsumOfDies());\n\t}",
"public void actionPerformed(ActionEvent arg0) \n\t\t\t{\n\t\t\t\tif (btnPlay.getText().equals(\"Come-out Roll\"))\n\t\t\t\t{\n\t\t\t\t\t// roll dice\n\t\t\t\t\td1.roll();\n\t\t\t\t\td2.roll();\n\t\t\t\t\ttotalRolls++;\n\t\t\t\t\t\n\t\t\t\t\t// assign dice numbers to variables\n\t\t\t\t\tint num1 = d1.getValue();\n\t\t\t\t\tint num2 = d2.getValue();\n\t\t\t\t\t\n\t\t\t\t\t// put dice numbers in text boxes\n\t\t\t\t\ttxtDie1.setText(Integer.toString(num1));\n\t\t\t\t\ttxtDie2.setText(Integer.toString(num2));\n\t\t\t\t\t\n\t\t\t\t\t//initially set the point value box and label invisible\n\t\t\t\t\ttxtPointValue.setVisible(false);\n\t\t\t\t\tlblPointValue.setVisible(false);\n\t\t\t\t\t\n\t\t\t\t\t// if roll equals 2, 3, or 12.....Lose and reset\n\t\t\t\t\tif (num1 + num2 == 2 || num1 + num2 == 3 || num1 + num2 == 12)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Loser!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t// if roll equals 7 or 11...Win and reset\n\t\t\t\t\telse if (num1 + num2 == 7 || num1 + num2 == 11)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Winner!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\ttotalWins++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t//If neither win nor lose on first roll.....assign point value to text box and move on\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tbtnPlay.setText(\"Point Roll\");\n\t\t\t\t\t\tlblMessage.setText(\"Game in Progress...\");\n\t\t\t\t\t\tpointValue = num1 + num2;\n\t\t\t\t\t\ttxtPointValue.setVisible(true);\n\t\t\t\t\t\tlblPointValue.setVisible(true);\n\t\t\t\t\t\ttxtPointValue.setText(Integer.toString(pointValue));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if button label equals point roll\n\t\t\t\telse if (btnPlay.getText().equals(\"Point Roll\"))\n\t\t\t\t{\n\t\t\t\t\t// roll dice again\n\t\t\t\t\td1.roll();\n\t\t\t\t\td2.roll();\n\t\t\t\t\ttotalRolls++;\n\t\t\t\t\t\n\t\t\t\t\t//re-assign numbers\n\t\t\t\t\tint num1 = d1.getValue();\n\t\t\t\t\tint num2 = d2.getValue();\n\t\t\t\t\t\n\t\t\t\t\t//put new numbers in text box\n\t\t\t\t\ttxtDie1.setText(Integer.toString(num1));\n\t\t\t\t\ttxtDie2.setText(Integer.toString(num2));\n\t\t\t\t\t\n\t\t\t\t\t// if dice numbers equal point value......Win and reset\n\t\t\t\t\tif (num1 + num2 == pointValue)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Winner!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\ttotalWins++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// if dice numbers equal 7......Lose and reset\n\t\t\t\t\telse if (num1 + num2 == 7)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Loser!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"static void diceRollPopup(Context context, int diceValue, int modifier, String message){\n try {\n Random randomNumberDiceBox = new Random();\n int randomNumberValue = randomNumberDiceBox.nextInt(diceValue) + 1;\n String longMessage;\n AlertDialog.Builder diceDialogBox = new AlertDialog.Builder(context);\n\n //creates a textview for the dice message\n TextView diceMessage = new TextView(context);\n diceMessage.setGravity(Gravity.CENTER_HORIZONTAL);\n diceMessage.setTextColor(Color.WHITE);\n diceMessage.setTextSize(20);\n\n //checks for whether it was a nat20 and adds text\n if (randomNumberValue == diceValue) {\n diceDialogBox.setTitle(\"Dice Roll (d\" + diceValue + \") CRITICAL ROLL!\");\n }\n else{\n diceDialogBox.setTitle(\"Dice Roll (d\" + diceValue + \")\");\n }\n randomNumberValue = randomNumberValue + modifier;\n //adds the message to the dialog\n if (message != null) {\n longMessage = \"You have rolled \" + Integer.toString(randomNumberValue) + \" \" + message;\n } else {\n longMessage = \"You have rolled \" + Integer.toString(randomNumberValue);\n }\n diceMessage.setText(longMessage);\n diceDialogBox.setView(diceMessage);\n //adds an ok button to the dialog box\n diceDialogBox.setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n //Activates the dialog box\n AlertDialog diceDialog = diceDialogBox.create();\n diceDialog.show();\n Log.i(\"MenuAndDatabase\",\"dice roll popup. dice value: \" + randomNumberValue);\n }\n catch(Exception e){\n MenuAndDatabase.errorNotification(context,e.toString());\n Log.e(\"MenuAndDatabase\",\"error rolling dice: \" + e.toString());\n }\n }",
"public void haveContinuedGo(Dice currentDice, int currentSection, int roundsTaken)\n {\n dice = currentDice;\n boolean madeChoice = false;\n boolean firstMove = false;\n boolean secondMove = true;\n int diceRolls = 0;\n if(currentSection == 1)\n {\n firstMove = false;\n secondMove = true;\n diceRolls = 0;\n }\n if(currentSection ==2)\n {\n diceRolls = 1;\n }\n if(currentSection == 3)\n {\n diceRolls =2;\n }\n //Proceed to haveGo() whilst taking account of different initial variable scenarios\n while(diceRolls <= 1){\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n if(diceRolls == 0){\n System.out.println(\"\\n\\t--------------------------\\n\\t\" + this.name + \"'s Go!\\n\\t--------------------------\\n\\nRoll One...\");\n diceRoll = dice.getDiceState();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"\\nRoll Two...\");\n if(currentSection == 1)\n {\n diceRoll = dice.roll();\n }\n else\n {\n diceRoll = dice.getDiceState();\n }\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n secondMove = false;\n firstMove = true;\n }\n //CURRENTLY MOVING REPEATS\n while(!firstMove)\n {\n boolean repeat = false;\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,5);\n if(choice == 0)\n {\n gameFinisher.exitSequence(filename,name, diceRoll, saveString,roundsTaken, 1);\n }\n else if(choice == 3)\n {\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n\n else if(choice == 4)\n {\n diceRolls++;\n firstMove = true;\n }\n else if(choice == 2)\n {\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"Which row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n scorer.findPossibilities(diceRoll, scorecard.getFreeCategories());\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n firstMove = true;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n }\n }\n while(!secondMove)\n {\n boolean repeat = false;\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\\n\\t5) Hold and Roll Dice\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,6);\n if(choice == 0)\n {\n gameFinisher.exitSequence(filename, name, diceRoll, saveString,roundsTaken, 2);\n }\n else if(choice == 3)\n {\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n else if(choice == 5)\n {\n System.out.println(\"\\n\\t--------------------------\");\n System.out.println(\"\\tDice Holder\\n\\t-----\\n\\t[0) Leave [1) Hold\");\n System.out.println(\"\\t--------------\\n\");\n System.out.println(diceRoll);\n System.out.println(\"--------------------------\");\n System.out.print(\"[\" + diceRoll.get(0) + \"]\");\n boolean one = toHold();\n System.out.print(\"[\" + diceRoll.get(1) + \"]\");\n boolean two = toHold();\n System.out.print(\"[\" + diceRoll.get(2) + \"]\");\n boolean three = toHold();\n System.out.print(\"[\" + diceRoll.get(3) + \"]\");\n boolean four = toHold();\n System.out.print(\"[\" + diceRoll.get(4) + \"]\");\n boolean five = toHold();\n ArrayList<Boolean> newState = new ArrayList<Boolean>();\n newState.add(one);\n newState.add(two);\n newState.add(three);\n newState.add(four);\n newState.add(five);\n dice.setDiceHoldState(newState);\n System.out.println(\"\\n\\t--------------------------\\n\\tDice Held\\n\\t-----\\n\\tRolling Dice...\\n\\t--------------------------\");\n diceRolls++;\n secondMove = true;\n }\n else if(choice == 4)\n {\n diceRolls++;\n secondMove = true;\n madeChoice = false;\n }\n else if(choice == 2)\n {\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n repeat = false;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n\n }\n }\n }\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n if(currentSection != 3)\n {\n diceRoll = dice.roll(); \n }\n else if(currentSection == 3)\n {\n diceRoll = dice.getDiceState(); \n }\n while(!madeChoice)\n {\n System.out.println(\"\\nFinal Roll...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,4);\n if(choice == 0)\n {\n gameFinisher.exitSequence(filename, name, diceRoll, saveString, roundsTaken, 2);\n }\n else if(choice == 3)\n {\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n }\n\n else if(choice == 2)\n {\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n }\n else if(choice == 1)\n {\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n }\n }\n }",
"public static int rollDice()\n\t{\n\t\tint roll = (int)(Math.random()*6)+1;\n\t\t\n\t\treturn roll;\n\n\t}",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"public void throwDice()\n {\n System.out.println( name + \"'s Turn \" + (turnNumber + 1) + \" Results for Round \" + round + \": \");\n turnScores[turnNumber] = 0;\n System.out.print(\"Dice Throws: \");\n for (int diceNumber = 0; diceNumber < diceThrows[turnNumber].length; diceNumber++)\n {\n int diceThrow = r.nextInt(6) + 1;\n diceThrows[turnNumber][diceNumber] = diceThrow;\n turnScores[turnNumber] += diceThrow;\n totalScore += diceThrow;\n System.out.print(diceThrows[turnNumber][diceNumber] + \" \");\n }\n System.out.print(\" Score This Turn: \" + turnScores[turnNumber] + \" \");\n System.out.println(\" \" + name + \"'s Running Total Score: \" + totalScore + \"\\n\");\n \n turnNumber++;\n }",
"public void drawGameCompleteScreen() {\r\n PennDraw.clear();\r\n\r\n if (didPlayerWin()) {\r\n PennDraw.text(width / 2, height / 2, \"You Win!\");\r\n } else if (didPlayerLose()) {\r\n PennDraw.text(width / 2, height / 2, \"You have lost...\");\r\n }\r\n\r\n PennDraw.advance();\r\n }",
"public boolean handleMessage(Message msg) {\n switch(rnd.nextInt(6)+1) {\n case 1:\n dice_pic.setImageResource(R.drawable.one);\n break;\n case 2:\n dice_pic.setImageResource(R.drawable.two);\n break;\n case 3:\n dice_pic.setImageResource(R.drawable.three);\n break;\n case 4:\n dice_pic.setImageResource(R.drawable.four);\n break;\n case 5:\n dice_pic.setImageResource(R.drawable.five);\n break;\n case 6:\n dice_pic.setImageResource(R.drawable.six);\n break;\n default:\n }\n rolling=false; //user can press again\n return true;\n }",
"public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}",
"private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }",
"@Override\n public void run() {\n //get random number\n int number = random.nextInt(6) + 1;\n int resource = getResources().getIdentifier(\"game_dice\"+number,\n \"drawable\",\n \"com.bawp.alienvspredator\");\n if (dices[2]%2 == 0){\n dices[0] = resource;\n game_IMAGE_p1_dice.setImageResource(dices[0]);\n }\n else{\n dices[1] = resource;\n game_IMAGE_p2_dice.setImageResource(dices[1]);\n }\n\n //create dice roll sound\n mediaPlayer =MediaPlayer.create(Activity_Game.this, R.raw.roll_dice);\n mediaPlayer.start();\n //if both dices have the same value or p2 haven't roll\n //it will make sure the animation will continue\n dices[2]++;\n if (dices[0] == dices[1] || dices[1] == 0) {\n if (dices[0] == dices[1]){\n dices[0] = 0;\n dices[1] = 0;\n }\n handlerDices.postDelayed(this, DELAY);\n }\n //it means the animation ended and one of the sides has a larger value in the dice\n //according to this whoever won the dice roll will start first\n else{\n turn = dices[0] > dices[1];\n diceRollFinish = true;\n handlerGame.postDelayed(runnableGame, DELAY);\n }\n }",
"boolean hasRoll();",
"boolean hasRoll();",
"private int rollDie() {\r\n final SecureRandom random = new SecureRandom();\r\n return random.nextInt(6 - 1) + 1;\r\n }",
"private static void displayDice(Shaker shaker) {\n int faceValue1 = shaker.getDice()[0].getFaceValue();\n int faceValue2 = shaker.getDice()[1].getFaceValue();\n\n\n // Displays the dice on the board\n InterfaceController.setDice(faceValue1, faceValue2);\n }",
"public void roll()\r\n\t{\r\n\t\tRandom rand = new Random();\r\n\r\n\t\trollNumber = rand.nextInt(numOfSides) + 1;\r\n\t}",
"public void gameOver(int gameOver);",
"public void onRollAgainClick(View view) {\n rollDie();\n }",
"public void updateDiceLabel(int leftResult, int rightResult) {\n\t\tleftDiceResult.setText(String.valueOf(leftResult));\n\t\trightDiceResult.setText(String.valueOf(rightResult));\n\t}",
"private void showDice() {\n Drawable diceDrawable;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n diceDrawable = getResources().getDrawable(die.getImageId(),\n getApplicationContext().getTheme());\n } else {\n diceDrawable = getResources().getDrawable(die.getImageId());\n }\n\n dieView.setImageDrawable(diceDrawable);\n dieView.setContentDescription(Integer.toString(die.getNumber()));\n }",
"public static void roll()\n {\n Random no = new Random();\n Integer dice = no.nextInt(7);\n System.out.println(dice);\n }",
"public int rollDice()\n{\n int die1, die2, sum; \n\n // pick random die values\n die1 = 1 + ( int ) ( Math.random() * 6 );\n die2 = 1 + ( int ) ( Math.random() * 6 );\n\n sum = die1 + die2; // sum die values\n\n // display results\n die1Field.setText( Integer.toString( die1 ) );\n die2Field.setText( Integer.toString( die2 ) );\n sumField.setText( Integer.toString( sum ) );\n\n return sum; // return sum of dice\n\n\n}",
"public int rollDice() {\n\t\td1 = (int)rand.nextInt(6)+1;\n\t\td2 = (int)rand.nextInt(6)+1;\n\t\treturn d1+d2;\n\t}",
"public int setRollResult(int diceAmount, int diceSides) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < diceAmount; i++) {\n\t\t\tresult += diceBag.rollDice(diceSides);\n\t\t}\n\t\treturn result;\n\t}",
"public static int diceRoll() {\n Random roller = new Random();//Create a random number generator\r\n return roller.nextInt(6) + 1;//Generate a number between 0-5 and add 1 to it\r\n }",
"private void rollDice(){\n int rollNumber=rng.nextInt(6)+1;\n //int rollNumber=5;\n switch(rollNumber) {\n case 1:\n dice_picture.setImageResource(R.drawable.one);\n break;\n case 2:\n dice_picture.setImageResource(R.drawable.two);\n break;\n case 3:\n dice_picture.setImageResource(R.drawable.three);\n break;\n case 4:\n dice_picture.setImageResource(R.drawable.four);\n break;\n case 5:\n dice_picture.setImageResource(R.drawable.five);\n break;\n case 6:\n dice_picture.setImageResource(R.drawable.six);\n break;\n default:\n }\n\n move(rollNumber);\n }",
"public String diceFight(String[] attackerDefender, int attackerDice, int defenderDice){\n\n Territory attacker = getTerritory(attackerDefender[0]);\n Territory defender = getTerritory(attackerDefender[1]);\n\n\n //Used to make a list of the different players different dice rolls\n LinkedList<Integer> attackerRolls = new LinkedList<>();\n LinkedList<Integer> defenderRolls = new LinkedList<>();\n\n\n //Add dice roll values to the lists. Number of dice rolls specified above\n for (int i = 0; i<attackerDice; i++){ attackerRolls.push((Integer) dice.rollDie());}\n Collections.sort(attackerRolls);//Sorting low to high\n Collections.reverse(attackerRolls);//Reverse to go high to low\n\n for (int i = 0; i<defenderDice; i++){ defenderRolls.push((Integer) dice.rollDie()); }\n Collections.sort(defenderRolls);//Sorting low to high\n Collections.reverse(defenderRolls);//Reverse to go high to low\n\n\n String diceFightResultMessage = \"\";\n\n //Pop out the dice rolls high to low to compare. Higher number wins. Ties means defender wins\n while (!attackerRolls.isEmpty() && !defenderRolls.isEmpty()){\n diceFightResultMessage += \"Attacker rolls a \" + attackerRolls.peek() +\"\\n\";\n diceFightResultMessage += \"Defender rolls a \" + defenderRolls.peek() +\"\\n\";\n if (attackerRolls.pop() <= defenderRolls.pop()){\n //Defender wins\n diceFightResultMessage += \"Defender wins! Attacker loses a troop! RIP\" +\"\\n\";\n attacker.changeTroops(-1);\n } else {\n //Attacker wins\n diceFightResultMessage += \"Attacker wins! Defender loses a troop! RIP\" +\"\\n\";\n defender.changeTroops(-1);\n }\n }\n\n\n diceFightResultMessage += \"\\n\\n\" + \"Attacker has \" + attacker.getTroops() + \" troops remaining\";\n diceFightResultMessage += \"\\n\" + \"Defender has \" + defender.getTroops() + \" troops remaining\";\n\n //If the attacker takes over the territory, the number of troops moved in has to be greater or equal to\n //the number of dice rolled on the most recent diceFight\n return diceFightResultMessage;\n }",
"public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }",
"public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}",
"private void gameOver(final int status) {\n // Play R.raw.robot_bleep\n soundPool.play(this.soundIds[2], 1, 1, 3, 0, (float) 1.0);\n this.gameOverDisplayed = true;\n ((PongGame) context).gameState = PongGame.GAME_OVER;\n this.touchEnabled = false;\n\n ((PongGame) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n DialogInterface.OnDismissListener listener = new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(@NonNull DialogInterface dialog) {\n dialog.dismiss();\n }\n };\n GeneralFunctions.displayDialog(context, status, listener);\n }\n });\n }",
"public void onRollClick() {\n game.TakeTurn(player1);\n game.TakeTurn(computer);\n undoButton.setDisable(false);\n resetButton.setDisable(false);\n updateFields(\"player\");\n updateFields(\"computer\");\n setLeadPlayerImage();\n checkGame();\n }",
"int roll();",
"RollingResult roll(Player player);",
"int getAttackRoll();",
"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 }",
"@Override\n public void notifyRollDice() {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyHaveToShotDice();\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending have to shot error\");\n }\n }",
"@Override\n public void initDiceRoller() {\n debug(\"initDiceRoller\");\n\n setContentView(getDiceRollerLayout());\n setDiceRollerButtons();\n }",
"void roll(int noOfPins);",
"public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }",
"public void playGame()\n\t{\n\t\t// Playing a new round; increase round id\n\t\troundId += 1;\n\n\t\tint diceRoll = 1 + dice.nextInt(6);\n\t\t\n\t\tif(diceRoll <= 3)\n\t\t{\n\t\t\tbranchId = 0;\n\t\t\tresult = 0;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 0\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbranchId = 1;\n\t\t\tresult = 6;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 6\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\t\n\t}",
"public void throwDice() {\n\n Random r = new Random();\n\n if (color == DiceColor.NEUTRAL) {\n this.value = 0;\n } else {\n this.value = 1 + r.nextInt(6);\n }\n\n }",
"public static int diceRoll(){\n Random rd = new Random();\n int dice1, dice2;\n\n dice1 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 1\n dice2 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 2\n\n System.out.println(\"You rolled \" + dice1 + \" + \" + dice2 + \" = \" + (dice1+dice2)); //print result\n\n return dice1 + dice2; //returns sum of dice rolls\n\n }",
"static void printStatus() {\r\n System.out.println(\"\"\"\r\n\r\n +---------------------------------------+\r\n | Welcome to the FIT2099 AutoShowroom! |\r\n +---------------------------------------+\"\"\");\r\n while(isRunning){\r\n try {\r\n consoleMenu();\r\n } catch (InputMismatchException e) {\r\n System.out.println(\"\\nInput Mismatch Exception encountered, sorry for the inconvenience!\");\r\n } catch (RuntimeException e) {\r\n System.out.println(\"\\nRuntime Exception encountered, sorry for the inconvenience!\");\r\n } catch (Exception e) {\r\n System.out.println(\"\\nSome other Exception encountered, sorry for the inconvenience!\");\r\n }\r\n }\r\n System.out.println(\"\\nThank you for visiting the FIT2099 Showroom\");\r\n }",
"@Test\n public void testDiceThrown() {\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n testDie(game.diceThrown(), 3, 4);\n game.nextTurn();\n testDie(game.diceThrown(), 3, 4);\n game.nextTurn();\n testDie(game.diceThrown(), 5, 6);\n game.nextTurn();\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n\n }",
"DiceRoll modifyRoll(DiceRoll roll, Die die);",
"public int roll(){\r\n myFaceValue = (int)(Math.random() * myNumSides) + 1;\r\n return myFaceValue;\r\n }",
"@Override\n public void gameOver(GameController game) {\n updateScreen(game);\n ((MultiplayerHostController) Main.game).updateClient();\n\n switch (game.getCurrentState()) {\n case END_DRAW:\n JOptionPane.showMessageDialog(this, \"Draw!\");\n break;\n case END_CIRCLE:\n JOptionPane.showMessageDialog(this, \"You won!\");\n break;\n case END_CROSS:\n JOptionPane.showMessageDialog(this, \"You lost!\");\n break;\n }\n stopGame();\n }",
"public static int rollDice(){\n return (int)(Math.random()*6) + 1;\n // Math.random returns a double number >=0.0 and <1.0\n }",
"public void gameOver(){ // will be more complex in processing (like a fadey screen or whatever, more dramatic)\n System.out.println();\n System.out.println(\"Three strikes and you're out! You're FIRED!\");\n gameOver = true;\n }",
"public void actionPerformed(ActionEvent e) {\n\t\tif (!table.diceAreRolling()) table.rollDice();\n\t}",
"public int roll() {\n if(!debug)\n this.result = random.nextInt(6) + 1;\n else{\n scanner = new Scanner(showInputDialog(\"Enter dice value (1-6):\"));\n try{int res = scanner.nextInt()%7;\n this.result = res!=0? res:6;\n }\n catch(NoSuchElementException ne){this.result=6;} \n }\n return this.result;\n }",
"public int throwDice(int number) {\n this.lastThrow = number;\n this.status = \"Started\";\n Player player = players.get(activePlayer);\n\n // DICELISTENER : throw DiceEvent to diceListeners\n for (DiceListener listener : diceListeners) {\n DiceEvent diceEvent = new DiceEvent(this, this.activePlayer, number);\n listener.diceThrown(diceEvent);\n }\n\n\n //check if number thrown was a 6\n if (number != 6) {\n player.setSixersRow(0);\n } else if (!player.inStartingPosition()) { //count up the sixers row if not in starting pos\n player.setSixersRow(player.getSixersRow() + 1);\n }\n\n if (player.getSixersRow() == 3) { //three 6's in a row, next turn\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n return number;\n }\n\n if (player.inStartingPosition()) { //starting position have 3 throws to get a six\n player.setThrowAttempts(player.getThrowAttempts() + 1);\n if (number != 6 && player.getThrowAttempts() == 3) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n player.setThrowAttempts(0);\n return number;\n } else {\n return number;\n }\n }\n\n boolean nextTurn = false;\n int piecesInPlay = player.piecesInPlay();\n int blockedPieces = 0;\n int notMakingItInPieces = 0;\n\n for (Piece piece : player.getPieces()) {\n if (piece.isInPlay()) {\n //count blocked pieces\n if (towersBlocksOpponents(player, piece.position, number)) {\n blockedPieces++;\n }\n\n //If piece is at pos over 52 but the thrown dice won't make it 59\n //end of turn\n if (piece.getPosition() > 52 && piece.getPosition() + number != 59 && piece.getPosition() != 59) {\n notMakingItInPieces++;\n }\n }\n\n }\n\n //if all active pieces are blocked, end of turn\n if (blockedPieces == piecesInPlay) {\n nextTurn = true;\n //if all pieces are at endplay, but none can get in, end of turn\n } else if (notMakingItInPieces == piecesInPlay) {\n nextTurn = true;\n //if blocked pieces and notmakingitinpieces are all the pieces in play, end of turn\n } else if ((notMakingItInPieces + blockedPieces) == piecesInPlay) {\n nextTurn = true;\n }\n\n //set next turn\n if (nextTurn) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n }\n\n return number;\n }",
"public void notifyGameEnded() {\n this.myStatusString.setText(\"Game Ended\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"private void gameOverAlert() {\n \tAlert alert = new Alert(AlertType.INFORMATION);\n \t\n \talert.setTitle(\"Game Over!\");\n \talert.setHeaderText(\"You Did Not Get A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Try Again Next Time!\");\n \talert.show();\n\t}",
"private static void checkForKnockout()\n\t{\n\t\tif (playerOneHealth <= 0 && opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(playerOneName + \" and \" + opponentName + \" both go down for the count!\");\n\t\t\t\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e) \n\t\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\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" and \" + opponentName + \" knocked each other out at the same time.\\nWhat a weird ending!!!\");\n\t\t}\n\t\n\t\t// Check if Player One Lost\n\t\telse if (playerOneHealth <= 0)\n\t\t{\n\t\t\t// Prints one to ten because player one is knocked out\n\t\t\tSystem.out.println(playerOneName + \" is down for the count!\");\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" was knocked out, and \" + opponentName + \" still had \" + opponentHealth + \" health left. \\nBetter luck next time player one!!!\");\n\t\t}\n\t\n\t\t// Check if Player Two Lost\n\t\telse if (opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(opponentName + \" is down for the count!\");\n\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif(i < 6)System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!! \\n\" + opponentName + \" was knocked out, and \" + playerOneName + \" still had \" + playerOneHealth + \" health left.\\nCONGRATULATIONS PLAYER ONE!!!\");\n\t\t}\n\t}",
"public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }",
"private int diceRoll(int sides) {\n return (int) ((Math.random() * sides) + 1);\n }",
"void gameOver();",
"void gameOver();",
"public int generateRoll() {\n\t\tint something = (int) (Math.random() * 100) + 1;\n\t\tif (something <= 80) {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2 - 1;\n\t\t\treturn roll;\n\t\t} else {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2;\t\t\n\t\t\treturn roll;\n\t\t}\n\t}"
]
| [
"0.69095564",
"0.6858664",
"0.6841514",
"0.6841307",
"0.6794609",
"0.6690848",
"0.6552816",
"0.64861625",
"0.6470997",
"0.64689696",
"0.63129103",
"0.62816805",
"0.62741417",
"0.62662196",
"0.6261108",
"0.62480146",
"0.6243115",
"0.62372977",
"0.62200594",
"0.61900777",
"0.6183294",
"0.61657256",
"0.61568767",
"0.61525553",
"0.6148588",
"0.6138343",
"0.61374724",
"0.6130731",
"0.61304057",
"0.6101958",
"0.60796034",
"0.6064094",
"0.6053383",
"0.6052445",
"0.60414714",
"0.6039413",
"0.60327184",
"0.6005292",
"0.59713286",
"0.596161",
"0.5949363",
"0.5937872",
"0.5911989",
"0.5910521",
"0.58997476",
"0.5867945",
"0.5859832",
"0.5854309",
"0.58480155",
"0.5847865",
"0.584611",
"0.58452004",
"0.58452004",
"0.58203167",
"0.58125174",
"0.58124846",
"0.581031",
"0.5806146",
"0.5791199",
"0.57745415",
"0.5769994",
"0.5766893",
"0.5759625",
"0.5751535",
"0.57439125",
"0.5740962",
"0.57359874",
"0.5731683",
"0.57249653",
"0.57190686",
"0.5715124",
"0.5713871",
"0.57082283",
"0.5700573",
"0.5691967",
"0.56909835",
"0.5679394",
"0.5673455",
"0.56687814",
"0.56623214",
"0.5658944",
"0.5651499",
"0.5644221",
"0.5632249",
"0.5626933",
"0.5624546",
"0.56167233",
"0.5615038",
"0.5611107",
"0.5607766",
"0.560657",
"0.5605906",
"0.5603823",
"0.55844474",
"0.5580644",
"0.55780876",
"0.5573306",
"0.55637187",
"0.55637187",
"0.5561804"
]
| 0.80144894 | 0 |
/ / Constructors / | public DirectedEdge(int from, int to, double weight) {
this.from = from;
this.to = to;
this.weight = weight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public CyanSus() {\n\n }",
"public Pitonyak_09_02() {\r\n }",
"private TMCourse() {\n\t}",
"public _355() {\n\n }",
"public CSSTidier() {\n\t}",
"public PSRelation()\n {\n }",
"public RngObject() {\n\t\t\n\t}",
"public Curso() {\r\n }",
"public Basic() {}",
"public Libro() {\r\n }",
"public Odontologo() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"public Trening() {\n }",
"public Cohete() {\n\n\t}",
"public Phl() {\n }",
"public Anschrift() {\r\n }",
"public Coche() {\n super();\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Chick() {\n\t}",
"public Clade() {}",
"protected abstract void construct();",
"public Orbiter() {\n }",
"public Tbdtokhaihq3() {\n super();\n }",
"public Rol() {}",
"public AirAndPollen() {\n\n\t}",
"public TTau() {}",
"public Chauffeur() {\r\n\t}",
"public Lanceur() {\n\t}",
"public JSFOla() {\n }",
"private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}",
"public Pasien() {\r\n }",
"private Instantiation(){}",
"public Cgg_jur_anticipo(){}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public Tigre() {\r\n }",
"protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}",
"private SingleObject()\r\n {\r\n }",
"public Demo() {\n\t\t\n\t}",
"public Soil()\n\t{\n\n\t}",
"Composite() {\n\n\t}",
"public EnsembleLettre() {\n\t\t\n\t}",
"private void __sep__Constructors__() {}",
"public Tbdcongvan36() {\n super();\n }",
"public Magazzino() {\r\n }",
"public SlanjePoruke() {\n }",
"public Excellon ()\n {}",
"public mapper3c() { super(); }",
"public OVChipkaart() {\n\n }",
"public lo() {}",
"public Livro() {\n\n\t}",
"public ChaCha()\n\t{\n\t\tsuper();\n\t}",
"@Override\r\n\tpublic void init() {}",
"public Supercar() {\r\n\t\t\r\n\t}",
"public SgaexpedbultoImpl()\n {\n }",
"public Achterbahn() {\n }",
"public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }",
"public AFMV() {\r\n }",
"private IndexBitmapObject() {\n\t}",
"public CMN() {\n\t}",
"public Steganography() {}",
"private TbusRoadGraph() {}",
"public Carrinho() {\n\t\tsuper();\n\t}",
"private MApi() {}",
"@Override\n public void init() {}",
"private CZ()\n {\n }",
"public CD() {}",
"public p7p2() {\n }",
"public Catelog() {\n super();\n }",
"public Mitarbeit() {\r\n }",
"public Mannschaft() {\n }",
"public Genret() {\r\n }",
"public Self__1() {\n }",
"public AntrianPasien() {\r\n\r\n }",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"private Ognl() {\n }",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"public Rook()\n {\n super();\n }",
"private TAPosition()\n {\n\n }",
"public Naive() {\n\n }",
"public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}",
"private Road()\n\t{\n\t\t\n\t}",
"public Husdjurshotell(){}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public ExamMB() {\n }",
"public Goodsinfo() {\n super();\n }",
"public Aritmetica(){ }",
"public Carrera(){\n }",
"private Node() {\n\n }",
"public OOP_207(){\n\n }",
"private Composite() {\n }",
"public Corso() {\n\n }",
"public Boop() {\n\t\tsuper();\n\t}",
"public Vaccine() {\n\t}",
"public Lotto2(){\n\t\t\n\t}",
"public Data() {}",
"public AvaliacaoRisco() {\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}"
]
| [
"0.84202886",
"0.78166115",
"0.71776414",
"0.7029142",
"0.6997788",
"0.6988559",
"0.698599",
"0.69655824",
"0.6958574",
"0.69455236",
"0.69264483",
"0.69235736",
"0.69148237",
"0.6909453",
"0.6896481",
"0.6896198",
"0.6878102",
"0.6870602",
"0.68672794",
"0.6842882",
"0.6840633",
"0.6840214",
"0.6836925",
"0.68324536",
"0.6823645",
"0.6822566",
"0.6812783",
"0.6801895",
"0.67968386",
"0.67439944",
"0.67318386",
"0.67263633",
"0.671435",
"0.67136514",
"0.6711922",
"0.6704347",
"0.66981107",
"0.66965204",
"0.6692949",
"0.669221",
"0.6690277",
"0.667818",
"0.6655319",
"0.66551185",
"0.6651808",
"0.66477346",
"0.66233927",
"0.6620925",
"0.6618219",
"0.66174084",
"0.66105056",
"0.6608594",
"0.6594065",
"0.6585368",
"0.65824443",
"0.65799683",
"0.65792644",
"0.6577649",
"0.65770644",
"0.6576263",
"0.6572612",
"0.65669936",
"0.6565091",
"0.6563983",
"0.6562797",
"0.656054",
"0.65588415",
"0.65566367",
"0.6549467",
"0.6546707",
"0.6544491",
"0.65442044",
"0.6542907",
"0.6539986",
"0.65367776",
"0.6532379",
"0.6531835",
"0.65309185",
"0.65294564",
"0.6526406",
"0.65254116",
"0.65182686",
"0.6516085",
"0.6514157",
"0.6514042",
"0.65135074",
"0.65111166",
"0.6509801",
"0.64981645",
"0.6496173",
"0.64949447",
"0.64942473",
"0.6493381",
"0.6487091",
"0.64837235",
"0.6483175",
"0.64826834",
"0.64809376",
"0.6478219",
"0.6478219",
"0.6478219"
]
| 0.0 | -1 |
/ / Overridden methods / | @Override
public String toString() {
return String.format("(%d->%d|%.6f)", from, to, weight);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\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\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\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\n\tpublic void verkaufen() {\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n void init() {\n }",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"protected abstract Set method_1559();",
"private stendhal() {\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"public void init() {\r\n\t\t// to override\r\n\t}",
"protected void init() {\n // to override and use this method\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public abstract void mo70713b();",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\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}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\n }",
"@Override\n public void init() {}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"protected Doodler() {\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void jugar() {\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\r\n\tprotected void initialize() {\n\r\n\t}"
]
| [
"0.7075843",
"0.7005523",
"0.6970091",
"0.6905572",
"0.6882535",
"0.68775666",
"0.6806705",
"0.6806705",
"0.6767504",
"0.6679509",
"0.6675976",
"0.66472864",
"0.66090494",
"0.6588188",
"0.6588188",
"0.65031534",
"0.649997",
"0.649704",
"0.64943534",
"0.6461663",
"0.64387363",
"0.6421777",
"0.639454",
"0.6385691",
"0.6361777",
"0.6355942",
"0.6350698",
"0.6344781",
"0.6339018",
"0.63064486",
"0.6291271",
"0.6287464",
"0.6287464",
"0.6287464",
"0.6287464",
"0.6287464",
"0.6287464",
"0.6240342",
"0.6240178",
"0.62226",
"0.6213129",
"0.6206473",
"0.619202",
"0.61855686",
"0.61828846",
"0.61792743",
"0.6169514",
"0.6155813",
"0.61529076",
"0.61519474",
"0.61371934",
"0.6117898",
"0.6117748",
"0.6080712",
"0.60791284",
"0.60791284",
"0.6075921",
"0.60757816",
"0.60670525",
"0.6065798",
"0.6065616",
"0.6062995",
"0.6062995",
"0.6051697",
"0.60428023",
"0.604109",
"0.6028204",
"0.60156196",
"0.6014202",
"0.6014202",
"0.6013332",
"0.5993968",
"0.5981842",
"0.59666085",
"0.59666085",
"0.5965611",
"0.5964895",
"0.59588414",
"0.5952275",
"0.59483856",
"0.59483856",
"0.59452534",
"0.5944329",
"0.59421796",
"0.5942085",
"0.5941318",
"0.5937519",
"0.5937519",
"0.5937519",
"0.5937519",
"0.5937519",
"0.5937519",
"0.59339845",
"0.59299016",
"0.59197545",
"0.59187174",
"0.5917116",
"0.59145516",
"0.59145516",
"0.59145516",
"0.5914291"
]
| 0.0 | -1 |
/ / Getters / | public int from() {
return from;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n public void get() {}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public void get() {\n }",
"protected abstract Set method_1559();",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n String get();",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public abstract String get();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public String getName () { return this.name; }",
"@Override\r\n public String toString() {\n return super.toString();\r\n }",
"@Override\r\n public String toString() {\n return super.toString();\r\n }",
"String getName(){return this.name;}",
"@Override\n public String toString() {\n return (super.toString());\n\n }",
"public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }",
"public int getAge() {return age;}",
"@Override\n public String toString () {\n return super.toString();\n }",
"private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public String getName(){return this.name;}",
"@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 String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }",
"public abstract Object getData();",
"@Override\r\n public String toString() {\r\n return super.toString();\r\n }",
"@Override\r\n public String toString() {\r\n return super.toString();\r\n }",
"private Get() {}",
"private Get() {}",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }",
"public String get();",
"@Override\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\n\t\t}",
"@Override\n public String toString() {\n return value();\n }",
"Objet getObjetAlloue();",
"@Override\n public String toString() {\n return super.toString();\n }",
"@Override\n public String toString() {\n return super.toString();\n }",
"@Override\n public String toString() {\n return super.toString();\n }",
"@Override\n public String toString() {\n return super.toString();\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getDataFromUCF() {\n\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n String toString();",
"@Override\n public String getName(){\n return Name; \n }",
"public String getName(){ return name; }",
"@Override\r\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\r\n\t\t}",
"public String getName(){return name;}",
"public String getName(){return name;}",
"public String getName(){return name;}",
"public String getName(){return name;}",
"@Override\n protected Object[] getData() {\n return new Object[] { creator };\n }",
"private Integer getId() { return this.id; }",
"public String getValue() {\n/* 99 */ return this.value;\n/* */ }",
"@Override\n\tpublic String toString(){\n\n\t}",
"@Override\n //Method for getting output from String declaration\n //First set of accessor/mutator that returns value as String\n public String toString(){\n return \"[\"+name+\",\"+type+\",\"+value+\"]\";\n }",
"@Override\n public void memoria() {\n \n }",
"public abstract String getInfo();",
"public abstract String getInfo();",
"public String getName ()\n {\n return name;\n }",
"protected List getProperties() {\n return null;\n }",
"public String getName(){\n return name;\n}",
"@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}",
"protected abstract void retrievedata();",
"public abstract Object getCustomData();",
"public String getName()\n {\n return name;\n}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\n public void perish() {\n \n }",
"public String getName(){return this.aName;}",
"@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\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}",
"protected String getName(){\r\n return this.name;\r\n }",
"abstract public Object getUserData();",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"public int characteristics() {\n/* 1570 */ return this.characteristics;\n/* */ }",
"@Override\n\tpublic void getDetail() {\n\t\t\n\t}",
"@Override\r\n\tpublic void getRegimeAlimentaire() {\n\t\t\r\n\t}",
"public void getAssignment() {\n \n }",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}"
]
| [
"0.6769337",
"0.6713516",
"0.6674307",
"0.66010565",
"0.6595861",
"0.6408529",
"0.62115395",
"0.6206359",
"0.61318505",
"0.60977244",
"0.6072681",
"0.6060625",
"0.60480505",
"0.60480505",
"0.6036608",
"0.60152364",
"0.6005706",
"0.60056156",
"0.59965944",
"0.599505",
"0.5965361",
"0.59614396",
"0.59528166",
"0.59484476",
"0.5947544",
"0.5947142",
"0.59288883",
"0.59131086",
"0.59072053",
"0.59072053",
"0.5906325",
"0.5906325",
"0.59038854",
"0.5900662",
"0.58894867",
"0.58885825",
"0.5885713",
"0.58807147",
"0.5877884",
"0.5877884",
"0.5877884",
"0.5877884",
"0.58629787",
"0.58621067",
"0.5859255",
"0.5859255",
"0.58584106",
"0.58494365",
"0.5846058",
"0.5844419",
"0.58438015",
"0.58438015",
"0.58438015",
"0.58438015",
"0.582953",
"0.58250546",
"0.5820497",
"0.58200014",
"0.5813374",
"0.5812475",
"0.58035976",
"0.58035976",
"0.57890904",
"0.57631254",
"0.57612973",
"0.5761024",
"0.5760223",
"0.57580185",
"0.5753391",
"0.57521325",
"0.5751442",
"0.5751197",
"0.5751197",
"0.5751197",
"0.5751197",
"0.5751197",
"0.5751197",
"0.574623",
"0.5743889",
"0.57399845",
"0.57381165",
"0.57381165",
"0.57365245",
"0.5734756",
"0.57343847",
"0.5733271",
"0.57323724",
"0.5728468",
"0.5724259",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447",
"0.57167447"
]
| 0.0 | -1 |
Checks that a given value is with a range. For example, sanitizeUserArgs(17, 3, 5, 10) ensures that 17 is greater/equal than 3 5 and less/equal to 3 10. | public static long sanitizeUserArgs(String key, long valueTocheck,
String baseKey, long baseValue, long minFactor, long maxFactor) {
long minLimit = baseValue * minFactor;
long maxLimit = baseValue * maxFactor;
if (valueTocheck < minLimit) {
LOG.warn(
"{} value = {} is smaller than min = {} based on"
+ " the key value of {}, reset to the min value {}.",
key, valueTocheck, minLimit, baseKey, minLimit);
valueTocheck = minLimit;
} else if (valueTocheck > maxLimit) {
LOG.warn(
"{} value = {} is larger than max = {} based on"
+ " the key value of {}, reset to the max value {}.",
key, valueTocheck, maxLimit, baseKey, maxLimit);
valueTocheck = maxLimit;
}
return valueTocheck;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}",
"public void rangeCheck(int value) throws RangeException {\n\tSystem.out.println(\"In rangeCheck, value: \" + value);\n\tif (value < min || value > max) {\n\t throw new RangeException(min, max, value);\n\t}\n }",
"void checkRange(Long value) throws TdtTranslationException {\r\n\t\tif (hasRange) {\r\n\t\t\tif ((value.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (value.compareTo(maximum) > 0)) {\r\n\t\t\t\tthrow new TdtTranslationException(\"Value {\" + value\r\n\t\t\t\t\t\t+ \"} out of range [{\" + minimum + \"},{\" + maximum\r\n\t\t\t\t\t\t+ \"}] in field \" + getId());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void checkRange(String value) throws TdtTranslationException {\r\n\t\tif (!hasRange)\r\n\t\t\treturn;\r\n\t\tLong intValue;\r\n\t\ttry {\r\n\t\t\tintValue = Long.valueOf(Long.parseLong(value));\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new TdtTranslationException(\"Cannot convert \" + value\r\n\t\t\t\t\t+ \" to ulong in field \" + getId());\r\n\t\t}\r\n\t\tcheckRange(intValue);\r\n\t}",
"private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}",
"@SuppressWarnings(\"unused\")\n public static boolean withinRange(float value, float startValue, float endValue) {\n return value == ScWidget.valueRangeLimit(value, startValue, endValue);\n }",
"private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {\n\t\tif (fromIndex > toIndex)\n\t\t\tthrow new IllegalArgumentException(\"fromIndex(\" + fromIndex +\n\t\t\t\t\t\") > toIndex(\" + toIndex+\")\");\n\t\tif (fromIndex < 0)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(fromIndex);\n\t\tif (toIndex > arrayLen)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(toIndex);\n\t}",
"void validateValue(long val) {\n\n if ((min != null && val < min) || (max != null && val > max)) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Value, \");\n sb.append(val);\n sb.append(\", is outside of the allowed range\");\n throw new IllegalArgumentException(sb.toString());\n }\n }",
"public void setValidRange (int lowerBounds, int upperBounds)\r\n\t{\r\n\t\tm_lowerBounds = lowerBounds;\r\n\t\tm_upperBounds = upperBounds;\r\n\t}",
"public int bookInputRangeChecker(String input, int min, int max)\n {\n int num = bookInputIntChecker(input);\n while (num < min || num > max){\n System.out.println(num + \" is not in the allowed range, \" + min + \" - \" + max);\n num = bookInputIntChecker(input);\n }\n \n return num;\n }",
"@SuppressWarnings(\"unused\")\n public static float valueRangeLimit(float value, float startValue, float endValue) {\n // If is over the limit return the normalized value\n if (value < Math.min(startValue, endValue)) return Math.min(startValue, endValue);\n if (value > Math.max(startValue, endValue)) return Math.max(startValue, endValue);\n // Else return the original value\n return value;\n }",
"@Override\n\t\tpublic boolean inRange(String value) {\n\t\t\treturn true;\n\t\t}",
"private Filter rangeFilter(String start, String end, Object minValue, Object maxValue) {\n Filter f1 = FF.lessOrEqual(FF.property(start), FF.literal(maxValue));\n Filter f2 = FF.greaterOrEqual(FF.property(end), FF.literal(minValue));\n return FF.and(Arrays.asList(f1, f2));\n\n// Filter f1 = FF.greaterOrEqual(FF.property(start), FF.literal(minValue));\n// Filter f2 = FF.lessOrEqual(FF.property(end), FF.literal(maxValue));\n// return FF.and(Arrays.asList(f1, f2));\n }",
"public static boolean isValueRange(int value, int min, int max) throws Exception {\r\n\t\t//Checks the Case:\r\n\t\tif (value >= min && value <= max) {\r\n\t\t\t//Returns Value:\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\t//Returns Value:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected final boolean rangeTestFailed(int value) {\n\tboolean test1 =\n\t (reqminSet && (reqminClosed? (value < reqmin): (value <= reqmin)))\n\t || (minSet && (minClosed? (value < min): (value <= min)));\n\tboolean test2 =\n\t (reqmaxSet && (reqmaxClosed? (value > reqmax): (value >= reqmax)))\n\t || (maxSet && (maxClosed? (value > max): (value >= max)));\n\treturn (test1 || test2);\n }",
"boolean valueCheckMatch(String value) {\r\n\t\tif (value.length() > intLength) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (hasRange) {\r\n\t\t\tLong ulongValue = Long.valueOf(Long.parseLong(value));\r\n\t\t\tif ((ulongValue.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (ulongValue.compareTo(maximum) > 0)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private void inRange(String[] arguments) {\n\t\ttry { \n\t int IDLow = Integer.parseInt(arguments[1]);\n\t int IDHigh = Integer.parseInt(arguments[2]);\n\t totalInRangeCount = 0;\n\t countInRange(root, IDLow, IDHigh);\n\t System.out.printf(\"%d\\n\",totalInRangeCount);\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t\t\n\t}",
"public static void between(int arg, int min, int max, String argName) {\r\n lessThan(arg, max, argName);\r\n greaterThan(arg, min, argName);\r\n }",
"public boolean isOutsideLimits(int value) {\n return value < lowerLimit || value > upperLimit;\n }",
"public boolean isInsideLimits(int value) {\n return value > lowerLimit && value < upperLimit;\n }",
"@Override\n\t@Deprecated\n\tprotected final void rangeCheck ( int from , int to ) {\n\t}",
"private boolean checkRange() {\n String notInRange = \"\"; //used for displaying error message\n \n double a = Double.valueOf(ampBox.getText());\n int d = Integer.valueOf(durBox.getText());\n int f = Integer.valueOf(freqBox.getText());\n int ow = Integer.valueOf(owBox.getText());\n \n if(a>8.128 || a<0) notInRange += \"Amplitude not in range [0mA,8.128mA]\\n\";\n if(d>423 || d<0) notInRange += \"Pulse duration not in range [0uS,423uS]\\n\";\n if(f>100 || f<0) notInRange += \"Frequency not in range [0Hz,100Hz]\\n\";\n if(ow>60 || ow<0) notInRange += \"ON-WAVE duration not in range [0sec,60sec]\\n\";\n \n if(notInRange.length()>0) {\n notInRange += \"\\nInput within proper ranges and try again\";\n JOptionPane.showMessageDialog(null, \n notInRange, \n \"Error\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n else {\n return true;\n }\n }",
"private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }",
"protected ArrayList<Attraction> TryParseRange(String i, ArrayList<Attraction> toRunOn) throws Exception {\n ArrayList<Attraction> toReturn = new ArrayList<>();\n try {\n String[] range = i.split(\"-\");\n if (range.length > 2)\n throw new Exception(\"Error parsing\");\n final int low = Integer.parseInt(range[0]);\n final int high = Integer.parseInt(range[1]);\n for (Attraction item : toRunOn) {\n float price = item.getPrice();\n if (price >= low && price <= high)\n toReturn.add(item);\n }\n } catch (Exception ex) {\n return toReturn;\n }\n return toReturn;\n }",
"public void setRangeOfCheck(String[] rangeOfCheck) {\n this.rangeOfCheck = rangeOfCheck;\n }",
"DbQuery setRangeFilter(int startValue, int endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }",
"private void checkBound(int lowerBound, int upperBound) {\n\t\tSet setKeys = Utility.vocabHM.keySet();\n\t\tIterator i = setKeys.iterator();\n\n\t\twhile (i.hasNext()) {\n\t\t\tString s = (String) i.next();\n\t\t\tInteger df = (Integer) Utility.vocabHM.get(s);\n\n\t\t\tif ((df.intValue() <= lowerBound) || (df.intValue() >= upperBound))\n\t\t\t\ti.remove();\n\t\t}\n\t}",
"private String useRangeFormat(Unit units, int lowerBound, int upperBound) {\n return lowerBound + \" to \" + upperBound + getUnits(units, upperBound);\n }",
"public void setRange(double lower, double upper) {\n/* 625 */ if (lower >= upper) {\n/* 626 */ throw new IllegalArgumentException(\"Requires 'lower' < 'upper'.\");\n/* */ }\n/* 628 */ setRange(new DateRange(lower, upper));\n/* */ }",
"private double correctToRange(double value, double min, double max) {\r\n\t\t// If the value is below the range, set it equal to the minimum.\r\n\t\tif (value < min) {\r\n\t\t\treturn min;\r\n\t\t\t// If it is above the range, set it equal to the maximum.\r\n\t\t} else if (value > max) {\r\n\t\t\treturn max;\r\n\t\t}\r\n\t\t// Otherwise, it is in-range and no adjustments are needed.\r\n\t\treturn value;\r\n\t}",
"public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }",
"private int checkRange(int number,int range){\n return (number+range)%range;\n }",
"public boolean whitelist(Range<Integer> range) {\n meta.add(range);\n return isWhitelisted(range);\n }",
"public void setParamValueRange(String label, Object minValue, Object maxValue);",
"public static void isInRange(int userInput, int maxNum) {\n\t\tif (userInput < 1 || userInput > maxNum) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter a number (1-\" + maxNum + \")! Please try again:\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner scnr = new Scanner(System.in);\n\t\tint firstNum;\n\t\tint secondNum;\n\t\tint thirdNum;\n\t\tint lowEnd;\n\t\tint highEnd;\n\t\t\n\t\tSystem.out.println(\"Enter a number: \");\n\t\tfirstNum = scnr.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter another number: \");\n\t\tsecondNum = scnr.nextInt();\n\t\tif (firstNum < secondNum) {\n\t\t\tlowEnd = firstNum;\n\t\t\thighEnd = secondNum;\n\t\t} else {\n\t\t\tlowEnd = secondNum;\n\t\t\thighEnd = firstNum;\n\t\t}\n\t\tSystem.out.println(\"Your range is \" + lowEnd + \"-\" + highEnd + \".\");\n\t\tSystem.out.println(\"Enter a number for verification: \");\n\t\tthirdNum = scnr.nextInt();\n\t\t\n\t\tif (thirdNum >= lowEnd && thirdNum <= highEnd) {\n\t\t\tSystem.out.println(thirdNum + \" is in the range.\");\n\t\t} else {\n\t\t\tSystem.out.println(thirdNum + \" is outside the range.\");\n\t\t}\n\t\t\n\t\tscnr.close();\n\t}",
"DbQuery setRangeFilter(long startValue, long endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }",
"public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }",
"private Query getIntRange(final String fieldName, String[] range) {\n int lower = Integer.parseInt(range[0]);\n int upper = Integer.parseInt(range[1]);\n return IntPoint.newRangeQuery(fieldName, lower, upper);\n }",
"private void validateParameter(){\n\t\tif(hrNum > upperBound){\n\t\t\thrNum = upperBound;\n\t\t}\n\t\telse if(hrNum < lowerBound){\n\t\t\thrNum = lowerBound;\n\t\t}\n\t}",
"protected static String expectedRangeString(Object minValue, boolean minInclusive, Object maxValue, boolean maxInclusive) {\n // A means for a return value\n String retVal;\n\n // Start with the proper symbol for the lower bound\n if (minInclusive) {\n retVal = \"[\";\n } else {\n retVal = \"(\";\n }\n\n // Add in the minimum and maximum values\n retVal += minValue + \" .. \" + maxValue;\n\n // End with the proper symbol for the upper bound\n if (maxInclusive) {\n retVal += \"]\";\n } else {\n retVal += \")\";\n }\n\n // Return the formatted string\n return retVal;\n }",
"public static boolean correctRange(int [] input) {\n\t\treturn (input[0] > 0) && (input[1] > 0) && (input[2] > 0);\n\t}",
"public ValueOutOfRangeException(String value, int lowerBound, int upperBound) {\n this.message = String.format(VALUE_OUT_OF_EXPECTED_RANGE, value, lowerBound, upperBound);\n }",
"protected final boolean isValidValueImpl(String value) {\n if (value.length() != 8) {\n return false;\n }\n\n // Convert all 3 components of the string to integers\n int y, m, d;\n try {\n y = Integer.parseInt(value.substring(0, 4));\n m = Integer.parseInt(value.substring(4, 6));\n d = Integer.parseInt(value.substring(6, 8));\n } catch (NumberFormatException nfe) {\n return false;\n }\n\n // Check that the values are in the correct range\n return (y >= 0) && (m >= 1) && (m <= 12) && (d >= 1) && (d <= 31);\n }",
"NumericRangeFilter(double p_min, double p_max) {\n maximum = p_max;\n minimum = p_min;\n }",
"public static void between(double arg, double min, double max, String argName) {\r\n lessThan(arg, max, argName);\r\n greaterThan(arg, min, argName);\r\n }",
"public static Boolean IntBetween(String arg, int floor, int ceiling){\n\t\tif(Is.Int(arg) && Is.DoubleBetween(arg, floor, ceiling)){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void setParamValueRange(String label, double minValue, double maxValue);",
"private void parseRange(Node node) {\r\n if (switchTest) return;\r\n int low = node.low();\r\n int high = node.high();\r\n ok = false;\r\n if (in < input.length()) {\r\n int ch = input.codePointAt(in);\r\n ok = (ch >= low) && (ch <= high);\r\n if (ok) {\r\n int n = Character.charCount(ch);\r\n in += n;\r\n if (tracing) traceInput();\r\n }\r\n }\r\n }",
"public boolean inRange(Number n) {\n return n.compareTo(min) >= 0 && n.compareTo(max) <= 0;\n }",
"private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }",
"private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }",
"@Override\r\n\tpublic Object visitRangeExpression(RangeExpression rangeExpression,\r\n\t\t\tObject arg) throws Exception {\r\n\t\tString lowerType = (String) rangeExpression.lower.visit(this, arg);\r\n\t\tString upperType = (String) rangeExpression.upper.visit(this, arg);\r\n\t\tcheck(lowerType.equals(intType) && upperType.equals(intType), \"uncompatible range expression\", rangeExpression);\r\n\t\treturn null;\r\n\t}",
"public static void main(String[] args) {\n Scanner num = new Scanner(System.in);\n int x = num.nextInt();\n if (x > -15 && x <= 12 || x > 14 && x < 17 || x >= 19 && x < Integer.MAX_VALUE) {\n System.out.println(\"True\");\n } else {\n System.out.println(\"False\");\n }\n }",
"public static void lenBetween(String arg, int min, int max, String argName) {\r\n shorterThan(arg, max, argName);\r\n longerThan(arg, min, argName);\r\n }",
"private Filter betweenFilter(String start, Object minValue, Object maxValue) {\n return FF.between(FF.property(start), FF.literal(minValue), FF.literal(maxValue));\n }",
"private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }",
"public static boolean between( int value, int min, int max ) {\n return value >= min && value <= max;\n }",
"public static int checkMinMax(int value, String name, int minValue, int maxValue)\r\n\t\tthrows NumberOutOfRangeException\r\n\t{\r\n\t\tif (value < minValue || value > maxValue) throw new NumberOutOfRangeException(name, value, minValue, maxValue);\r\n\t\treturn value;\r\n\t}",
"public static void lenBetween(Object[] arg, int min, int max, String argName) {\r\n shorterThan(arg, max, argName);\r\n longerThan(arg, min, argName);\r\n }",
"public static boolean inRange(int value, int min, int max){\n if ((value >= min) && (value <= max))\n return true;\n return false;\n }",
"public static double inInterval(double lowerBound, double value, double upperBound) {\n/* 67 */ if (value < lowerBound)\n/* 68 */ return lowerBound; \n/* 69 */ if (upperBound < value)\n/* 70 */ return upperBound; \n/* 71 */ return value;\n/* */ }",
"public SettingInteger setValidRange(int min, int max) { _minValue = min; _maxValue = max; return this; }",
"Range controlLimits();",
"private boolean isNumberinRange(double needle, double haystack, double range) {\n return (((haystack - range) < needle) // greater than low bounds\n && (needle < (haystack + range))); // less than upper bounds\n }",
"boolean isValidRangeReading(double dist) {\n return ( !Double.isNaN(dist) && dist>MIN_RANGE_DIST && dist<MAX_RANGE_DIST ) ;\n }",
"@Test(timeout = 4000)\n public void test21() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. 256 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }",
"public static boolean checkRange(int x) {\n\n \n if (x >= 1 && x <= 9) { //check if input is between 1 and 9, inclusive\n return (true);\n }\n else {\n System.out.print(\"You did not enter an int in [1,9]; try again: \");\n return (false);\n \n }\n\n \n\n }",
"private boolean isValidSeam(int[] a, int len, int range)\n {\n if (a.length != len || a[0] < 0 || a[0] > range)\n return false;\n for (int i = 1; i < len; i++)\n {\n if (a[i] < Math.max(0, a[i-1] -1) || a[i] > Math.min(range, a[i-1] +1))\n return false;\n }\n return true;\n }",
"public static boolean stringInBounds (String plainText) {\r\n\t\t\r\n\t\tchar[] pText = plainText.toCharArray();\r\n\t\tboolean isCorrect;\r\n\t\tfor(int i = 0; i < plainText.length(); i++) {\r\n\t\t\tdo {\r\n\t\t\t\tif (plainText.charAt(i) < LOWER_BOUND || plainText.charAt(i) > UPPER_BOUND ) {\r\n\t\t\t\t\tisCorrect = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t\tif(plainText.charAt(i) < LOWER_BOUND) {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) - RANGE);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) + RANGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t}else {\r\n\t\t\t\t\tisCorrect = true;\r\n\t\t\t\t}\r\n\t\t\t}while(isCorrect = false);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static void verifyStartEnd(int start, int end) {\n if (start >= end || start < 0) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Start value (\");\n sb.append(start);\n sb.append(\") MUST be greater equal than 0 and MUST be smaller than end value (\");\n sb.append(end);\n sb.append(\").\");\n throw new IllegalArgumentException(sb.toString());\n }\n }",
"private boolean isBetweenBounds(int x, int y, int[] bounds) {\n return x >= bounds[0] && x <= bounds[2] && y >= bounds[1] && y <= bounds[3];\n }",
"DbQuery setRangeFilter(String startValue, String endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.STRING;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }",
"@Override\r\n public boolean checkElements(SequenceConstructionExpression owner) {\r\n SequenceRange self = this.getSelf();\r\n Expression rangeLower = self.getRangeLower();\r\n Expression rangeUpper = self.getRangeUpper();\r\n ElementReference rangeLowerType = rangeLower == null? null: rangeLower.getType();\r\n ElementReference rangeUpperType = rangeUpper == null? null: rangeUpper.getType();\r\n return (rangeLowerType == null || rangeLowerType.getImpl().isInteger()) && \r\n (rangeUpperType == null || rangeUpperType.getImpl().isInteger());\r\n }",
"public static final InputValidator<Double> createRangeValidator(\n\t\t\tdouble beginInclusive, \n\t\t\tdouble endInclusive, \n\t\t\tString validationMessage\n\t) {\n\t\treturn new InputValidator<Double>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getErrorMessage(Double input) {\n\t\t\t\treturn input <= endInclusive \n\t\t\t\t\t\t&& input>= beginInclusive ? DEFAULT_SUCCESS_MESSAGE : validationMessage;\n\t\t\t}\t\t\t\n\t\t};\n\t}",
"public void setRange(Date lower, Date upper) {\n/* 610 */ if (lower.getTime() >= upper.getTime()) {\n/* 611 */ throw new IllegalArgumentException(\"Requires 'lower' < 'upper'.\");\n/* */ }\n/* 613 */ setRange(new DateRange(lower, upper));\n/* */ }",
"private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }",
"private void validateArgumentValues() throws ArgBoxException {\n\t\tfinal List<String> errorMessages = new ArrayList<>();\n\t\tparsedArguments.values().stream()\n\t\t\t\t.filter(parsedArg -> parsedArg.isValueRequired())\n\t\t\t\t.filter(parsedArg -> {\n\t\t\t\t\tfinal boolean emptyValue = null == parsedArg.getValue();\n\t\t\t\t\tif (emptyValue) {\n\t\t\t\t\t\terrorMessages.add(String.format(\"The argument %1s has no value !\", parsedArg.getCommandArg()));\n\t\t\t\t\t}\n\t\t\t\t\treturn !emptyValue;\n\t\t\t\t})\n\t\t\t\t.peek(parsedArg -> {\n\t\t\t\t\tif (parsedArg.getValidator().negate().test(parsedArg.getValue())) {\n\t\t\t\t\t\terrorMessages.add(String.format(\"The value %1s for the argument %2s is not valid !\",\n\t\t\t\t\t\t\t\tparsedArg.getValue(), parsedArg.getCommandArg()));\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.close();\n\t\tthrowException(() -> CollectionUtils.isNotEmpty(errorMessages),\n\t\t\t\tgetArgBoxExceptionSupplier(\"One or more arguments have errors with their values !\", errorMessages));\n\t}",
"@Test\n public void testGetRandomRange() {\n // XXX what should be tested?\n // bad values to the range?\n // min == max?\n Assert.assertTrue(true);\n }",
"public ValueOutOfRangeException(int value, int lowerBound, int upperBound) {\n this.message = String.format(VALUE_OUT_OF_EXPECTED_RANGE, value, lowerBound, upperBound);\n }",
"public void checkBounds() {\n for (int k = 0; k < numDataCols; k++) {\n DashDataType<?> dtype = dataTypes[k];\n\n if ( dtype instanceof StringDashDataType ) {\n StringDashDataType strtype = (StringDashDataType) dtype;\n for (int j = 0; j < numSamples; j++) {\n ADCMessage msg = strtype.boundsCheckStandardValue((String) stdObjects[j][k]);\n if ( msg != null ) {\n msg.setRowNumber(j + 1);\n msg.setColNumber(k + 1);\n msg.setColName(userColNames[k]);\n stdMsgList.add(msg);\n }\n }\n }\n else if ( dtype instanceof IntDashDataType ) {\n IntDashDataType inttype = (IntDashDataType) dtype;\n for (int j = 0; j < numSamples; j++) {\n ADCMessage msg = inttype.boundsCheckStandardValue((Integer) stdObjects[j][k]);\n if ( msg != null ) {\n msg.setRowNumber(j + 1);\n msg.setColNumber(k + 1);\n msg.setColName(userColNames[k]);\n stdMsgList.add(msg);\n }\n }\n }\n else if ( dtype instanceof DoubleDashDataType ) {\n DoubleDashDataType dbltype = (DoubleDashDataType) dtype;\n for (int j = 0; j < numSamples; j++) {\n ADCMessage msg = dbltype.boundsCheckStandardValue((Double) stdObjects[j][k]);\n if ( msg != null ) {\n msg.setRowNumber(j + 1);\n msg.setColNumber(k + 1);\n msg.setColName(userColNames[k]);\n stdMsgList.add(msg);\n }\n }\n }\n else {\n throw new IllegalArgumentException(\n \"unexpected data type encountered in bounds checking: \" + dtype);\n }\n }\n }",
"@Test\n public void testSetUserIdOutOfRange() {\n System.out.println(\"setUserId Test (Out of Range value)\");\n Long userId = Long.MAX_VALUE + 1;\n user.setUserId(userId);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertFalse(violations.isEmpty());\n }",
"@Override\n public boolean isRange() {\n return false;\n }",
"private static Object getInputWithinRange(String message, Scanner sc, Class type, float min, float max)\n throws IllegalArgumentException {\n while (true) {\n Object input = getInput(message, sc, type);\n float in;\n if (type.equals(Integer.class)) {\n in = 1.0f * (int) input;\n }\n else {\n in = (float) input;\n }\n \n if (in >= min && in <= max) {\n return input;\n }\n else {\n System.out.println(\"Invalid input: must be >=\" + min + \" and <=\" + max);\n }\n }\n }",
"public boolean isRangeValid()\n {\n return isRangeValid(((AnalogInput)m_echoChannel).getVoltage());\n }",
"@Test(dataProvider = \"NumericRangeWithoutConstraintViolationDataProvider\")\n public void testNumericRangeWithoutConstraintViolation( final String[] commandLine ) {\n runNumericArgumentRangeTest(commandLine);\n }",
"public static boolean notBetween(String value, double min, double max)\r\n\t{\r\n\t\treturn !isBetween(value, min, max);\r\n\t}",
"ValueRangeConstraint createValueRangeConstraint();",
"private double applyLimitBounds(double value) {\n if(value > 1.0) {\n value = 1.0;\n }\n if(value < -1.0) {\n value = -1.0;\n }\n\n // Absolute limits:\n if(lifter.getBottomLimit() && lifter.getUpperLimit()) {\n if(value < 0) {\n value = 0; // Can't go down from the bottom;\n }\n }\n\n if((lifter.getUpperLimit() && lifter.getUpperWarning()) && lifter.getUpperSmallPieceDetector()) {\n if(value > 0) {\n value = 0; // Can't go up from the top\n }\n }\n\n // Slow speed zones\n if(lifter.getBottomWarning()) {\n if(value < -0.3) {\n value = -0.3;\n }\n }\n\n if(lifter.getUpperWarning()) {\n if(value > 0.7) {\n value = 0.7;\n }\n }\n\n printLimits();\n\n return value;\n }",
"@Test\n public void testIsInLimitLower() {\n Assertions.assertTrue(saab.isInLimit(.3, .9, .6));\n }",
"DbQuery setRangeFilter(double startValue, double endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.DOUBLE;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }",
"public AllowedValues(final RangeType range){\n \n valueOrRange = new ArrayList<>();\n valueOrRange.add(range);\n }",
"@Test(expectedExceptions=InvalidArgumentValueException.class)\n public void argumentValidationTest() {\n String[] commandLine = new String[] {\"--value\",\"521\"};\n\n parsingEngine.addArgumentSource( ValidatingArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n ValidatingArgProvider argProvider = new ValidatingArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 521, \"Argument is not correctly initialized\");\n\n // Try some invalid arguments\n commandLine = new String[] {\"--value\",\"foo\"};\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }",
"private boolean isInRange(int c) {\n switch (border) {\n case between:\n return min <= c && c <= max;\n case min:\n return min <= c;\n case max:\n return c <= max;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + border);\n }\n }",
"public static void verifyInterval(double lower, double upper)\r\n/* 145: */ {\r\n/* 146:336 */ if (lower >= upper) {\r\n/* 147:337 */ throw new NumberIsTooLargeException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL, Double.valueOf(lower), Double.valueOf(upper), false);\r\n/* 148: */ }\r\n/* 149: */ }",
"private void add_range(Question q)\n\t{\n\t\tlog.debug(\"Question \" + q.getQid() + \" is getting checked for ranges\");\n\t\tString min = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='min_num_value_n']/value\").getText();\n\t\tString max = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='max_num_value_n']/value\").getText();\n\n\t\tif (min != \"\") {\n\t\t\tq.setFloat_range_min(min);\n\t\t}\n\t\tif (max != \"\") {\n\t\t\tq.setFloat_range_max(max);\n\t\t}\n\t\tlog.debug(\"range check finished\");\n\t}",
"@Test\n public void testIsInLimitUpper() {\n Assertions.assertFalse(saab.isInLimit(.5, 1.5, 2.0));\n }",
"private boolean acceptedValueRange(double amount){\n if(amount <= 1.0 && amount >= 0.0){\n return true;\n }\n else{\n throw new IllegalArgumentException(\"Number must be in range of [0,1]\");\n }\n }",
"public void validate(String[] argsIn) {\n\n\t\tif (argsIn.length > 1 || null == argsIn) {\n\t\t\tSystem.err.println(\"Arguments passed were either less/more than expected!\\nThe program can accepts 1 arguments.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tif(argsIn.length != 1 || argsIn[0].equals(\"${arg0}\") || (Integer.parseInt(argsIn[0]) > 2)) {\n\t\t\tSystem.err.println(\"Debug arguments can take values from 0-2\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tbuildInput(argsIn);\n\t\tif (argsIn.length == 1) {\n\t\t\tint debugValue = 0;\n\t\t\ttry {\n\t\t\t\tdebugValue = Integer.parseInt(argsIn[0]);\n\t\t\t\tMyLogger.setDebugValue(debugValue);\n\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Error while parsing debug level value\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}",
"public static <T extends Comparable<T>> boolean inRange(T val, T min, T max) {\n\t\tif(val.compareTo(min) >= 0 && val.compareTo(max) <= 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}"
]
| [
"0.6521457",
"0.632887",
"0.62761974",
"0.61100256",
"0.60182214",
"0.5871236",
"0.5792633",
"0.5743226",
"0.57373804",
"0.5714461",
"0.56903756",
"0.5673145",
"0.56323695",
"0.5617121",
"0.5616922",
"0.56060046",
"0.5570231",
"0.55121017",
"0.5487734",
"0.54864144",
"0.5459227",
"0.5429724",
"0.54218197",
"0.542034",
"0.5408287",
"0.5390538",
"0.5375991",
"0.53757226",
"0.5338002",
"0.53166544",
"0.5314317",
"0.5302231",
"0.5281993",
"0.5278837",
"0.52707547",
"0.5259232",
"0.52592176",
"0.52559716",
"0.523278",
"0.52305305",
"0.522675",
"0.52181333",
"0.5206333",
"0.5201668",
"0.5201563",
"0.5200268",
"0.51977545",
"0.5196279",
"0.5187006",
"0.518337",
"0.51726985",
"0.5169872",
"0.5154707",
"0.51371896",
"0.51230776",
"0.5110359",
"0.51034385",
"0.5099314",
"0.5092342",
"0.50829834",
"0.5072519",
"0.5057818",
"0.50507754",
"0.5049177",
"0.50385636",
"0.5032239",
"0.50288945",
"0.50283736",
"0.50238925",
"0.5020035",
"0.5019354",
"0.5014349",
"0.50128406",
"0.5012094",
"0.5001796",
"0.4995774",
"0.49953455",
"0.49943846",
"0.49844635",
"0.49831498",
"0.49815995",
"0.49799418",
"0.4961594",
"0.49454987",
"0.49341115",
"0.49279642",
"0.49208698",
"0.491843",
"0.49165002",
"0.49096182",
"0.4895294",
"0.48935935",
"0.48895007",
"0.48874876",
"0.4884578",
"0.48523808",
"0.48504803",
"0.48500836",
"0.4849517",
"0.48426065"
]
| 0.5994886 | 5 |
After starting an RPC server, updates configuration with the actual listening address of that server. The listening address may be different from the configured address if, for example, the configured address uses port 0 to request use of an ephemeral port. | public static InetSocketAddress updateRPCListenAddress(
OzoneConfiguration conf, String rpcAddressKey,
InetSocketAddress addr, RPC.Server rpcServer) {
return updateListenAddress(conf, rpcAddressKey, addr,
rpcServer.getListenerAddress());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateCustomServerAddress(String customServerAddress);",
"public static InetSocketAddress updateListenAddress(OzoneConfiguration conf,\n String addressKey, InetSocketAddress addr, InetSocketAddress listenAddr) {\n InetSocketAddress updatedAddr = new InetSocketAddress(addr.getHostString(),\n listenAddr.getPort());\n conf.set(addressKey,\n addr.getHostString() + \":\" + listenAddr.getPort());\n return updatedAddr;\n }",
"public abstract InetSocketAddress listeningAddress();",
"void resetToDefaultServerAddress();",
"public Configuration(String serverAddress) {\r\n\t\tthis.serverAddress = serverAddress;\r\n\t\tthis.serverPort = \"2586\";\r\n\t}",
"private URI resolveWebServerBindAddress(final Config config) {\n\t\tfinal String[] brokerHostPort = config.getBroker().getHostPort().split(\":\");\n \tfinal JerseyUriBuilder builder = new JerseyUriBuilder();\n \tfinal BootstrapConfiguration bs = config.getBootstrap();\n\t\tfinal String[] webHostPort = bs.getWebServerHostPort().split(\":\");\n\t\tint webPort = Integer.parseInt(webHostPort[1]);\n\t\tfinal boolean untouched = bs.getWebServerHostPort().equals(BootstrapConfiguration.WEB_SERVER_HOST_PORT);\n\t\tString webhostport;\n\t\tif (untouched) {\n\t\t\tint brokerPort = Integer.parseInt(brokerHostPort[1]);\n\t\t\twebPort = brokerPort == BrokerConfiguration.PORT ? webPort: brokerPort + 100;\n\t\t\tfinal String host = config.getResolvedShardId().getId().split(\":\")[0];\n\t\t\tbuilder.host(host).port(webPort);\n\t\t\twebhostport = host + \":\" + webPort;\n\t\t} else {\n\t\t\tbuilder.host(webHostPort[0]).port(webPort);\n\t\t\twebhostport = webHostPort[0]+ \":\" + webPort;\n\t\t}\n\t\tconfig.getResolvedShardId().setWebHostPort(webhostport);\n\t\tconfig.getBootstrap().setWebServerHostPort(webhostport);\n\t\tlogger.info(\"{}: {} Web host:port = {}\", name, tenant.getConnectReference(), webhostport);\n\t\tbuilder.path(config.getBootstrap().getWebServerContextPath());\n\t\treturn builder.build();\n\t}",
"public Builder setServerAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n serverAddress_ = value;\n onChanged();\n return this;\n }",
"public Configuration() {\r\n\t\tthis.serverAddress = \"127.0.0.1\";\r\n\t\tthis.serverPort = \"2586\";\r\n\t}",
"private void startListen() {\n try {\n listeningSocket = new ServerSocket(listeningPort);\n } catch (IOException e) {\n throw new RuntimeException(\"Cannot open listeningPort \" + listeningPort, e);\n }\n }",
"@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}",
"public synchronized void initListenInfo(@Nonnull String address, int port) {\n if (listenAddress != null) {\n throw new IllegalStateException(\"Already initialized\");\n }\n this.listenAddress = address;\n this.listenPort = port;\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"CenterServerImplPort\".equals(portName)) {\n setCenterServerImplPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public void setBindAddress(String bindAddress) {\n agentConfig.setBindAddress(bindAddress);\n }",
"public static InetSocketAddress getBindAddress(Configuration conf) {\n return conf.getSocketAddr(JHAdminConfig.MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_PORT);\n }",
"public void addressChanged() {\n\t\t// the variable OSCPortOut tries to get an instance of OSCPortOut\n\t\t// at the address indicated by the addressWidget\n\t\ttry {\n\t\t\toscPort =\n\t\t\t\tnew OSCPortOut(InetAddress.getByName(addressWidget.getText()));\n\t\t\t// if the oscPort variable fails to be instantiated then sent\n\t\t\t// the error message\n\t\t} catch (final Exception ex) {\n\t\t\tshowError(\"Couldn't set address\");\n\t\t}\n\t}",
"public void setLocalConfig(String lastAdress, String lastPort) {\r\n\t\tconfig.setLocalOption(\"LastAdress\", lastAdress);\r\n\t\tconfig.setLocalOption(\"LastPort\", lastPort);\r\n\t\tconfig.save();\r\n\t}",
"private void setServerAddressList(){\n\n if (mCallBack != null){\n mCallBack.onGetServerAddressListCompleted(mServerAddressList);\n }\n }",
"java.lang.String getServerAddress();",
"public Builder setRpcAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n rpcAddress_ = value;\n onChanged();\n return this;\n }",
"public String getRpcServerAddress() throws HMServiceException {\n return rpcServerAddress.orElseThrow(() -> new HMServiceException(\"No RPC server address given! Check builder procedure. \"\n + \"May passed the wrong path during building\"));\n }",
"@Override\n\tpublic void addServer(InetSocketAddress arg0) throws IOException {\n\n\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"UGSRuntimeServiceXfireImplHttpPort\".equals(portName)) {\n setUGSRuntimeServiceXfireImplHttpPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public ServerSide(Config config, InetAddress inetAddress, int port) {\n super(config);\n this.inetAddress = inetAddress;\n this.port = port;\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"RemoteFacadeCfc\".equals(portName)) {\r\n setRemoteFacadeCfcEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }",
"public abstract void listen(ServiceConfig serviceConfig) throws IOException;",
"private void initServerSocket()\n\t{\n\t\tboundPort = new InetSocketAddress(port);\n\t\ttry\n\t\t{\n\t\t\tserverSocket = new ServerSocket(port);\n\n\t\t\tif (serverSocket.isBound())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Server bound to data port \" + serverSocket.getLocalPort() + \" and is ready...\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to initiate socket.\");\n\t\t}\n\n\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"publicService\".equals(portName)) {\n setpublicServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"WSExtensionService\".equals(portName)) {\n setWSExtensionServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"void startServer(String name, Config.ServerConfig config);",
"public String getBindAddress() {\n return agentConfig.getBindAddress();\n }",
"public Configuration(String serverAddress, String serverPort) {\r\n\t\tthis.serverAddress = serverAddress;\r\n\t\tthis.serverPort = serverPort;\r\n\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"NFEServices\".equals(portName)) {\n setNFEServicesEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"UploaderPort\".equals(portName)) {\n setUploaderPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"@java.lang.Deprecated public Builder setListeningAddresses(\n int index, io.envoyproxy.envoy.config.core.v3.Address value) {\n if (listeningAddressesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureListeningAddressesIsMutable();\n listeningAddresses_.set(index, value);\n onChanged();\n } else {\n listeningAddressesBuilder_.setMessage(index, value);\n }\n return this;\n }",
"private void initServerSock(int port) throws IOException {\n\tserver = new ServerSocket(port);\n\tserver.setReuseAddress(true);\n }",
"public Builder setServerAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n serverAddress_ = value;\n onChanged();\n return this;\n }",
"String getBindAddress() {\n return bindAddress;\n }",
"@java.lang.Deprecated public io.envoyproxy.envoy.config.core.v3.Address.Builder addListeningAddressesBuilder() {\n return getListeningAddressesFieldBuilder().addBuilder(\n io.envoyproxy.envoy.config.core.v3.Address.getDefaultInstance());\n }",
"@Override\n\tpublic void addServer(InetSocketAddress arg0, int arg1) throws IOException {\n\n\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"OutboundServiceSessionEJBBeanServicePort\".equals(portName)) {\n setOutboundServiceSessionEJBBeanServicePortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"@Override\n protected void doBind(SocketAddress localAddress) throws Exception {}",
"private boolean configureAndStart(int port) {\n\t\ttry {\n\t\t\t//get local host to bind\n\t\t\tString host = InetAddress.getLocalHost().getHostName();\n//\t\t\thost = \"localhost\";\n\t\t\tSystem.out.printf(\"Listening on: Host: %s, Port: %d%n\", host, port);\n\n\t\t\tselector = Selector.open();\n\n\t\t\tserverChannel = ServerSocketChannel.open();\n\t\t\tserverChannel.socket().bind( new InetSocketAddress( host, port ) );\n\t\t\tserverChannel.configureBlocking( false );\n\n\t\t\t//setup selector to listen for connections on this serverSocketChannel\n\t\t\tserverChannel.register( selector, SelectionKey.OP_ACCEPT );\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Configuration for Server failed. Exiting.\");\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"Server Successfully configured\");\n\n\t\t//start up the ThreadPool\n\t\tmanager.start();\n\n\t\t//create timer to handle output, and timeout\n\t\ttimer = new Timer(\"Output_and_timeout\");\n\t\t//schedule output\n\t\ttimer.scheduleAtFixedRate(new ServerOutput(batchTime), Constants.OUTPUT_TIME * 1000,\n\t\t\t\tConstants.OUTPUT_TIME * 1000);\n\t\ttimeout = new ScheduleTimeout(this);\n\t\ttimer.scheduleAtFixedRate(timeout, batchTime * 1000, batchTime * 1000);\n\n\t\treturn true;\n\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"JobSubmission2SOAP11port_http\".equals(portName)) {\n setJobSubmission2SOAP11port_httpEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"EmpleadoServiciolmpl\".equals(portName)) {\r\n setEmpleadoServiciolmplEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }",
"public void markSrvPortReplace() throws JNCException {\n markLeafReplace(\"srvPort\");\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"dipp\".equals(portName)) {\n setdippEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"protected void doBind(SocketAddress localAddress) throws Exception {}",
"@java.lang.Deprecated public Builder addListeningAddresses(io.envoyproxy.envoy.config.core.v3.Address value) {\n if (listeningAddressesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureListeningAddressesIsMutable();\n listeningAddresses_.add(value);\n onChanged();\n } else {\n listeningAddressesBuilder_.addMessage(value);\n }\n return this;\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"msgserviceHttpSoap11Endpoint\".equals(portName)) {\n setmsgserviceHttpSoap11EndpointEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"@Override\n public int getServerBroadcastPort() {\n return 10081;\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"SliderSvcPort\".equals(portName)) {\n setSliderSvcPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public void setAjpListener(Builder serverBuilder) {\n if (options.ajp13Port == -1)\n return;\n if (options.ajp13Port < -1 || options.ajp13Port > MAX_PORT) {\n log.warn(\"Unallowed ajp13Port value. AJP listener is disabled!\");\n return;\n }\n\n if (options.ajp13ListenAddress != null)\n serverBuilder.addAjpListener(options.ajp13Port, options.ajp13ListenAddress);\n else {\n // Listen on all interfaces\n serverBuilder.addAjpListener(options.ajp13Port, hostAllInterfacesString);\n }\n\n log.info(\"AJP listener created\");\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"webservice_vasmanHttpPort\".equals(portName)) {\r\n setwebservice_vasmanHttpPortEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }",
"public static void setBroadcastInetAddressAndPort(InetAddressAndPort addr)\n {\n broadcastInetAddress = addr.getAddress();\n broadcastInetAddressAndPort = addr;\n }",
"public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serverAddress_ = s;\n return s;\n }\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"GarageSeller\".equals(portName)) {\n setGarageSellerEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serverAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n\tInetSocketAddress remoteAddress();",
"public String getServerAddress() {\r\n\t\treturn this.serverAddress;\r\n\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"WsUserServiceImpl\".equals(portName)) {\r\n setWsUserServiceImplEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }",
"public SocketChannelConfig setReuseAddress(boolean reuseAddress)\r\n/* 215: */ {\r\n/* 216: */ try\r\n/* 217: */ {\r\n/* 218:221 */ this.javaSocket.setReuseAddress(reuseAddress);\r\n/* 219: */ }\r\n/* 220: */ catch (SocketException e)\r\n/* 221: */ {\r\n/* 222:223 */ throw new ChannelException(e);\r\n/* 223: */ }\r\n/* 224:225 */ return this;\r\n/* 225: */ }",
"private void setupServerInfo() {\n\t\tlogger.trace(\"setupServerInfo() is called\");\n\t\t\n\t\t Object[] message = {\n\t\t \"Server Port:\", kkServerPortField,\n\t\t };\n\n\t\t int option = JOptionPane.showConfirmDialog(null, message, \"Setup Server\", JOptionPane.OK_CANCEL_OPTION);\n\t\t if (option == JOptionPane.OK_OPTION) {\t\t \n\t\t\t String portStr = kkServerPortField.getText().trim();\n\t\t\t if(Utility.isNumeric(portStr)){\n\t\t\t\t int port = Integer.valueOf(portStr);\n\t\t\t\t kkServerPort = (port > 0 && port < 65536?port:kkServerPort);\n\t\t\t }\n\t\t }\n\t\t kkServerPortField.setText(String.valueOf(kkServerPort));\n\t}",
"public void notifyServerListening() {\r\n nui.notifyHostListening();\r\n }",
"@java.lang.Override\n @java.lang.Deprecated public io.envoyproxy.envoy.config.core.v3.Address getListeningAddresses(int index) {\n return listeningAddresses_.get(index);\n }",
"public void init() throws ServletException {\n\t\tserver = getInitParameter(\"ncserver\");\n\t\t// System.out.println(\"fffpropsFileName\"+propsFileName+\"...\");\n\t\tif (server == null)\n\t\t\tserver = \"http://100.100.1.61:81/service/XChangeServlet?account=0002\";\n\t\tSystem.out.println(\"server:\" + server + \"...\");\n\t}",
"@java.lang.Override\n @java.lang.Deprecated public io.envoyproxy.envoy.config.core.v3.AddressOrBuilder getListeningAddressesOrBuilder(\n int index) {\n return listeningAddresses_.get(index);\n }",
"public ServerConfigImpl() {\n this.expectations = new ExpectationsImpl(globalEncoders, globalDecoders);\n this.requirements = new RequirementsImpl();\n }",
"protected void changeServer(String ip, int port, onConnetCallBack callBack)\n {\n connect(ip, port);\n }",
"@java.lang.Deprecated public Builder addListeningAddresses(\n int index, io.envoyproxy.envoy.config.core.v3.Address value) {\n if (listeningAddressesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureListeningAddressesIsMutable();\n listeningAddresses_.add(index, value);\n onChanged();\n } else {\n listeningAddressesBuilder_.addMessage(index, value);\n }\n return this;\n }",
"private static void processConfig() throws IOException, IllegalArgumentException, UnknownHostException {\n //\n // Use the defaults if there is no configuration file\n //\n File configFile = new File(dataPath+Main.fileSeparator+\"BitcoinWallet.conf\");\n if (!configFile.exists())\n return;\n //\n // Process the configuration file\n //\n List<PeerAddress> addressList = new ArrayList<>(5);\n try (BufferedReader in = new BufferedReader(new FileReader(configFile))) {\n String line;\n while ((line=in.readLine()) != null) {\n line = line.trim();\n if (line.length() == 0 || line.charAt(0) == '#')\n continue;\n int sep = line.indexOf('=');\n if (sep < 1)\n throw new IllegalArgumentException(String.format(\"Invalid configuration option: %s\", line));\n String option = line.substring(0, sep).trim().toLowerCase();\n String value = line.substring(sep+1).trim();\n switch (option) {\n case \"connect\":\n PeerAddress addr = new PeerAddress(value);\n addressList.add(addr);\n break;\n case \"passphrase\":\n Parameters.passPhrase = value;\n break;\n default:\n throw new IllegalArgumentException(String.format(\"Invalid configuration option: %s\", line));\n }\n }\n }\n if (!addressList.isEmpty())\n peerAddresses = addressList.toArray(new PeerAddress[addressList.size()]);\n }",
"public boolean setServer() {\n\t\tboolean success = false;\n\t\t\n\t\tthis.serverPort = FileTransferProtocol.DEFAULT_SERVER_PORT;\n\t\t\n\t\tboolean searchByHostName = textUI.getBoolean(\"Do you want to search by hostname? \"\n\t\t\t\t+ \"(if not, client will try multicast search)\");\n\t\t\n\t\tif (searchByHostName) {\n\t\t\tsuccess = this.findServerByHostName();\n\t\t} else {\n\t\t\tsuccess = this.discoverServer();\n\t\t}\n\t\t\n\t\tif (success) {\n\t\t\tthis.showNamedMessage(\"Server set to \" + this.serverName + \", with address \" +\n\t\t\t\t\tthis.serverAddress + \" and port \" + this.serverPort);\n\t\t}\n\t\t\n\t\treturn success;\n\t}",
"void bind(SocketAddress address) throws IOException {\n\t\t}",
"public void setAddr(String addr) {\n this.addr = addr;\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"PersonController\".equals(portName)) {\n setPersonControllerEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"OrderProcessingService\".equals(portName)) {\n setOrderProcessingServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"public void setReuseAddress (boolean on) {\n reuseAddrEnabled = on;\n }",
"public synchronized void addQuorumServer(NetAddress serverNetAddress) throws IOException {\n InetSocketAddress serverAddress = InetSocketAddress\n .createUnresolved(serverNetAddress.getHost(), serverNetAddress.getRpcPort());\n RaftPeerId peerId = RaftJournalUtils.getPeerId(serverAddress);\n Collection<RaftPeer> peers = mServer.getGroups().iterator().next().getPeers();\n if (peers.stream().anyMatch((peer) -> peer.getId().equals(peerId))) {\n return;\n }\n RaftPeer newPeer = RaftPeer.newBuilder()\n .setId(peerId)\n .setAddress(serverAddress)\n .build();\n List<RaftPeer> newPeers = new ArrayList<>(peers);\n newPeers.add(newPeer);\n RaftClientReply reply = mServer.setConfiguration(\n new SetConfigurationRequest(mRawClientId, mPeerId, RAFT_GROUP_ID, nextCallId(), newPeers));\n if (reply.getException() != null) {\n throw reply.getException();\n }\n }",
"public void setNatAddress(String addr);",
"public void setServerAddress(String mDbServerAddress) {\n\t\tthis.mServerAddress = mDbServerAddress;\n\t}",
"public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) throws Exception {\n\tint port = 8989;\n\t \n AsynchronousServerSocketChannel server = AsynchronousServerSocketChannel\n .open();\n InetSocketAddress sAddr = new InetSocketAddress(port);\n server.bind(sAddr);\n System.out.format(\"Server is listening at %s%n\", sAddr);\n \n InetAddress iAddress = InetAddress.getLocalHost();\n String currentIp = iAddress.getHostAddress();\n System.out.println(\"Current IP address : \" +currentIp); //gives only host address\n \n DesertedServer dserver = new DesertedServer(server);\n Attachment attach = new Attachment();\n attach.server = dserver;\n server.accept(attach, new ConnectionHandler());\n Thread.currentThread().join();\n }",
"public abstract void notifyAboutEmbeddedWebServerIpPort(InetAddress ip, int port);",
"public Builder clearServerAddress() {\n \n serverAddress_ = getDefaultInstance().getServerAddress();\n onChanged();\n return this;\n }",
"@Override\r\n public void setIPAddress(String address) {\r\n this.address = address;\r\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"WSEmisionAgricolaPort\".equals(portName)) {\r\n setWSEmisionAgricolaPortEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"PublishAPIServiceSoap\".equals(portName)) {\r\n setPublishAPIServiceSoapEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }",
"private void configureNode() {\n\t\twaitConfigData();\n\t\tpropagateConfigData();\n\n\t\tisConfigured = true;\n\t}",
"public String getServerAddress() {\n\t\treturn mServerAddress;\n\t}",
"interface MyConfig {\n int teamNumber = 5;\n int basePort = 5000;\n int udpPort = teamNumber + basePort;\n String interfaceName = \"wlan0\";\n // String broadcastAddress = \"192.168.24.255\";\n //String broadcastAddress = \"localhost\";\n}",
"private void initBinding() throws IOException {\n serverSocketChannel.bind(new InetSocketAddress(0));\n serverSocketChannel.configureBlocking(false);\n serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);\n\n sc.configureBlocking(false);\n var key = sc.register(selector, SelectionKey.OP_CONNECT);\n uniqueContext = new ClientContext(key, this);\n key.attach(uniqueContext);\n sc.connect(serverAddress);\n }",
"public void addServerManually() {\n JTextField address = new JTextField();\n address.setText(client.getIpv4());\n JTextField port = new JTextField();\n port.setText(\"2019\");\n\n JPanel serverPanel = new JPanel();\n serverPanel.add(new JLabel(\"Address:\"));\n serverPanel.add(address);\n serverPanel.add(Box.createHorizontalStrut(15));\n serverPanel.add(new JLabel(\"Port:\"));\n serverPanel.add(port);\n int result = JOptionPane.showConfirmDialog(frame, serverPanel, \"Please enter the address and the port\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) {\n client.searchForServer(address.getText(), Integer.parseInt(port.getText()));\n }\n }",
"@java.lang.Deprecated public io.envoyproxy.envoy.config.core.v3.Address.Builder addListeningAddressesBuilder(\n int index) {\n return getListeningAddressesFieldBuilder().addBuilder(\n index, io.envoyproxy.envoy.config.core.v3.Address.getDefaultInstance());\n }",
"private void startPortManager() throws GrpcException {\n\t\t/* start PortManager */\t\t\n\t\ttry {\n\t\t\tinformationManager.lockInformationManager();\n\t\t\t\n\t\t\tProperties localHostInfo =\n\t\t\t\t(Properties) informationManager.getLocalMachineInfo();\n\t\t\t\n\t\t\t/* PortManager without SSL */\n\t\t\tint port = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_RAW));\n\t\t\tportManagerNoSecure = new PortManager(this, false, port);\n\n\t\t\t/* PortManager with authonly is not implemented. */\n\n\t\t\t/* PortManager with GSI */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_GSI));\t\n\t\t\tportManagerGSI = new PortManager(this, PortManager.CRYPT_GSI, port);\n\n\t\t\t/* PortManager with SSL */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_SSL));\t\n\t\t\tportManagerSSL = new PortManager(this, PortManager.CRYPT_SSL, port);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new NgInitializeGrpcClientException(e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new NgIOException(e);\n\t\t} finally {\n\t\t\tinformationManager.unlockInformationManager();\n\t\t}\n\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"FeeCreateSOAP\".equals(portName)) {\n setFeeCreateSOAPEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:07.241 -0500\", hash_original_method = \"40EEF7A0A264136F662D7E1DA715A559\", hash_generated_method = \"73B4F21232108BF5282CD85457539E41\")\n \npublic LocalServerSocket(FileDescriptor fd) throws IOException\n {\n impl = new LocalSocketImpl(fd);\n impl.listen(LISTEN_BACKLOG);\n localAddress = impl.getSockAddress();\n }",
"public com.google.protobuf.ByteString\n getServerAddressBytes() {\n java.lang.Object ref = serverAddress_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n serverAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"protected void addOscServerAddressPanel() {\n\n\t\t// variable addressPanel holds an instance of JPanel.\n\t\t// instance of JPanel received from makeNewJPanel method\n\t\tfinal JPanel addressPanel = makeNewJPanel1();\n\t\taddressPanel.setBackground(new Color(123, 150, 123));\n\t\t// variable addressWidget holds an instance of JTextField\n\t\taddressWidget = new JTextField(\"localhost\");\n\t\t// variable setAddressButton holds an insatnce of JButton with\n\t\t// a \"Set Address\" argument for its screen name\n\t\tfinal JButton setAddressButton = new JButton(\"Set Address\");\n\t\tsetAddressButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\t// perform the addressChanged method when action is received\n\t\t\t\taddressChanged();\n\t\t\t}\n\t\t});\n\n\t\t// variable portWidget holds an instance of JLabel with the OSCPortOut\n\t\t// as the text it looks like OSCPortOut has a method to get the default\n\t\t// SuperCollider port\n\t\tportWidget = new JLabel(Integer.toString(OSCPort.defaultSCOSCPort()));\n\n\t\tportWidget.setForeground(new Color(255, 255, 255));\n\t\tfinal JLabel portLabel = new JLabel(\"Port\");\n\t\tportLabel.setForeground(new Color(255, 255, 255));\n\n\t\t// add the setAddressButton to the addressPanel\n\t\taddressPanel.add(setAddressButton);\n\t\t// portWidget = new JTextField(\"57110\");\n\t\t// add the addressWidget to the addressPanel\n\t\taddressPanel.add(addressWidget);\n\t\t// add the JLabel \"Port\" to the addressPanel\n\t\taddressPanel.add(portLabel);\n\t\t// add te portWidget tot eh addressPanel\n\t\taddressPanel.add(portWidget);\n\n\t\t//??? add address panel to the JPanel OscUI\n\t\tadd(addressPanel);\n\t}",
"@java.lang.Deprecated public Builder addAllListeningAddresses(\n java.lang.Iterable<? extends io.envoyproxy.envoy.config.core.v3.Address> values) {\n if (listeningAddressesBuilder_ == null) {\n ensureListeningAddressesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, listeningAddresses_);\n onChanged();\n } else {\n listeningAddressesBuilder_.addAllMessages(values);\n }\n return this;\n }",
"public static void setBroadcastInetAddress(InetAddress addr)\n {\n broadcastInetAddress = addr;\n broadcastInetAddressAndPort = InetAddressAndPort.getByAddress(broadcastInetAddress);\n }"
]
| [
"0.6618078",
"0.6319674",
"0.6087453",
"0.59616846",
"0.59599453",
"0.5864775",
"0.58040076",
"0.57007116",
"0.5662221",
"0.5640187",
"0.5582859",
"0.55760735",
"0.5545038",
"0.5514157",
"0.5506268",
"0.54818267",
"0.54806495",
"0.54666615",
"0.5454032",
"0.54387015",
"0.5437544",
"0.537681",
"0.5363901",
"0.5349673",
"0.53346086",
"0.53330433",
"0.5307986",
"0.5296948",
"0.5266036",
"0.5265409",
"0.5259888",
"0.5252277",
"0.52371144",
"0.5212547",
"0.52035636",
"0.520232",
"0.5182137",
"0.51741034",
"0.5173321",
"0.51591253",
"0.51434594",
"0.51426536",
"0.5139754",
"0.5138693",
"0.51237357",
"0.5120673",
"0.510409",
"0.5103301",
"0.5084647",
"0.50805676",
"0.507139",
"0.5069216",
"0.5062508",
"0.5050971",
"0.5043109",
"0.50381094",
"0.5036424",
"0.50317943",
"0.50281173",
"0.50231636",
"0.5020491",
"0.5014776",
"0.50117344",
"0.49920446",
"0.4991842",
"0.49909368",
"0.49818707",
"0.4980147",
"0.4978745",
"0.49753025",
"0.49715683",
"0.4969834",
"0.49628463",
"0.4961057",
"0.4959083",
"0.49578354",
"0.49477294",
"0.49435544",
"0.49222884",
"0.49169546",
"0.4914369",
"0.49126697",
"0.49060294",
"0.49047053",
"0.48988414",
"0.48984838",
"0.48970926",
"0.4896238",
"0.4885008",
"0.48841652",
"0.48839006",
"0.48826337",
"0.48816735",
"0.4880255",
"0.4873883",
"0.48729357",
"0.4871206",
"0.48703158",
"0.4868078",
"0.48664558"
]
| 0.71182185 | 0 |
After starting an server, updates configuration with the actual listening address of that server. The listening address may be different from the configured address if, for example, the configured address uses port 0 to request use of an ephemeral port. | public static InetSocketAddress updateListenAddress(OzoneConfiguration conf,
String addressKey, InetSocketAddress addr, InetSocketAddress listenAddr) {
InetSocketAddress updatedAddr = new InetSocketAddress(addr.getHostString(),
listenAddr.getPort());
conf.set(addressKey,
addr.getHostString() + ":" + listenAddr.getPort());
return updatedAddr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static InetSocketAddress updateRPCListenAddress(\n OzoneConfiguration conf, String rpcAddressKey,\n InetSocketAddress addr, RPC.Server rpcServer) {\n return updateListenAddress(conf, rpcAddressKey, addr,\n rpcServer.getListenerAddress());\n }",
"void updateCustomServerAddress(String customServerAddress);",
"void resetToDefaultServerAddress();",
"public abstract InetSocketAddress listeningAddress();",
"public Configuration(String serverAddress) {\r\n\t\tthis.serverAddress = serverAddress;\r\n\t\tthis.serverPort = \"2586\";\r\n\t}",
"private void startListen() {\n try {\n listeningSocket = new ServerSocket(listeningPort);\n } catch (IOException e) {\n throw new RuntimeException(\"Cannot open listeningPort \" + listeningPort, e);\n }\n }",
"public Builder setServerAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n serverAddress_ = value;\n onChanged();\n return this;\n }",
"public Configuration() {\r\n\t\tthis.serverAddress = \"127.0.0.1\";\r\n\t\tthis.serverPort = \"2586\";\r\n\t}",
"public synchronized void initListenInfo(@Nonnull String address, int port) {\n if (listenAddress != null) {\n throw new IllegalStateException(\"Already initialized\");\n }\n this.listenAddress = address;\n this.listenPort = port;\n }",
"@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}",
"public abstract void listen(ServiceConfig serviceConfig) throws IOException;",
"private URI resolveWebServerBindAddress(final Config config) {\n\t\tfinal String[] brokerHostPort = config.getBroker().getHostPort().split(\":\");\n \tfinal JerseyUriBuilder builder = new JerseyUriBuilder();\n \tfinal BootstrapConfiguration bs = config.getBootstrap();\n\t\tfinal String[] webHostPort = bs.getWebServerHostPort().split(\":\");\n\t\tint webPort = Integer.parseInt(webHostPort[1]);\n\t\tfinal boolean untouched = bs.getWebServerHostPort().equals(BootstrapConfiguration.WEB_SERVER_HOST_PORT);\n\t\tString webhostport;\n\t\tif (untouched) {\n\t\t\tint brokerPort = Integer.parseInt(brokerHostPort[1]);\n\t\t\twebPort = brokerPort == BrokerConfiguration.PORT ? webPort: brokerPort + 100;\n\t\t\tfinal String host = config.getResolvedShardId().getId().split(\":\")[0];\n\t\t\tbuilder.host(host).port(webPort);\n\t\t\twebhostport = host + \":\" + webPort;\n\t\t} else {\n\t\t\tbuilder.host(webHostPort[0]).port(webPort);\n\t\t\twebhostport = webHostPort[0]+ \":\" + webPort;\n\t\t}\n\t\tconfig.getResolvedShardId().setWebHostPort(webhostport);\n\t\tconfig.getBootstrap().setWebServerHostPort(webhostport);\n\t\tlogger.info(\"{}: {} Web host:port = {}\", name, tenant.getConnectReference(), webhostport);\n\t\tbuilder.path(config.getBootstrap().getWebServerContextPath());\n\t\treturn builder.build();\n\t}",
"private void initServerSocket()\n\t{\n\t\tboundPort = new InetSocketAddress(port);\n\t\ttry\n\t\t{\n\t\t\tserverSocket = new ServerSocket(port);\n\n\t\t\tif (serverSocket.isBound())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Server bound to data port \" + serverSocket.getLocalPort() + \" and is ready...\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to initiate socket.\");\n\t\t}\n\n\t}",
"private void initServerSock(int port) throws IOException {\n\tserver = new ServerSocket(port);\n\tserver.setReuseAddress(true);\n }",
"@Override\n\tpublic void addServer(InetSocketAddress arg0) throws IOException {\n\n\t}",
"public Configuration(String serverAddress, String serverPort) {\r\n\t\tthis.serverAddress = serverAddress;\r\n\t\tthis.serverPort = serverPort;\r\n\t}",
"public void setAjpListener(Builder serverBuilder) {\n if (options.ajp13Port == -1)\n return;\n if (options.ajp13Port < -1 || options.ajp13Port > MAX_PORT) {\n log.warn(\"Unallowed ajp13Port value. AJP listener is disabled!\");\n return;\n }\n\n if (options.ajp13ListenAddress != null)\n serverBuilder.addAjpListener(options.ajp13Port, options.ajp13ListenAddress);\n else {\n // Listen on all interfaces\n serverBuilder.addAjpListener(options.ajp13Port, hostAllInterfacesString);\n }\n\n log.info(\"AJP listener created\");\n }",
"void startServer(String name, Config.ServerConfig config);",
"public static void set(ServerLoggingConfiguration config) {\r\n LogImplServer.config = config;\r\n }",
"public void setBindAddress(String bindAddress) {\n agentConfig.setBindAddress(bindAddress);\n }",
"@java.lang.Deprecated public Builder setListeningAddresses(\n int index, io.envoyproxy.envoy.config.core.v3.Address value) {\n if (listeningAddressesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureListeningAddressesIsMutable();\n listeningAddresses_.set(index, value);\n onChanged();\n } else {\n listeningAddressesBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public void notifyServerListening() {\r\n nui.notifyHostListening();\r\n }",
"public void setLocalConfig(String lastAdress, String lastPort) {\r\n\t\tconfig.setLocalOption(\"LastAdress\", lastAdress);\r\n\t\tconfig.setLocalOption(\"LastPort\", lastPort);\r\n\t\tconfig.save();\r\n\t}",
"public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}",
"private boolean configureAndStart(int port) {\n\t\ttry {\n\t\t\t//get local host to bind\n\t\t\tString host = InetAddress.getLocalHost().getHostName();\n//\t\t\thost = \"localhost\";\n\t\t\tSystem.out.printf(\"Listening on: Host: %s, Port: %d%n\", host, port);\n\n\t\t\tselector = Selector.open();\n\n\t\t\tserverChannel = ServerSocketChannel.open();\n\t\t\tserverChannel.socket().bind( new InetSocketAddress( host, port ) );\n\t\t\tserverChannel.configureBlocking( false );\n\n\t\t\t//setup selector to listen for connections on this serverSocketChannel\n\t\t\tserverChannel.register( selector, SelectionKey.OP_ACCEPT );\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Configuration for Server failed. Exiting.\");\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"Server Successfully configured\");\n\n\t\t//start up the ThreadPool\n\t\tmanager.start();\n\n\t\t//create timer to handle output, and timeout\n\t\ttimer = new Timer(\"Output_and_timeout\");\n\t\t//schedule output\n\t\ttimer.scheduleAtFixedRate(new ServerOutput(batchTime), Constants.OUTPUT_TIME * 1000,\n\t\t\t\tConstants.OUTPUT_TIME * 1000);\n\t\ttimeout = new ScheduleTimeout(this);\n\t\ttimer.scheduleAtFixedRate(timeout, batchTime * 1000, batchTime * 1000);\n\n\t\treturn true;\n\t}",
"public void setHttpListener(Builder serverBuilder) {\n if (options.httpPort == -1) {\n log.info(\"HTTP listener is disabled.\");\n return;\n }\n if (options.httpPort < -1 || options.httpPort > MAX_PORT) {\n log.warn(\"Unallowed httpPort value. HTTP listener is disabled!\");\n return;\n }\n\n if (options.httpListenAddress != null)\n serverBuilder.addHttpListener(options.httpPort, options.httpListenAddress);\n else {\n // Listen on all interfaces\n serverBuilder.addHttpListener(options.httpPort, hostAllInterfacesString);\n }\n\n log.info(\"HTTP listener created\");\n }",
"public ServerSide(Config config, InetAddress inetAddress, int port) {\n super(config);\n this.inetAddress = inetAddress;\n this.port = port;\n }",
"java.lang.String getServerAddress();",
"public boolean setServer() {\n\t\tboolean success = false;\n\t\t\n\t\tthis.serverPort = FileTransferProtocol.DEFAULT_SERVER_PORT;\n\t\t\n\t\tboolean searchByHostName = textUI.getBoolean(\"Do you want to search by hostname? \"\n\t\t\t\t+ \"(if not, client will try multicast search)\");\n\t\t\n\t\tif (searchByHostName) {\n\t\t\tsuccess = this.findServerByHostName();\n\t\t} else {\n\t\t\tsuccess = this.discoverServer();\n\t\t}\n\t\t\n\t\tif (success) {\n\t\t\tthis.showNamedMessage(\"Server set to \" + this.serverName + \", with address \" +\n\t\t\t\t\tthis.serverAddress + \" and port \" + this.serverPort);\n\t\t}\n\t\t\n\t\treturn success;\n\t}",
"public void startListening() {\r\n\t\tlisten.startListening();\r\n\t}",
"@Override\n\tpublic void addServer(InetSocketAddress arg0, int arg1) throws IOException {\n\n\t}",
"public void addressChanged() {\n\t\t// the variable OSCPortOut tries to get an instance of OSCPortOut\n\t\t// at the address indicated by the addressWidget\n\t\ttry {\n\t\t\toscPort =\n\t\t\t\tnew OSCPortOut(InetAddress.getByName(addressWidget.getText()));\n\t\t\t// if the oscPort variable fails to be instantiated then sent\n\t\t\t// the error message\n\t\t} catch (final Exception ex) {\n\t\t\tshowError(\"Couldn't set address\");\n\t\t}\n\t}",
"public static InetSocketAddress getBindAddress(Configuration conf) {\n return conf.getSocketAddr(JHAdminConfig.MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_PORT);\n }",
"public ServerConfigImpl() {\n this.expectations = new ExpectationsImpl(globalEncoders, globalDecoders);\n this.requirements = new RequirementsImpl();\n }",
"public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}",
"public Builder setServerAddressBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n serverAddress_ = value;\n onChanged();\n return this;\n }",
"@SuppressWarnings(\"resource\")\r\n\tprivate void tryToSetupServer() {\r\n\t\ttry {\r\n\t\t\tsetupStream.write(\"Trying to start on \" + Inet4Address.getLocalHost().toString() + \":\" + port);\r\n\t\t\tcientConn = new ServerSocket(port).accept();\r\n\t\t\tsetupStream.write(\"Client connectd, ready for data\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tif(e.getMessage().contains(\"Bind failed\")) {\r\n\t\t\t\tsetupStream.write(\"You can't use that port\");\r\n\t\t\t} else if(e.getMessage().contains(\"Address already in use\")) {\r\n\t\t\t\tsetupStream.write(\"That port is already in use\");\r\n\t\t\t}\r\n\t\t\tport = -1;\r\n\t\t}\r\n\t}",
"public void registerServer() {\n log.info(\"Registering service {}\", serviceName);\n cancelDiscovery = discoveryService.register(\n ResolvingDiscoverable.of(new Discoverable(serviceName, httpService.getBindAddress())));\n }",
"private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }",
"public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }",
"@java.lang.Deprecated public Builder addListeningAddresses(io.envoyproxy.envoy.config.core.v3.Address value) {\n if (listeningAddressesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureListeningAddressesIsMutable();\n listeningAddresses_.add(value);\n onChanged();\n } else {\n listeningAddressesBuilder_.addMessage(value);\n }\n return this;\n }",
"public static void startServer() {\n clientListener.startListener();\n }",
"private void setTargetServer(){\n mTargetServer = findViewById(R.id.network_scanner_host_edit_text);\n String ip = DefaultPreferences.getIp(this);\n if(ip != null) {\n mTargetServer.setText(ip);\n }\n\n mTargetServer.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n DefaultPreferences.setIp(NetworkScannerActivity.this, s.toString());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }",
"private void setServerAddressList(){\n\n if (mCallBack != null){\n mCallBack.onGetServerAddressListCompleted(mServerAddressList);\n }\n }",
"public void openServer() {\n try {\n this.serverSocket = new ServerSocket(this.portNumber);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }",
"private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}",
"@java.lang.Deprecated public io.envoyproxy.envoy.config.core.v3.Address.Builder addListeningAddressesBuilder() {\n return getListeningAddressesFieldBuilder().addBuilder(\n io.envoyproxy.envoy.config.core.v3.Address.getDefaultInstance());\n }",
"@Override\n protected void doBind(SocketAddress localAddress) throws Exception {}",
"public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }",
"static void test2 () throws Exception {\n\n server = new ServerSocket ();\n InetSocketAddress sadr = new InetSocketAddress (ia4addr, 0);\n server.bind (sadr);\n dprintln (\"server bound to \" + sadr);\n int port = server.getLocalPort();\n InetSocketAddress sadr6 = new InetSocketAddress (ia6addr, port);\n\n c1 = new Socket (ia4addr, port);\n try {\n dprintln (\"connecting to \" + ia6addr);\n c2 = new Socket ();\n c2.connect (sadr6, 1000);\n throw new RuntimeException (\"connect to IPv6 address should be refused\");\n } catch (IOException e) { }\n server.close ();\n c1.close ();\n\n /* now try IPv6 only */\n\n server = new ServerSocket ();\n sadr = new InetSocketAddress (ia6addr, 0);\n dprintln (\"binding to \" + sadr);\n server.bind (sadr);\n port = server.getLocalPort();\n\n c1 = new Socket (ia6addr, port);\n try {\n c2 = new Socket (ia4addr, port);\n throw new RuntimeException (\"connect to IPv4 address should be refused\");\n } catch (IOException e) { }\n server.close ();\n c1.close ();\n\n /* now try IPv6 specific port only */\n\n server = new ServerSocket ();\n sadr = new InetSocketAddress (ia6addr, 5200);\n server.bind (sadr);\n port = server.getLocalPort();\n t_assert (port == 5200);\n\n c1 = new Socket (ia6addr, port);\n try {\n c2 = new Socket (ia4addr, port);\n throw new RuntimeException (\"connect to IPv4 address should be refused\");\n } catch (IOException e) { }\n server.close ();\n c1.close ();\n\n /* now try IPv4 specific port only */\n\n server = new ServerSocket ();\n sadr = new InetSocketAddress (ia4addr, 5200);\n server.bind (sadr);\n port = server.getLocalPort();\n t_assert (port == 5200);\n\n c1 = new Socket (ia4addr, port);\n\n try {\n c2 = new Socket (ia6addr, port);\n throw new RuntimeException (\"connect to IPv6 address should be refused\");\n } catch (IOException e) { }\n server.accept().close();\n c1.close ();\n server.close();\n System.out.println (\"Test2: OK\");\n }",
"@java.lang.Deprecated public Builder addListeningAddresses(\n int index, io.envoyproxy.envoy.config.core.v3.Address value) {\n if (listeningAddressesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureListeningAddressesIsMutable();\n listeningAddresses_.add(index, value);\n onChanged();\n } else {\n listeningAddressesBuilder_.addMessage(index, value);\n }\n return this;\n }",
"protected void doBind(SocketAddress localAddress) throws Exception {}",
"private void initBinding() throws IOException {\n serverSocketChannel.bind(new InetSocketAddress(0));\n serverSocketChannel.configureBlocking(false);\n serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);\n\n sc.configureBlocking(false);\n var key = sc.register(selector, SelectionKey.OP_CONNECT);\n uniqueContext = new ClientContext(key, this);\n key.attach(uniqueContext);\n sc.connect(serverAddress);\n }",
"public abstract void notifyAboutEmbeddedWebServerIpPort(InetAddress ip, int port);",
"protected void bind(InetAddress host, int port) throws IOException {\n localport = port;\n }",
"public Builder listeningPort(final Optional<Integer> maybeListeningPort) {\n this.listeningPort = maybeListeningPort.filter(port -> port != 0);\n return this;\n }",
"public void setServerAddress(String mDbServerAddress) {\n\t\tthis.mServerAddress = mDbServerAddress;\n\t}",
"public void init() throws IOException {\r\n try {\r\n serverSocket = new ServerSocket(PORT);\r\n this.running = true;\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }",
"public Builder clearServerAddress() {\n \n serverAddress_ = getDefaultInstance().getServerAddress();\n onChanged();\n return this;\n }",
"void bind(SocketAddress address) throws IOException {\n\t\t}",
"private void initServer() throws IOException {\r\n \t\tLogger.logMessage(\"Binding Server to \" + this.serverIpAddress + \":\" + this.serverPort);\r\n \r\n \t\tthis.isAlive = true;\r\n \t\tthis.serverSocket = new ServerSocket(this.serverPort, this.backLog, this.serverIpAddress);\r\n \t\tthis.dataLayer = DataLayerFactory.getDataLayer();\r\n \r\n \t\t// Generate the grouplist\r\n \t\tCollection<String> dbGroupList = this.dataLayer.getGroups();\r\n \r\n \t\tfor (String group : dbGroupList) {\r\n \t\t\tthis.groupList.addGroup(group);\r\n \t\t}\r\n \r\n \t\tLogger.logMessage(\"Server successfuly bound!\");\r\n \t}",
"public String getServerAddress() {\r\n\t\treturn this.serverAddress;\r\n\t}",
"public static void setServerSocket(ServerSocket serverSocket) {\n\t\tServer.serverSocket = serverSocket;\n\t}",
"public static void setBroadcastInetAddressAndPort(InetAddressAndPort addr)\n {\n broadcastInetAddress = addr.getAddress();\n broadcastInetAddressAndPort = addr;\n }",
"public SimpleAddressDetector(StunAddress serverAddress) {\n this.serverAddress = serverAddress;\n }",
"public void markSrvPortReplace() throws JNCException {\n markLeafReplace(\"srvPort\");\n }",
"@java.lang.Override\n @java.lang.Deprecated public io.envoyproxy.envoy.config.core.v3.Address getListeningAddresses(int index) {\n return listeningAddresses_.get(index);\n }",
"public String getBindAddress() {\n return agentConfig.getBindAddress();\n }",
"public SocketChannelConfig setReuseAddress(boolean reuseAddress)\r\n/* 215: */ {\r\n/* 216: */ try\r\n/* 217: */ {\r\n/* 218:221 */ this.javaSocket.setReuseAddress(reuseAddress);\r\n/* 219: */ }\r\n/* 220: */ catch (SocketException e)\r\n/* 221: */ {\r\n/* 222:223 */ throw new ChannelException(e);\r\n/* 223: */ }\r\n/* 224:225 */ return this;\r\n/* 225: */ }",
"@java.lang.Override\n @java.lang.Deprecated public io.envoyproxy.envoy.config.core.v3.AddressOrBuilder getListeningAddressesOrBuilder(\n int index) {\n return listeningAddresses_.get(index);\n }",
"public void setReuseAddress (boolean on) {\n reuseAddrEnabled = on;\n }",
"public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serverAddress_ = s;\n return s;\n }\n }",
"public Server() {\n print_addr();\n follow_updates();\n }",
"public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serverAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}",
"@Override\n public int getServerBroadcastPort() {\n return 10081;\n }",
"@Test\n public void serverConfiguration() throws IOException {\n initJadlerUsing(new JettyStubHttpServer());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }",
"String getBindAddress() {\n return bindAddress;\n }",
"public static void setBroadcastInetAddress(InetAddress addr)\n {\n broadcastInetAddress = addr;\n broadcastInetAddressAndPort = InetAddressAndPort.getByAddress(broadcastInetAddress);\n }",
"public void configure() {\n from(\"as2://\" + PATH_PREFIX + \"/listen?requestUriPattern=/\")\n .to(\"mock:as2RcvMsgs\");\n\n // test route processing exception\n Processor failingProcessor = new Processor() {\n public void process(org.apache.camel.Exchange exchange) throws Exception {\n throw new Exception(PROCESSOR_EXCEPTION_MSG);\n }\n };\n from(\"as2://\" + PATH_PREFIX + \"/listen?requestUriPattern=/process_error\")\n .process(failingProcessor)\n .to(\"mock:as2RcvMsgs\");\n\n // test route for listen with custom MDN parameters\n from(\"as2://\" + PATH_PREFIX\n + \"/listen?requestUriPattern=/mdnTest&from=MdnTestFrom&subject=MdnTestSubjectPrefix\")\n .to(\"mock:as2RcvMsgs\");\n }",
"public void setServer (\r\n String strServer) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void setServerPort(int serverPort) {\n this.serverPort = serverPort;\n }",
"public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }",
"public com.google.protobuf.ByteString\n getServerAddressBytes() {\n java.lang.Object ref = serverAddress_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n serverAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"protected void changeServer(String ip, int port, onConnetCallBack callBack)\n {\n connect(ip, port);\n }",
"public String getServerAddress() {\n\t\treturn mServerAddress;\n\t}",
"void initAndListen() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t// Startuje nowy watek z odbieraniem wiadomosci.\n\t\t\t\tnew ClientHandler(clientSocket, this);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Accept failed.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}",
"public void testUpdateConfiguration() throws ConfigurationException {\n\t\tSmtpServer smtpServer = new SmtpServer();\n\t\t\t\t\n\t\tsmtpServer.setSmtpServerEnabled(false);\n\t\tsmtpServer.setBindAddress(\"3.4.5.6:877\");\n\t\tsmtpServer.setConnectionBacklog(\"cntbacklog\");\n\t\tsmtpServer.setAuthorizedAddresses(\"a.b.c.d\");\n\t\tsmtpServer.setMaxmessagesize(\"333\");\n\t\tsmtpServer.setConnectiontimeout(\"678\");\n\t\tsmtpServer.setKeystore(\"file://mykey\");\n\t\tsmtpServer.setSecret(\"mysecret\");\n\t\tsmtpServer.setAlgorithm(\"myalgo\");\n\t\tsmtpServer.setProvider(\"org.myprovider.com\");\t\t\n\t\tsmtpServer.setHelloNameAutoDetect(false);\n\t\tsmtpServer.setHelloName(\"hellonam\");\n\t\tsmtpServer.setConnectionLimit(\"444\");\t\t\n\t\tsmtpServer.setConnectionLimitPerIP(\"555\");\t\t\n\t\tsmtpServer.setAddressBracketsEnforcement(false);\n\t\t\n\t\tsmtpServer.setSocketTls(true); //new\n\t\tsmtpServer.setStartTls(false); //new\n\t\tsmtpServer.setGreeting(\"GREAT\"); //new\n\t\t\n\t\tSystem.out.println(\"SmtpServer to store: \"+smtpServer.toString());\n\t\t\t\t\t\t\t\n\t\tsmtpServerConfigManager.updateConfiguration(smtpServer);\n\t\t\t\t\t\t\n\t\t//part 2: check previously stored configuration\n\t\tSmtpServer loadedConfig = smtpServerConfigManager.readConfiguration();\n\t\t\n\t\tSystem.out.println(\"SmtpServer loaded: \"+loadedConfig.toString());\n\t\t\t\t\t\t\n\t\tassertNotNull(loadedConfig);\t\n\t\tassertNotNull(loadedConfig.isSmtpServerEnabled());\n\t\tassertNotNull(loadedConfig.getBindAddress());\n\t\tassertNotNull(loadedConfig.getConnectionBacklog());\n\t\tassertNotNull(loadedConfig.getConnectiontimeout());\n\t\tassertNotNull(loadedConfig.isHelloNameAutoDetect());\n\t\tassertNotNull(loadedConfig.getHelloName());\n\t\tassertNotNull(loadedConfig.getConnectionLimit());\n\t\tassertNotNull(loadedConfig.getConnectionLimitPerIP());\t\n\t\tassertNotNull(loadedConfig.getAlgorithm());\n\t\tassertNotNull(loadedConfig.getKeystore());\n\t\tassertNotNull(loadedConfig.getSecret());\n\t\tassertNotNull(loadedConfig.getProvider());\n\t\tassertNotNull(loadedConfig.getAuthorizedAddresses());\n\t\tassertNotNull(loadedConfig.getMaxmessagesize());\n\t\tassertNotNull(loadedConfig.isAddressBracketsEnforcement());\n\t\t\t\t\n\t\t\t\t\n\t\tassertEquals(false,loadedConfig.isSmtpServerEnabled());\n\t\tassertEquals(\"3.4.5.6:877\",loadedConfig.getBindAddress());\n\t\tassertEquals(\"a.b.c.d\",loadedConfig.getAuthorizedAddresses());\n\t\tassertEquals(\"cntbacklog\",loadedConfig.getConnectionBacklog());\n\t\tassertEquals(\"678\",loadedConfig.getConnectiontimeout());\n\t\tassertEquals(false,loadedConfig.isHelloNameAutoDetect());\n\t\tassertEquals(\"hellonam\",loadedConfig.getHelloName());\n\t\tassertEquals(\"333\",loadedConfig.getMaxmessagesize());\n\t\tassertEquals(\"444\",loadedConfig.getConnectionLimit());\n\t\tassertEquals(\"555\",loadedConfig.getConnectionLimitPerIP());\n\t\tassertEquals(\"myalgo\",loadedConfig.getAlgorithm());\n\t\tassertEquals(\"file://mykey\",loadedConfig.getKeystore());\n\t\tassertEquals(\"mysecret\",loadedConfig.getSecret());\n\t\tassertEquals(\"org.myprovider.com\",loadedConfig.getProvider());\n\t\tassertEquals(false,loadedConfig.isAddressBracketsEnforcement());\n\t\t\n\t\tassertEquals(true,loadedConfig.isSocketTls());\n\t\tassertEquals(false,loadedConfig.isStartTls());\n\t\tassertEquals(\"GREAT\",loadedConfig.getGreeting());\t\t\n\t}",
"@java.lang.Deprecated public Builder setListeningAddresses(\n int index, io.envoyproxy.envoy.config.core.v3.Address.Builder builderForValue) {\n if (listeningAddressesBuilder_ == null) {\n ensureListeningAddressesIsMutable();\n listeningAddresses_.set(index, builderForValue.build());\n onChanged();\n } else {\n listeningAddressesBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public void Listen() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//reconstruct byte array for receiving\r\n\t\t\treceiveData = new byte[5192];\r\n\t\t\t\r\n\t\t\t//receive a packet!\r\n\t\t\tserverSocket.receive(packet = new DatagramPacket(receiveData, receiveData.length));\r\n\t\t\t\r\n\t\t\t//translate into a string and print to console\r\n\t\t\tString output = new String(packet.getData());\r\n\t\t\t//address = serverSocket.getInetAddress();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tNetConsole.window.addText(output, false);\r\n\t\t\t\r\n\t\t\t//deconstruct array so remnants of last commands don't get shown. \r\n\t\t\treceiveData = null;\r\n\t\t\tpacket = null;\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn;\r\n\t\t\r\n\t}",
"@java.lang.Deprecated public Builder addAllListeningAddresses(\n java.lang.Iterable<? extends io.envoyproxy.envoy.config.core.v3.Address> values) {\n if (listeningAddressesBuilder_ == null) {\n ensureListeningAddressesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, listeningAddresses_);\n onChanged();\n } else {\n listeningAddressesBuilder_.addAllMessages(values);\n }\n return this;\n }",
"public void listen() throws Exception {\n if (serverSocket != null) {\n try {\n serverSocket.setSoTimeout(0);\n } catch (SocketException sx) {\n sx.printStackTrace();\n }\n }\n }",
"public void setupWebServers(){\n if(rwsServer == null || csaServer == null){\n String serverURL = getFirstAttribute(cn,FRONTEND_ADDRESS_TAG);\n setupWebServers(serverURL);\n }\n }",
"public void setActive(InetSocketAddress address) {\n unbindPassive();\n remoteAddress = address;\n passiveMode = false;\n isBind = false;\n remotePort = remoteAddress.getPort();\n }",
"@Test\n public void portConfiguration() throws IOException {\n initJadlerListeningOn(SocketUtils.findAvailableTcpPort());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }",
"@Override\n\t\tpublic int getServerPort() {\n\t\t\treturn 0;\n\t\t}",
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"CenterServerImplPort\".equals(portName)) {\n setCenterServerImplPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }",
"private void setServerList() {\n ArrayList<ServerObjInfo> _serverList =\n ServerConfigurationUtils.getServerListFromFile(mContext, ExoConstants.EXO_SERVER_SETTING_FILE);\n ServerSettingHelper.getInstance().setServerInfoList(_serverList);\n\n int selectedServerIdx = Integer.parseInt(mSharedPreference.getString(ExoConstants.EXO_PRF_DOMAIN_INDEX, \"-1\"));\n mSetting.setDomainIndex(String.valueOf(selectedServerIdx));\n mSetting.setCurrentServer((selectedServerIdx == -1) ? null : _serverList.get(selectedServerIdx));\n }",
"public void setServerport(Integer serverport) {\n this.serverport = serverport;\n }",
"ServerSocketChannelConfig setBacklog(int backlog);"
]
| [
"0.6409295",
"0.64029455",
"0.6194837",
"0.6188014",
"0.6132964",
"0.610483",
"0.5989265",
"0.588401",
"0.58054435",
"0.5718648",
"0.57069254",
"0.5687412",
"0.5667794",
"0.5638479",
"0.55622065",
"0.55021083",
"0.5491638",
"0.54397637",
"0.5386724",
"0.5373859",
"0.53600776",
"0.53547096",
"0.53532714",
"0.53463984",
"0.53429383",
"0.5342085",
"0.5338009",
"0.53326976",
"0.53138995",
"0.53044254",
"0.53027624",
"0.52998936",
"0.5291512",
"0.52870154",
"0.5286353",
"0.5281192",
"0.5234452",
"0.5224941",
"0.52206725",
"0.5218692",
"0.5211924",
"0.5207803",
"0.5187779",
"0.51866513",
"0.5159509",
"0.51568234",
"0.51558864",
"0.51409006",
"0.51319623",
"0.5117675",
"0.5115323",
"0.51111156",
"0.51093316",
"0.5108153",
"0.510487",
"0.5098057",
"0.50934726",
"0.5085616",
"0.5083402",
"0.5080113",
"0.50735426",
"0.50657374",
"0.50606525",
"0.5055765",
"0.5050804",
"0.50469637",
"0.5041538",
"0.5033155",
"0.5011507",
"0.5001304",
"0.49997616",
"0.4997766",
"0.49945238",
"0.4986458",
"0.49840108",
"0.4980321",
"0.49718356",
"0.49632606",
"0.49497908",
"0.49476525",
"0.4944211",
"0.49382913",
"0.49376467",
"0.4937049",
"0.4933477",
"0.49271488",
"0.49262738",
"0.49222028",
"0.49195135",
"0.49159816",
"0.4915787",
"0.48992053",
"0.4896167",
"0.48940986",
"0.48934966",
"0.48891908",
"0.48841152",
"0.48822755",
"0.4879928",
"0.48780054"
]
| 0.671516 | 0 |
Releases a http connection if the request is not null. | public static void releaseConnection(HttpRequestBase request) {
if (request != null) {
request.releaseConnection();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void ensureConnectionRelease() {\n if (responseConnection != null) {\n responseConnection.releaseConnection();\n responseConnection = null;\n }\n }",
"public static void closeHttpConn(){ \n\t\thttpUrl.disconnect(); \n\t}",
"boolean releaseConnection(Connection connection);",
"public void dispose() {\n if (exporterContainer != null) {\n exporterContainer.close();\n exporterContainer = null;\n }\n\n if (applicationContainer != null) {\n applicationContainer.close();\n applicationContainer = null;\n }\n\n if (network != null) {\n network.close();\n network = null;\n }\n\n httpClient = null;\n }",
"public static void releaseConnection(){\n Connection conn = THREAD_CONNECTION.get();\n if(conn != null){\n try {\n if(!conn.isClosed()){\n conn.close();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n LOGGER.error(\"releaseConnection error\", e);\n throw new RuntimeException(e);\n } finally {\n THREAD_CONNECTION.remove();\n }\n }\n }",
"public void closeRequest(){\n try {\n res.close();\n stmt.close();\n } catch(SQLException e){\n e.printStackTrace();\n }\n }",
"public void releaseConnection() {\r\n\t\tif (conn != null) {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\tSystem.out.println(\"Exception closing connection: \" + ex);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void releaseWorkRequest(WorkRequestProxy workRequestProxy);",
"public void cancelAndReleaseQueue() {\n if (mRequestHandle != null) {\n mRequestHandle.cancel();\n mRequestHandle = null;\n }\n releaseQueue();\n }",
"private void closeConnection () {\n setConnection (null);\n }",
"public void releaseResource() {\n if (!isPreConnected() && !isInCallServiceBinded() && this.mCallMapById.isEmpty() && this.mPreAddedCall == null && this.mPendingDisconnectPreAddedCall == null) {\n release();\n }\n }",
"@Override\n @Deprecated\n public void release() {\n close();\n }",
"public void release(Connection value) {\n\t\t\n\t}",
"public void release() {\n HiLog.info(LOG_LABEL, \"release.\", new Object[0]);\n this.mCallMapById.clear();\n this.mRemote = null;\n disconnect();\n destroyHandler();\n this.mContext = null;\n this.mPendingCallAudioState = null;\n this.mCurrentCallAudioState = null;\n this.mPendingCanAddCall = null;\n this.mPreAddedCall = null;\n this.mPendingDisconnectPreAddedCall = null;\n this.mIsConnected = false;\n this.mIsBound = false;\n this.mIsInCallServiceBinded = false;\n this.mIsPreConnected = false;\n Listener listener = this.mListener;\n if (listener != null) {\n listener.onReleased(this);\n this.mListener = null;\n }\n }",
"private static void disableConnectionReuseIfNecessary() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n }",
"public void releaseConnectionHandler(ConnectionHandler handler) {\n }",
"public void release() {\r\n pageEL = null;\r\n params = null;\r\n super.release();\r\n }",
"public void release() {\n assertExecuted();\n method.releaseConnection();\n }",
"private static void disableConnectionReuseIfNecessary() {\n if (Integer.parseInt(Build.VERSION.SDK) < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n }",
"private void releaseService() {\n unbindService(connection);\n connection = null;\n Log.d(TAG, \"releaseService() unbound.\");\n }",
"private void releaseHttpRequest(\r\n \t\t\tHttpServletRequestEvent hreqEvent) {\r\n \t\t\r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"releaseHttpRequest() enter\");\r\n \t\t}\r\n \t\t\r\n \t\tObject lock = requestLock.removeLock(hreqEvent);\r\n \t\tif (lock != null) {\r\n \t\t\tsynchronized (lock) {\r\n \t\t\t\tlock.notify();\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tlogger.warn(\"unable to wake up blocked servlet thread, did not found the lock for event \"+hreqEvent);\r\n \t\t}\r\n \r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"releaseHttpRequest() exit\");\r\n \t\t}\r\n \t}",
"public void release() throws IOException;",
"@Override\n\tprotected void finalize() throws Throwable {\n\t\t\n\t\tif (this.connection != null) {\n\t\t\tthis.connection.close();\t\t\n\t\t}\n\t\tsuper.finalize();\n\t}",
"private static void disableConnectionReuseIfNecessary() {\n\t if (Integer.parseInt(Build.VERSION.SDK) < Build.VERSION_CODES.FROYO) {\n\t System.setProperty(\"http.keepAlive\", \"false\");\n\t }\n\t}",
"@Override\n public void release() {\n }",
"protected void close() {\n\t\tthis.connection.close();\n\t\tthis.connection = null;\n\t}",
"public static void closeConnection() {\n if(connection != null) {\n try {\n connection.close();\n connection = null;\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }",
"public void release() { \r\n\t remoteControlClient = null;\r\n\t }",
"@Override\n public void cleanup() {\n if (this.inputStream != null) {\n try {\n this.inputStream.close();\n }\n catch (IOException var1_1) {}\n }\n this.defaultFetcher.cleanup();\n }",
"public static void release() {\n\t}",
"public void cleanup(){\n try{\n if (this._connection != null){\n this._connection.close ();\n }//end if\n }catch (SQLException e){\n // ignored.\n }//end try\n }",
"@Override\n\tprotected URLConnection openConnection(final URL u) throws IOException {\n\t\treturn null;\n\t}",
"public static void disableConnectionReuseIfNecessary() {\n\t\t// HTTP connection reuse which was buggy pre-froyo\n\t\tif (hasHttpConnectionBug()) {\n\t\t\tSystem.setProperty(\"http.keepAlive\", \"false\");\n\t\t}\n\t}",
"@Override\n protected void onRequestDone(HttpServletRequest request) {\n if (!sessions.isEmpty()) {\n for (SessionRef ref : getSessions()) {\n ref.destroy();\n }\n }\n sessions = null;\n }",
"@Override\n public void release() {\n }",
"public void release()\r\n throws IOException\r\n {\r\n // nothing needs to be done\r\n }",
"@Override\r\n\tpublic void release()\r\n\t{\n\t}",
"@Override\n\tpublic void release() {\n\t}",
"public void release() {\n }",
"private void dispose() {\n if (this.consumed) {\n return;\n }\n try {\n EntityUtils.consume(this.response.getEntity());\n } catch (Exception ignore) {\n } finally {\n this.consumed = true;\n }\n }",
"@Override\n public void release() {\n output = null;\n super.release();\n }",
"public void dispose() {\n if (python != null) {\n python.shutdown();\n }\n }",
"public void shutdown() {\n MultiThreadedHttpConnectionManager manager = \n (MultiThreadedHttpConnectionManager) httpClient.getHttpConnectionManager();\n manager.shutdown();\n }",
"public void release()\r\n\t{\r\n\t\tsuper.release();\r\n\t\t_href = null;\r\n\t\t_box = null;\r\n\t\t_bracket = null;\r\n\t\t_bracketFont = null;\r\n\r\n\t}",
"public void close() {\n if (mLeakedException != null) {\n getConnectionManager().shutdown();\n mLeakedException = null;\n }\n }",
"public static void releaseConnection(Connection con) {\n\t\tinstance.connectionPool.offer(con);\n\t}",
"public void release() {\n }",
"protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n }\n if (_socket != null) {\n _socket.close();\n _socket = null;\n }\n } catch (java.io.IOException e) {\n }\n }",
"@Override\n public void release() {\n \n }",
"private void clearRequest() { request_ = null;\n \n }",
"@Override\n\tpublic void release() {\n\t\t\n\t}",
"protected boolean shouldCloseConnection(HttpConnection conn) {\n return true;\n }",
"@Override\n\tpublic void release() {\n\n\t}",
"@Override\n\tpublic void release() {\n\n\t}",
"public void destroy(){\n\n if(myConnection !=null){\n\n try{\n myConnection.close();\n }\n catch(Exception e){\n System.out.println(\"failed to destroy\");\n }\n\n\n }\n return;\n }",
"public void closeConn() {\n try {\n if (writer != null) {\n writer.close();\n }\n if (sockoutOs != null) {\n sockoutOs.close();\n }\n if (null != socket || !socket.isClosed()) {\n socket.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n }",
"@Override\n public void close() {\n if (!this.closed) {\n this.closed = true;\n this.requestsMap.values().forEach(request -> {\n try {\n ucpWorker.cancelRequest(request);\n } catch (NullPointerException nex) {\n // ignored, already cancelled\n }\n });\n }\n }",
"public void release() {\n if (this.compositeDisposable != null) {\n this.compositeDisposable.clear();\n }\n }",
"public void release() {\r\n return;\r\n }",
"public synchronized void release() {\r\n if (active) {\r\n if (clmNullDummy != null)\r\n clReleaseMemObject(clmNullDummy);\r\n if (kernelMatrixMultiplication != null)\r\n clReleaseKernel(kernelMatrixMultiplication);\r\n if (kernelVectorTotal != null)\r\n clReleaseKernel(kernelVectorTotal);\r\n if (kernelVectorSquaredTotal != null)\r\n clReleaseKernel(kernelVectorSquaredTotal);\r\n if (kernelForwardPropagation != null)\r\n clReleaseKernel(kernelForwardPropagation);\r\n if (krenelCostFunctionPartLog != null)\r\n clReleaseKernel(krenelCostFunctionPartLog);\r\n if (kernelCalculateGradientTheta != null)\r\n clReleaseKernel(kernelCalculateGradientTheta);\r\n if (kernelCalculateGradientDelta != null)\r\n clReleaseKernel(kernelCalculateGradientDelta);\r\n if (program != null)\r\n clReleaseProgram(program);\r\n if (commandQueue != null)\r\n clReleaseCommandQueue(commandQueue);\r\n if (context != null)\r\n clReleaseContext(context);\r\n active = false;\r\n }\r\n }",
"public void release();",
"public void release();",
"public void release() {\r\n super.release();\r\n this.page = null;\r\n }",
"protected void release()\n {\n }",
"public void release() {\n\t\t\n\t}",
"void releaseConnection(Connection connection) throws InterruptedException;",
"private static void closeResource(Connection resource) {\r\n if (resource != null) {\r\n try {\r\n resource.close();\r\n } catch (SQLException e) { /* do nothing */ }\r\n }\r\n }",
"public void releaseConnection(Connection con) {\n\t\tif (con != null)\n\t\t\ttry {\n\t\t\t\tcon.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//取消某个网络请求\n\t\tNMApplication.getRequestQueue().cancelAll(VOLLEY_POST);\n\t}",
"public synchronized void releaseConnection(HttpClientConnection conn, Object state, long keepalive, TimeUnit timeUnit) {\n/* 259 */ Args.notNull(conn, \"Connection\");\n/* 260 */ Asserts.check((conn == this.conn), \"Connection not obtained from this manager\");\n/* 261 */ if (this.log.isDebugEnabled()) {\n/* 262 */ this.log.debug(\"Releasing connection \" + conn);\n/* */ }\n/* 264 */ if (this.isShutdown.get()) {\n/* */ return;\n/* */ }\n/* */ try {\n/* 268 */ this.updated = System.currentTimeMillis();\n/* 269 */ if (!this.conn.isOpen()) {\n/* 270 */ this.conn = null;\n/* 271 */ this.route = null;\n/* 272 */ this.conn = null;\n/* 273 */ this.expiry = Long.MAX_VALUE;\n/* */ } else {\n/* 275 */ this.state = state;\n/* 276 */ this.conn.setSocketTimeout(0);\n/* 277 */ if (this.log.isDebugEnabled()) {\n/* */ String s;\n/* 279 */ if (keepalive > 0L) {\n/* 280 */ s = \"for \" + keepalive + \" \" + timeUnit;\n/* */ } else {\n/* 282 */ s = \"indefinitely\";\n/* */ } \n/* 284 */ this.log.debug(\"Connection can be kept alive \" + s);\n/* */ } \n/* 286 */ if (keepalive > 0L) {\n/* 287 */ this.expiry = this.updated + timeUnit.toMillis(keepalive);\n/* */ } else {\n/* 289 */ this.expiry = Long.MAX_VALUE;\n/* */ } \n/* */ } \n/* */ } finally {\n/* 293 */ this.leased = false;\n/* */ } \n/* */ }",
"private void doStop()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n \"STOP\", \r\n null,\r\n null,\r\n null, \r\n null,\r\n false,\r\n null,\r\n null ) );\r\n }",
"public void closeConnection() {\r\n if (getConnection() != null && StringUtil.isNotBlank(config.getDataSource())\r\n /*&& this.conn.getConnection() instanceof PooledConnection */) {\r\n LOG.ok(\"Close the pooled connection\");\r\n dispose();\r\n }\r\n }",
"public void close() {\n connection.close();\n running = false;\n }",
"@Override\n\tpublic final void destroy() {\n\t\tsynchronized (this.connectionMonitor) {\n\t\t\tif (connection != null) {\n\t\t\t\tthis.connection.destroy();\n\t\t\t\tthis.connection = null;\n\t\t\t}\n\t\t}\n\t\treset();\n\t}",
"@Override\r\n public void close() throws Exception {\r\n if (connection != null){\r\n connection.close();\r\n }\r\n }",
"private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}",
"@Override\r\n\tpublic void release() {\n\r\n\t}",
"protected void clearRegistryFromHTTPSession( HttpServletRequest request )\n {\n HttpSession session = request.getSession();\n XDocReportRegistry registry =\n (XDocReportRegistry) session.getAttribute( XDocBaseServletConstants.XDOCREPORTREGISTRY_SESSION_KEY );\n if ( registry != null )\n {\n registry.dispose();\n }\n session.removeAttribute( XDOCREPORTREGISTRY_SESSION_KEY );\n }",
"@Override\n public void close() {\n response.close();\n }",
"public final void release() { \n native_release();\n }",
"protected void finalize() {\n this.asClient.close();\n this.asClient = null;\n }",
"private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}",
"@Override\n protected void doRelease() {\n if (mNativePtr != 0) {\n nativeRelease(mNativePtr);\n mNativePtr = 0;\n }\n }",
"private void stopHttpAdaptor() {\n if (!agentConfig.isHttpEnabled()) {\n return;\n }\n\n // stop the adaptor...\n try {\n httpAdaptor.stop();\n } catch (Exception e) {\n logger.warn(e.getMessage(), e);\n }\n\n try {\n MBeanUtils.unregisterMBean(getHttpAdaptorName());\n MBeanUtils.unregisterMBean(getXsltProcessorName());\n } catch (MalformedObjectNameException e) {\n logger.warn(e.getMessage(), e);\n }\n }",
"public Builder clearHttpRequest() {\n bitField0_ = (bitField0_ & ~0x00000001);\n httpRequest_ = null;\n if (httpRequestBuilder_ != null) {\n httpRequestBuilder_.dispose();\n httpRequestBuilder_ = null;\n }\n onChanged();\n return this;\n }",
"@Override\n\tpublic void finalize() {\n\t\tcontext.unbindService(CONNECTION);\n\t}",
"void _release();",
"public void release() {\n super.release();\n _gboss = null;\n }",
"@Override\n public void close() throws Exception {\n synchronized (lock) {\n httpClient.close();\n }\n }",
"public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }",
"public void close()\n {\n getConnectionManager().shutdown();\n }",
"public void _releaseReply(InputStream input) {\n throw new NO_IMPLEMENT(reason);\n }",
"public void closeConnection();",
"@Override\n public void release() {\n super.release();\n init();\n }",
"public void close() {\n\t\t_taxonomyConnection.close();\n\t}",
"private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}",
"public final GetHTTP removeConnectionTimeout() {\n properties.remove(CONNECTION_TIMEOUT_PROPERTY);\n return this;\n }",
"public K release()\n {\n return (K) destroy().getResponse();\n }",
"@Override\r\n\tpublic void close() {\n\t \t if (conn != null) {\r\n\t \t\t try {\r\n\t \t\t\t conn.close();\r\n\t \t\t } catch (Exception e) {\r\n\t \t\t\t e.printStackTrace();\r\n\t \t\t }\r\n\t \t }\r\n\t}",
"void release(Object o);"
]
| [
"0.7034775",
"0.65474695",
"0.6283731",
"0.6031171",
"0.5967445",
"0.57027537",
"0.57007486",
"0.5630861",
"0.5575894",
"0.55758554",
"0.55264485",
"0.5499997",
"0.54233295",
"0.539096",
"0.53852516",
"0.53839976",
"0.5378109",
"0.5364044",
"0.53406477",
"0.5330735",
"0.5326728",
"0.53076196",
"0.52978426",
"0.52753526",
"0.5263964",
"0.52422816",
"0.5236723",
"0.522395",
"0.522026",
"0.52173597",
"0.52087295",
"0.52080774",
"0.5205735",
"0.51968634",
"0.5188009",
"0.5186592",
"0.5174145",
"0.5155905",
"0.5155305",
"0.51540506",
"0.5147516",
"0.5145592",
"0.51452214",
"0.5137057",
"0.51369566",
"0.51342845",
"0.5124008",
"0.5114153",
"0.51126236",
"0.51023287",
"0.5099348",
"0.50931615",
"0.50816405",
"0.50816405",
"0.50745475",
"0.50728714",
"0.50667334",
"0.506512",
"0.5057577",
"0.50573415",
"0.5047396",
"0.5047396",
"0.5047327",
"0.5045284",
"0.50438917",
"0.5029649",
"0.5026162",
"0.50079006",
"0.49832037",
"0.49797198",
"0.4978426",
"0.49756235",
"0.49627373",
"0.49596334",
"0.49523786",
"0.49461",
"0.49455416",
"0.4935748",
"0.49272987",
"0.4926487",
"0.49109963",
"0.4910827",
"0.49097127",
"0.49039954",
"0.48966157",
"0.4895323",
"0.48852494",
"0.48835796",
"0.48818222",
"0.4877479",
"0.4870776",
"0.48570582",
"0.48155808",
"0.4810572",
"0.48058742",
"0.47985563",
"0.47934788",
"0.47933176",
"0.47928774",
"0.4791187"
]
| 0.82346874 | 0 |
Get the location where SCM should store its metadata directories. Fall back to OZONE_METADATA_DIRS if not defined. | public static File getScmDbDir(ConfigurationSource conf) {
File metadataDir = getDirectoryFromConfig(conf,
ScmConfigKeys.OZONE_SCM_DB_DIRS, "SCM");
if (metadataDir != null) {
return metadataDir;
}
LOG.warn("{} is not configured. We recommend adding this setting. " +
"Falling back to {} instead.",
ScmConfigKeys.OZONE_SCM_DB_DIRS, HddsConfigKeys.OZONE_METADATA_DIRS);
return getOzoneMetaDirPath(conf);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static File getOzoneMetaDirPath(ConfigurationSource conf) {\n File dirPath = getDirectoryFromConfig(conf,\n HddsConfigKeys.OZONE_METADATA_DIRS, \"Ozone\");\n if (dirPath == null) {\n throw new IllegalArgumentException(\n HddsConfigKeys.OZONE_METADATA_DIRS + \" must be defined.\");\n }\n return dirPath;\n }",
"private static File getHadoopConfFolder() throws IOException {\n if (System.getenv().containsKey(\"HADOOP_CONF_DIR\")) {\n return new File(System.getenv(\"HADOOP_CONF_DIR\"));\n } else if (System.getenv().containsKey(\"HADOOP_HOME\")) {\n return new File(System.getenv(\"HADOOP_HOME\") + \"/etc/hadoop/\");\n } else {\n throw new IOException(\"Unable to find hadoop configuration folder.\");\n }\n }",
"public File getCommonDir()\n {\n return validatePath(ServerSettings.getInstance().getProperty(ServerSettings.COMMON_DIR));\n }",
"public String getLocationOfFiles() {\n\t\ttry {\n\t\t\tFile f = new File(\n\t\t\t\t\tgetRepositoryManager().getMetadataRecordsLocation() + \"/\" + getFormatOfRecords() + \"/\" + getKey());\n\t\t\treturn f.getAbsolutePath();\n\t\t} catch (Throwable e) {\n\t\t\tprtlnErr(\"Unable to get location of files: \" + e);\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public File getLocalAnnotationDir() throws IOException {\n\t\t\treturn new File(System.getProperty(\"user.home\") + \"/.chipster/annotations\");\n\t\t}",
"public Path getRemoteRepositoryBaseDir();",
"public Path getRepositoryBaseDir();",
"public Path getRepositoryGroupBaseDir();",
"private String getConfigurationDirectory() throws UnsupportedEncodingException {\r\n\r\n String folder;\r\n if (ISphereJobLogExplorerPlugin.getDefault() != null) {\r\n // Executed, when started from a plug-in.\r\n folder = ISphereJobLogExplorerPlugin.getDefault().getStateLocation().toFile().getAbsolutePath() + File.separator + REPOSITORY_LOCATION\r\n + File.separator;\r\n FileHelper.ensureDirectory(folder);\r\n } else {\r\n // Executed, when started on a command line.\r\n URL url = getClass().getResource(DEFAULT_CONFIGURATION_FILE);\r\n if (url == null) {\r\n return null;\r\n }\r\n String resource = URLDecoder.decode(url.getFile(), \"utf-8\"); //$NON-NLS-1$\r\n folder = new File(resource).getParent() + File.separator;\r\n }\r\n return folder;\r\n }",
"public static File getConfigDirectory() {\n return getDirectoryStoragePath(\"/NWD/config\", false);\n }",
"public File getLocalCacheDirectory() {\n return pathsProvider.getLocalAcmCacheDir();\n }",
"java.io.File getBaseDir();",
"static public File getLatestPlatformLocation(){\n Iterator i = serverLocationAndClassLoaderMap.entrySet().iterator();\n File ret =null;\n while (i.hasNext()){\n Map.Entry e = (Map.Entry)i.next();\n String loc = (String)e.getKey();\n File possibleOne = new File(loc);\n if (ret==null){\n ret =possibleOne;\n }\n if (isGlassFish(possibleOne)){\n ret =possibleOne;\n }\n }\n return ret;\n \n }",
"private Optional<Path> dataSetDir() {\n Optional<String> dataSetDirProperty = demoProperties.dataSetDir();\n if (!dataSetDirProperty.isPresent()) {\n logger.info(\"Data set directory (app.demo.data-set-dir) is not set.\");\n return Optional.empty();\n }\n Path dataSetDirPath = Paths.get(dataSetDirProperty.get());\n if (!isReadableDir(dataSetDirPath)) {\n logger.warn(\n \"Data set directory '{}' doesn't exist or cannot be read. No external data sets will be loaded.\",\n dataSetDirPath.toAbsolutePath());\n return Optional.empty();\n }\n return Optional.of(dataSetDirPath);\n }",
"public Path getDataDirectory();",
"private String getArcGISHomeDir() throws IOException {\n String arcgisHome = null;\n /* Not found in env, check system property */\n if (System.getProperty(ARCGISHOME_ENV) != null) {\n arcgisHome = System.getProperty(ARCGISHOME_ENV);\n }\n if(arcgisHome == null) {\n /* To make env lookup case insensitive */\n Map<String, String> envs = System.getenv();\n for (String envName : envs.keySet()) {\n if (envName.equalsIgnoreCase(ARCGISHOME_ENV)) {\n arcgisHome = envs.get(envName);\n }\n }\n }\n if(arcgisHome != null && !arcgisHome.endsWith(File.separator)) {\n arcgisHome += File.separator;\n }\n return arcgisHome;\n }",
"abstract public String getTopResourcesDir();",
"@Override\n public String getSystemDir() {\n return null;\n }",
"public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }",
"public static File getDBPath(ConfigurationSource conf, String key) {\n final File dbDirPath =\n getDirectoryFromConfig(conf, key, \"OM\");\n if (dbDirPath != null) {\n return dbDirPath;\n }\n\n LOG.warn(\"{} is not configured. We recommend adding this setting. \"\n + \"Falling back to {} instead.\", key,\n HddsConfigKeys.OZONE_METADATA_DIRS);\n return ServerUtils.getOzoneMetaDirPath(conf);\n }",
"public File getWorldFolder(String worldName);",
"public File getStoreDir();",
"public static Object getInternalStorageDirectory() {\n\n FileObject root = Repository.getDefault().getDefaultFileSystem().getRoot();\n\n //FileObject dir = root.getFileObject(\"Storage\");\n \n //return dir;\n return null;\n }",
"protected File getCacheDirectory() {\n \t\treturn Activator.getDefault().getStateLocation().append(\"cache\").toFile(); //$NON-NLS-1$\n \t}",
"@Override\n public File getExternalDirectory() throws LocationManagerException {\n if (externalDir == null) {\n throw new LocationManagerException(\"External directory not set\");\n }\n\n return new File(externalDir);\n }",
"private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}",
"public String getRepositoryRootFolder() {\n\t\tString userFolder = UnixPathUtil.unixPath(IdatrixPropertyUtil.getProperty(\"idatrix.metadata.reposity.root\",\"/data/ETL/reposity/\"));\n\t\tif (CloudApp.getInstance().getRepository() instanceof KettleFileRepository) {\n\t\t\tKettleFileRepository fileRepo = (KettleFileRepository) CloudApp.getInstance().getRepository();\n\t\t\tuserFolder = fileRepo.getRepositoryMeta().getBaseDirectory();\n\t\t}\n\t\treturn userFolder;\n\t}",
"public File getWorldRegionFolder(String worldName);",
"abstract public String getMspluginsDir();",
"public static File systemInstallDir() {\n String systemInstallDir = System.getProperty(INSTALL_DIR_SYSTEM_PROP, \"../config\").trim();\n return new File(systemInstallDir);\n }",
"abstract public String getDataResourcesDir();",
"@Override\n public List<String> getCmsLocations() {\n return Collections.emptyList();\n }",
"public File getGitRepoContainerDir() {\n return config.getGitReposParentDir();\n }",
"abstract public String getRingResourcesDir();",
"private static String getRioHomeDirectory() {\n String rioHome = RioHome.get();\n if(!rioHome.endsWith(File.separator))\n rioHome = rioHome+File.separator;\n return rioHome;\n }",
"public static Path locateResourcesDir(ServiceContext context) {\n if (context.getServlet() != null) {\n return locateResourcesDir(context.getServlet().getServletContext(), context.getApplicationContext());\n }\n\n return context.getBean(GeonetworkDataDirectory.class).getResourcesDir();\n }",
"public String getLocationPath();",
"public String getStorageLocation() {\n\t\treturn io.getFile();\n\t}",
"public static String getOutputFolderName() {\n\t\treturn PropertiesFile.getSystemRoot()+PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t}",
"private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }",
"public static String getOutputDir() {\n outputDir = getProperty(\"outputDir\");\n if (outputDir == null) outputDir = \"./\";\n return outputDir;\n }",
"public static String getWorldConfigLocation(String sName) {\n\n\t\treturn DataStore.dataLayerFolderPath + File.separator + \"WorldConfigs/\" + sName + \".cfg\";\n\t}",
"public static String rootDir()\n {\n read_if_needed_();\n \n return _root;\n }",
"public static Path locateResourcesDir(ServletContext context,\n ApplicationContext applicationContext) {\n Path property = null;\n try {\n property = applicationContext.getBean(GeonetworkDataDirectory.class).getResourcesDir();\n } catch (NoSuchBeanDefinitionException e) {\n final String realPath = context.getRealPath(\"/WEB-INF/data/resources\");\n if (realPath != null) {\n property = IO.toPath(realPath);\n }\n }\n\n if (property == null) {\n return IO.toPath(\"resources\");\n } else {\n return property;\n }\n }",
"public static File getYdfDirectory()\r\n/* 36: */ throws IOException\r\n/* 37: */ {\r\n/* 38: 39 */ log.finest(\"OSHandler.getYdfDirectory\");\r\n/* 39: 40 */ return ydfDirectory == null ? setYdfDirectory() : ydfDirectory;\r\n/* 40: */ }",
"public String getImageDir() {\n return (String) data[GENERAL_IMAGE_DIR][PROP_VAL_VALUE];\n }",
"private String getDicDir() {\n\t\tString wDir = null;\n\n\t\tif (System.getProperties().containsKey(\"root\")) {\n\t\t\twDir = System.getProperty(\"root\");\n\t\t}\n\n\t\tif ((wDir == null || wDir.isEmpty()) && CPlatform.isMacOs())\n\t\t\twDir = new File(CPlatform.getUserHome(), \"Library/Spelling\")\n\t\t\t\t\t.getAbsolutePath();\n\n\t\tif (wDir == null || wDir.isEmpty())\n\t\t\twDir = \"/home/ff/projects/hunspell\";\n\t\treturn wDir;\n\t}",
"public String getMappingDirectory() {\n\t\treturn props.getProperty(ARGUMENT_MAPPING_DIRECTORY);\n\t}",
"@Override\r\n\tpublic String getRootDir() {\t\t\r\n\t\treturn Global.USERROOTDIR;\r\n\t}",
"@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public File getDefaultOutputDir() {\n File out = _mkdir(XPreferencesFactory.kDefaultReportsOutputDir.getDir(false));\r\n String dn = NamingConventions.createNiceEnglishDate_for_dirs();\r\n return _mkdir(new File(out, dn));\r\n }",
"public static String getConfigFolder() {\n\t\tString progArg = System.getProperty(ConfigConstants.CONFIG_DIR_PROG_ARGUMENT);\n\t\tif (progArg != null) {\n\t\t\treturn progArg;\n\t\t} else {\n\t\t\treturn configFolder;\n\t\t}\n\t}",
"private String getDataDirectory() {\n Session session = getSession();\n String dataDirectory;\n try {\n dataDirectory = (String) session.createSQLQuery(DATA_DIRECTORY_QUERY).list().get(0);\n } finally {\n releaseSession(session);\n }\n return dataDirectory;\n }",
"public static File getRootPackageDir(File location, String longPackageName) {\r\n\t\tfinal StringTokenizer tk = new StringTokenizer(longPackageName, \".\");\r\n\t\tFile back = location;\r\n\t\twhile (tk.hasMoreTokens()) {\r\n\t\t\ttk.nextToken();\r\n\t\t\tback = back.getParentFile();\r\n\t\t}\r\n\t\treturn back;\r\n\t}",
"public String getDir();",
"FileObject getBaseFolder();",
"public static File getPlatformDir () {\n return new File (System.getProperty (\"netbeans.home\")); // NOI18N\n }",
"public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}",
"public static File getDataDirectory() {\n\t\treturn DATA_DIRECTORY;\n\t}",
"public String getSchemaLocation() {\r\n return schemaLocation;\r\n }",
"private Folder getRootFolder() {\n if(!MigrationProperties.get(MigrationProperties.PROP_MIGRATION_PROFILE).equalsIgnoreCase(\"DELTA\")) {\n String folderPath = MigrationProperties.get(MigrationProperties.PROP_SOURCE_LOCATION);\n\n if (folderPath != null && folderPath.contains(\"/\")) {\n Folder rootFolder = CmisHelper.getFolder(jobParameters.getSessionSource(), folderPath);\n return rootFolder;\n\n } else\n return null;\n } else\n return null;\n }",
"public static String getOutputFolder() {\n\n if ((m_sOutputFolder == null) || m_sOutputFolder.trim().equals(\"\")) {\n return System.getProperty(\"user.home\");\n }\n else {\n return m_sOutputFolder;\n }\n\n }",
"public String getFileDirectory() {\n String storedDirectory = settings.get(\"fileDirectory\");\n \n // Default to the program files\n if (storedDirectory == null) {\n storedDirectory = System.getenv(\"ProgramFiles\");\n }\n \n return storedDirectory;\n }",
"private String getInitialDirectory() {\n String lastSavedPath = controller.getLastSavePath();\n\n if (lastSavedPath == null) {\n return System.getProperty(Constants.JAVA_USER_HOME);\n }\n\n File lastSavedFile = new File(lastSavedPath);\n\n return lastSavedFile.getAbsoluteFile().getParent();\n }",
"public static String getPluginsLocation() {\r\n return pluginsLocation.getValue();\r\n }",
"public String getXLSDirectory() {\n\t\treturn props.getProperty(ARGUMENT_XLS_DIRECTORY);\n\t}",
"private File getConfigurationFolder(final File baseFolder) throws FileNotFoundException, IOException {\n final String METADATA_FOLDER_NAME = System.getProperty(\"com.bf.viaduct.metadata.location\", \"metadata\");\n final String CONFIG_FOLDER_NAME = \"config\";\n final String CONFIGURATION_FOLDER_NAME = \"configuration\";\n\n // If the \"metadata\" folder exists, use it, otherwise check for existence of the\n // \"configuration\" folder.\n File folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n METADATA_FOLDER_NAME));\n if (!folder.isDirectory()) {\n // If the \"configuration\" folder exists, use it, otherwise use the \"config\" folder.\n folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n CONFIGURATION_FOLDER_NAME));\n if (!folder.isDirectory()) {\n folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n CONFIG_FOLDER_NAME));\n }\n }\n\n return folder;\n }",
"public File getCartridgeDir() {\n\t\treturn new File(DataStore.getInstance().getValue(CodegenConstants.DATASTORE_CARTRIDGE_DIR));\n\t}",
"protected File getRootDir() {\r\n\t\tif (rootDir == null) {\r\n\t\t\trootDir = new File(getProperties().getString(\"rootDir\"));\r\n\t\t\tif (! rootDir.exists())\r\n\t\t\t\tif (! rootDir.mkdirs())\r\n\t\t\t\t\tthrow new RuntimeException(\"Could not create root dir\");\r\n\t\t}\r\n\t\treturn rootDir;\r\n\t}",
"public String getDataParent () {\n if (dataParent == null) {\n return System.getProperty (GlobalConstants.USER_DIR);\n } else {\n return dataParent;\n }\n }",
"public static File getWorkspaceDir(BundleContext context)\n {\n return new File(getTargetDir(context), \"../../\");\n }",
"public String getConfigurationDirectory() {\n\t\treturn props.getProperty(ARGUMENT_CONFIGURATION_DIRECTORY);\n\t}",
"private String getRepositoryPath() {\n if (repoPath != null) {\n return repoPath;\n }\n\n final String pathProp = System.getProperty(SYSTEM_PATH_PROPERTY);\n\n if (pathProp == null || pathProp.isEmpty()) {\n repoPath = getWorkingDirectory();\n } else if (pathProp.charAt(0) == '.') {\n // relative path\n repoPath = getWorkingDirectory() + System.getProperty(\"file.separator\") + pathProp;\n } else {\n repoPath = RepoUtils.stripFileProtocol(pathProp);\n }\n\n log.info(\"Using repository path: \" + repoPath);\n return repoPath;\n }",
"public String getExternalStorageDir() throws IOException {\n\t\tString ret = exec(\"echo $EXTERNAL_STORAGE\").replace('\\n', ' ').trim();\n\t\tif (!(ret.endsWith(\"/\"))) {\n\t\t\tret += \"/\";\n\t\t}\n\t\treturn ret;\n\t}",
"public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }",
"private void initializeLocation() throws CoreException {\n \t\tif (location.toFile().exists()) {\n \t\t\tif (!location.toFile().isDirectory()) {\n \t\t\t\tString message = NLS.bind(CommonMessages.meta_notDir, location);\n \t\t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t\t}\n \t\t}\n \t\t//try infer the device if there isn't one (windows)\n \t\tif (location.getDevice() == null)\n \t\t\tlocation = new Path(location.toFile().getAbsolutePath());\n \t\tcreateLocation();\n \t\tinitialized = true;\n \t}",
"@Override\n\tpublic String getDirName() {\n\t\treturn StringUtils.substringBeforeLast(getLocation(), \"/\");\n\t}",
"public File getDataStoreDir() {\n\t\treturn this.localDataStoreDir;\n\t}",
"String getInstallRoot();",
"public String getLocalRepositoryRootFolder() {\n\t\tString userFolder = IdatrixPropertyUtil.getProperty(\"idatrix.local.reposity.root\",getRepositoryRootFolder() );\n\t\tint index = userFolder.indexOf(\"://\");\n\t\tif(index > -1 ) {\n\t\t\tuserFolder = userFolder.substring(index+3);\n\t\t}\n\t\treturn userFolder;\n\t}",
"public String getDataDirectory() {\n return dataDirectory;\n }",
"@Override\n public URL getTemplateLocation() {\n try {\n String[] candidates = getDirectoryCandidates();\n for (int i = 0; i < candidates.length; i++) {\n if (Activator.getDefault().getBundle().getEntry(candidates[i]) != null) {\n URL candidate = new URL(getInstallURL(), candidates[i]);\n return candidate;\n }\n }\n } catch (MalformedURLException e) { // do nothing\n }\n return null;\n }",
"@Override\n public String getConfigPath() {\n String fs = String.valueOf(File.separatorChar);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"scan\").append(fs);\n sb.append(\"config\").append(fs);\n sb.append(\"mesoTableConfig\").append(fs);\n\n return sb.toString();\n }",
"public abstract String getFileLocation();",
"public String getOutputHdfsDir() {\n\t\treturn outputHdfsDir;\n\t}",
"protected File getAsinstalldir() throws ClassNotFoundException {\n\t\tif (asinstalldir == null) {\n\t\t\tString home = getProject().getProperty(\"asinstall.dir\");\n\t\t\tif (home != null) {\n asinstalldir = new File(home);\n\t\t\t}\n else {\n home = getProject().getProperty(\"sunone.home\");\n if (home != null)\n {\n final String msg = lsm.getString(\"DeprecatedProperty\", new Object[] {\"sunone.home\", \"asinstall.dir\"});\n log(msg, Project.MSG_WARN);\n asinstalldir = new File(home);\n }\n \n }\n\t\t}\n if (asinstalldir!=null) verifyAsinstalldir(asinstalldir);\n\t\treturn asinstalldir;\n\t}",
"String getDockerFilelocation();",
"public String getWalletFileDirectoryFull() {\r\n return dataDirectory + walletFileDirectory;\r\n }",
"public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }",
"public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }",
"public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}",
"abstract public String getImageResourcesDir();",
"java.lang.String getFileLoc();",
"String getDir();",
"@NonNull\n public static File getSdkDir() {\n String androidHome = System.getenv(\"ANDROID_HOME\");\n if (androidHome != null) {\n File f = new File(androidHome);\n if (f.isDirectory()) {\n return f;\n }\n }\n\n throw new IllegalStateException(\"SDK directory not defined with ANDROID_HOME\");\n }",
"@Override\n public String getCurrentDirectory() {\n return (String) gemFileState.get(STATE_SYNC_DIRECTORY);\n }",
"public static File getResourcesFolder(Context context){\n SharedPreferences sharedPreferences = context.getSharedPreferences(Values.PREFERENCES_NAME, Context.MODE_PRIVATE);\n File downloadPath = null;\n File[] folders = context.getExternalFilesDirs(null);\n switch (sharedPreferences.getString(Values.DOWNLOAD_LOCATION, Values.NOT_YET_DECIDED)) {\n case Values.LOCATION_INTERNAL:\n downloadPath = folders[0];\n break;\n case Values.LOCATION_EXTERNAL:\n if (hasWritableSd(context))\n downloadPath = folders[1];\n break;\n case Values.NOT_YET_DECIDED:\n //If it's the first time choosing one of the two possible storage locations, make the choice\n downloadPath = requestNewResourcesFolder(context);\n }\n return downloadPath;\n }",
"phaseI.Hdfs.DataNodeLocation getLocation();",
"String getRepositoryPath();",
"default Optional<Path> getProjectDir() {\n Optional<Path> projectDir = get(MICRONAUT_PROCESSING_PROJECT_DIR, Path.class);\n if (projectDir.isPresent()) {\n return projectDir;\n }\n // let's find the projectDir\n Optional<GeneratedFile> dummyFile = visitGeneratedFile(\"dummy\" + System.nanoTime());\n if (dummyFile.isPresent()) {\n URI uri = dummyFile.get().toURI();\n // happens in tests 'mem:///CLASS_OUTPUT/dummy'\n if (uri.getScheme() != null && !uri.getScheme().equals(\"mem\")) {\n // assume files are generated in 'build' or 'target' directories\n Path dummy = Paths.get(uri).normalize();\n while (dummy != null) {\n Path dummyFileName = dummy.getFileName();\n if (dummyFileName != null && (\"build\".equals(dummyFileName.toString()) || \"target\".equals(dummyFileName.toString()))) {\n projectDir = Optional.ofNullable(dummy.getParent());\n put(MICRONAUT_PROCESSING_PROJECT_DIR, dummy.getParent());\n break;\n }\n dummy = dummy.getParent();\n }\n }\n }\n\n return projectDir;\n }"
]
| [
"0.7056067",
"0.5869351",
"0.58169454",
"0.576889",
"0.5726751",
"0.57088673",
"0.56834984",
"0.56709296",
"0.56601715",
"0.56570816",
"0.5633187",
"0.55941063",
"0.5558206",
"0.5551663",
"0.55261505",
"0.5517616",
"0.5492314",
"0.5492111",
"0.54910904",
"0.54747415",
"0.547377",
"0.541429",
"0.5410774",
"0.54081357",
"0.5366928",
"0.5363548",
"0.5360965",
"0.5342276",
"0.53306264",
"0.53280413",
"0.532073",
"0.5320696",
"0.53198355",
"0.5284715",
"0.5283868",
"0.5275162",
"0.52553934",
"0.5248683",
"0.52483034",
"0.52473354",
"0.5240778",
"0.52333844",
"0.5222936",
"0.52134174",
"0.520205",
"0.5198155",
"0.5194583",
"0.5180413",
"0.5174719",
"0.51744676",
"0.51719433",
"0.5170125",
"0.516412",
"0.5161706",
"0.5153412",
"0.5152205",
"0.5151484",
"0.5147578",
"0.51413524",
"0.5136536",
"0.5134204",
"0.5132995",
"0.5112946",
"0.511012",
"0.5109705",
"0.5109156",
"0.5107977",
"0.51013255",
"0.50989705",
"0.5098852",
"0.50963163",
"0.50950515",
"0.5089486",
"0.5088923",
"0.5086015",
"0.5085742",
"0.50799406",
"0.5075418",
"0.5060116",
"0.5056905",
"0.5055165",
"0.5052268",
"0.5050261",
"0.50362176",
"0.50360477",
"0.50347805",
"0.50238526",
"0.5023252",
"0.5021289",
"0.501852",
"0.5012728",
"0.49925292",
"0.49886596",
"0.4988055",
"0.49801803",
"0.49797225",
"0.49778834",
"0.4976516",
"0.49719548",
"0.49695048"
]
| 0.69186634 | 1 |
Utility method to retrieve the value of a key representing a DB directory and create a File object for the directory. The method also sets the directory permissions based on the configuration. | public static File getDirectoryFromConfig(ConfigurationSource conf,
String key,
String componentName) {
final Collection<String> metadirs = conf.getTrimmedStringCollection(key);
if (metadirs.size() > 1) {
throw new IllegalArgumentException(
"Bad config setting " + key +
". " + componentName +
" does not support multiple metadata dirs currently");
}
if (metadirs.size() == 1) {
final File dbDirPath = new File(metadirs.iterator().next());
if (!dbDirPath.mkdirs() && !dbDirPath.exists()) {
throw new IllegalArgumentException("Unable to create directory " +
dbDirPath + " specified in configuration setting " +
key);
}
try {
Path path = dbDirPath.toPath();
// Fetch the permissions for the respective component from the config
String permissionValue = getPermissions(key, conf);
String symbolicPermission = getSymbolicPermission(permissionValue);
// Set the permissions for the directory
Files.setPosixFilePermissions(path,
PosixFilePermissions.fromString(symbolicPermission));
} catch (Exception e) {
throw new RuntimeException("Failed to set directory permissions for " +
dbDirPath + ": " + e.getMessage(), e);
}
return dbDirPath;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public File getDirectoryValue();",
"public File getFileForKey(String key) {\n\t\treturn new File(mRootDirectory, getFilenameForKey(key));\n\t}",
"public static File getDBPath(ConfigurationSource conf, String key) {\n final File dbDirPath =\n getDirectoryFromConfig(conf, key, \"OM\");\n if (dbDirPath != null) {\n return dbDirPath;\n }\n\n LOG.warn(\"{} is not configured. We recommend adding this setting. \"\n + \"Falling back to {} instead.\", key,\n HddsConfigKeys.OZONE_METADATA_DIRS);\n return ServerUtils.getOzoneMetaDirPath(conf);\n }",
"public void testGetDir() {\n System.out.println(\"testGetDir\");\n\n final String key = \"preferenceKey\";\n preferences.put(key, \"\");\n\n final File expResult = null;\n final File result = DataAccessPreferenceUtilities.getDir(key);\n\n assertEquals(result, expResult);\n }",
"static File setupRecordRoot(Configuration config) throws IOException {\n String recordDir = getRioHomeDirectory()+\"logs\"+File.separator+\"records\";\n try {\n recordDir = (String)config.getEntry(CybernodeImpl.getConfigComponent(), \n \"recordDirectory\", \n String.class, \n recordDir);\n } catch(ConfigurationException e) {\n logger.warn(\"Exception getting recordDirectory\", e);\n }\n File recordRoot = new File(recordDir); \n checkAccess(recordRoot);\n return(recordRoot);\n }",
"public static File createFileFieldData(File directory, String data) throws Exception {\r\n File actual = new File(directory.getPath(), \"fielddata.dat\");\r\n FileUtils.saveFile(actual, data);\r\n return actual;\r\n }",
"alluxio.proto.journal.File.PersistDirectoryEntry getPersistDirectory();",
"Object getDir();",
"public void testGetDir3() {\n System.out.println(\"testGetDir3\");\n final String key = null;\n final String value = null;\n\n preferences.put(key, value);\n \n final File expResult = null;\n final File result = DataAccessPreferenceUtilities.getDir(key);\n\n assertEquals(result, expResult);\n }",
"private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}",
"public static String createFilePath(File cacheDir, String imageKey)\n {\n try\n {\n // Get the ABsolute Path of the Cache Directory. E.g /root/......\n String absolutePath = cacheDir.getAbsolutePath();\n // Use URLEncoder to make sure the file name is valid\n String validFileName = URLEncoder.encode(imageKey, \"UTF-8\");\n // Construct File Path\n return absolutePath + File.separator + validFileName;\n }\n catch (UnsupportedEncodingException e)\n {\n Log.e(\"DiskLruCache\", \"createFilePath - \" + e);\n }\n\n return null;\n }",
"@Test\n public void testGetDataAccessResultsDir() throws IOException {\n System.out.println(\"getDataAccessResultsDir\");\n\n final String key = \"saveDataDir\";\n File tempFile = null;\n try {\n tempFile = File.createTempFile(\"testfile\", \".txt\");\n\n final String path = tempFile == null ? \"\" : tempFile.getAbsolutePath();\n\n preferences.put(key, path);\n \n final File result = DataAccessPreferenceUtilities.getDir(key);\n\n // Verify mock is working correctly\n assertEquals(result, tempFile);\n\n // Verify no file is returned because it needs to be a directory\n final File expResult = null;\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDir(), expResult);\n } finally {\n // Cleanup\n if (tempFile != null && tempFile.exists()) {\n tempFile.delete();\n }\n }\n }",
"public File getStoreDir();",
"public void setDirectoryKey(String key) {\n mDirectoryKey = key;\n }",
"private static File setYdfDirectory()\r\n/* 27: */ throws IOException\r\n/* 28: */ {\r\n/* 29: 32 */ log.finest(\"OSHandler.setYdfDirectory\");\r\n/* 30: 33 */ ydfDirectory = new File(USER_HOME + \"/\" + \".yourdigitalfile\");\r\n/* 31: 34 */ ydfDirectory.mkdir();\r\n/* 32: 35 */ return ydfDirectory;\r\n/* 33: */ }",
"@Test\n public void testGetDataAccessResultsDir2() {\n System.out.println(\"getDataAccessResultsDir2\");\n\n final String key = \"\";\n\n // key is null in preferences\n \n final File expResult = null;\n final File result = DataAccessPreferenceUtilities.getDir(key);\n\n assertEquals(result, expResult);\n\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDir(), expResult);\n }",
"String getDatabaseDirectoryPath();",
"public static File getFile(File workingDirectory, String value)\n {\n if (value.startsWith(\".\"))\n {\n return new File(workingDirectory, value.substring(2));\n }\n else\n {\n return new File(value);\n }\n }",
"public static File getDatabaseExportDirectoryFile() {\n\t\tif (xml == null) return null;\n\t\treturn new File(basepath + databaseExportDir);\n\t}",
"public static File getYdfDirectory()\r\n/* 36: */ throws IOException\r\n/* 37: */ {\r\n/* 38: 39 */ log.finest(\"OSHandler.getYdfDirectory\");\r\n/* 39: 40 */ return ydfDirectory == null ? setYdfDirectory() : ydfDirectory;\r\n/* 40: */ }",
"public static File getFile(String key) {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\treturn new File(get(key));\n\t}",
"static File getRootFile() {\n File root = new File(Constant.CONFIG_DIRECTORY_NAME);\n boolean directoryCreated = true;\n if (!root.exists()) {\n directoryCreated = root.mkdirs();\n }\n if (directoryCreated) {\n return root;\n } else {\n return null;\n }\n }",
"@Test\n public void testGetDataAccessResultsDirEx2() throws IOException {\n System.out.println(\"getDataAccessResultsDirEx2\");\n\n final String key = \"saveDataDir\";\n File tempFile = null;\n try {\n tempFile = File.createTempFile(\"testfile\", \".txt\");\n\n final String path = tempFile == null ? \"\" : tempFile.getAbsolutePath();\n\n preferences.put(key, path);\n\n final File result = DataAccessPreferenceUtilities.getDir(key);\n\n // Verify mock is working correctly\n assertEquals(result, tempFile);\n\n // Verify no file is returned because it needs to be a directory\n final File expResult = null;\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDir(), expResult);\n\n // Verify that a file is returned because it does not care about directory.\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDirEx(), tempFile);\n } finally {\n // Cleanup\n if (tempFile != null && tempFile.exists()) {\n tempFile.delete();\n }\n }\n }",
"void setDirectory(File dir);",
"public DirectoryField addDirectoryField(final FileProperty property, final String directory) {\n return addDirectoryField(property.getKey(), directory);\n }",
"public String getKeyFilePath();",
"private static File safeOpenFile() throws IOException {\n\t\tPath path = Paths.get(PropertyUtil.getConfigPath() + \"/config\");\n\n\t\tif (!Files.exists(path)) {\n\t\t\tFiles.createDirectories(path.getParent());\n\t\t\tFiles.createFile(path);\n\t\t\tlogger.debug(\"Creating {}\", path.toAbsolutePath());\n\t\t}\n\n\t\treturn path.toFile();\n\t}",
"public String open() throws Exception {\n\t\tFile d = new File(dir);\n\n\t\tif (d.mkdirs()) {\n\t\t\t// all OK, return.\n\t\t\treturn path;\n\t\t}\n\n\t\tif (d.exists()) {\n\t\t\t// already exists, return.\n\t\t\treturn path;\n\t\t}\n\n\t\t// try and fix the path\n\t\tlogger.warn(\"Cannot create directory: \" + d.getPath());\n\t\tfixPath(d);\n\n\t\tif (d.mkdirs()) {\n\t\t\t// all OK, return.\n\t\t\treturn path;\n\t\t}\n\n\t\tif (d.exists()) {\n\t\t\t// already exists, return.\n\t\t\treturn path;\n\t\t}\n\n\t\tthrow new ConverterException(\"Unable to fix path: \" + d.getPath());\n\t}",
"public String getDir();",
"public static Object getExternalStorageDirectory() {\n \n //User home directory\n String home = System.getProperty(\"user.home\");\n File dir = new File(home+\"/externalStorage/databases/\");\n FileObject myfolder = FileUtil.toFileObject(dir);\n dir.mkdir();\n /*if(myfolder == null){\n //Testing\n //displayMessage(\"Creating folder \"+dir.getPath());\n \n return null;\n }*/\n \n return dir.getAbsolutePath();\n \n }",
"public void testGetDir2() {\n System.out.println(\"testGetDir2\");\n\n final String key = \"preferenceKey\";\n preferences.put(key, \"preferenceValue\");\n\n // Create static mock of NbPreferences to return the preferences mock\n final File expResult = new File(\"preferenceValue\");\n final Path expectedPath = Paths.get(expResult.getAbsolutePath());\n \n final File result = DataAccessPreferenceUtilities.getDir(key);\n final Path resultantPath = Paths.get(result.getAbsolutePath());\n\n assertEquals(resultantPath.normalize(), expectedPath.normalize());\n }",
"public static File getUserDir()\n {\n return fUserDir;\n }",
"public Path getDataDirectory();",
"@Test\n public void testGetDataAccessResultsDirEx() {\n System.out.println(\"getDataAccessResultsDirEx\");\n\n final String key = \"saveDataDir\";\n\n preferences.put(key, System.getProperty(\"user.dir\"));\n\n final File expResult = new File(System.getProperty(\"user.dir\"));\n final File result = DataAccessPreferenceUtilities.getDir(key);\n final Path expectedPath = Paths.get(expResult.getAbsolutePath());\n final Path resultantPath = Paths.get(result.getAbsolutePath());\n\n assertEquals(resultantPath.normalize(), expectedPath.normalize());\n\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDir(), expResult);\n\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDirEx(), expResult);\n }",
"@Test\n public void testGetDataAccessResultsDir3() {\n System.out.println(\"getDataAccessResultsDir3\");\n\n final String key = \"saveDataDir\";\n\n preferences.put(key, System.getProperty(\"user.dir\"));\n\n final File expResult = new File(System.getProperty(\"user.dir\"));\n final Path expectedPath = Paths.get(expResult.getAbsolutePath());\n \n final File result = DataAccessPreferenceUtilities.getDir(key);\n final Path resultantPath = Paths.get(result.getAbsolutePath());\n\n assertEquals(resultantPath.normalize(), expectedPath.normalize());\n\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDir(), expResult);\n }",
"public Storage() {\n\t\tstorageReader = new StorageReader();\n\t\tstorageWriter = new StorageWriter();\n\t\tdirectoryManager = new DirectoryManager();\n\n\t\tFile loadedDirectory = storageReader.loadDirectoryConfigFile(FILENAME_DIRCONFIG);\n\t\tif (loadedDirectory != null) {\n\t\t\tif (directoryManager.createDirectory(loadedDirectory) == true) {\n\t\t\t\tdirectory = loadedDirectory;\n\t\t\t\tSystem.out.println(\"{Storage} Directory loaded | \" + directory.getAbsolutePath());\n\t\t\t} else { //loaded directory was invalid or could not be created\n\t\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t\t}\n\t\t} else { //directory config file was not found\n\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t}\n\t}",
"public File getFile(String key) {\n\t\tFile defaultValue = (File) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tFile file = new File(sp);\n\t\tif (file.exists())\n\t\t\treturn file;\n\t\telse {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\t}",
"public String getFileDirectory() {\n String storedDirectory = settings.get(\"fileDirectory\");\n \n // Default to the program files\n if (storedDirectory == null) {\n storedDirectory = System.getenv(\"ProgramFiles\");\n }\n \n return storedDirectory;\n }",
"private String getDirectory(String timedObjectId) {\n String dirName = directories.get(timedObjectId);\n if (dirName == null) {\n dirName = baseDir.getAbsolutePath() + File.separator + timedObjectId.replace(File.separator, \"-\");\n File file = new File(dirName);\n if(!file.exists()) {\n if(!file.mkdirs()) {\n logger.error(\"Could not create directory \" + file + \" to persist EJB timers.\");\n }\n }\n directories.put(timedObjectId, dirName);\n }\n return dirName;\n }",
"public File getDirectory()\n {\n return directory;\n }",
"String getUserDatabaseFilePath();",
"@Override\n public void createDirectory(File storageName) throws IOException {\n }",
"public String addDirectory(String dir)\n\t{\n\t\tString dirn= this.sysdir + File.separator + dir;\n\t\tFile f= new File(dirn);\n\t\tif( !f.exists() )\n\t\t\tf.mkdirs();\n\t\t\n\t\tsynchronized( syncFiles ) // get Intermediate-Data access for the key \n\t\t{\n\t\t\twhile( syncFileswait )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tsyncFiles.wait();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tsyncFileswait= true;\n\t\t\t\n\t\t\tfiles.put(dir, dirn);\n\t\t\t\n\t\t\tsyncFileswait= false;\n\t\t\tsyncFiles.notifyAll();\n\t\t}\n\t\t\n\t\treturn dirn;\n\t}",
"Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }",
"private static File getUserFolderConfFile() {\n String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;\n File userFolder = PlatformUtil.getUserDirectory();\n File userEtcFolder = new File(userFolder, ETC_FOLDER_NAME);\n if (!userEtcFolder.exists()) {\n userEtcFolder.mkdir();\n }\n return new File(userEtcFolder, confFileName);\n }",
"public DirectoryField addDirectoryField(final String key, final String directory) {\n String label = key;\n DirectoryField directoryField = new DirectoryField(getComposite(), _form, key, label, directory, false);\n directoryField.adapt(_formToolkit);\n _form.mapField(key, directoryField);\n return directoryField;\n }",
"private Map<String, String> getDirectory() {\n return new HashMap<>() {{\n put(\"Moran Lin\", \"1111111111\"); // 546*6*\n put(\"Ming Kho\", \"2222222222\"); // 546*6*\n put(\"Sam Haboush\", \"3333333333\"); // 4226874*7*\n put(\"Heidi Haboush\", \"4444444444\"); // 4226874*4*\n put(\"Hakeem Haboush\", \"5555555555\"); // 4226874*4*\n put(\"Amanda Holden\", \"6666666666\"); // 465336*2*\n put(\"Megan Fox\", \"7777777777\"); // 369*6*\n put(\"Kate Moss\", \"8888888888\"); // 6677*5*\n put(\"Sarah Louche\", \"9999999999\"); // 568243*7*\n put(\"Cameron Diaz\", \"0000000000\"); // 3429*2*\n// put(\"Heidi Klum\", \"1212121212\"); // 5586*4* doesn't exist in dictionary\n }};\n }",
"public File getFileFromDataDirs() {\n String[] dataDirs = IoTDBDescriptor.getInstance().getConfig().getDataDirs();\n String partialFileString =\n (sequence ? IoTDBConstant.SEQUENCE_FLODER_NAME : IoTDBConstant.UNSEQUENCE_FLODER_NAME)\n + File.separator\n + logicalStorageGroupName\n + File.separator\n + dataRegionId\n + File.separator\n + timePartitionId\n + File.separator\n + filename;\n for (String dataDir : dataDirs) {\n File file = FSFactoryProducer.getFSFactory().getFile(dataDir, partialFileString);\n if (file.exists()) {\n return file;\n }\n }\n return null;\n }",
"public FileSupport(String defaultPath){\n\t this.defaultPath = defaultPath;\n\t \n\t File dir = new File(defaultPath);\n\t \n\t if(!dir.exists()){\n\t\t try{\n\t\t\t dir.mkdir();\n\t\t } catch(SecurityException e){\n\t\t\t \n\t\t }\n\t\t \n\t }\n }",
"public static File getStorageDir2(Context context) {\n File file = new File(Environment.getExternalStorageDirectory()+File.separator+\"ZhouImage\", OUTGOING_DATE_FORMAT.format(new Date())+\".jpg\");\n if (!file.exists()) {\n if (!file.mkdirs()) {\n Log.e(\"TAG\", \"Directory not created\");\n }\n }\n\n return file;\n }",
"public File getFileChooserDirectory() {\n\n\t\tFile dir = null;\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(diffuseBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(specularBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(((TextField) textureInputLayout.lookup(\"tex_path\")).getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\treturn dir;\n\t}",
"String getDir();",
"java.io.File getBaseDir();",
"public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}",
"public DirectoryFileLocator() {\r\n this(System.getProperty(\"user.dir\"));\r\n }",
"private String getDataDirectory() {\n Session session = getSession();\n String dataDirectory;\n try {\n dataDirectory = (String) session.createSQLQuery(DATA_DIRECTORY_QUERY).list().get(0);\n } finally {\n releaseSession(session);\n }\n return dataDirectory;\n }",
"private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static File createTableDataFile(File directory, Hashtable valuesTable) throws Exception {\r\n return AbstractTemplateGenerator.createTableDataFile(directory, valuesTable, \"tableIndex.txt\");\r\n }",
"FsPath baseDir();",
"public void createOrReadCache() {\n\t\tList<String> cachedDirectoryPaths = new ArrayList<>();\n\t\tFile file = new File(LevelEditor.SAVED_PATH_DATA);\n\t\tif (!file.exists()) {\n\t\t\t// Set the default paths first\n\t\t\tFileControl.lastSavedDirectory = new File(LevelEditor.defaultPath);\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\n\t\t\tcachedDirectoryPaths.add(FileControl.lastSavedDirectory.getAbsolutePath());\n\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"rw\")) {\n\t\t\t\tthis.storeCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"r\")) {\n\t\t\t\tthis.fetchCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\n\t\t\tFileControl.lastSavedDirectory = new File(cachedDirectoryPaths.get(LevelEditor.FileControlIndex));\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\t\t}\n\t}",
"File getDirForNextEntryLog(List<File> writableLedgerDirs);",
"public void setDir(File d) {\r\n this.dir = d;\r\n }",
"private DirDetailsForWrite fileWithDirListingEntry(String fileName, Block root, int rootIndex) {\n\t\tint slashIndex = fileName != null ? fileName.indexOf(\"/\") : Constants.NEGATIVE;\n\t\tString first = null;\n\t\tString second = null;\n\t\tDirEntryDetails dirEntryDetails = null;\n\t\tDirDetailsForWrite dirDetailsForWrite = null;\n\t\t\n\t\tif(slashIndex > 0) {\n\t\t\tsecond = fileName.substring(slashIndex+1);\n\t\t\tfirst = fileName.substring(0, slashIndex);\n\t\t\t\n\t\t\tdirEntryDetails = ((Directory)root).containDirEntryByName(first);\n\t\t\t//dirDetailsForWrite = new DirDetailsForWrite();\n\t\t\t//dirDetailsForWrite.setDirEntryDetails(dirEntryDetails);\n\t\t\t//dirDetailsForWrite.setRootIndex(rootIndex);\n\t\t\t\n\t\t\treturn fileWithDirListingEntry(second, sector.get(dirEntryDetails.getLink()), dirEntryDetails.getLink());\n\t\t} else {\n\t\t\tdirEntryDetails = ((Directory)root).containDirEntryByName(fileName);\n\t\t\t\n\t\t\tdirDetailsForWrite = new DirDetailsForWrite();\n\t\t\tdirDetailsForWrite.setDirEntryDetails(dirEntryDetails);\n\t\t\tdirDetailsForWrite.setRootIndex(rootIndex);\n\t\t\t\n\t\t\tif(dirEntryDetails != null)\n\t\t\t\treturn dirDetailsForWrite;\n\t\t}\n\t\treturn null;\n\t}",
"public static Object getInternalStorageDirectory() {\n\n FileObject root = Repository.getDefault().getDefaultFileSystem().getRoot();\n\n //FileObject dir = root.getFileObject(\"Storage\");\n \n //return dir;\n return null;\n }",
"@Test\n public void testCreateFilePath() {\n System.out.println(\"createFilePath with realistic path\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"\n +fSeparator+\"Users\"+fSeparator+\"Panagiwtis Georgiadis\"+fSeparator+\"Entries\"\n +fSeparator+\"Test1\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createFilePath(path);\n assertEquals(\"Some message\",expResult, result);\n }",
"private static File getStorageDir(Context context) {\n File file = new File(context.getExternalFilesDir(\n Environment.MEDIA_MOUNTED), \"ZhouImage\");\n if (!file.exists()) {\n if (!file.mkdirs()) {\n Log.e(\"TAG\", \"Directory not created\");\n }\n }\n\n return file;\n }",
"public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}",
"public static boolean createDBDir() {\n return (new File(path)).mkdirs();\n }",
"public static String getFilesStoreDir(Context ctx) {\n\t\tString filedir = \"\";\n\t\tif (XSSysUtil.existSDCard(ctx)) {\n\t\t\tfiledir = android.os.Environment.getExternalStorageDirectory()\n\t\t\t\t\t+ \"/\" + ctx.getPackageName();\n\t\t} else {\n\t\t\tfiledir = \"data/data/\" + ctx.getPackageName();\n\t\t}\n\n\t\tFile fFile = new File(filedir);\n\t\tif (!fFile.exists()) {\n\t\t\tboolean success = fFile.mkdirs();\n\t\t\tif(!success){\n\t\t\t\tLog.e(TAG, \"getFilesStoreDir()-->first mkdirs fail!\");\n\t\t\t}\n\t\t}\n\n\t\tfiledir += \"/Files\";\n\t\tfFile = new File(filedir);\n\t\tif (!fFile.exists()) {\n\t\t\tboolean success = fFile.mkdirs();\n\t\t\tif(!success){\n\t\t\t\tLog.e(TAG, \"getFilesStoreDir()-->second mkdirs fail!\");\n\t\t\t}\n\t\t}\n\t\treturn filedir;\n\t}",
"public File getDirectory() {\n\t\treturn directory;\n\t}",
"public File createImageFile() {\n // the public picture director\n File picturesDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); // To get pictures directory from android system\n\n // timestamp makes unique name.\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n String timestamp = sdf.format(new Date());\n\n // put together the directory and the timestamp to make a unique image location.\n File imageFile = new File(picturesDirectory, timestamp + \".jpg\");\n\n return imageFile;\n }",
"public DirectoryManager(String directory,String _username){\n username = _username;\n root = new File(directory);\n if(!root.exists()) //create root directory if it doesn't exists\n root.mkdir();\n PWD = new File(root,username); //set home directory(root/username) as PWD\n if (!PWD.exists()) { //create PWD directory if it doesn't exists\n PWD.mkdir();\n }\n pattern = Pattern.compile(root + osPathSeprator + username + osPathSeprator + \"(.*)\");\n }",
"public void createDirectoryEntry(\n TableServiceClient tableServiceClient,\n UUID collectionId,\n String tableName,\n FireStoreDirectoryEntry createEntry) {\n\n tableServiceClient.createTableIfNotExists(tableName);\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n\n // Walk up the lookup directory path, finding missing directories we get to an\n // existing one\n // We will create the ROOT_DIR_NAME directory here if it does not exist.\n String lookupDirPath = FileMetadataUtils.makeLookupPath(createEntry.getPath());\n for (String testPath = lookupDirPath;\n !testPath.isEmpty();\n testPath = FileMetadataUtils.getDirectoryPath(testPath)) {\n\n // !!! In this case we are using a lookup path\n if (lookupByFilePath(tableServiceClient, collectionId, tableName, testPath) != null) {\n break;\n }\n\n FireStoreDirectoryEntry dirToCreate = FileMetadataUtils.makeDirectoryEntry(testPath);\n String partitionKey = getCollectionPartitionKey(collectionId, testPath);\n String rowKey = encodePathAsAzureRowKey(testPath);\n TableEntity entity = FireStoreDirectoryEntry.toTableEntity(partitionKey, rowKey, dirToCreate);\n logger.info(\"Upserting directory entry for {} in table {}\", testPath, tableName);\n // For file ingest worker flights,\n // It's possible that another thread is trying to write the same directory entity at the same\n // time upsert rather than create so that it does not fail if it already exists\n tableClient.upsertEntity(entity);\n }\n createEntityForPath(tableClient, collectionId, tableName, createEntry);\n }",
"public void setDir(File dir) {\n this.dir = dir;\n }",
"private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}",
"private void storeDirectory(ISO9660Directory directory, TaskMonitor monitor) {\n\n\t\tString dirName = directory.getName();\n\t\tboolean isDirectory = directory.isDirectoryFlagSet();\n\t\tint length = directory.getDataLengthLE();\n\t\tGFileImpl gFile = null;\n\n\t\t//Map does not contain entries yet since root level needs to be processed\n\t\tif (!lookedAtRoot) {\n\t\t\tgFile = GFileImpl.fromFilename(this, root, dirName, isDirectory, length, null);\n\t\t\tstoreFile(gFile, directory);\n\t\t}\n\t\telse {\n\t\t\t//Root has been processed, all other entries must have a parent\n\t\t\tString parentDirName = directory.getParentDirectory().getName();\n\t\t\tfor (GFile currGFile : fileToDirectoryMap.keySet()) {\n\t\t\t\t//Find the parent and store the file\n\t\t\t\tif (parentDirName.equals(currGFile.getName())) {\n\t\t\t\t\tgFile =\n\t\t\t\t\t\tGFileImpl.fromFilename(this, currGFile, dirName, isDirectory, length, null);\n\t\t\t\t\tstoreFile(gFile, directory);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static FileHandler getFileHandler() throws SecurityException, IOException {\n if (fh == null) {\n String path = Config.getStringProperty(\"logPath\");\n String fileName = Config.getStringProperty(\"logFileName\");\n String fullLogPath;\n\n if (path.toLowerCase().equals(\"default\")) {\n path = System.getProperty(\"user.dir\");\n path += \"/Logs\";\n }\n\n if (!path.endsWith(\"/\")) {\n path += \"/\";\n }\n\n fullLogPath = path + fileName;\n fh = new FileHandler(fullLogPath, true);\n }\n return fh;\n }",
"public void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams params)\n throws IOException {\n\n // Access the database context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Check if the database is online\n \n if ( dbCtx.getDBInterface().isOnline() == false)\n throw new DiskOfflineException( \"Database is offline\");\n \n // Get, or create, a file state for the new path. Initially this will indicate that the directory\n // does not exist.\n \n FileState fstate = getFileState(params.getPath(), dbCtx, false);\n if ( fstate != null && fstate.fileExists() == true)\n throw new FileExistsException(\"Path \" + params.getPath() + \" exists\");\n\n // If there is no file state check if the directory exists\n \n if ( fstate == null) {\n\n // Create a file state for the new directory\n \n fstate = getFileState(params.getPath(), dbCtx, true);\n \n // Get the file details for the directory\n \n if ( getFileDetails(params.getPath(), dbCtx, fstate) != null)\n throw new FileExistsException(\"Path \" + params.getPath() + \" exists\");\n }\n\n // Find the parent directory id for the new directory\n \n int dirId = findParentDirectoryId(dbCtx,params.getPath(),true);\n if ( dirId == -1)\n throw new IOException(\"Cannot find parent directory\");\n \n // Create the new directory entry\n \n try {\n\n // Get the directory name\n \n String[] paths = FileName.splitPath(params.getPath());\n String dname = paths[1];\n\n // Check if the directory name is too long\n \n if ( dname != null && dname.length() > MaxFileNameLen)\n throw new FileNameException(\"Directory name too long, \" + dname);\n \n // If retention is enabled check if the file is a temporary folder\n \n boolean retain = true;\n \n if ( dbCtx.hasRetentionPeriod()) {\n \n // Check if the file is marked delete on close\n \n if ( params.isDeleteOnClose())\n retain = false;\n }\n \n // Set the default NFS file mode, if not set\n \n if ( params.hasMode() == false)\n params.setMode(DefaultNFSDirMode);\n\n // Make sure the create directory option is enabled\n \n if ( params.hasCreateOption( WinNT.CreateDirectory) == false)\n throw new IOException( \"Create directory called for non-directory\");\n \n // Use the database interface to create the new file record\n \n int fid = dbCtx.getDBInterface().createFileRecord(dname, dirId, params, retain);\n\n // Indicate that the path exists\n \n fstate.setFileStatus( FileStatus.DirectoryExists);\n \n // Set the file id for the new directory\n \n fstate.setFileId(fid);\n \n // If retention is enabled get the expiry date/time\n \n if ( dbCtx.hasRetentionPeriod() && retain == true) {\n RetentionDetails retDetails = dbCtx.getDBInterface().getFileRetentionDetails(dirId, fid);\n if ( retDetails != null)\n fstate.setRetentionExpiryDateTime(retDetails.getEndTime());\n }\n \n // Check if the file loader handles create directory requests\n \n if ( fid != -1 && dbCtx.getFileLoader() instanceof NamedFileLoader) {\n \n // Create the directory in the filesystem/repository\n \n NamedFileLoader namedLoader = (NamedFileLoader) dbCtx.getFileLoader();\n namedLoader.createDirectory(params.getPath(), fid);\n }\n }\n catch (Exception ex) {\n Debug.println(ex);\n }\n }",
"public FileField addFileField(final String key, final String directory, final String[][] filters) {\n String label = key;\n FileField fileField = new FileField(getComposite(), _form, key, label, directory, filters, false);\n fileField.adapt(_formToolkit);\n _form.mapField(key, fileField);\n return fileField;\n }",
"private static String createAppSpecificLocalDir(String baseDir, String applicationIdString,\n String user, int dagIdentifier) {\n return baseDir + File.separator + \"usercache\" + File.separator + user + File.separator +\n \"appcache\" + File.separator + applicationIdString + File.separator + dagIdentifier;\n }",
"public File getDoveFile(){\n File temp = new File(drv.getAbsolutePath() + File.separator \n + folderName);\n return temp;\n }",
"@Test\n public void testGetFile() {\n System.out.println(\"getFile with valid path of existing folder with 2 subfiles\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"+fSeparator+\"Users\"+fSeparator+\n \"Panagiwtis Georgiadis\"+fSeparator+\"Entries\"+fSeparator+\"Texnologia2\"+fSeparator+\"Images\";\n FilesDao instance = new FilesDao();\n File expResult = new File(path+fSeparator+\"testImg.jpg\");\n File result;\n try{\n result = instance.getFile(path);\n }catch(EntryException ex){\n result = null;\n }\n assertEquals(\"Some message\",expResult, result);\n }",
"public @Nullable String valueFor(File file, String key) {\n StringBuilder pathBuilder = new StringBuilder(file.getAbsolutePath().length());\n boolean isDirectory = file.isDirectory();\n File parent = file.getParentFile();\n\n pathBuilder.append(file.getName());\n while (parent != null) {\n String path = pathBuilder.toString();\n\n String value = findAttributeInRules(path, isDirectory, key, getRulesForFolder(parent));\n if (value != null) {\n return value;\n }\n\n pathBuilder.insert(0, parent.getName() + \"/\");\n parent = parent.getParentFile();\n }\n return null;\n }",
"private File m29051a(String str) {\n File externalStorageDirectory = Environment.getExternalStorageDirectory();\n if (externalStorageDirectory == null) {\n return null;\n }\n File file = new File(String.format(\"%s%s%s\", new Object[]{externalStorageDirectory.getAbsolutePath(), File.separator, str}));\n if (!file.exists()) {\n file.mkdirs();\n }\n return file;\n }",
"public FileStorage(File path) {\n dataFolder = path;\n }",
"protected File getDir() {\n return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir,\n getBlockId()) : baseDir;\n }",
"public Dataset openTDB(String directory){\n Dataset dataset = TDBFactory.createDataset(directory);\n return dataset;\n}",
"public static File getDataDirectory() {\n\t\treturn DATA_DIRECTORY;\n\t}",
"private File getCacheDir(Context context, String uniqueName) {\n\t\tStringBuilder cachePath = new StringBuilder();\n\t\tif(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) || !Environment.isExternalStorageRemovable()){//API9\n\t\t\tcachePath.append(context.getExternalCacheDir().getPath());\n\t\t} else {\n\t\t\tcachePath.append(context.getCacheDir().getPath());\n\t\t}\n\t return new File(cachePath.toString() + File.separator + uniqueName);\n\t}",
"abstract File getTargetDirectory();",
"public File getFileValue();",
"public static FSDirectory createFSIndex(File indexDir) throws IOException {\n\t\tFSDirectory fsDirectory = FSDirectory.getDirectory( indexDir );\n\t\tif ( ! IndexReader.indexExists( fsDirectory ) ) {\n\t\t\tlog.debug( \"Initialize index: '{}'\", indexDir.getAbsolutePath() );\n\t\t\tIndexWriter.MaxFieldLength fieldLength = new IndexWriter.MaxFieldLength( IndexWriter.DEFAULT_MAX_FIELD_LENGTH );\n\t\t\tIndexWriter iw = new IndexWriter( fsDirectory, new StandardAnalyzer(), true, fieldLength );\n\t\t\tiw.close();\n\t\t}\n\t\treturn fsDirectory;\n\t}",
"public static File getDir(String city) {\n\t\tcity = checkUpperCase(city);\n\t\tString file = city + \".dat\";\n\t\tString dir = (System.getProperty(\"user.dir\"));\n\t\tdir += \"/data\";\n\t\tFile actualFile = new File (dir, file);\n\t\treturn actualFile;\n\t}",
"public String getDirectory() {\n return directoryProperty().get();\n }",
"public DirectoryFileLocator(File dir) {\r\n directory = dir;\r\n }",
"public File prepareDataFolder() {\n if (!dataFolder.exists()) {\n dataFolder.mkdirs();\n }\n return dataFolder;\n }",
"abstract File getResourceDirectory();",
"private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }",
"public boolean makeDirectory( String directory, FileType type );",
"private static void checkAccess(File directory, boolean isWriteable) throws IOException {\n if(!directory.exists()) {\n if(directory.mkdirs()) {\n logger.debug(\"Created directory [{}]\", directory.getCanonicalPath());\n } else {\n throw new IOException(\"Could not create directory \" +\n \"[\"+directory.getCanonicalPath()+\"], \" +\n \"make sure you have the proper \" +\n \"permissions to create, read & write \" +\n \"to the file system\");\n }\n }\n // Find if we can write to the record root directory\n if(!directory.canRead())\n throw new IOException(\"Cant read from : \"+directory.getCanonicalPath());\n if(isWriteable) {\n if(!directory.canWrite())\n throw new IOException(\"Cant write to : \"+directory.getCanonicalPath());\n }\n }"
]
| [
"0.6521722",
"0.5940173",
"0.5870977",
"0.5615353",
"0.55935526",
"0.5550648",
"0.5548779",
"0.55259603",
"0.5520779",
"0.55110174",
"0.5481374",
"0.54807466",
"0.5450959",
"0.54431456",
"0.54326546",
"0.54251",
"0.54060376",
"0.5402351",
"0.53878635",
"0.53166",
"0.5285281",
"0.5268076",
"0.5219227",
"0.51869774",
"0.5179694",
"0.5174674",
"0.5173826",
"0.51695037",
"0.51337075",
"0.51166534",
"0.5109356",
"0.51067173",
"0.5102802",
"0.50910854",
"0.5077746",
"0.5077447",
"0.5076761",
"0.5067164",
"0.50592047",
"0.5052218",
"0.50464654",
"0.503856",
"0.5001812",
"0.4996492",
"0.49860126",
"0.49395254",
"0.4938966",
"0.49304318",
"0.49298015",
"0.49225292",
"0.48947236",
"0.4871367",
"0.486675",
"0.48587653",
"0.48550585",
"0.48487702",
"0.48463723",
"0.48438722",
"0.48401755",
"0.48365626",
"0.4832258",
"0.48309574",
"0.48191258",
"0.48185012",
"0.48160532",
"0.4813108",
"0.4807844",
"0.4807736",
"0.48021045",
"0.48018745",
"0.4798292",
"0.47978324",
"0.47949728",
"0.47919565",
"0.47885558",
"0.4787302",
"0.4778444",
"0.4772821",
"0.47704297",
"0.4769615",
"0.47643623",
"0.47637755",
"0.47481683",
"0.47429192",
"0.47399017",
"0.4737603",
"0.47352663",
"0.4733526",
"0.47334048",
"0.47278485",
"0.47260353",
"0.47235855",
"0.47229698",
"0.47204438",
"0.47134337",
"0.4707076",
"0.4704209",
"0.47033042",
"0.46964428",
"0.4693402"
]
| 0.6327838 | 1 |
Fetches the symbolic representation of the permission value. | private static String getSymbolicPermission(String permissionValue) {
if (isSymbolic(permissionValue)) {
// For symbolic representation, use it directly
return permissionValue;
} else {
// For octal representation, convert it to FsPermission object and then
// to symbolic representation
short octalPermission = Short.parseShort(permissionValue, 8);
FsPermission fsPermission = new FsPermission(octalPermission);
return fsPermission.toString();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getPermission();",
"public String getPermission()\r\n {\r\n return permission;\r\n }",
"@Column(name = \"PERMISSION_VALUE\")\n\t@AccelaGenerator(generatorClass=\"com.accela.aa.datamanager.service.FilterScreenPermissionModelGeneratorImpl\")\t\n\tpublic String getPermissionValue()\n\t{\n\t\treturn permissionValue;\n\t}",
"public String getPermission() {\n return this.permission;\n }",
"private static boolean isSymbolic(String permissionValue) {\n return permissionValue.matches(\".*[rwx].*\");\n }",
"public Integer getPermission() {\n\t\treturn permission;\n\t}",
"public String getPermissionName() {\n return permissionName;\n }",
"public Permission getPermission() {\n return permission;\n }",
"public int getPermission() {\r\n\t\treturn nPermission;\r\n\t}",
"abstract public void getPermission();",
"public String getPermissionDescription() {\n return permissionDescription;\n }",
"Object getPerm(String name);",
"@Nullable\n Permission getPermissionTEMP(@NonNull String permName);",
"int getSymptomTypeValue();",
"@Column(name = \"PERMISSION_ACCESS\")\n\tpublic String getPermissionAccess()\n\t{\n\t\treturn permissionAccess;\n\t}",
"public FacebookPermissionsE permission(){\n\t\treturn this.permission;\n\t}",
"public static String applicationPermission() {\n return holder.format(\"applicationPermission\");\n }",
"public String getFloodPerm() throws PermissionDeniedException;",
"String getValue() throws AccessDeniedException {\n\t performSecurityManagerCheck();\n\t return town;\n\t }",
"Object getPerm(String name, Object def);",
"java.lang.String getPermissions(int index);",
"public int getPermission(Integer resourceId);",
"public Enumeration permissions();",
"@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _permissionType.getDescription();\n\t}",
"public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }",
"@Override\n @XmlTransient // Only for permission checks, don't serialize to XML\n public String getId() {\n return PERMISSION;\n }",
"public int convertPermission(Permission permission) {\n\n final int CHMOD = 1;\n final int WRITE = 2;\n final int READ = 4;\n final int ALL = 7;\n\n if (permission.equals(Permission.READ)) {\n return READ;\n }\n if (permission.equals(Permission.WRITE)) {\n return WRITE;\n }\n if (permission.equals(Permission.CHANGE_PERMISSION)) {\n return CHMOD;\n }\n return -1;\n }",
"public Integer getPermissionId() {\n return permissionId;\n }",
"public Integer getPermissionId() {\n return permissionId;\n }",
"int getPermissionRead();",
"public IPermissionOwner getPermissionOwner(String fname);",
"public java.lang.String getPermissions(int index) {\n return permissions_.get(index);\n }",
"public java.lang.String getPermissions(int index) {\n return permissions_.get(index);\n }",
"public void setPermissionValue(String permissionValue)\n\t{\n\t\tthis.permissionValue = permissionValue;\n\t}",
"public TPermissionMode getUserPermissionArray() {\n\n\t\treturn otherPermission;\n\t}",
"@Column(name = \"PERMISSION_LEVEL\")\n\tpublic String getPermissionLevel()\n\t{\n\t\treturn permissionLevel;\n\t}",
"PermissionType createPermissionType();",
"public String getPermissionAdmin() {\n return permissionAdmin;\n }",
"public String getAccess();",
"@ApiModelProperty(required = true, value = \"The remote system permission of the invoking user on the file/folder.\")\n public String getPermissions() {\n return permissions;\n }",
"public java.lang.String getAccession()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCESSION$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getFloodPerm(String dpidStr) throws PermissionDeniedException;",
"@Override\r\n\tpublic String permission() {\n\t\treturn Permissions.DEFAULT;\r\n\t}",
"@Override\n\tpublic java.lang.String getTypeName() {\n\t\treturn _permissionType.getTypeName();\n\t}",
"public List<Permission> getPermissionList() {\n return permissionList;\n }",
"public String symbolic() {\n return parent + \"/\" + symbolic;\n }",
"String getAccess();",
"String getAccess();",
"public java.lang.String getKind_ant() throws java.rmi.RemoteException;",
"public IPermissionActivity getPermissionActivity(long ownerId, String activityFname);",
"String getSymbolicName();",
"public com.tangosol.net.ClusterPermission getPermission()\n {\n return __m_Permission;\n }",
"public YangString getCellAccessModeValue() throws JNCException {\n return (YangString)getValue(\"cell-access-mode\");\n }",
"public List<String> getPermissions() {\n AppMethodBeat.m2504i(92672);\n List permissions = this.properties.getPermissions();\n AppMethodBeat.m2505o(92672);\n return permissions;\n }",
"public ArrayList<Permission> getPermissions()\r\n {\r\n return this.securityInfo.getPermissions();\r\n }",
"java.util.List<java.lang.String>\n getPermissionsList();",
"public Set<PosixFilePermission> permissions() {\n List<PosixFilePermission> listPermissions = new ArrayList<PosixFilePermission>();\n listPermissions.add(PosixFilePermission.OWNER_READ);\n listPermissions.add(PosixFilePermission.OWNER_WRITE);\n listPermissions.add(PosixFilePermission.OWNER_EXECUTE);\n listPermissions.add(PosixFilePermission.GROUP_READ);\n listPermissions.add(PosixFilePermission.GROUP_WRITE);\n listPermissions.add(PosixFilePermission.GROUP_EXECUTE);\n listPermissions.add(PosixFilePermission.OTHERS_READ);\n listPermissions.add(PosixFilePermission.OTHERS_WRITE);\n listPermissions.add(PosixFilePermission.OTHERS_EXECUTE);\n\n // We get the permission string and we create it by looking up\n String permissionString = this.attrs.getPermissionsString();\n Set<PosixFilePermission> permissions = new HashSet<PosixFilePermission>();\n char nothing = \"-\".charAt(0);\n // We skip the first character as it's the file type\n for (int i=1; i< permissionString.length();i++) {\n if (permissionString.charAt(i) != nothing) {\n permissions.add(listPermissions.get(i-1));\n }\n }\n\n return permissions;\n\n }",
"public IPermissionActivity getPermissionActivity(String ownerFname, String activityFname);",
"private List<Permission> convertPermission(int value) {\n\n List<Permission> permissions = new ArrayList<Permission>();\n\n final int CHMOD = 1;\n final int WRITE = 2;\n final int READ = 4;\n final int ALL = 7;\n\n if (value == ALL) {\n permissions.add(Permission.READ);\n permissions.add(Permission.WRITE);\n permissions.add(Permission.CHANGE_PERMISSION);\n return permissions;\n }\n\n if ((value & CHMOD) == CHMOD) {\n permissions.add(Permission.CHANGE_PERMISSION);\n }\n if ((value & READ) == READ) {\n permissions.add(Permission.READ);\n }\n if ((value & WRITE) == WRITE) {\n permissions.add(Permission.WRITE);\n }\n\n return permissions;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", permissionId=\").append(permissionId);\n sb.append(\", permissionName=\").append(permissionName);\n sb.append(\", permissionDescription=\").append(permissionDescription);\n sb.append(\", permissionAdmin=\").append(permissionAdmin);\n sb.append(\", permissionTypeId=\").append(permissionTypeId);\n sb.append(\", permissionPid=\").append(permissionPid);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }",
"public com.google.protobuf.ProtocolStringList\n getPermissionsList() {\n permissions_.makeImmutable();\n return permissions_;\n }",
"public Permission getPermission(String objectId, User user, Boolean pending) throws UserManagementException;",
"@Override\n\tpublic java.lang.String getTypeCode() {\n\t\treturn _permissionType.getTypeCode();\n\t}",
"List<Permission> getPermissions();",
"public Permission[] getPermissionsField() {\n\treturn super.getPermissions(null);\n }",
"public interface IPermissionTarget {\n \n /**\n * Get the key of this permission target. This key\n * will be used as the actual target string of a permission assignment.\n * \n * @return\n */\n public String getKey();\n \n /**\n * Get the human-readable name of this permission target.\n * \n * @return\n */\n public String getName();\n \n}",
"int getPermissionWrite();",
"public Integer getPermissionTypeId() {\n return permissionTypeId;\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Permissions getPermissions() {\r\n return permissions;\r\n }",
"public java.util.List<org.eclipse.stardust.engine.api.runtime.Permission>\n getPermissions()\n throws org.eclipse.stardust.common.error.WorkflowException;",
"public com.google.protobuf.ProtocolStringList\n getPermissionsList() {\n return permissions_;\n }",
"public PermissionHandler getHandler() {\r\n return Permissions.Security;\r\n }",
"public java.lang.String sign() {\n\n return java.lang.String.valueOf(this.getValue().charAt(0));\n }",
"public List<String> getPermissions() {\n return this.permissions;\n }",
"@Override\r\n\tpublic Permission getPermission(int id) {\n\t\treturn null;\r\n\t}",
"public String getAccessTypeString() {\n return String.valueOf(accessType);\n }",
"public @NonNull String getSplitPermission() {\n return mSplitPermissionInfoParcelable.getSplitPermission();\n }",
"public interface Permissions\r\n{\r\n\t/**\r\n\t * Tests whether a permission has been granted\r\n\t * \r\n\t * @param capability The permission (capability) to test for\r\n\t * @return Whether the given capability is allowed\r\n\t */\r\n\tboolean has(String capability);\r\n\r\n\t/**\r\n\t * @param capability The permission to get\r\n\t * @return The permission of the given name\r\n\t */\r\n\tPermission getPermission(String capability);\r\n\r\n\t/** @return All permissions associated with this Permissions object */\r\n\tPermission [] getAllPermissions();\r\n}",
"@Override\n public String toString() {\n return value + symbol(this.type);\n }",
"public String getInodePermissions(short fileMode)\n {\n\n\n StringBuilder inodeType = new StringBuilder();\n StringBuilder permissions = new StringBuilder();\n\n\n for(int i = 0; i < fileModes.length; i++)\n {\n if(fileMode(fileMode, fileModes[i]))\n {\n inodeType.append(getFileModeString(fileModes[i]));\n }\n }\n\n for(int i = 0; i < filePermissions.length; i++)\n {\n if(fileMode(fileMode, filePermissions[i]))\n {\n permissions.append(getFilePermission(filePermissions[i]));\n }\n else\n {\n permissions.append(\"-\");\n }\n }\n return inodeType.toString() + permissions.toString();\n }",
"public IPermissionActivity getPermissionActivity(long id);",
"@Override\n\tpublic long getPermissionTypeId() {\n\t\treturn _permissionType.getPermissionTypeId();\n\t}",
"public void setPermission(String permission)\r\n {\r\n this.permission = permission;\r\n }",
"Map<String, Object> getPermStorage();",
"public Integer getPermissionPid() {\n return permissionPid;\n }",
"public interface PermissionContainer {\n\n\t/**\n\t * @param permission\n\t * @return true if player has permission\n\t */\n\tboolean hasPermission(String permission);\n\n\t/**\n\t * @param permission\n\t * @return true if container has permission\n\t */\n\tboolean hasPermission(Permission permission);\n\n\t/**\n\t * Sets a desired permission\n\t * \n\t * @param perm\n\t * @param add\n\t */\n\tvoid setPermission(String perm, boolean add);\n\n\t/**\n\t * @return true if account has wildcard\n\t */\n\tboolean hasWildCard();\n\n\t/**\n\t * Adds wildcard permission\n\t */\n\tvoid addWildCard();\n\n\t/**\n\t * Removes wildcard permission\n\t */\n\tvoid removeWildCard();\n\n\t/**\n\t * @return the account's permissions\n\t */\n\tSet<String> getPermissions();\n\n\t/**\n\t * @return the account's evaded permissions\n\t */\n\tSet<String> getNonPermissions();\n\n}",
"public org.dcache.srm.v2_2.TPermissionReturn[] getPermissionArray() {\n return permissionArray;\n }",
"int getSymbolicId();",
"public String getAccess()\n\t\t{\n\t\t\treturn m_access;\n\t\t}",
"public int getPermissions()\n {\n return encryptionDictionary.getInt( \"P\", 0 );\n }",
"public IPermissionOwner getPermissionOwner(long id);",
"public static int convertPermToInt(Perm permission) {\n if(permission == null) {\n return 0;\n }\n \n // Else convert the object into an int value\n int permInt = 0;\n permInt += (1 * (permission.isPermission() ? 1 : 0));\n permInt += (2 * (permission.isRemove() ? 1 : 0));\n permInt += (4 * (permission.isRead() ? 1 : 0));\n permInt += (8 * (permission.isWrite() ? 1 : 0));\n permInt += (16 * (permission.isExecute() ? 1 : 0));\n permInt += (32 * (permission.isList() ? 1 : 0));\n permInt += (64 * (permission.isGetMetadata() ? 1 : 0));\n permInt += (128 * (permission.isSetMetadata() ? 1 : 0));\n\n return permInt;\n }",
"public String getRights() {\n/* 287 */ return getRights((String)null);\n/* */ }",
"com.google.protobuf.ByteString\n getPermissionsBytes(int index);",
"public com.google.protobuf.ByteString\n getPermissionsBytes(int index) {\n return permissions_.getByteString(index);\n }",
"public int getUserModificationPermission() {\n return permission;\n }",
"public List<String> getUsedPermissions() {\n final List<String> result = new LinkedList<String>();\n for (final Element child : manifestElement.getChildren(ELEMENT_USES_PERMISSION)) {\n final String permission = child.getAttributeValue(ATTRIBUTE_NAME);\n if (permission != null) {\n result.add(permission);\n }\n }\n\n return result;\n }",
"public\t\tString\t\tgetValue()\n\t\t{\n\t\treturn(\"\" + getNormalizedValue());\n\t\t}",
"protected static int[] convertPermission(String jivePermission, boolean isGlobalPermission) {\r\n \r\n //TODO Igor: check again all permission conversions here\r\n if ( (jivePermission==null) || (jivePermission.equalsIgnoreCase(\"NONE\")) ) {\r\n return new int[] {MVNForumPermission.PERMISSION_NO_PERMISSIONS};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"SYSTEM_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_SYSTEM_ADMIN};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CATEGORY_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n // presently mvnForum does not support permission PERMISSION_CATEGORY_ADMIN and PERMISSION_CATEGORY_MODERATOR\r\n return new int[] {/*MVNForumPermission.PERMISSION_CATEGORY_ADMIN,\r\n MVNForumPermission.PERMISSION_CATEGORY_MODERATOR,*/\r\n MVNForumPermission.PERMISSION_ADD_CATEGORY,\r\n MVNForumPermission.PERMISSION_EDIT_CATEGORY,\r\n MVNForumPermission.PERMISSION_DELETE_CATEGORY};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"FORUM_ADMIN\")) {\r\n // note that PERMISSION_FORUM_ADMIN is a combined permission so it includes other permission\r\n return new int[] {MVNForumPermission.PERMISSION_FORUM_ADMIN/*,\r\n MVNForumPermission.PERMISSION_FORUM_MODERATOR,\r\n MVNForumPermission.PERMISSION_ADD_FORUM,\r\n MVNForumPermission.PERMISSION_EDIT_FORUM,\r\n MVNForumPermission.PERMISSION_DELETE_FORUM*/};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"GROUP_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_GROUP_ADMIN,\r\n MVNForumPermission.PERMISSION_GROUP_MODERATOR};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"USER_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_USER_ADMIN,\r\n MVNForumPermission.PERMISSION_USER_MODERATOR};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"MODERATOR\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_CATEGORY_MODERATOR,\r\n MVNForumPermission.PERMISSION_FORUM_MODERATOR,\r\n MVNForumPermission.PERMISSION_GROUP_MODERATOR,\r\n MVNForumPermission.PERMISSION_USER_MODERATOR};\r\n } else {\r\n return new int[] {MVNForumPermission.PERMISSION_FORUM_MODERATOR};\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"MODERATE_THREADS\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST,\r\n MVNForumPermission.PERMISSION_ADD_POST,\r\n MVNForumPermission.PERMISSION_EDIT_POST,\r\n MVNForumPermission.PERMISSION_DELETE_POST,\r\n MVNForumPermission.PERMISSION_ADD_THREAD};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CREATE_THREAD\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_ADD_THREAD};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"MODERATE_MESSAGES\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST,\r\n MVNForumPermission.PERMISSION_ADD_POST,\r\n MVNForumPermission.PERMISSION_EDIT_POST,\r\n MVNForumPermission.PERMISSION_DELETE_POST};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CREATE_MESSAGE\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_ADD_POST};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CREATE_ATTACHMENT\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_ADD_ATTACHMENT};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"READ_FORUM\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"READ\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST};\r\n \r\n } else {\r\n // TODO minhnn: I think we should show warning here, even could throw AssertionError\r\n return new int[] {MVNForumPermission.PERMISSION_NO_PERMISSIONS};\r\n }\r\n }",
"public ResourceInformation.Permissions getEffectivePermissions() {\n\t\tif (effectivePermissions == null)\n\t\t\tfetchInfo();\n\t\treturn effectivePermissions;\n\t}"
]
| [
"0.68243855",
"0.65004975",
"0.6343013",
"0.6302105",
"0.60491794",
"0.5967524",
"0.59320426",
"0.5925",
"0.5914742",
"0.5870802",
"0.58689463",
"0.5828055",
"0.5735895",
"0.5724262",
"0.57227266",
"0.5721026",
"0.5607469",
"0.55033946",
"0.5383068",
"0.53479",
"0.5327199",
"0.53223056",
"0.5296026",
"0.5227782",
"0.52229506",
"0.5222494",
"0.5135213",
"0.5122216",
"0.5122216",
"0.5111672",
"0.51092494",
"0.5107244",
"0.51005083",
"0.507612",
"0.5051508",
"0.50462574",
"0.5038873",
"0.50137883",
"0.49991518",
"0.4997411",
"0.49948645",
"0.49887055",
"0.49864906",
"0.49824798",
"0.49653283",
"0.49630946",
"0.4952217",
"0.4952217",
"0.4951012",
"0.49478835",
"0.49426734",
"0.49424604",
"0.49420518",
"0.49369246",
"0.49226695",
"0.49123305",
"0.489776",
"0.48962495",
"0.4893645",
"0.48921216",
"0.48918605",
"0.4884411",
"0.48820904",
"0.48759878",
"0.48726147",
"0.48686525",
"0.48664",
"0.48579502",
"0.48494264",
"0.48348382",
"0.48234904",
"0.48231956",
"0.4820673",
"0.48186147",
"0.48066333",
"0.48005784",
"0.47355518",
"0.47254986",
"0.47249505",
"0.47218972",
"0.4719108",
"0.4717829",
"0.4714095",
"0.47058004",
"0.4703095",
"0.47011274",
"0.46975005",
"0.46949947",
"0.4690207",
"0.46848485",
"0.4682802",
"0.46810853",
"0.4663575",
"0.4660179",
"0.46548003",
"0.46517023",
"0.4648101",
"0.46430737",
"0.46411204",
"0.46404225"
]
| 0.8042788 | 0 |
Checks if the permission value is in symbolic representation. | private static boolean isSymbolic(String permissionValue) {
return permissionValue.matches(".*[rwx].*");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String getSymbolicPermission(String permissionValue) {\n if (isSymbolic(permissionValue)) {\n // For symbolic representation, use it directly\n return permissionValue;\n } else {\n // For octal representation, convert it to FsPermission object and then\n // to symbolic representation\n short octalPermission = Short.parseShort(permissionValue, 8);\n FsPermission fsPermission = new FsPermission(octalPermission);\n return fsPermission.toString();\n }\n }",
"public boolean isSymbolic() throws PDFNetException {\n/* 583 */ return IsSymbolic(this.a);\n/* */ }",
"public boolean checkPermission(Permission permission);",
"String getPermission();",
"@Override\n\tpublic boolean hasPermission(String string) {\n\t\treturn true;\n\t}",
"boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;",
"private boolean validateAccess(String permission) {\n\t\tif (\"READ\".equalsIgnoreCase(permission)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }",
"boolean isAccess(char access);",
"public boolean hasSymbolicLinksEnabled(SrvSession sess, TreeConnection tree) {\n\n // Access the associated database interface to check if it supports symbolic links\n \n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n if ( dbCtx.getDBInterface().supportsFeature( DBInterface.FeatureSymLinks)) {\n \n // Database interface supports symbolic links\n\n return true;\n }\n \n // Symbolic links not supported\n \n return false;\n }",
"public boolean isPermissionSet ( String name ) {\n\t\treturn extract ( handle -> handle.isPermissionSet ( name ) );\n\t}",
"public Boolean isPermissions() {\n return (Boolean) get(\"permissions\");\n }",
"public static boolean m45181a() {\n Context b = m45183b();\n if (b != null) {\n try {\n PackageManager packageManager = b.getPackageManager();\n if (packageManager == null) {\n return true;\n }\n String[] strArr = packageManager.getPackageInfo(b.getPackageName(), 4096).requestedPermissions;\n if (strArr == null) {\n return false;\n }\n String[] strArr2 = f31382a;\n for (String str : strArr2) {\n boolean a = m45182a(strArr, str);\n f31383b.put(str, Boolean.valueOf(a));\n if (!a) {\n TLogger.m45340ee(\"PermissionChecker\", \"The required permission of <\" + str + \"> does not found!\");\n return false;\n }\n }\n return true;\n } catch (Throwable th) {\n TLogger.m45339e(\"PermissionChecker\", \"check required permissins exception.\", th);\n return false;\n }\n } else {\n throw new IllegalArgumentException(\"The context parameter can not be null!\");\n }\n }",
"public static boolean isSymbolicLink(Path path) {\n\t\treturn Files.isSymbolicLink(path);\n\t}",
"public static boolean isPermittedValue(String value) {\n if (value == null\n || NONE.equals(value)\n || PUBLIC.equals(value)\n || CONFIDENTIAL.equals(value)) {\n return true;\n }\n return false;\n }",
"public static boolean hasPermission(Player player, String permission){\n \t\tif (player.hasPermission(permission)){\n \t\t\treturn true;\n \t\t}\n \t\tString permWithWild = \"\";\n \t\tString[] nodes = permission.split(\"\\\\.\");\n \t\tSystem.out.println(nodes.length);\n \t\tfor (int i = 0; i + 1 <= nodes.length; i++){\n \t\t\tif (i + 1 == nodes.length){\n \t\t\t\tpermWithWild += \"*\";\n \t\t\t\tif (player.hasPermission(permWithWild)){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tpermWithWild += nodes[i] + \".\";\n \t\t\t\tif (player.hasPermission(permWithWild + \"*\")){\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}",
"public abstract boolean impliesWithoutTreePathCheck(Permission permission);",
"private boolean hasSymbolicLink(Path path)\n {\n if (Files.isSymbolicLink(path))\n {\n return true;\n }\n\n // Lets try each path segment\n Path base = path.getRoot();\n for (Path segment : path)\n {\n base = base.resolve(segment);\n if (Files.isSymbolicLink(base))\n {\n return true;\n }\n }\n\n return false;\n }",
"public boolean isSymbolicLink() {\n return linkFlag == LF_SYMLINK;\n }",
"private boolean isSign( char in )\r\n\t{\r\n\t\treturn ( in=='*' || in=='/' || in=='+' || in=='-' );\r\n\t}",
"void check(Permission permission, Surrogate surrogate) throws T2DBException;",
"public String getPermission()\r\n {\r\n return permission;\r\n }",
"boolean isAtom(Formula f);",
"public boolean hasPermission ( String name ) {\n\t\treturn extract ( handle -> handle.hasPermission ( name ) );\n\t}",
"@GET\n\t@Path(\"check\")\n\tpublic void checkPermission(\n\t\t\t@QueryParam(value = \"permission\") final String permissionString) {\n\n\t\tif (permissionString == null) {\n\t\t\tthrow new WebApplicationException(\n\t\t\t\t\tResponse.status(Response.Status.BAD_REQUEST).build());\n\t\t}\n\t\tPermissionInfo pi = new PermissionInfo(permissionString);\n\t\tfinal Permission permission;\n\t\ttry {\n\t\t\tConstructor<?> constructor = Class.forName(pi.getType())\n\t\t\t\t\t.getConstructor(String.class, String.class);\n\t\t\tpermission = (Permission) constructor\n\t\t\t\t\t.newInstance(pi.getName(), pi.getActions());\n\t\t} catch (Exception ex) {\n\t\t\tthrow new WebApplicationException(ex, Response.Status.BAD_REQUEST);\n\t\t}\n\t\tAccessController.checkPermission(permission);\n\t}",
"abstract boolean canHandle(\n final PathReal name);",
"private static boolean isOperator(String value){\r\n\t\tif (value.equals(\"+\") ||value.equals(\"-\")|| value.equals(\"*\")|| value.equals(\"/\"))\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}",
"private boolean isOperator(String value) {\r\n return value.equals(\"*\") || value.equals(\"/\") || value.equals(\"-\") || value.equals(\"+\") || value.equals(\"(\") || value.equals(\")\");\r\n }",
"public boolean isValidSymbol(String s){\n\t\t// check whether the specified string s is a valid tent or tree symbol of the game\n\t\t// O(1)\n\t\tif(s.equals(tentSymbol) || s.equals(treeSymbol)) { //If the symbol is the same as the tent or tree symbol the it will return true\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean isHasPermissions();",
"@Column(name = \"PERMISSION_VALUE\")\n\t@AccelaGenerator(generatorClass=\"com.accela.aa.datamanager.service.FilterScreenPermissionModelGeneratorImpl\")\t\n\tpublic String getPermissionValue()\n\t{\n\t\treturn permissionValue;\n\t}",
"boolean hasSymbol();",
"boolean hasSymbol();",
"static boolean isaNonMinusOperator(char s){\n boolean nonMinusOperator = false;\n switch (s){\n case '+':nonMinusOperator = true; break;\n case '*':nonMinusOperator = true; break;\n case '/':nonMinusOperator = true; break;\n case '^':nonMinusOperator = true; break;\n }\n return nonMinusOperator;\n }",
"private boolean isFactor() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\tswitch(theCurrentToken.TokenType)\n\t\t{\n\t\t\tcase INTEGER: case TRUE: case FALSE: //case FLOAT:\n\t\t\t\tif(theCurrentSymbol != null)\n\t\t\t\t{\n\t\t\t\t\tif(theCurrentSymbol.getType() == TokenType.IF || theCurrentSymbol.getType() == TokenType.FOR)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(theCurrentToken.TokenType == TokenType.INTEGER || theCurrentToken.TokenType == TokenType.TRUE || theCurrentToken.TokenType == TokenType.FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(theCurrentSymbol.getType() == TokenType.INTEGER || theCurrentSymbol.getType() == TokenType.BOOL //|| theCurrentSymbol.getType() == TokenType.FLOAT\n\t\t\t\t\t|| theCurrentSymbol.getType() == TokenType.GETINTEGER || theCurrentSymbol.getType() == TokenType.GETBOOL //|| theCurrentSymbol.getType() == TokenType.GETFLOAT\n\t\t\t\t\t|| theCurrentSymbol.getType() == TokenType.PUTINTEGER || theCurrentSymbol.getType() == TokenType.PUTBOOL //|| theCurrentSymbol.getType() == TokenType.PUTFLOAT\n\t\t\t\t\t|| theCurrentSymbol.getType() == TokenType.PROCEDURE)\n\t\t\t\t\t{\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(theCurrentSymbol.getType() == TokenType.FLOAT && theCurrentToken.TokenType == TokenType.INTEGER)\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tcase FLOAT:\n\t\t\t\tif(theCurrentSymbol != null)\n\t\t\t\t{\n\t\t\t\t\tif( theCurrentSymbol.getType() == TokenType.FLOAT || theCurrentSymbol.getType() == TokenType.GETFLOAT || theCurrentSymbol.getType() == TokenType.PUTFLOAT\n\t\t\t\t\t|| theCurrentSymbol.getType() == TokenType.PROCEDURE)\n\t\t\t\t\t{\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tcase CHAR:\n\t\t\t\tif(theCurrentSymbol != null)\n\t\t\t\t{\n\t\t\t\t\tif(theCurrentSymbol.getType() == TokenType.IF || theCurrentSymbol.getType() == TokenType.FOR)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(theCurrentSymbol.getParameterTypes() == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheCurrentSymbol.setParameterTypes(Arrays.asList(theCurrentToken.TokenType));\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(theCurrentSymbol.getParameterTypes().get(0) == theCurrentToken.TokenType)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(theCurrentSymbol.getType() == TokenType.CHAR || theCurrentSymbol.getType() == TokenType.GETCHAR || \n\t\t\t\t\ttheCurrentSymbol.getType() == TokenType.PUTCHAR || theCurrentSymbol.getType() == TokenType.PROCEDURE)\n\t\t\t\t\t{\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tcase STRING:\n\t\t\t\tif(theCurrentSymbol != null)\n\t\t\t\t{\n\t\t\t\t\tif(theCurrentSymbol.getType() == TokenType.IF || theCurrentSymbol.getType() == TokenType.FOR)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(theCurrentSymbol.getParameterTypes() == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheCurrentSymbol.setParameterTypes(Arrays.asList(theCurrentToken.TokenType));\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(theCurrentSymbol.getParameterTypes().get(0) == theCurrentToken.TokenType)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(theCurrentSymbol.getType() == TokenType.STRING || theCurrentSymbol.getType() == TokenType.GETSTRING || \n\t\t\t\t\ttheCurrentSymbol.getType() == TokenType.PUTSTRING || theCurrentSymbol.getType() == TokenType.PROCEDURE)\n\t\t\t\t\t{\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tcase MINUS:\n\t\t\t\tupdateToken();\n\t\t\t\tif(isName())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t\telse if(isFactor())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LEFT_PARENTHESIS:\n\t\t\t\tupdateToken();\n\t\t\t\tif(isExpression())\n\t\t\t\t{\n\t\t\t\t\tupdateToken();\n\t\t\t\t\tif(theCurrentToken.TokenType == TokenType.RIGHT_PARENTHESIS)\n\t\t\t\t\t{\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IDENTITY:\n\t\t\t\tisValid = isName();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tisValid = false;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}",
"public String getPermission() {\n return this.permission;\n }",
"@JsonIgnore\n\tpublic boolean isPermission(String id) {\n\t\t // Fix, if prefix layers\n return layerIds.contains(getBaseLayerId(id));\n\t}",
"public boolean checkAccess(String s, String op, String obj){\n\t\t\n\t\t/*Integer object = values.get(5).get(obj);\n\t\tInteger operation = values.get(3).get(op);\n\t\tInteger session = values.get(4).get(s);*/\n\t\t\n\t\tHashMap<Integer,Integer> elements = new HashMap<Integer,Integer>();\n\t\telements.put(5, values.get(5).get(obj));\n\t\telements.put(3,values.get(3).get(op));\n\t\telements.put(4, values.get(4).get(s));\n\t\t\n\t\tif (authGraph.dfsWalkEdges(authGraph.getRoot(), elements)) return true;\n\t\telse return false;\n\t\t\n\t\t//CHECK ACCESS MUST HANDLE THE INHERITANCE PROPERLY.........\n\t\t//MEANING IF THERE IS A SPECIAL EDGE BETWEEN TWO ROLES THEN PASS IT WITHOUT CONSUMING THE PATH VALUES....\n\t}",
"private boolean isArithOp() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\tif(isRelation())\n\t\t{\n\t\t\tif(theNextToken.TokenType == TokenType.PLUS)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tupdateToken();\n\t\t\t\t\n\t\t\t\tif(isArithOp())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(theNextToken.TokenType == TokenType.MINUS)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tupdateToken();\n\t\t\t\t\n\t\t\t\tif(isArithOp())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisValid = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}",
"public boolean hasPermission(String permission) {\n return SecurityUtil.getListPermissions()\n .map(list -> list.contains(StringUtils.lowerCase(permission)))\n .orElse(false);\n }",
"int isSymbol(String h) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tif (h.equals(\"+\") || h.equals(\"-\") || h.equals(\"*\") || h.equals(\"/\") || h.equals(\"=\")) {\r\n\t\t\t\tisToken(h);\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif (h.equals(\";\")) {\r\n\t\t\t\tisToken(h);\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\tif (h.contains(\"(){\")) {\r\n\t\t\t\tisToken(\"(\");\r\n\t\t\t\tisToken(\")\");\r\n\t\t\t\tisToken(\"{\");\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\tif (h.contains(\"*\")) {\r\n\t\t\t\tisToken(\"*\");\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif (h.contains(\"/\")) {\r\n\t\t\t\tisToken(\"/\");\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif (h.contains(\"-\")) {\r\n\t\t\t\tisToken(\"-\");\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif (h.contains(\"+\")) {\r\n\t\t\t\tisToken(\"+\");\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\tif (h.contains(\"(\") || h.equals(\"(\") || h.contains(\")\") || h.equals(\")\")) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\r\n\t\t\tisToken(h);\r\n\t\t\treturn 1;\r\n\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tSystem.out.println(\"Program will not run because of this symbol = \" + h);\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"int getSymptomTypeValue();",
"public Enumeration permissions();",
"@Override\n public boolean shouldShowRequestPermissionRationale(@NonNull String permission) {\n return false;\n }",
"public boolean checkOperation(char operation) {\n boolean result = false;\n if (operation == '+' | operation == '-' | operation == '/' | operation == '*') {\n result = true;\n }\n return result;\n }",
"@Override\n public boolean containsPermission(Class<? extends AeroCommandBase<?>> command, String permission) {\n if (!containsPermissions(command)) {\n return false;\n }\n\n return permissions.get(command).contains(permission.toLowerCase());\n }",
"public boolean hasData(int aSym);",
"@Test\n public void testGetPermissionInstanceString() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"CAN_TREAT_ANIMALS\");\n assertEquals(\"can_treat_animals\", permission.getName());\n }",
"@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}",
"public final boolean isSpecialForm ()\r\n {\r\n return _value.isSpecialForm();\r\n }",
"public boolean reducible() {\n\treturn \n\t operator . equals( \"\\\\\") &&\n\t (argument.reducible() || argument instanceof BoolConstant);\n }",
"public String getPermissionName() {\n return permissionName;\n }",
"@Override\r\n\tpublic boolean visit(QualifiedName node) {\r\n\t\toperand(node,node.getFullyQualifiedName());\r\n\t\treturn false;\r\n\t}",
"static boolean m61443b(Context context, String str) {\n if (context.checkCallingOrSelfPermission(str) == 0) {\n return true;\n }\n return false;\n }",
"public static boolean isToken(String value) {\n\tif( value==null) return true;\n\tint len = value.length();\n\n\tfor (int i = 0; i < len; i++) {\n\t char c = value.charAt(i);\n\n\t if (c < 0x20 || c >= 0x7f || tspecials.indexOf(c) != -1)\n\t\treturn false;\n\t}\n\treturn true;\n }",
"public boolean validatePermissions()\r\n\t{\n\t\treturn true;\r\n\t}",
"public boolean isSymbolDefined(String s) {\n return slexic.containsKey(s);\n }",
"@Override\n public boolean hasPermission(Permission permission) {\n // FacesContext context = FacesContext.getCurrentInstance();\n String imp = (String)ADFContext.getCurrent().getSessionScope().get(\"isImpersonationOn\");\n// String imp = (String)context.getExternalContext().getSessionMap().get(\"isImpersonationOn\");\n if(imp == null || !imp.equals(\"Y\")){\n return super.hasPermission(permission);\n }\n else{\n return true;\n \n }\n \n }",
"@Column(name = \"PERMISSION_ACCESS\")\n\tpublic String getPermissionAccess()\n\t{\n\t\treturn permissionAccess;\n\t}",
"private boolean isOperator(String s) {\n\t\treturn (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\") || s.equals(\"/\") || s.equals(\"^\"));\n\t}",
"boolean hasSymbolTuple();",
"public Value restrictToSymbol() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~PRIMITIVE;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }",
"public boolean checkPermissions(String permission) {\r\n Log.d(TAG, \"checkPermissions: checking permission: \" + permission);\r\n\r\n int permissionRequest = ActivityCompat.checkSelfPermission(EditProfileActivity.this, permission);\r\n\r\n if (permissionRequest != PackageManager.PERMISSION_GRANTED) {\r\n Log.d(TAG, \"checkPermissions: \\n Permission was not granted for: \" + permission);\r\n Toast.makeText(this, \"Permissions not granted to access camera,\\n\" +\r\n \"please give permissions to GetAplot\", Toast.LENGTH_SHORT).show();\r\n return false;\r\n } else {\r\n Log.d(TAG, \"checkPermissions: \\n Permission was granted for: \" + permission);\r\n return true;\r\n }\r\n }",
"public void setPermissionValue(String permissionValue)\n\t{\n\t\tthis.permissionValue = permissionValue;\n\t}",
"public boolean isSign() {\n return this.type == Type.SIGN;\n }",
"@Override\n public void checkPermission(Permission perm) {\n }",
"public static boolean validAtom(char atom)\n\t{\n\t\tchar temp = Character.toUpperCase(atom);\n\t\treturn temp == 'C' || temp == 'H' || temp == 'O';\n\t}",
"public Boolean CanRender(MilStdSymbol symbol)\n {\n //String basicSymbolID = symbol.getSymbolID();\n return CanRender(symbol.getSymbolID(), symbol.getCoordinates(),symbol.getSymbologyStandard());\n }",
"public static boolean isValid(String name) {\n if (name == null) {\n throw new IllegalArgumentException(\"Name is missing\");\n }\n\n boolean slash = false;\n for (int i = 0; i < name.length(); i++) {\n char ch = name.charAt(i);\n if (ch <= ' ' || ch >= 127 || ch == '(' || ch == ')' || ch == '<' || ch == '>' ||\n ch == '@' || ch == ',' || ch == ';' || ch == ':' || ch == '\\\\' || ch == '\"' ||\n ch == '[' || ch == ']' || ch == '?' || ch == '=') {\n return false;\n } else if (ch == '/') {\n if (slash || i == 0 || i + 1 == name.length()) {\n return false;\n }\n slash = true;\n }\n }\n return slash;\n }",
"public boolean hasPermission(Context paramContext, String paramString) {\n }",
"public final boolean m2277l() {\n return this.f2952a == ValueType.stringValue;\n }",
"public static boolean isOperator(String name) {\n if (name.length() == 0) {\n return false;\n }\n // Pieced together from various sources (JsYaccLexer, DefaultJsParser, ...)\n switch (name.charAt(0)) {\n case '+':\n return name.equals(\"+\") || name.equals(\"+@\");\n case '-':\n return name.equals(\"-\") || name.equals(\"-@\");\n case '*':\n return name.equals(\"*\") || name.equals(\"**\");\n case '<':\n return name.equals(\"<\") || name.equals(\"<<\") || name.equals(\"<=\") || name.equals(\"<=>\");\n case '>':\n return name.equals(\">\") || name.equals(\">>\") || name.equals(\">=\");\n case '=':\n return name.equals(\"=\") || name.equals(\"==\") || name.equals(\"===\") || name.equals(\"=~\");\n case '!':\n return name.equals(\"!=\") || name.equals(\"!~\");\n case '&':\n return name.equals(\"&\") || name.equals(\"&&\");\n case '|':\n return name.equals(\"|\") || name.equals(\"||\");\n case '[':\n return name.equals(\"[]\") || name.equals(\"[]=\");\n case '%':\n return name.equals(\"%\");\n case '/':\n return name.equals(\"/\");\n case '~':\n return name.equals(\"~\");\n case '^':\n return name.equals(\"^\");\n case '`':\n return name.equals(\"`\");\n default:\n return false;\n }\n }",
"@Test\n public void testCheckExistsPermissionWithString() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE2\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission.getName()));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE2\");\n assertFalse(permissionManager.checkExists(permission2.getName()));\n }",
"public static String applicationPermission() {\n return holder.format(\"applicationPermission\");\n }",
"abstract public void getPermission();",
"public static boolean parseValue(String value) {\n\t\t/*// Whenever constants refer to a variable \n\t\tif(Environment.globalSymTab.containsSymbol(value))\n\t\t\treturn ((BooleanType)Environment.globalSymTab.getSymbol(value)).value();\n\t\telse*/\n\t\t\treturn Boolean.parseBoolean(value);\n\t}",
"@Override\n public boolean equals(Object o) {\n if (o instanceof AccessSymbol) {\n AccessSymbol other = (AccessSymbol)o;\n return (base.equals(other.base) && member.equals(other.member));\n } else {\n return false;\n }\n }",
"private static boolean isOperator(String c)\n\t\t{\t\n\t\t\tif (c.equals(\"+\") || c.equals(\"-\") || c.equals(\"*\") || c.equals(\"/\") ) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public boolean is (String name) {\n \t/* Avoid roundoff issues */\n return Math.abs(this.lookup(name)) < 0.0000001;\n }",
"public Integer getPermission() {\n\t\treturn permission;\n\t}",
"public int getPermission() {\r\n\t\treturn nPermission;\r\n\t}",
"@Override\r\n\tpublic boolean hasPermission(String absPath, String actions)\r\n\t\t\tthrows RepositoryException {\n\t\treturn false;\r\n\t}",
"private boolean validarPermiso(IUserSettings userSettings, String permissions)\r\n {\r\n boolean result = false;\r\n if (userSettings.hasPermission(permissions))\r\n {\r\n //Si tiene el permiso, y se indica a false la verficiacion de que no tenga permiso\r\n if (Boolean.FALSE.equals(getNotHasPermission()) || getNotHasPermission() == null)\r\n {\r\n result = true;\r\n }\r\n }\r\n else if (Boolean.TRUE.equals(getNotHasPermission()))\r\n {\r\n //No se tiene el permiso indicado, pero se indica a true el flag notHasPermission.\r\n result = true;\r\n }\r\n return result;\r\n }",
"public static boolean isValidSymbolPattern(String s) throws Exception{\n Stack<Character> stack = new Stack<Character>();\n if(s == null || s.length() == 0){\n return true;\n }\n for(int i = 0; i < s.length(); i++){\n if(s.charAt(i) == ')'){\n if(!stack.isEmpty() && stack.peek() == '('){\n stack.pop();\n }else{\n return false;\n }\n }else if(s.charAt(i) == ']'){\n if(!stack.isEmpty() && stack.peek() == '['){\n stack.pop();\n }else{\n return false;\n }\n }else if(s.charAt(i) == '}'){\n if(!stack.isEmpty() && stack.peek() == '{'){\n stack.pop();\n }else{\n return false;\n }\n }else{\n stack.push(s.charAt(i));\n }\n }\n if(stack.isEmpty()){\n return true;\n }else{\n return false;\n }\n }",
"private boolean hasPermission(String permission) {\n if (canMakeSmores()) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n return (checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED);\n }\n }\n return true;\n }",
"public String getPermissionDescription() {\n return permissionDescription;\n }",
"public boolean hasPermission(Uri uri)\n\t{\n\t\treturn getPermissibleRoot(uri) != null;\n\t}",
"@Override\n\tpublic boolean hasPermissions(File file, int position, String permissionLetter) {\n\t\treturn true;\n\t}",
"public static boolean isOperator(String token) {\n if (Connective.getValueFromSymbol(token) == null) {\n return false;\n } else {\n return true;\n }\n }",
"public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }",
"boolean isNilAttributeTypeDisplayName();",
"protected static int[] convertPermission(String jivePermission, boolean isGlobalPermission) {\r\n \r\n //TODO Igor: check again all permission conversions here\r\n if ( (jivePermission==null) || (jivePermission.equalsIgnoreCase(\"NONE\")) ) {\r\n return new int[] {MVNForumPermission.PERMISSION_NO_PERMISSIONS};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"SYSTEM_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_SYSTEM_ADMIN};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CATEGORY_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n // presently mvnForum does not support permission PERMISSION_CATEGORY_ADMIN and PERMISSION_CATEGORY_MODERATOR\r\n return new int[] {/*MVNForumPermission.PERMISSION_CATEGORY_ADMIN,\r\n MVNForumPermission.PERMISSION_CATEGORY_MODERATOR,*/\r\n MVNForumPermission.PERMISSION_ADD_CATEGORY,\r\n MVNForumPermission.PERMISSION_EDIT_CATEGORY,\r\n MVNForumPermission.PERMISSION_DELETE_CATEGORY};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"FORUM_ADMIN\")) {\r\n // note that PERMISSION_FORUM_ADMIN is a combined permission so it includes other permission\r\n return new int[] {MVNForumPermission.PERMISSION_FORUM_ADMIN/*,\r\n MVNForumPermission.PERMISSION_FORUM_MODERATOR,\r\n MVNForumPermission.PERMISSION_ADD_FORUM,\r\n MVNForumPermission.PERMISSION_EDIT_FORUM,\r\n MVNForumPermission.PERMISSION_DELETE_FORUM*/};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"GROUP_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_GROUP_ADMIN,\r\n MVNForumPermission.PERMISSION_GROUP_MODERATOR};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"USER_ADMIN\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_USER_ADMIN,\r\n MVNForumPermission.PERMISSION_USER_MODERATOR};\r\n } else {\r\n return EMPTY_PERMISSION;\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"MODERATOR\")) {\r\n if (isGlobalPermission) {\r\n return new int[] {MVNForumPermission.PERMISSION_CATEGORY_MODERATOR,\r\n MVNForumPermission.PERMISSION_FORUM_MODERATOR,\r\n MVNForumPermission.PERMISSION_GROUP_MODERATOR,\r\n MVNForumPermission.PERMISSION_USER_MODERATOR};\r\n } else {\r\n return new int[] {MVNForumPermission.PERMISSION_FORUM_MODERATOR};\r\n }\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"MODERATE_THREADS\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST,\r\n MVNForumPermission.PERMISSION_ADD_POST,\r\n MVNForumPermission.PERMISSION_EDIT_POST,\r\n MVNForumPermission.PERMISSION_DELETE_POST,\r\n MVNForumPermission.PERMISSION_ADD_THREAD};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CREATE_THREAD\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_ADD_THREAD};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"MODERATE_MESSAGES\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST,\r\n MVNForumPermission.PERMISSION_ADD_POST,\r\n MVNForumPermission.PERMISSION_EDIT_POST,\r\n MVNForumPermission.PERMISSION_DELETE_POST};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CREATE_MESSAGE\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_ADD_POST};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"CREATE_ATTACHMENT\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_ADD_ATTACHMENT};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"READ_FORUM\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST};\r\n \r\n } else if (jivePermission.equalsIgnoreCase(\"READ\")) {\r\n return new int[] {MVNForumPermission.PERMISSION_READ_POST};\r\n \r\n } else {\r\n // TODO minhnn: I think we should show warning here, even could throw AssertionError\r\n return new int[] {MVNForumPermission.PERMISSION_NO_PERMISSIONS};\r\n }\r\n }",
"public interface PermissionContainer {\n\n\t/**\n\t * @param permission\n\t * @return true if player has permission\n\t */\n\tboolean hasPermission(String permission);\n\n\t/**\n\t * @param permission\n\t * @return true if container has permission\n\t */\n\tboolean hasPermission(Permission permission);\n\n\t/**\n\t * Sets a desired permission\n\t * \n\t * @param perm\n\t * @param add\n\t */\n\tvoid setPermission(String perm, boolean add);\n\n\t/**\n\t * @return true if account has wildcard\n\t */\n\tboolean hasWildCard();\n\n\t/**\n\t * Adds wildcard permission\n\t */\n\tvoid addWildCard();\n\n\t/**\n\t * Removes wildcard permission\n\t */\n\tvoid removeWildCard();\n\n\t/**\n\t * @return the account's permissions\n\t */\n\tSet<String> getPermissions();\n\n\t/**\n\t * @return the account's evaded permissions\n\t */\n\tSet<String> getNonPermissions();\n\n}",
"public static boolean checkInput(String saInput) {\r\n\t\treturn checkGenericPattern(saInput) && checkGenericPattern(unalter(saInput));\r\n\t}",
"public static boolean isConformantSchemeName(String p_scheme) {\n if (p_scheme == null || p_scheme.trim().length() == 0) {\n return false;\n }\n \n if (!isAlpha(p_scheme.charAt(0))) {\n return false;\n }\n \n char testChar;\n int schemeLength = p_scheme.length();\n for (int i = 1; i < schemeLength; ++i) {\n testChar = p_scheme.charAt(i);\n if (!isSchemeCharacter(testChar)) {\n return false;\n }\n }\n \n return true;\n }",
"boolean hasPermission(final Player sniper, final String permission);",
"public String isValidOperand(FullArgument operand, boolean executeNow) {\n\t\tif (operand.address.type == Op.ERROR) {\n\t\t\treturn \"Invalid Expression\";\n\t\t}\n\t\tif ((operand.address.type & Op.MEM) != 0) {\n\t\t\treturn isValidAddress(operand.arg, operand.address.size, executeNow);\n\t\t}\n\t\treturn null;\n\t}",
"boolean memberHasPermission(String perm, Member m);",
"public final boolean hasLiteralValue ()\r\n {\r\n return _value.isLiteral();\r\n }",
"private void assertIsOfKind(SymObject object, int kind, String error) {\n if (object.kind != kind) {\n error(error);\n }\n }"
]
| [
"0.6917892",
"0.6354013",
"0.53728884",
"0.5228638",
"0.520601",
"0.5184916",
"0.5161105",
"0.51577336",
"0.51382935",
"0.51179",
"0.51034164",
"0.50878733",
"0.49814332",
"0.4950945",
"0.4933385",
"0.49269083",
"0.4898622",
"0.48863727",
"0.4881737",
"0.48422748",
"0.4828379",
"0.48165137",
"0.47915787",
"0.47910592",
"0.47654903",
"0.47556585",
"0.47500178",
"0.47467312",
"0.47426277",
"0.47394514",
"0.47383207",
"0.4708352",
"0.4708352",
"0.47004557",
"0.46916372",
"0.4670049",
"0.46601737",
"0.4651073",
"0.46490812",
"0.46424496",
"0.4638327",
"0.4628452",
"0.46264607",
"0.46130803",
"0.4605042",
"0.46007994",
"0.45988238",
"0.45951152",
"0.45896372",
"0.45861015",
"0.45849195",
"0.4580229",
"0.4570107",
"0.45565352",
"0.454928",
"0.45478615",
"0.45341536",
"0.45250678",
"0.44881126",
"0.44822934",
"0.44746268",
"0.44713065",
"0.4470982",
"0.44695818",
"0.4462478",
"0.44599184",
"0.44484392",
"0.4435417",
"0.4431186",
"0.4430883",
"0.44305205",
"0.44179165",
"0.44155312",
"0.44121128",
"0.44107372",
"0.44099185",
"0.4408498",
"0.4406616",
"0.43984252",
"0.43949148",
"0.43836316",
"0.4380182",
"0.43713254",
"0.43673587",
"0.4366701",
"0.4355004",
"0.4346114",
"0.43400714",
"0.43389255",
"0.4338861",
"0.4338215",
"0.4334916",
"0.43348658",
"0.43338296",
"0.4332689",
"0.43289852",
"0.43286142",
"0.43278605",
"0.43273777",
"0.432009"
]
| 0.75516975 | 0 |
Retrieves the permissions' configuration value for a given config key. | public static String getPermissions(String key, ConfigurationSource conf) {
String configName = "";
// Assign the appropriate config name based on the KEY
if (key.equals(ReconConfigKeys.OZONE_RECON_DB_DIR)) {
configName = ReconConfigKeys.OZONE_RECON_DB_DIRS_PERMISSIONS;
} else if (key.equals(ScmConfigKeys.OZONE_SCM_DB_DIRS)) {
configName = ScmConfigKeys.OZONE_SCM_DB_DIRS_PERMISSIONS;
} else if (key.equals(OzoneConfigKeys.OZONE_OM_DB_DIRS)) {
configName = OzoneConfigKeys.OZONE_OM_DB_DIRS_PERMISSIONS;
} else {
// If the permissions are not defined for the config, we make it fall
// back to the default permissions for metadata files and directories
configName = OzoneConfigKeys.OZONE_METADATA_DIRS_PERMISSIONS;
}
String configValue = conf.get(configName);
if (configValue != null) {
return configValue;
}
throw new IllegalArgumentException(
"Invalid configuration value for key: " + key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String readConfigValue(Context context, String key) {\n Resources resources = context.getResources();\n try {\n InputStream inputStream = resources.openRawResource(R.raw.config);\n Properties properties = new Properties();\n properties.load(inputStream);\n return properties.getProperty(key);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"\";\n }",
"Configuration getConfigByKey(String configKey);",
"String getSettingByKey(String key);",
"public Object lookupConfigurationEntry(String key);",
"public static String getConfiguration(String key) {\r\n PersistenceManager pm = PMF.getPersistenceManager();\r\n Query query = pm.newQuery(Configuration.class, \"key == \" + key);\r\n query.setUnique(true);\r\n Configuration config = (Configuration) query.execute(query);\r\n return config.getValue();\r\n }",
"public static String getConfigValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"config\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}",
"public String get(String key) {\n\t\tInstant start = Instant.now();\n\t\tString value = getConfig(key);\n\t\tLOGGER.debug(\"Access to config {} to get {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn value;\n\t}",
"String getSettingByKey(HawkularUser user, String key);",
"public String getConfig(String configKey) {\n\t\t// Do something if key doesn't exist\n\t\t\n\t\treturn serverOptions.get(configKey);\n\t}",
"public String getConfigurationValue(String name);",
"String get(String key) {\n return settings.get(key);\n }",
"public String getConfigProperties(String key) {\n String value = null;\n try {\n FileReader fileReader=new FileReader(System.getProperty(\"user.dir\")+\"/src/main/resources/config.properties\");\n Properties properties=new Properties();\n properties.load(fileReader);\n value= properties.getProperty(key);\n }catch (Exception e){\n e.printStackTrace();\n }\n return value;\n }",
"private String get(String key)\n {\n return settings.getProperty(key);\n }",
"String readConfig(String parameter, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;",
"public static String GetConfigData(String key) throws ConfigurationException {\r\n\r\n PropertiesConfiguration properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//configuration.properties\");\r\n return properties.getString(key);\r\n }",
"public Object get(String key) {\r\n\t\treturn settings.get(key);\r\n\t}",
"public String getValue(final String key) {\n final ConfigProperty cp = get(key);\n return cp != null ? cp.getValue() : null;\n }",
"public String getConfigurationValue(Enum<?> key) {\n // get string key\n String keyStr = key.toString();\n\n // get value\n String value = this.getConfigurationValue(keyStr);\n\n return value;\n }",
"public static String getParam(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.get(key);\n }",
"public static Object getConfigValue(Map config, String key) {\n return getConfigValue(config, key, null);\n }",
"public String get(HelixConfigScope scope, String key) {\n Map<String, String> map = get(scope, Arrays.asList(key));\n if (map != null) {\n return map.get(key);\n }\n return null;\n }",
"public String getVal(String key) {\n Optional<KeyValList> kv = findKeyVal(key);\n\n if (kv.isPresent()) {\n return kv.get().getCfgVal();\n }\n\n return null;\n }",
"public static String getSetting(Context context, String key) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n return sp.getString(key, null);\n\n }",
"public String getValue(final String key) {\n\n\t\treturn config.getString(StringUtils.lowerCase(key));\n\t\t\t}",
"public static String get(String key){\n\t\tif(sys_cfg == null){\n\t\t\tsys_cfg = new Configuration(\"text.properties\");\n\t\t}\n\t\tString value = sys_cfg.getValue(key);\n\t\treturn value;\n\t}",
"public String getSetting(String key) throws SQLException {\n\t\treturn db.selectItem(\"value\", \"settings\", \"`key`='\"+key+\"'\");\n\t}",
"String getSettingByKey(HawkularUser user, String key, String defaultValue);",
"public String getProperty(String key) {\r\n \tif (mConfig.containsKey(key)){\r\n \t\treturn mConfig.getProperty(key);\r\n \t}else{\r\n \t\tSystem.out.println(\"[ERROR] Not defined property key: \" + key);\r\n \t\treturn null;\r\n \t}\r\n \r\n }",
"public int get(int id) {\r\n return configurations[id];\r\n }",
"public String getConfigurationKey() {\n return configurationKey;\n }",
"public String get(String key) {\n return cache.containsKey(key) ? cache.get(key) : customConfig.getString(key);\n }",
"public Optional<String> safeGet(String key) {\n\t\tInstant start = Instant.now();\n\t\tOptional<String> result;\n\t\ttry {\n\t\t\tresult = Optional.of(get(key));\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No value was found for key {}: an Optional.empty() will be returned\", key);\n\t\t\tresult = Optional.empty();\n\t\t}\n\t\tLOGGER.debug(\"Access to config {} to safeGet {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\n\t\treturn result;\n\t}",
"public String getSettings(String settingsKey) {\n\t\tString settingsValue = \"\";\n\t\ttry {\n\t\t\tCursor settings = localDB.query(true, TABLE_SETTINGS, null,\n\t\t\t\t\tKEY_SETTINGS_ID + \" = ?\", new String[] { settingsKey },\n\t\t\t\t\tnull, null, null, null);\n\t\t\tif ((settings.getCount() == 0) || !settings.moveToFirst()) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tsettingsValue = settings.getString(SETTINGS_VALUE_COLUMN);\n\t\t} catch (SQLiteException ex) {\n\t\t\tLog.d(TAG, ex.getMessage());\n\t\t}\n\t\tLog.v(TAG, \"setting: \" + settingsValue);\n\t\treturn settingsValue;\n\t}",
"public static String getApplicationConfigurationValue(String configurationName) {\r\n\t\tIApplicationConfiguration configuration = getApplicationConfiguration(configurationName);\r\n\t\tif (configuration != null) {\r\n\t\t\treturn configuration.getValue();\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String getSystemConfig(String key) {\n\t\treturn sysConfigService.getValueBykey(key);\r\n\t}",
"java.lang.String getPermissions(int index);",
"public static String getProperty(String key, Context context) throws IOException {\n Properties properties = new Properties();\n AssetManager assetManager = context.getAssets();\n InputStream inputStream = assetManager.open(\"config-private.properties\");\n properties.load(inputStream);\n return properties.getProperty(key);\n }",
"public String getConfig();",
"public abstract String getConfigurationFolderKey();",
"public Config getConfig();",
"public static String get(String key) throws UnknownID, IOFailure, ArgumentNotValid {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\tString val = System.getProperty(key);\n\t\tif (val != null) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Key not in System.properties try loaded data instead\n\t\tsynchronized (fileSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : fileSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\n\t\t// Key not in file based settings, try classpath settings instead\n\t\tsynchronized (defaultClasspathSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : defaultClasspathSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n */\n\t\tthrow new UnknownID(\"No match for key '\" + key + \"' in settings\");\n\t}",
"String getEnvironmentProperty(String key);",
"protected String getConfigurationValue(String key) throws KKException\n {\n try\n {\n if (getEng() != null)\n {\n return getConfigMgr().getConfigurationValue(false, key);\n }\n return getAdminConfigMgr().getConfigurationValue(key);\n } catch (KKException kke)\n {\n throw kke;\n } catch (Exception e)\n {\n throw new KKException(e);\n }\n }",
"public String get(String key, String def)\n {\n return settings.getProperty(key, def);\n }",
"String getConfigName();",
"String getSettingByKey(String key, String defaultValue);",
"public String getConfigurationValue(String key) {\n // format property key\n String propertyKey = key;\n if (this.PROPERTY_PART != null) {\n propertyKey = MessageFormat.format(key, new Object[] { this.PROPERTY_PART });\n }\n\n // get value\n String value = this.CONFIGURATION.get(propertyKey);\n\n // trim value\n if (value != null) {\n value = value.trim();\n\n // set as null if empty string\n if (value.length() == 0) {\n value = null;\n }\n }\n\n this.LOGGER.logDebug(new Object[] { \"Extracted configuration for key: \", propertyKey, \" value: \", value },\n null);\n\n return value;\n }",
"public String getPreference(String key) {\n return preferences.get(key).value;\n }",
"public String getMandatoryString(String key) throws ConfigNotFoundException;",
"ParameterConfiguration getParameterConfiguration(String name);",
"public static String GetConfigProperty(String propertName)\n\t{\n\t\tProperties props = new Properties();\n\t try {\t \n\t \t\t\n\t \tprops.load(GetInputStream());\n\t \t\n\t } catch (IOException ex) {\n\t ex.printStackTrace();\n\t } finally {\n\t \n\t }\n\t // get the property value and return it\n\t return props.getProperty(propertName);\n\t}",
"public RegistryKeyProperty getPolicyKey();",
"public String getUserConfig() {\n return userConfig;\n }",
"String getPermission();",
"public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}",
"private void GetConfigDetails() {\n\t\tCursor c = database.rawQuery(\"select * from config\", null);\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\r\n\t\t\t\t\tmuUid = c.getString(c.getColumnIndex(\"id\"));\r\n\t\t\t\t\tmuUsername = c.getString(c.getColumnIndex(\"username\"));\r\n\t\t\t\t\tmuPassword = c.getString(c.getColumnIndex(\"password\"));\r\n\t\t\t\t\tmuFname = c.getString(c.getColumnIndex(\"fname\"));\r\n\t\t\t\t\tmuLname = c.getString(c.getColumnIndex(\"lname\"));\r\n\t\t\t\t\tmuEmail = c.getString(c.getColumnIndex(\"email\"));\r\n\t\t\t\t\tmuMobile = c.getString(c.getColumnIndex(\"mobile\"));\r\n\t\t\t\t\tmuUrl = c.getString(c.getColumnIndex(\"url\"));\r\n\t\t\t\t\tmuRole = c.getString(c.getColumnIndex(\"role\"));\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t}\r\n\t\tc.close();\r\n\t}",
"public AppResourceData retrieveConfigResource(String url) {\n\n return this.retrieveResource(File.separator + \"..\" + File.separator + \"config\" + File.separator + url);\n }",
"Optional<SettingDTO> getSetting(String settingKey);",
"protected String getConfigKey ()\n {\n return \"ConfigEditor.\" + ResourceUtil.getPrefsPrefix() + (_readOnly ? \".readonly\" : \"\");\n }",
"public PerWorldConfig getConfig(World world){\n \t\treturn config.get(world);\n \t}",
"public java.lang.String getPermissions(int index) {\n return permissions_.get(index);\n }",
"public java.lang.String getPermissions(int index) {\n return permissions_.get(index);\n }",
"public static synchronized String getPropValue(String key, String path)\r\n/* */ {\r\n/* 21 */ if (p == null) {\r\n/* 22 */ String npath = path + \"WEB-INF/classes/config.properties\";\r\n/* 23 */ InputStream is = null;\r\n/* */ try {\r\n/* 25 */ is = new FileInputStream(npath);\r\n/* */ } catch (FileNotFoundException e1) {\r\n/* 27 */ e1.printStackTrace();\r\n/* */ }\r\n/* 29 */ p = new Properties();\r\n/* */ try {\r\n/* 31 */ p.load(is);\r\n/* */ } catch (IOException e) {\r\n/* 33 */ e.printStackTrace();\r\n/* */ }\r\n/* */ }\r\n/* 36 */ return p.getProperty(JobStandConfs.work_base_dir);\r\n/* */ }",
"public String get(String key) {\n return this.properties.getProperty(key);\n }",
"public abstract String getConfig();",
"protected String getComponentConfigProperty(\n String name,\n org.opencrx.kernel.admin1.jmi1.ComponentConfiguration componentConfiguration\n ) {\n String value = null;\n Collection<org.opencrx.kernel.base.jmi1.Property> properties = componentConfiguration.getProperty();\n for(org.opencrx.kernel.base.jmi1.Property p:properties) {\n if(\n p.getName().equals(name) &&\n (p instanceof org.opencrx.kernel.base.jmi1.StringProperty)\n ) {\n value = ((org.opencrx.kernel.base.jmi1.StringProperty)p).getStringValue();\n break;\n }\n }\n return value;\n }",
"public String get(String key) {\n return this.properties.getProperty(key);\n }",
"public String readConfig(Context context) {\n\n String ret = \"\";\n\n try {\n InputStream inputStream = context.openFileInput(\"config.txt\");\n\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receiveString = \"\";\n StringBuilder stringBuilder = new StringBuilder();\n\n while ((receiveString = bufferedReader.readLine()) != null) {\n stringBuilder.append(receiveString);\n }\n\n inputStream.close();\n ret = stringBuilder.toString();\n }\n } catch (FileNotFoundException e) {\n Log.e(\"Config\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"Config\", \"Can not read file: \" + e.toString());\n }\n\n return ret;\n }",
"public String readConfiguration(String path);",
"public String getProperty(String key) {\n \t\tSecurityManager sm = System.getSecurityManager();\n \n \t\tif (sm != null) {\n \t\t\tsm.checkPropertyAccess(key);\n \t\t}\n \n \t\treturn (framework.getProperty(key));\n \t}",
"public KernelConfig getConfig()\n {\n Kernel.checkAccess();\n return config;\n }",
"public String getConfigName () {\n return this.configName;\n }",
"public String getConfig() {\n\n return config;\n }",
"public String getConfiguration(){\n\t\treturn this.config;\n\t}",
"public int getPermission(Integer resourceId);",
"String getProperty(String key);",
"String getProperty(String key);",
"String getProperty(String key);",
"protected String getConfigurationElementValue(String property) {\n return ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService().getAPIManagerConfiguration().\n getFirstProperty(property);\n }",
"public static String getValue(String key) {\r\n\t\tload();\r\n\t\treturn properties.getProperty(key);\r\n\t}",
"public String getPref(String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t String value = settings.getString(key, \"\");\n\t return value;\n\t}",
"public String getConfig() {\n\t\treturn(config);\n\t}",
"public String getSharePreferenceValue(Context context, String fileKey, Integer mode, String key) {\n return getSharePreferenceValue(context, fileKey, mode, key, null);\n }",
"public static String getProperty(String key) {\n\t\tString val = properties.getProperty(key);\n\t\tif (val == null) {\n\t\t\tAlert.raise(null, \"Unable to find config property named '\" + key + \"' in \"\n\t\t\t\t\t+ Configuration.configFileName);\n\t\t}\n\t\treturn val;\n\t}",
"public ConfigProperty get(final String key) {\n ArgumentChecker.notNull(key, \"key\");\n return _properties.get(key);\n }",
"public java.lang.String getIncludedPermissions(int index) {\n return includedPermissions_.get(index);\n }",
"public String getPreference(String key) {\n return prefs.get(key, null);\n }",
"public String getConfigurationField() {\n return configField;\n }",
"public boolean getBoolean( String key )\n {\n boolean value = false;\n try\n {\n if (config != null)\n {\n value = config.getBoolean(key);\n LOG.debug( \"getBoolean name [{}] value [{}]\", key, value );\n }\n else\n {\n LOG.warn( \"getBoolean invalid config, can't read prop [{}], using default [{}]\", key, false );\n }\n }\n catch (java.util.NoSuchElementException e )\n {\n LOG.debug( \"getBoolean - no such element [{}], using default [{}]\", key, false );\n }\n return value;\n }",
"public static String get(String key) {\n return properties.getProperty(key);\n }",
"@Override\n\tpublic Object get(Object key) throws Exception {\n\t\treturn propertyConfigMapper.selectByPrimaryKey(key);\n\t}",
"public static String getPropValue(Config config, String key ) throws Exception {\n\t\tif( config.getObject(\"eagleNotificationProps\") == null )\n\t\t\tthrow new Exception(\"Eagle Notification Properties not found in application.conf \");\n\t\tConfigObject notificationConf = config.getObject(\"eagleNotificationProps\");\n\t\treturn notificationConf.get(key).unwrapped().toString();\n\t}",
"public C getConfig()\n {\n return config;\n }",
"<S> S getSetting(Setting<S> setting);",
"public java.lang.String getIncludedPermissions(int index) {\n return includedPermissions_.get(index);\n }",
"public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() {\n if (configBuilder_ == null) {\n return config_ == null\n ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance()\n : config_;\n } else {\n return configBuilder_.getMessage();\n }\n }",
"public AppConfigurationEntry[] getAppConfigurationEntry(String name) {\n if (name.equals(CONFIGNAME)) {\n return driverConf;\n }\n else {\n if (null != current)\n return current.getAppConfigurationEntry(name);\n else\n return null;\n }\n }",
"public String getURL(String key) {\n return propertiesConfiguration.getString(key);\n }",
"public static String getString(final String key) {\r\n if (PROP == null) {\r\n throw new RuntimeException(\"Config hasn't been initialized yet.\");\r\n }\r\n if (PROP.containsKey(key))\r\n return PROP.getProperty(key);\r\n else\r\n throw new RuntimeException(\"No config key found for [\" + key + \"].\"\r\n + \" from PROP:\" + PROP);\r\n }",
"public Optional<Map.Entry<String, Object>> findConfig(final String name)\n\t{\n\t\tfor (Map.Entry<String, Object> param : getConfig().entrySet())\n\t\t{\n\t\t\tif (param.getKey().equals(name))\n\t\t\t{\n\t\t\t\treturn Optional.of(param);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Optional.empty();\n\t}"
]
| [
"0.6631019",
"0.6566701",
"0.65292794",
"0.62811434",
"0.6114825",
"0.610586",
"0.60497254",
"0.6021565",
"0.60186195",
"0.5938924",
"0.5853796",
"0.5800617",
"0.5737364",
"0.5614242",
"0.5602981",
"0.5582537",
"0.55740094",
"0.5543293",
"0.5542525",
"0.5531192",
"0.5507144",
"0.54823375",
"0.54511845",
"0.54414785",
"0.5437909",
"0.54315895",
"0.5427223",
"0.5342932",
"0.5338109",
"0.53270864",
"0.5296999",
"0.5290431",
"0.52847165",
"0.5268288",
"0.52630055",
"0.52553576",
"0.519529",
"0.5176412",
"0.5158991",
"0.5141345",
"0.5117243",
"0.5110809",
"0.51088417",
"0.5107109",
"0.5099475",
"0.5095771",
"0.5095442",
"0.50861686",
"0.5083202",
"0.5071644",
"0.5059734",
"0.50454605",
"0.5017581",
"0.50154054",
"0.5006267",
"0.5006031",
"0.49873513",
"0.4986636",
"0.49794158",
"0.4974689",
"0.49697432",
"0.49643692",
"0.49633768",
"0.4962857",
"0.49618047",
"0.49495736",
"0.49198976",
"0.49192393",
"0.4914628",
"0.49125433",
"0.4910984",
"0.49097538",
"0.48998794",
"0.4896708",
"0.48906904",
"0.48900867",
"0.48900867",
"0.48900867",
"0.4886254",
"0.4880075",
"0.48742816",
"0.48697838",
"0.48667273",
"0.48649728",
"0.4857734",
"0.485474",
"0.48547018",
"0.48494637",
"0.48442206",
"0.48410988",
"0.48279336",
"0.48223966",
"0.48199978",
"0.481995",
"0.4814249",
"0.48106843",
"0.47958016",
"0.4795003",
"0.47930717",
"0.47912285"
]
| 0.7040526 | 0 |
Checks and creates Ozone Metadir Path if it does not exist. | public static File getOzoneMetaDirPath(ConfigurationSource conf) {
File dirPath = getDirectoryFromConfig(conf,
HddsConfigKeys.OZONE_METADATA_DIRS, "Ozone");
if (dirPath == null) {
throw new IllegalArgumentException(
HddsConfigKeys.OZONE_METADATA_DIRS + " must be defined.");
}
return dirPath;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkIfLocationExists() {\n try {\n File file = new File(saveLocation);\n if(!file.exists()) file.mkdirs();\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }",
"@Test\n public void testStorageLocationMkdirs() throws Exception {\n MemoryBackendCheckpointStorageAccess storage =\n new MemoryBackendCheckpointStorageAccess(\n new JobID(), randomTempPath(), null, DEFAULT_MAX_STATE_SIZE);\n\n File baseDir = new File(storage.getCheckpointsDirectory().getPath());\n assertFalse(baseDir.exists());\n\n // mkdirs only be called when initializeLocationForCheckpoint\n storage.initializeLocationForCheckpoint(177L);\n assertTrue(baseDir.exists());\n }",
"private void createLocation() throws CoreException {\n \t\tFile file = location.append(F_META_AREA).toFile();\n \t\ttry {\n \t\t\tfile.mkdirs();\n \t\t} catch (Exception e) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_couldNotCreate, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, e));\n \t\t}\n \t\tif (!file.canWrite()) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_readonly, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t}\n \t\t// set the log file location now that we created the data area\n \t\tIPath logPath = location.append(F_META_AREA).append(F_LOG);\n \t\ttry {\n \t\t\tActivator activator = Activator.getDefault();\n \t\t\tif (activator != null) {\n \t\t\t\tFrameworkLog log = activator.getFrameworkLog();\n \t\t\t\tif (log != null)\n \t\t\t\t\tlog.setFile(logPath.toFile(), true);\n \t\t\t\telse if (debug())\n \t\t\t\t\tSystem.out.println(\"ERROR: Unable to acquire log service. Application will proceed, but logging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// set the trace file location now that we created the data area\n \t\tIPath tracePath = location.append(F_META_AREA).append(F_TRACE);\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator != null) {\n \t\t\tDebugOptions debugOptions = activator.getDebugOptions();\n \t\t\tif (debugOptions != null) {\n \t\t\t\tdebugOptions.setFile(tracePath.toFile());\n \t\t\t} else {\n \t\t\t\tSystem.out.println(\"ERROR: Unable to acquire debug service. Application will proceed, but debugging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t}",
"private void initializeLocation() throws CoreException {\n \t\tif (location.toFile().exists()) {\n \t\t\tif (!location.toFile().isDirectory()) {\n \t\t\t\tString message = NLS.bind(CommonMessages.meta_notDir, location);\n \t\t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t\t}\n \t\t}\n \t\t//try infer the device if there isn't one (windows)\n \t\tif (location.getDevice() == null)\n \t\t\tlocation = new Path(location.toFile().getAbsolutePath());\n \t\tcreateLocation();\n \t\tinitialized = true;\n \t}",
"private static void checkFridgeDataDirectory() throws FileNotFoundException, InvalidDateException,\n InvalidQuantityException, EmptyDescriptionException,\n RepetitiveFoodIdentifierException, InvalidFoodCategoryException, InvalidFoodLocationException {\n Path path = Paths.get(DATA_FILE_PATH); //creates Path instance\n try {\n Files.createDirectories(Paths.get(DIRECTORY));\n Files.createFile(path); //creates file at specified location\n } catch (IOException e) {\n readFridgeData();\n }\n }",
"private File createEmptyDirectory() throws IOException {\n File emptyDirectory = findNonExistentDirectory();\n if (emptyDirectory.mkdir() == false) {\n throw new IOException(\"Can't create \" + emptyDirectory);\n }\n\n return emptyDirectory;\n }",
"private static void judeDirExists(String myPath) {\n \tFile myDir = new File(Paths.get(myPath).getParent().toString());\n if (!myDir.exists()) {\n \tmyDir.mkdirs(); \n System.out.println(\"Create path:\"+ myDir.getPath());\n }\n }",
"private boolean checkBackupDir() {\n if (!dbBackupDir.exists()) {\n return dbBackupDir.mkdir();\n }\n return true;\n }",
"public static void createDirectories() \r\n\t{\r\n\t\tif(!fCertificatesDir().exists()) \r\n\t\t{\r\n\t\t\tfCertificatesDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fDbDir().exists()) \r\n\t\t{\r\n\t\t\tfDbDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsDir().exists())\r\n\t\t{\r\n\t\t\tfMibsDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsBinaryDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsBinaryDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsTextDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsTextDir().mkdir();\r\n\t\t}\r\n\t}",
"private void checkRootFolder() throws TBException {\r\n\t\tFile f = new File(rootTBFolder);\r\n\t\tif(!f.exists()) {\r\n\t\t\tf.mkdir();\r\n\t\t\tf = new File(AppUtil.createFilePath(new String[]{rootTBFolder, COMPUTED_FILES_FOLDER_NM}));\r\n\t\t\tf.mkdir();\r\n\t\t}\t\r\n\t}",
"private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }",
"private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}",
"private void createCatalogFileIfNoneExists(){\n\t\t\n\t\tinOut = new IOUtility();\n\t\t\n\t\tif (inOut.checkLocalCache()) {\n\t\t\tcatalog = inOut.readCatalogFromFile();\n\t\t}\n\n\t\telse {\n\n\t\t\ttry {\n\t\t\t\tinOut.createCatalogFile();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t} \n\t\t}\n\t\t\n\t}",
"public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }",
"private static void checkAndCreateZNode(ZooKeeper zk , String path) throws KeeperException, InterruptedException {\n if (zk.exists(path, null) == null) { // if znode doesn't exist\n if (path.lastIndexOf(\"/\") > 1) { // recursively traverse to parent znode and check parent exist\n checkAndCreateZNode(zk, (path.substring(0, path.lastIndexOf(\"/\"))));\n }\n zk.create(path, null, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);// create a znode\n }\n }",
"private static void checkHistoryDirectory()\n throws FileNotFoundException {\n Path path = Paths.get(HISTORY_FILE_PATH); //creates Path instance\n try {\n Files.createDirectories(Paths.get(DIRECTORY));\n Files.createFile(path); //creates file at specified location\n } catch (IOException e) {\n readHistoryData();\n }\n }",
"public void checkFolder() {\n String mPath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/ExoTest/\";\n mDir = new File(mPath);\n boolean isDirectoryCreated = mDir.exists();\n if (!isDirectoryCreated) {\n isDirectoryCreated = mDir.mkdir();\n }\n if (isDirectoryCreated) {\n // do something\\\n Log.d(\"Folder\", \"Already Created\");\n }\n }",
"public static boolean createDBDir() {\n return (new File(path)).mkdirs();\n }",
"private void createDirectory(String path) throws IOException {\n\t\tfinal Path p = Paths.get(path);\n\t\tif (!fileExists(p)) {\n\t\t\tFiles.createDirectory(p);\n\t\t}\n\t}",
"public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}",
"private void createRootDirectory(String rootDirectoryPath) throws Exception {\n\t\tlogger.traceEntry();\n\n\t\trootDirectory = new Path(rootDirectoryPath);\n\t\tif (!hadoopFileSystem.exists(rootDirectory)) {\n\t\t\tlogger.warn(\"Directory \" + rootDirectoryPath + \" does not exist, creating\");\n\t\t\thadoopFileSystem.mkdirs(rootDirectory);\n\t\t}\n\t\tlogger.traceExit();\n\t}",
"public static void createDatabaseIfNotExists() throws DaoException {\n\n Path data = Paths.get(DATA_DIR);\n if (!Files.exists(data)) {\n try {\n Files.createDirectory(data);\n Files.createDirectory(Paths.get(DATA_DIR, ACCOUNT_DATA_DIR));\n } catch (IOException ex) {\n throw new DaoException(\"Could not create data directory\", ex);\n }\n }\n\n }",
"private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}",
"@Override\n protected void createRootDir() {\n }",
"private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void handleMissingDirectory(String path_string) throws PersistBlobException {\n\t\tPath path = Paths.get(path_string);\n\t\tSet<PosixFilePermission> perms = PosixFilePermissions.fromString(directoryPerms);\n\t\tFileAttribute<Set<PosixFilePermission>> attr =\tPosixFilePermissions.asFileAttribute(perms);\n\t\ttry {\n\t\t\tFiles.createDirectories(path, attr);\n\t\t} catch (IOException e) {\n\t\t\tthrow new PersistBlobException(\"Unable to create path: [\"+path+\"]\",e);\n\t\t}\n\t\tlog.info(\"PersistBlobImpl: created directory: {}\",path_string);\n\t}",
"private static String verifyPath(String fileOrDir) {\n if (!new File(fileOrDir).exists()) {\n if (fileOrDir.startsWith(File.separator) || fileOrDir.startsWith(\"\\\\\") || fileOrDir.startsWith(\"/\")) {\n fileOrDir = systemDataDirectory + fileOrDir;\n } else {\n fileOrDir = systemDataDirectory + File.separator + fileOrDir;\n }\n }\n return fileOrDir;\n }",
"public static void mkdirs(String owner, Path path) throws CWLException {\r\n File dir = path.toFile();\r\n if (!dir.exists() && !dir.mkdirs()) {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.mkdir.failed\", path.toString(), owner), 255);\r\n }\r\n }",
"public boolean mkdirs()\n\t{\n\t\treturn file.mkdirs() ;\n\t}",
"public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}",
"private boolean initHome(File file) {\r\n\t\ttry {\r\n\t\t\tFileUtils.forceMkdir(file);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize home directory '\" + file + \"'\", ex);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static boolean createRootdir(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"mkdir \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }",
"private static void createDirectory(Path path) throws IOException {\n\t\ttry {\n\t\t\tFiles.createDirectory(path);\n\t\t} catch (FileAlreadyExistsException e) {\n\t\t\tif (!Files.isDirectory(path)) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t}",
"public static boolean createRootFile(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"touch \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }",
"private void init() throws IOException {\n if (Files.exists(getBaseConfigPath()) && !Files.isDirectory(getBaseConfigPath())) {\n throw new IOException(\"Base config path exists and is not a directory \" + getBaseConfigPath());\n }\n\n if (!Files.exists(getBaseConfigPath())) {\n Files.createDirectories(getBaseConfigPath());\n }\n\n\n if (Files.exists(nodeIdPath) && !Files.isRegularFile(nodeIdPath)) {\n throw new IOException(\"NodeId file is not a regular directory!\");\n }\n\n if (Files.exists(clusterNamePath) && !Files.isRegularFile(clusterNamePath)) {\n throw new IOException(\"Cluster name is not a regular directory!\");\n }\n\n if (!Files.isWritable(getBaseConfigPath())) {\n throw new IOException(\"Can't write to the base configuration path!\");\n }\n }",
"boolean hasUpdateInodeDirectory();",
"private static boolean checkDirectory() {\n File baseDir = new File(Environment.getExternalStorageDirectory(), \"Andevindo\");\n mImageDir = new File(baseDir.getPath() + File.separator + \"Images\");\n mVideoDir = new File(baseDir.getPath() + File.separator + \"Videos\");\n mMiscDir = new File(baseDir.getPath() + File.separator + \"Misc\");\n if (!baseDir.exists()) {\n if (!baseDir.mkdirs()) {\n\n return false;\n } else {\n\n\n if (!mImageDir.exists()) {\n if (!mImageDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mVideoDir.exists()) {\n if (!mVideoDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mMiscDir.exists()) {\n if (!mMiscDir.mkdirs()) {\n\n return false;\n }\n }\n\n }\n }\n return true;\n }",
"private static void checkFilePath(String filePath) {\n File file = new File(filePath);\n try {\n if (!file.getParentFile().exists()) {\n file.getParentFile().mkdirs();\n }\n if (!file.exists()) {\n file.createNewFile();\n }\n file.createNewFile();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }",
"public boolean createPath(String path, byte[] value,int blockTimes){\n\t\tif (!zkClient.isConnected() && blockTimes == 0) {\n\t\t\treturn false;\n\t\t}\n TimeTrace trace = zkClient.startTracer(\"createPath:\" + path);//log message\n try{\n EnsurePath ensure = new EnsurePath(path).excludingLast();\n ensure.ensure(zkClient);//only for persistent node\n RetryLoop loop = zkClient.newRetryLoop();\n int _current = 0;\n while(loop.shouldContinue()){\n try{\n if(_current >= blockTimes){\n loop.markComplete(); //stop here.\n continue;\n }\n //blocking\n boolean isConnected = zkClient.blockUntilConnectedOrTimedOut();\n if(!isConnected){\n _current++;\n continue;\n }\n zkClient.getZooKeeper().create(path, value, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n loop.markComplete();\n } catch (KeeperException.NodeExistsException e){\n loop.markComplete();//exist ,stop here\n } catch (Exception e){\n loop.takeException(e);\n }\n }\n } catch (Exception e){\n e.printStackTrace();\n return false; //cant create path\n } finally{\n trace.commit();\n }\n return true;\n }",
"private boolean createFolder (Path path) {\n if (Files.notExists(path)) {\n // If the folder doesn't already exists we create it\n File f = new File(path.toString());\n try {\n // Create the folder\n f.mkdir();\n // Create an empty flow.json file\n f = new File(path + \"/flow.json\");\n f.createNewFile();\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n } else {\n return false;\n }\n }",
"private void checkCreateParentDirs(Path file) throws IOException {\n if (!Files.exists(file.getParent())) {\n Files.createDirectories(file.getParent());\n }\n }",
"AMPLPath createAMPLPath();",
"@Override\n\tpublic boolean pathExists(String path) {\n\t\treturn false;\n\t}",
"private void m20349g() {\n boolean z = true;\n if (this.f17414c.exists()) {\n if (!this.f17416e.exists()) {\n FileTree.m20516b(this.f17414c);\n } else {\n z = false;\n }\n }\n if (z) {\n try {\n C3945c.m20520a(this.f17416e);\n } catch (C3945c.C3946a unused) {\n CacheErrorLogger aVar = this.f17417f;\n CacheErrorLogger.EnumC3922a aVar2 = CacheErrorLogger.EnumC3922a.WRITE_CREATE_DIR;\n Class<?> cls = f17413b;\n aVar.mo27388a(aVar2, cls, \"version directory could not be created: \" + this.f17416e, null);\n }\n }\n }",
"@Override\n public synchronized boolean create(Path file)\n {\n File f = file.toFile(root);\n if (file.isRoot()) {\n return false;\n }\n File parent = file.parent().toFile(root);\n parent.mkdirs();\n\n try {\n return f.createNewFile();\n } catch (IOException e) {\n \te.printStackTrace();\n return false;\n }\n }",
"private void createEssentialDirs() throws TNotFoundEx{\n\t\tFileUtil fT = new FileUtil();\n\t\tfT.createDirOnDevice(TicklerVars.sdCardPath);\n\t\tif (!fT.isExistOnDevice(TicklerVars.sdCardPath))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.sdCardPath+\". Check your configurations in Tickler.conf file\");\n\t\tfT.createDirOnHost(TicklerVars.appTickDir);\n\t\tif (!fT.isExist(TicklerVars.appTickDir))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.appTickDir+\". Check your configurations in Tickler.conf file\");\n\t\t\n\t}",
"private void createFileHierarchie() throws IOException {\r\n\t\tlog.debug(\"START: SBIWebServer.createFileHierarchie\");\r\n\t\t// Create logs directory if not exist\r\n\t\tPath logPath = Paths.get(DEFAULT_LOG_LOCATION);\r\n\t\tif (!Files.exists(logPath)) {\r\n\t\t\tFiles.createDirectory(Paths.get(DEFAULT_LOG_LOCATION));\r\n\t\t\tlog.debug(\"Directory \"+DEFAULT_LOG_LOCATION+\" created\");\r\n\t\t}else {\r\n\t\t\tlog.debug(\"Directory \"+DEFAULT_LOG_LOCATION+\" already exists\");\r\n\t\t}\r\n\t\t\r\n\t\t// Create default server.xml\r\n\t\tPath serverConfigPath = Paths.get(CONFIG_SERVER_LOCATION);\r\n\t\tif (!Files.exists(serverConfigPath)) {\r\n\t\t\tXmlServerConfig xml = ConfigurationFactory.createDefaultXmlServerConfig();\r\n\t\t\ttry {\r\n\t\t\t\tXmlHelper.storeXml(xml, new File(CONFIG_SERVER_LOCATION));\r\n\t\t\t\tlog.debug(\"File \"+CONFIG_SERVER_LOCATION+\" created\");\r\n\t\t\t} catch (JAXBException e) {\r\n\t\t\t\tlog.error(\"Cannot store \"+CONFIG_SERVER_LOCATION,e);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tlog.debug(\"File \"+CONFIG_SERVER_LOCATION+\" already exists\");\r\n\t\t}\r\n\t\tlog.debug(\"END: SBIWebServer.createFileHierarchie\");\r\n\t}",
"private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }",
"private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }",
"static Path createBackupDirectory(Path savegame) {\r\n\t\tPath backupDirectory = Paths.get(savegame.getParent() + \"\\\\Backups\");\r\n\t\tif (!Files.isDirectory(backupDirectory)) {\r\n\t\t\ttry {\r\n\t\t\t\tFiles.createDirectory(backupDirectory);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"Error: couldn't create Backup directory\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (Files.isDirectory(backupDirectory)) {\r\n\t\t\tSystem.out.println(\"Created Backup Directory..\");\r\n\t\t}\r\n\t\treturn backupDirectory;\r\n\t}",
"private static void doCreateDir() {\n String newDir = \"new_dir\";\n boolean success = (new File(newDir)).mkdir();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n // Create a directory; all non-existent ancestor directories are\n // automatically created.\n newDir = \"c:/export/home/jeffreyh/new_dir1/new_dir2/new_dir3\";\n success = (new File(newDir)).mkdirs();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n }",
"public boolean setupFileSystem() {\n\t\tboolean success = false;\n\t\tthis.root = Paths.get(\"\").toAbsolutePath();\n\t\tthis.showNamedMessage(\"Client root path set to: \" + this.root.toString());\n\t\t\n\t\tthis.fileStorage = root.resolve(fileStorageDirName);\n\t\tthis.showNamedMessage(\"File storage set to: \" + this.fileStorage.toString());\n\n\t\ttry {\n\t\t\tFiles.createDirectory(fileStorage);\n\t\t\tthis.showNamedMessage(\"File storage directory did not exist:\"\n\t\t\t\t\t+ \" created \" + fileStorageDirName + \" in client root\"); \n\t\t} catch (java.nio.file.FileAlreadyExistsException eExist) {\n\t\t\tthis.showNamedMessage(\"File storage directory already exist:\"\n\t\t\t\t\t+ \" not doing anything with \" + fileStorageDirName + \" in client root\");\n\t\t} catch (IOException e) {\n\t\t\tthis.showNamedError(\"Failed to create file storage:\"\n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\n\t\tsuccess = true;\n\t\treturn success;\n\t}",
"public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }",
"protected void createHMetisInFilePath() {\n\t\tString file = \"\";\n\t\tfile += this.getRuntimeEnv().getOptionValue(PTArgString.OUTPUTDIR);\n\t\tfile += Utils.getFileSeparator();\n\t\tfile += \"TEMP_GRAPH_FILE.hgr\";\n\t\tthis.setHMetisInFile(file);\n\t}",
"@Test\n public void a_hierarchical_non_existent_path_can_be_created_and_value_set() {\n\n String path = \"$.shipment.extensionFields.carrier\";\n JsonPath compiledPath = JsonPath.compile(path);\n Object output = compiledPath.set(pathConfiguration.jsonProvider().parse(inputObject),\n \"Alpha Transports\",pathConfiguration);\n String result = parse(output).read(path);\n assertThat(result).matches(\"Alpha Transports\");\n\n }",
"public static boolean checkFileDirectory() {\n\t\ttry {\n\t\t\tfinal File dir = new File(FINAL_SAVE_MEDIA_PATH);\n\t\t\tif (!dir.exists()) {\n\t\t\t\tfinal boolean isMkdirs = dir.mkdirs();\n\t\t\t\treturn isMkdirs;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasInodeDirectory();",
"Path createPath();",
"public static void checkFolder(String dir){\n java.nio.file.Path checkFolderPath = java.nio.file.Paths.get(dir+\"/data\");\n boolean folderExists = java.nio.file.Files.exists(checkFolderPath);\n //folder not exists, create one\n if(!folderExists) {\n new File(dir+\"/data\").mkdirs();\n }\n }",
"static public void createClusterProfileDir() {\n if (new File(getClusterProfileDir()).exists() == true) {\n return;\n }\n\n String dir = IJ.getDirectory(\"home\") + File.separator + \".MosaicToolSuite\";\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n\n dir += File.separator + \"clusterProfile\";\n\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void createDirectory(File storageName) throws IOException {\n }",
"public static void createOutputDirectoryPath(String path){\n \n new File(path).mkdirs();\n \n }",
"public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}",
"public void createModuleBackupPath() {\n\t\tString[] onlyFolderNames = new String[] {\n\t\t\tmInstance.getModuleBackupRepositoryPath(),\n\t\t\tmModuleName\n\t\t};\n\t\t\n\t\tmModuleBackupPath = StringUtils.makeFilePath (onlyFolderNames, false);\n\t}",
"public static boolean createDirIfNotExists(SourceFile sourceFile) throws IOException {\n return createDirIfNotExists(sourceFile.getPath(), sourceFile.getSourceType());\n }",
"public static void insurePathToFileExists(File f) {\r\n File p = f.getParentFile();\r\n //System.out.println(\"uu.iPE: parent of \"+filename+\" is \"+parent);\r\n\r\n if (!p.exists()) {\r\n // parent doesn't exist, create it:\r\n if (!p.mkdirs()) {\r\n throw new IllegalStateException(\"Unable to make directory \" + p.getPath());\r\n } // endif -- second mkdir unsuc\r\n } // endif -- parent exists\r\n }",
"@BeforeEach\n void before() {\n if (Files.notExists(path)) path.toFile().mkdirs();\n }",
"public OutputResponse mkdirs(String path){\n String command = \"mkdir -p \" + path;\n return jobTarget.runCommand( command);\n }",
"private void createNode() throws Exception {\n try {\n _curator.create().creatingParentsIfNeeded().forPath(_zkPath, new byte[0]);\n } catch (KeeperException.NodeExistsException e) {\n // Don't care\n }\n }",
"@Override\n public void init() throws MetadataException {\n if (!config.isEnableIDTableLogFile()\n && config.getDeviceIDTransformationMethod().equals(\"SHA256\")) {\n throw new MetadataException(\n \"enableIDTableLogFile OR deviceIDTransformationMethod==\\\"Plain\\\"\");\n }\n File schemaRegionFolder = SystemFileFactory.INSTANCE.getFile(schemaRegionDirPath);\n if (!schemaRegionFolder.exists()) {\n if (schemaRegionFolder.mkdirs()) {\n logger.info(\"create schema region folder {}\", schemaRegionDirPath);\n } else {\n if (!schemaRegionFolder.exists()) {\n logger.error(\"create schema region folder {} failed.\", schemaRegionDirPath);\n throw new SchemaDirCreationFailureException(schemaRegionDirPath);\n }\n }\n }\n logger.info(\"initialized successfully: {}\", this);\n }",
"@Override\n public synchronized void startInternal() throws Exception {\n createConnection();\n\n // ensure root dirs exist\n createRootDir(znodeWorkingPath);\n createRootDir(zkRootNodePath);\n createRootDir(rmDTSecretManagerRoot);\n createRootDir(rmAppRoot);\n }",
"public IStatus prepareRuntimeDirectory(IPath baseDir);",
"private FilePath ensureWorkspaceExists(WorkflowJob job) throws Exception {\n FilePath path = remote.getWorkspaceFor(job);\n path.mkdirs();\n return path;\n }",
"@Override\n public MethodOutcome mkdirsRootOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_TRUE);\n }",
"@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}",
"private void init() {\r\n\t\t// check system property\r\n\t\tif (System.getProperty(TACOS_HOME) != null) {\r\n\t\t\tFile customHome = new File(System.getProperty(TACOS_HOME));\r\n\t\t\tif (initHome(customHome)) {\r\n\t\t\t\thomeDir = customHome;\r\n\t\t\t\tlogger.info(\"Using custom home directory ('\" + homeDir + \"')\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// custom home directory not available (or failed to initialize)\r\n\t\tFile defaultHome = new File(System.getProperty(DEFAULT_HOME), \".tacos\");\r\n\t\tif (initHome(defaultHome)) {\r\n\t\t\thomeDir = defaultHome;\r\n\t\t\tlogger.info(\"Using default home directory ('\" + homeDir + \"')\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// fallback if everything goes wrong\r\n\t\tlogger.warn(\"Using temporary directory to store files\");\r\n\t\thomeDir = new File(System.getProperty(\"java.io.tmpdir\"), \".tacos\");\r\n\t\tinitHome(homeDir);\r\n\t}",
"public void init(){\n\t\ttry{\n\t\t\tFile file=new File(\"c:/EasyShare/setting/dir.es\");\n\t\t\tif(!file.exists()){\n\t\t\t\tfile.getParentFile().mkdirs();\n\t\t\t\tfile.createNewFile();\n\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t\t\t}\n\t}",
"@Override\r\n\tpublic boolean createFolder(String filePath) throws FileSystemUtilException {\r\n\t\ttry{\r\n\t\t\tString userHome = getUserHome();\r\n\t\t\t//if given file path doesnot start with user home\r\n\t\t\tif(filePath == null && filePath.trim().length() < 1 && !filePath.startsWith(userHome)){\r\n\t\t\t\tthrow new FileSystemUtilException(\"EL0701\");\r\n\t\t\t}\r\n\t\t\tconnect();\r\n\t\t\tString mkDirCmd = \"mkdir -p \"+filePath;\t\t\t\r\n\t\t\tint x = executeSimpleCommand(mkDirCmd);\r\n\t\t\tif(x!=0)\r\n\t\t\t{\r\n\t\t\t\tlogger.info(\"Folder creation failed, may be file path is not correct or privileges are not there\");\r\n\t\t\t\tthrow new FileSystemUtilException(\"EL0699\");\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}catch(FileSystemUtilException e)\r\n\t\t{\r\n\t\t disconnect();\r\n\t\t\tthrow new FileSystemUtilException(e.getErrorCode(),e.getException());\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tthrow new FileSystemUtilException(\"F00002\",e);\r\n\t\t}\r\n\r\n\t}",
"protected boolean arff_exists() {\n\t\tFile tmpDir = new File(arff_path + \"\\\\\" + taskdata_name + \".arff\");\n\t\treturn tmpDir.exists();\n\t}",
"private void checkSyncDirExists() {\n syncDirString = IVLEOfflineStorage.GetPropertyValue(Constants.SyncDirectory);\n if(syncDirString != null || syncDirString != \"\") {\n jTextField3.setText(syncDirString);\n } else {\n jTextField3.setText(\"Please Select a Sync Directory.\");\n }\n }",
"private void createScratchDirectory(Path rootpath) {\n\t\tprintMsg(\"running createScratchDirectory() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\t\n\t\tif (Files.isDirectory(rootpath)) {\n\t\t\tprintMsg(\"The \" + theRootPath + \" exists...\");\n\t\t} else {\n\t\t\tprintMsg(\"Creating \" + theRootPath);\n\t\t\ttry {\n\t\t\t\tFiles.createDirectories(rootpath);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void create(String path) throws IOException {\n Path destionationPath = new Path(path);\n\n if (hdfs.exists(destionationPath)) {\n hdfs.delete(destionationPath, true);\n }\n hdfs.createNewFile(destionationPath);\n }",
"boolean hasAddMountPoint();",
"@Test\n public void testMakeFileFileExists() {\n FileTree myTree = new FileTree();\n String file = \"file1\";\n boolean result = false;\n try {\n myTree.makeFile(file);\n myTree.makeFile(file);\n } catch (NotDirectoryException | AlreadyExistException e) {\n result = true;\n }\n assertTrue(result);\n\n }",
"boolean checkIfPathExists(String startCityUID, List<WayPointDto> path);",
"@Override\n public void stageForCache_destination_exists() throws Exception {\n assumeTrue( !isWindows() );\n super.stageForCache_destination_exists();\n }",
"private File createNewFile(String prefix){\n if(prefix==null || \"\".equalsIgnoreCase(prefix)){\n prefix=\"IMG_\";\n }\n File newDirectory = new File(Environment.getExternalStorageDirectory()+\"/mypics/\");\n if(!newDirectory.exists()){\n if(newDirectory.mkdir()){\n Log.d(mContex.getClass().getName(), newDirectory.getAbsolutePath()+\" directory created\");\n }\n }\n File file = new File(newDirectory,(prefix+ System.currentTimeMillis()+\".jpg\"));\n if(file.exists()){\n //this wont be executed\n file.delete();\n try {\n file.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return file;\n }",
"public static Boolean dir(String str){\n\t\t\n\t\t//File dir_root = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/kenzap\");\n\t\t//if (!dir_root.exists()){dir_root.mkdir();Log.e(\"DIRECROY\", \"MAKING_ROOT\");}\n\t\t\n\t File dir = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + str);\n\t if (!dir.exists()){\n\t \tdir.mkdirs();\n\t \t//Log.e(\"DIRECTORY\", \"MAKING\");\n\t \t}\n\n\t\t//Log.e(\"DIRECROY\", \"YES\");\n//Log.e(\"DIRECROY\", \"NO\");\n\t\treturn dir.exists();\n\t}",
"@Test(timeout=180000)\n public void testQuarantineMissingRegionDir() throws Exception {\n TableName table = TableName.valueOf(name.getMethodName());\n // inject a fault in the hfcc created.\n final FileSystem fs = FileSystem.get(conf);\n HBaseFsck hbck = new HBaseFsck(conf, hbfsckExecutorService) {\n @Override\n public HFileCorruptionChecker createHFileCorruptionChecker(boolean sidelineCorruptHFiles)\n throws IOException {\n return new HFileCorruptionChecker(conf, executor, sidelineCorruptHFiles) {\n AtomicBoolean attemptedFirstHFile = new AtomicBoolean(false);\n @Override\n protected void checkRegionDir(Path p) throws IOException {\n if (attemptedFirstHFile.compareAndSet(false, true)) {\n assertTrue(fs.delete(p, true)); // make sure delete happened.\n }\n super.checkRegionDir(p);\n }\n };\n }\n };\n doQuarantineTest(table, hbck, 3, 0, 0, 0, 1);\n hbck.close();\n }",
"public void criar() throws IOException {\nif (!directorio.exists()) {\n directorio.mkdir();\n System.out.println(\"Directorio criado\");\n } else {\n System.out.println(\"Directorio existe\");\n }\n if (!fileAdmin.exists()) {\n fileAdmin.createNewFile();\n System.out.println(\"file de Administrador criado com sucesso\");\n escrever(lista);\n } else {\n System.out.println(\"ficheiro existe\");\n }\n\n }",
"private static void initDirectories() {\n String storeName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_META_DATA_DIRECTORY\n + File.separator\n + QVCSConstants.QVCS_FILEID_STORE_NAME\n + \".dat\";\n File storeFile = new File(storeName);\n if (storeFile.exists()) {\n storeFile.delete();\n }\n deleteAuthenticationStore();\n initAuthenticationStore();\n\n deleteRoleProjectViewStore();\n initRoleProjectViewStore();\n\n initProjectProperties();\n }",
"private String createEmptyLocationForHive(ArcticTable arcticTable) {\n String newLocation = ((SupportHive) arcticTable).hiveLocation() + \"/ts_\" + System.currentTimeMillis();\n OutputFile file = arcticTable.io().newOutputFile(newLocation + \"/.keep\");\n try {\n file.createOrOverwrite().close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return newLocation;\n }",
"private File createTempFolder(String osBasePath, String prefix, String suffix) {\n File baseTempFolder = getTempFolder(osBasePath);\n if (!baseTempFolder.isDirectory()) {\n if (baseTempFolder.isFile()) {\n deleteFileOrFolder(baseTempFolder);\n }\n if (!baseTempFolder.mkdirs()) {\n return null;\n }\n }\n for (int i = 1; i < 100; i++) {\n File folder = new File(baseTempFolder, String.format(\"%1$s.%2$s%3$02d\", prefix, suffix, i));\n if (!folder.exists()) {\n return folder;\n }\n }\n return null;\n }",
"private static void makeDirPath(String targetAddr) {\n\t\tString parentPath = PathUtil.getImgBasePath() + targetAddr;\r\n\t\tFile dirPath = new File(parentPath);\r\n\t\tif (!dirPath.exists()) {\r\n\t\t\tdirPath.mkdirs();\r\n\t\t}\r\n\t}",
"public void createDir(File file){\n\t\tif (!file.exists()) {\n\t\t\tif (file.mkdir()) {\n\t\t\t\tlogger.debug(\"Directory is created!\");\n\t\t\t} else {\n\t\t\t\tlogger.debug(\"Failed to create directory!\");\n\t\t\t}\n\t\t}\n\t}",
"private boolean directoryExists() {\n if (Meta.getInstance().containDirectory(dirName))\n return true;\n else\n return false;\n }",
"public static boolean createDirectoryAtPath(String path){\n \t\tFile folder = new File(path);\n \t\tif( !folder.exists() ){\n \t\t\tfolder.mkdirs();\n \t\t}\n \t\treturn true;\n \t}",
"@Test\n public void testMkdirOneDirectoryAbsolutePathOneDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"/directory1\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"directory1 already exists or the path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1\"), true);\n }",
"@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }",
"@Override\n public void Init() {\n strRemoteDownloadPath = strBasePath + (\"serialize/to/\");\n strRemoteUploadPath = strBasePath + (\"serialize/from/\");\n new File(strRemoteDownloadPath).mkdirs();\n new File(strRemoteUploadPath).mkdirs();\n }"
]
| [
"0.6067344",
"0.59779185",
"0.58449054",
"0.56358093",
"0.5578773",
"0.54574424",
"0.53844655",
"0.5360667",
"0.5259696",
"0.52526706",
"0.5242169",
"0.52229196",
"0.5222201",
"0.5220579",
"0.51763004",
"0.5173426",
"0.5169468",
"0.51494557",
"0.5138419",
"0.5104063",
"0.5090003",
"0.50817066",
"0.50795144",
"0.50441015",
"0.5033417",
"0.50316864",
"0.4979811",
"0.49795106",
"0.4967123",
"0.49661022",
"0.49622685",
"0.49373087",
"0.49363694",
"0.49344483",
"0.49277604",
"0.49042335",
"0.4903177",
"0.4902039",
"0.48972636",
"0.48710924",
"0.484862",
"0.4842578",
"0.4834099",
"0.4833037",
"0.48320007",
"0.48184285",
"0.48089203",
"0.4802193",
"0.47999382",
"0.47982112",
"0.47848055",
"0.47756493",
"0.4774548",
"0.47695333",
"0.47607192",
"0.47574577",
"0.475623",
"0.47489643",
"0.4742895",
"0.47405133",
"0.47372258",
"0.473507",
"0.47343773",
"0.47258818",
"0.47104025",
"0.4705345",
"0.4690037",
"0.46818414",
"0.46759644",
"0.4672635",
"0.4672221",
"0.465094",
"0.46323436",
"0.46315894",
"0.46039003",
"0.46011236",
"0.4595219",
"0.45933807",
"0.4589709",
"0.45896354",
"0.45764098",
"0.4574406",
"0.45730147",
"0.4557811",
"0.45574093",
"0.45488128",
"0.45445505",
"0.45444027",
"0.4543321",
"0.45288116",
"0.45256555",
"0.45211297",
"0.45191032",
"0.4518221",
"0.45083487",
"0.44952127",
"0.4494266",
"0.4490757",
"0.4484187",
"0.44826245"
]
| 0.45820716 | 80 |
Returns with the service specific metadata directory. If the directory is missing the method tries to create it. | public static File getDBPath(ConfigurationSource conf, String key) {
final File dbDirPath =
getDirectoryFromConfig(conf, key, "OM");
if (dbDirPath != null) {
return dbDirPath;
}
LOG.warn("{} is not configured. We recommend adding this setting. "
+ "Falling back to {} instead.", key,
HddsConfigKeys.OZONE_METADATA_DIRS);
return ServerUtils.getOzoneMetaDirPath(conf);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createServiceDirectory(String serviceID){\n \n String changedServiceID = serviceID.replaceAll(\"\\\\.\",\"&\");\n changedServiceID = changedServiceID.replaceAll(\":\",\"&\");\n \n //Create directory to store output files of service\n File dir = new File(sessionDirectory.getPath()+\"/\"+changedServiceID);\n dir.mkdir();\n \n //Add created directory to map \"servicesDirectories\"\n servicesDirectories.put(serviceID,dir);\n \n }",
"@Override\n public void createDirectory(File storageName) throws IOException {\n }",
"Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }",
"public MetaDataManager createMetaDataManager() throws ServiceException {\r\n initialize(); \r\n return new MetaDataManager(multiDomainMetaService); \r\n\t}",
"private void initDirectoryService(File workDir) {\n if (!workDir.exists()) {\n boolean dirsCreated = workDir.mkdirs();\n if (!dirsCreated) {\n logger.debug(\"Not all directories could be created. \" + workDir.getAbsolutePath());\n }\n }\n /*\n WhydahConfig fCconfig = new WhydahConfig();\n if (fCconfig.getProptype().equals(\"FCDEV\")) {\n dc = \"WHYDAH\";\n } else if (fCconfig.getProptype().equals(\"DEV\")) {\n dc = \"WHYDAH\";\n } else {\n dc = \"WHYDAH\";\n }\n */\n init(workDir.getPath());\n\n // And start the identity\n // service.startup();\n }",
"@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}",
"public static File getDirectoryFromConfig(ConfigurationSource conf,\n String key,\n String componentName) {\n final Collection<String> metadirs = conf.getTrimmedStringCollection(key);\n if (metadirs.size() > 1) {\n throw new IllegalArgumentException(\n \"Bad config setting \" + key +\n \". \" + componentName +\n \" does not support multiple metadata dirs currently\");\n }\n\n if (metadirs.size() == 1) {\n final File dbDirPath = new File(metadirs.iterator().next());\n if (!dbDirPath.mkdirs() && !dbDirPath.exists()) {\n throw new IllegalArgumentException(\"Unable to create directory \" +\n dbDirPath + \" specified in configuration setting \" +\n key);\n }\n try {\n Path path = dbDirPath.toPath();\n // Fetch the permissions for the respective component from the config\n String permissionValue = getPermissions(key, conf);\n String symbolicPermission = getSymbolicPermission(permissionValue);\n\n // Set the permissions for the directory\n Files.setPosixFilePermissions(path,\n PosixFilePermissions.fromString(symbolicPermission));\n } catch (Exception e) {\n throw new RuntimeException(\"Failed to set directory permissions for \" +\n dbDirPath + \": \" + e.getMessage(), e);\n }\n return dbDirPath;\n }\n\n return null;\n }",
"@Override\n protected void createRootDir() {\n }",
"private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }",
"@Override\n public void init() throws MetadataException {\n if (!config.isEnableIDTableLogFile()\n && config.getDeviceIDTransformationMethod().equals(\"SHA256\")) {\n throw new MetadataException(\n \"enableIDTableLogFile OR deviceIDTransformationMethod==\\\"Plain\\\"\");\n }\n File schemaRegionFolder = SystemFileFactory.INSTANCE.getFile(schemaRegionDirPath);\n if (!schemaRegionFolder.exists()) {\n if (schemaRegionFolder.mkdirs()) {\n logger.info(\"create schema region folder {}\", schemaRegionDirPath);\n } else {\n if (!schemaRegionFolder.exists()) {\n logger.error(\"create schema region folder {} failed.\", schemaRegionDirPath);\n throw new SchemaDirCreationFailureException(schemaRegionDirPath);\n }\n }\n }\n logger.info(\"initialized successfully: {}\", this);\n }",
"public static File findOrCreateDir(String directory) {\n \t\tFile dir = new File(directory);\n \t\tif (!dir.exists()) {\n \t\t\tdir.mkdirs();\n\t\t\treturn null;\n \t\t}\n \t\treturn dir;\n \t}",
"private void setupServiceAndMetadata() throws ServiceException {\n \t\t\tfinal MetadataRetrieve retrieve = getMetadata().getOmeMeta().getRoot();\n \n \t\t\tservice = getContext().getService(OMEXMLService.class);\n \t\t\tfinal OMEXMLMetadata originalOMEMeta = service.getOMEMetadata(retrieve);\n \t\t\toriginalOMEMeta.resolveReferences();\n \n \t\t\tfinal String omexml = service.getOMEXML(originalOMEMeta);\n \t\t\tomeMeta = service.createOMEXMLMetadata(omexml);\n \t\t}",
"private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}",
"public File getPublicServiceDir(String serviceName) {\n return new File(new File(getRootDir(), ToolboxFoldersFileConstants.WSDL), serviceName);\n }",
"public CustomDirectoryFactory(){\n\t\tsuper();\n\t}",
"private void initDirectoryService(File workDir) throws Exception {\n // Initialize the LDAP service\n service = new DefaultDirectoryService();\n service.setInstanceId(currentTest.getDisplayName());\n service.setInstanceLayout(new InstanceLayout(workDir));\n CacheService cacheService = new CacheService();\n cacheService.initialize(service.getInstanceLayout(), \"test\");\n service.setCacheService(cacheService);\n\n factory = new JdbmPartitionFactory();\n\n // first load the schema\n initSchema();\n\n // then the system partition\n // this is a MANDATORY partition\n initSystemPartition();\n\n // Disable the ChangeLog system\n service.getChangeLog().setEnabled(false);\n service.setDenormalizeOpAttrsEnabled(true);\n\n // Now we can create as many partitions as we need\n // Create some new partitions named 'foo', 'bar' and 'apache'.\n\n Partition partition;\n if (ldapSchema == null) {\n partition = addPartition(\"jenkins\", \"dc=jenkins,dc=io\");\n } else {\n partition = addPartition(ldapSchema.id(), ldapSchema.dn());\n }\n\n // Index some attributes on the jenkins partition\n addIndex(partition, \"objectClass\", \"ou\", \"uid\");\n\n // And start the service\n service.startup();\n\n try {\n CoreSession coreSession = service.getAdminSession();\n ModifyRequest modifyRequest = new ModifyRequestImpl();\n modifyRequest.setName(new Dn(\"uid=admin\", \"ou=system\"));\n modifyRequest.replace(\"userPassword\", configuration == null ? \"password\" : configuration.adminPassword());\n coreSession.modify(modifyRequest);\n } catch (LdapException lnnfe) {\n throw new AssertionError(\"Could not update admin password\");\n }\n\n if (ldapSchema != null) {\n String resourceName = ldapSchema.ldif() + \".ldif\";\n String schemaSource = resourceName.startsWith(\"/\")\n ? resourceName\n : currentTest.getTestClass().getName().replace('.', '/') + \"/\" + resourceName;\n try (InputStream stream = currentTest.getTestClass().getResourceAsStream(resourceName)) {\n LOGGER.log(Level.INFO, \"Importing schema from {0}\", schemaSource);\n loadSchema(partition, stream);\n }\n }\n\n // We are all done !\n }",
"public DirectoryService() {\n\n }",
"private boolean directoryExists() {\n if (Meta.getInstance().containDirectory(dirName))\n return true;\n else\n return false;\n }",
"private Optional<Path> dataSetDir() {\n Optional<String> dataSetDirProperty = demoProperties.dataSetDir();\n if (!dataSetDirProperty.isPresent()) {\n logger.info(\"Data set directory (app.demo.data-set-dir) is not set.\");\n return Optional.empty();\n }\n Path dataSetDirPath = Paths.get(dataSetDirProperty.get());\n if (!isReadableDir(dataSetDirPath)) {\n logger.warn(\n \"Data set directory '{}' doesn't exist or cannot be read. No external data sets will be loaded.\",\n dataSetDirPath.toAbsolutePath());\n return Optional.empty();\n }\n return Optional.of(dataSetDirPath);\n }",
"private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}",
"public DataStoreCrudService(final IServiceContext service_context, final String output_directory) {\n\t\tthis.output_directory = output_directory;\n\t\tthis.fileContext = service_context.getStorageService().getUnderlyingPlatformDriver(FileContext.class, Optional.empty()).get();\n\t\t_logger.debug(\"Created DataStoreCrudService pointed at dir: \" + output_directory);\n\t}",
"public File getServiceRoot(String serviceName) {\n return new File(new File(new File(getRootDir(), ToolboxFoldersFileConstants.WEB_INF), ToolboxFoldersFileConstants.SERVICES), serviceName);\n }",
"public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}",
"private File getConfigurationFolder(final File baseFolder) throws FileNotFoundException, IOException {\n final String METADATA_FOLDER_NAME = System.getProperty(\"com.bf.viaduct.metadata.location\", \"metadata\");\n final String CONFIG_FOLDER_NAME = \"config\";\n final String CONFIGURATION_FOLDER_NAME = \"configuration\";\n\n // If the \"metadata\" folder exists, use it, otherwise check for existence of the\n // \"configuration\" folder.\n File folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n METADATA_FOLDER_NAME));\n if (!folder.isDirectory()) {\n // If the \"configuration\" folder exists, use it, otherwise use the \"config\" folder.\n folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n CONFIGURATION_FOLDER_NAME));\n if (!folder.isDirectory()) {\n folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n CONFIG_FOLDER_NAME));\n }\n }\n\n return folder;\n }",
"private File createEmptyDirectory() throws IOException {\n File emptyDirectory = findNonExistentDirectory();\n if (emptyDirectory.mkdir() == false) {\n throw new IOException(\"Can't create \" + emptyDirectory);\n }\n\n return emptyDirectory;\n }",
"@Override\n protected NodeInfo createDirectoryEntry(NodeInfo parentEntry, Path dir) throws IOException {\n return drive.createFolder(parentEntry.getId(), toFilenameString(dir));\n }",
"private static String createAppSpecificLocalDir(String baseDir, String applicationIdString,\n String user, int dagIdentifier) {\n return baseDir + File.separator + \"usercache\" + File.separator + user + File.separator +\n \"appcache\" + File.separator + applicationIdString + File.separator + dagIdentifier;\n }",
"public Path getDataDirectory();",
"public Storage() {\n\t\tstorageReader = new StorageReader();\n\t\tstorageWriter = new StorageWriter();\n\t\tdirectoryManager = new DirectoryManager();\n\n\t\tFile loadedDirectory = storageReader.loadDirectoryConfigFile(FILENAME_DIRCONFIG);\n\t\tif (loadedDirectory != null) {\n\t\t\tif (directoryManager.createDirectory(loadedDirectory) == true) {\n\t\t\t\tdirectory = loadedDirectory;\n\t\t\t\tSystem.out.println(\"{Storage} Directory loaded | \" + directory.getAbsolutePath());\n\t\t\t} else { //loaded directory was invalid or could not be created\n\t\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t\t}\n\t\t} else { //directory config file was not found\n\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t}\n\t}",
"private static void checkFridgeDataDirectory() throws FileNotFoundException, InvalidDateException,\n InvalidQuantityException, EmptyDescriptionException,\n RepetitiveFoodIdentifierException, InvalidFoodCategoryException, InvalidFoodLocationException {\n Path path = Paths.get(DATA_FILE_PATH); //creates Path instance\n try {\n Files.createDirectories(Paths.get(DIRECTORY));\n Files.createFile(path); //creates file at specified location\n } catch (IOException e) {\n readFridgeData();\n }\n }",
"public IStatus prepareRuntimeDirectory(IPath baseDir);",
"public Path getRepositoryGroupBaseDir();",
"public static boolean createDirIfNotExists(SourceFile sourceFile) throws IOException {\n return createDirIfNotExists(sourceFile.getPath(), sourceFile.getSourceType());\n }",
"public File prepareDataFolder() {\n if (!dataFolder.exists()) {\n dataFolder.mkdirs();\n }\n return dataFolder;\n }",
"boolean hasPersistDirectory();",
"public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}",
"public void handleMissingDirectory(String path_string) throws PersistBlobException {\n\t\tPath path = Paths.get(path_string);\n\t\tSet<PosixFilePermission> perms = PosixFilePermissions.fromString(directoryPerms);\n\t\tFileAttribute<Set<PosixFilePermission>> attr =\tPosixFilePermissions.asFileAttribute(perms);\n\t\ttry {\n\t\t\tFiles.createDirectories(path, attr);\n\t\t} catch (IOException e) {\n\t\t\tthrow new PersistBlobException(\"Unable to create path: [\"+path+\"]\",e);\n\t\t}\n\t\tlog.info(\"PersistBlobImpl: created directory: {}\",path_string);\n\t}",
"private void createDirectoryIfNeeded(String directoryName)\n\t{\n\t\tFile theDir = new File(directoryName);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!theDir.exists())\n\t\t{\n\t\t\t//System.out.println(\"creating directory: \" + directoryName);\n\t\t\ttheDir.mkdir();\n\t\t}\n\t}",
"@Override\n public String getSystemDir() {\n return null;\n }",
"public MessageDirectory createMessageDirectory()\n {\n return messageDirectory;\n }",
"alluxio.proto.journal.File.PersistDirectoryEntry getPersistDirectory();",
"public static File createDirectoryIfNotExists(String directory) {\n if (directory == null) {\n return null;\n }\n\n // Check if the target directory exists on the input path\n File targetDirectory = new File(directory);\n if (targetDirectory.exists() != true) {\n LOG.debug(\"ics.core.io.FileUtils.createDirectoryIfNotExists(): Creating \"\n + directory);\n\n // Don't run as sudo but as a tomcat user instead\n ProcessResult result = ShellUtil.executeShellCommand(\"mkdir -p \"\n + directory);\n if (result.getExitCode() != 0) {\n LOG.error(\"ics.core.io.FileUtils.createDirectoryIfNotExists(): Process exited abnormally. Exit code: \"\n + result.getExitCode());\n //LOG.error(result.getStandardError());\n return null;\n }\n\n }\n\n return targetDirectory;\n }",
"public interface DirectoryService {\n\n List<File> searchByName(String name);\n\n List<File> searchByExtension(String extension);\n\n Long getDirectorySize(File directory, boolean recursive);\n\n void appendLinesToFile(File file, List<String> lines);\n\n void zip(File fileToZip);\n\n void unZip(File fileToZip);\n\n void delete(File toDelete);\n}",
"@VisibleForTesting\n void storeTopDirectory(TableServiceClient tableServiceClient, UUID snapshotId, String dirName) {\n String dirPath = \"/\" + dirName;\n String snapshotTableName = StorageTableName.SNAPSHOT.toTableName(snapshotId);\n\n // Check if top directory already exists\n TableEntity directoryEntry =\n lookupByFilePath(tableServiceClient, snapshotId, snapshotTableName, dirPath);\n if (directoryEntry != null) {\n return;\n }\n\n // Top directory does not exists, so create it\n FireStoreDirectoryEntry topDir =\n new FireStoreDirectoryEntry()\n .fileId(UUID.randomUUID().toString())\n .isFileRef(false)\n .path(\"/\")\n .name(dirName)\n .fileCreatedDate(Instant.now().toString());\n\n createDirectoryEntry(tableServiceClient, snapshotId, snapshotTableName, topDir);\n }",
"public StorageManager() {\n makeDirectory();\n }",
"public void createDirectoryEntry(\n TableServiceClient tableServiceClient,\n UUID collectionId,\n String tableName,\n FireStoreDirectoryEntry createEntry) {\n\n tableServiceClient.createTableIfNotExists(tableName);\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n\n // Walk up the lookup directory path, finding missing directories we get to an\n // existing one\n // We will create the ROOT_DIR_NAME directory here if it does not exist.\n String lookupDirPath = FileMetadataUtils.makeLookupPath(createEntry.getPath());\n for (String testPath = lookupDirPath;\n !testPath.isEmpty();\n testPath = FileMetadataUtils.getDirectoryPath(testPath)) {\n\n // !!! In this case we are using a lookup path\n if (lookupByFilePath(tableServiceClient, collectionId, tableName, testPath) != null) {\n break;\n }\n\n FireStoreDirectoryEntry dirToCreate = FileMetadataUtils.makeDirectoryEntry(testPath);\n String partitionKey = getCollectionPartitionKey(collectionId, testPath);\n String rowKey = encodePathAsAzureRowKey(testPath);\n TableEntity entity = FireStoreDirectoryEntry.toTableEntity(partitionKey, rowKey, dirToCreate);\n logger.info(\"Upserting directory entry for {} in table {}\", testPath, tableName);\n // For file ingest worker flights,\n // It's possible that another thread is trying to write the same directory entity at the same\n // time upsert rather than create so that it does not fail if it already exists\n tableClient.upsertEntity(entity);\n }\n createEntityForPath(tableClient, collectionId, tableName, createEntry);\n }",
"public Path getRepositoryBaseDir();",
"@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public File getStoreDir();",
"private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }",
"private static File getStorageDir(Context context) {\n File file = new File(context.getExternalFilesDir(\n Environment.MEDIA_MOUNTED), \"ZhouImage\");\n if (!file.exists()) {\n if (!file.mkdirs()) {\n Log.e(\"TAG\", \"Directory not created\");\n }\n }\n\n return file;\n }",
"private void createTDenseDirectory() {\n File dense = new File(DenseLayerPath);\n dense.mkdir();\n }",
"public boolean serviceDirectoryIsEmpty(String serviceID){\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n return listOfFiles.length == 0;\n }\n \n return true;\n \n }",
"abstract public String getDataResourcesDir();",
"public String getDir();",
"static LauncherDir maybeCreate(Options options) {\n if (options.getLauncherDir() == null) {\n return null;\n }\n return new LauncherDir(options);\n }",
"private void createLocation() throws CoreException {\n \t\tFile file = location.append(F_META_AREA).toFile();\n \t\ttry {\n \t\t\tfile.mkdirs();\n \t\t} catch (Exception e) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_couldNotCreate, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, e));\n \t\t}\n \t\tif (!file.canWrite()) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_readonly, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t}\n \t\t// set the log file location now that we created the data area\n \t\tIPath logPath = location.append(F_META_AREA).append(F_LOG);\n \t\ttry {\n \t\t\tActivator activator = Activator.getDefault();\n \t\t\tif (activator != null) {\n \t\t\t\tFrameworkLog log = activator.getFrameworkLog();\n \t\t\t\tif (log != null)\n \t\t\t\t\tlog.setFile(logPath.toFile(), true);\n \t\t\t\telse if (debug())\n \t\t\t\t\tSystem.out.println(\"ERROR: Unable to acquire log service. Application will proceed, but logging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// set the trace file location now that we created the data area\n \t\tIPath tracePath = location.append(F_META_AREA).append(F_TRACE);\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator != null) {\n \t\t\tDebugOptions debugOptions = activator.getDebugOptions();\n \t\t\tif (debugOptions != null) {\n \t\t\t\tdebugOptions.setFile(tracePath.toFile());\n \t\t\t} else {\n \t\t\t\tSystem.out.println(\"ERROR: Unable to acquire debug service. Application will proceed, but debugging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t}",
"private File getExternalPhotoStorageDir() {\n File file = new File(getExternalFilesDir(\n Environment.DIRECTORY_PICTURES), \"ApparelApp\");\n if (!file.exists() && !file.mkdirs()) {\n Log.e(TAG, \"Directory not created\");\n }\n return file;\n }",
"static File getRootFile() {\n File root = new File(Constant.CONFIG_DIRECTORY_NAME);\n boolean directoryCreated = true;\n if (!root.exists()) {\n directoryCreated = root.mkdirs();\n }\n if (directoryCreated) {\n return root;\n } else {\n return null;\n }\n }",
"public static File getYdfDirectory()\r\n/* 36: */ throws IOException\r\n/* 37: */ {\r\n/* 38: 39 */ log.finest(\"OSHandler.getYdfDirectory\");\r\n/* 39: 40 */ return ydfDirectory == null ? setYdfDirectory() : ydfDirectory;\r\n/* 40: */ }",
"private void initializeLocation() throws CoreException {\n \t\tif (location.toFile().exists()) {\n \t\t\tif (!location.toFile().isDirectory()) {\n \t\t\t\tString message = NLS.bind(CommonMessages.meta_notDir, location);\n \t\t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t\t}\n \t\t}\n \t\t//try infer the device if there isn't one (windows)\n \t\tif (location.getDevice() == null)\n \t\t\tlocation = new Path(location.toFile().getAbsolutePath());\n \t\tcreateLocation();\n \t\tinitialized = true;\n \t}",
"public static Path locateLogosDir(ServiceContext context) {\n ServletContext servletContext = null;\n \n if(context == null) {\n context = ServiceContext.get();\n }\n \n if(context == null) {\n throw new RuntimeException(\"Null Context found!!!!\");\n } else if (context.getServlet() != null) {\n servletContext = context.getServlet().getServletContext();\n }\n\n return locateLogosDir(servletContext, context.getApplicationContext(),\n context.getAppPath());\n }",
"static public void createClusterProfileDir() {\n if (new File(getClusterProfileDir()).exists() == true) {\n return;\n }\n\n String dir = IJ.getDirectory(\"home\") + File.separator + \".MosaicToolSuite\";\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n\n dir += File.separator + \"clusterProfile\";\n\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n }",
"protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)\n throws IOException {\n createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescriptor);\n }",
"Object getDir();",
"private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic String createDirectory(AuthenticationToken authenticationToken, String filePath, String idealFolderName, boolean force) \n\t\t\tthrows PermissionDeniedException, CreateDirectoryFailedException { \n\t\tif(idealFolderName.trim().isEmpty()) \n\t\t\tthrow new CreateDirectoryFailedException(\"Directory name is empty. The directory was not created.\");\n\t\t\n\t\tidealFolderName = fileNameNormalizer.normalize(idealFolderName);\n\t\t\n\t\tFile dir = new File(filePath);\n if(dir.isFile()) {\n \tdir = dir.getParentFile();\n \tfilePath = dir.getAbsolutePath();\n }\n dir.mkdirs();\n\t\t\n\t\tboolean permissionResult = filePermissionService.hasWritePermission(authenticationToken, filePath);\n\t\tif(!permissionResult)\n\t\t\tthrow new PermissionDeniedException();\n\t\telse {\n\t\t\tboolean inUseResult = this.isInUse(authenticationToken, filePath);\n\t\t\tif(inUseResult)\n\t\t\t\t//throw new CreateDirectoryFailedException(\"Can't create directory. Parent directory is currently in use.\");\n\t\t\t\tthrow new CreateDirectoryFailedException(\"Can't create directory. Parent directory \"+this.createMessageFileInUse(authenticationToken, filePath)+\". Delete the tasks using Task Manager, then try again.\");\n\t\t\telse {\n\t\t\t\tFile file = new File(filePath + File.separator + idealFolderName);\n\t\t\t\tboolean resultMkDir = file.mkdir();\n\t\t\t\tif(!resultMkDir && force) {\n\t\t\t\t\tString date = dateTimeFormat.format(new Date());\n\t\t\t\t\tidealFolderName = idealFolderName + \"_\" + date;\n\t\t\t\t\tfile = new File(filePath + File.separator + idealFolderName);\n\t\t\t\t\tresultMkDir = file.mkdir();\n\t\t\t\t\tint i = 1;\n\t\t\t\t\twhile(!resultMkDir) {\n\t\t\t\t\t\tfile = new File(filePath + File.separator + idealFolderName + \"_\" + i++);\n\t\t\t\t\t\tresultMkDir = file.mkdir();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!resultMkDir){ \n\t\t\t\t\tif(file.isDirectory() && file.exists())\n\t\t\t\t\t\tthrow new CreateDirectoryFailedException(\"Directory \"+file.getName()+\" already exists. You can try again with another name.\");\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new CreateDirectoryFailedException(\"Network or server errors\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn file.getAbsolutePath();\n\t\t\t}\n\t\t}\n\t}",
"private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}",
"private String getDirectory(String timedObjectId) {\n String dirName = directories.get(timedObjectId);\n if (dirName == null) {\n dirName = baseDir.getAbsolutePath() + File.separator + timedObjectId.replace(File.separator, \"-\");\n File file = new File(dirName);\n if(!file.exists()) {\n if(!file.mkdirs()) {\n logger.error(\"Could not create directory \" + file + \" to persist EJB timers.\");\n }\n }\n directories.put(timedObjectId, dirName);\n }\n return dirName;\n }",
"@Override\n public boolean isDir() { return true; }",
"private static File setYdfDirectory()\r\n/* 27: */ throws IOException\r\n/* 28: */ {\r\n/* 29: 32 */ log.finest(\"OSHandler.setYdfDirectory\");\r\n/* 30: 33 */ ydfDirectory = new File(USER_HOME + \"/\" + \".yourdigitalfile\");\r\n/* 31: 34 */ ydfDirectory.mkdir();\r\n/* 32: 35 */ return ydfDirectory;\r\n/* 33: */ }",
"public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }",
"public static File getRegistrationDirectory() {\n\t\t\n\t\tFile home = ApplicationRuntime.getInstance().getApplicationHomeDir();\n\n\t\tFile registrationDirectory = new File(home,REGISTRATION_DIRECTORY_NAME);\n\t\tif (!registrationDirectory.exists()) {\n\t\t\tregistrationDirectory.mkdir();\n\t\t}\n\t\treturn registrationDirectory;\n\t}",
"private static void checkHistoryDirectory()\n throws FileNotFoundException {\n Path path = Paths.get(HISTORY_FILE_PATH); //creates Path instance\n try {\n Files.createDirectories(Paths.get(DIRECTORY));\n Files.createFile(path); //creates file at specified location\n } catch (IOException e) {\n readHistoryData();\n }\n }",
"private static File prepareTempFolder() {\n File result;\n try {\n result = java.nio.file.Files.createTempDirectory(\n DCOSService.class.getSimpleName()).toFile();\n System.out.println(result.toString());\n\n return result;\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public static File getOzoneMetaDirPath(ConfigurationSource conf) {\n File dirPath = getDirectoryFromConfig(conf,\n HddsConfigKeys.OZONE_METADATA_DIRS, \"Ozone\");\n if (dirPath == null) {\n throw new IllegalArgumentException(\n HddsConfigKeys.OZONE_METADATA_DIRS + \" must be defined.\");\n }\n return dirPath;\n }",
"public File getDirectory()\n {\n return directory;\n }",
"public File getSubtitleStorageDir() {\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS), \"Subtitle\");\n if (!file.mkdirs()) {\n Log.e(\"Subtitle\", \"Directory not created\");\n }\n return file;\n }",
"public static File getStorageDir2(Context context) {\n File file = new File(Environment.getExternalStorageDirectory()+File.separator+\"ZhouImage\", OUTGOING_DATE_FORMAT.format(new Date())+\".jpg\");\n if (!file.exists()) {\n if (!file.mkdirs()) {\n Log.e(\"TAG\", \"Directory not created\");\n }\n }\n\n return file;\n }",
"private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }",
"public static Object getInternalStorageDirectory() {\n\n FileObject root = Repository.getDefault().getDefaultFileSystem().getRoot();\n\n //FileObject dir = root.getFileObject(\"Storage\");\n \n //return dir;\n return null;\n }",
"@CliCommand(value = \"generate-idp-metadata\", help = \"Generate SAML2 IdP Metadata\")\n public void generate(\n @CliOption(key = {\"metadataLocation\"},\n help = \"Directory location to hold metadata and relevant keys/certificates\",\n specifiedDefaultValue = \"/etc/cas/saml\",\n unspecifiedDefaultValue = \"/etc/cas/saml\",\n optionContext = \"Directory location to hold metadata and relevant keys/certificates\") final String metadataLocation,\n @CliOption(key = {\"entityId\"},\n help = \"Entity ID to use for the generated metadata\",\n specifiedDefaultValue = \"cas.example.org\",\n unspecifiedDefaultValue = \"cas.example.org\",\n optionContext = \"Entity ID to use for the generated metadata\") final String entityId,\n @CliOption(key = {\"hostName\"},\n help = \"CAS server prefix to be used at the IdP host name when generating metadata\",\n specifiedDefaultValue = \"https://cas.example.org/cas\",\n unspecifiedDefaultValue = \"https://cas.example.org/cas\",\n optionContext = \"CAS server prefix to be used at the IdP host name when generating metadata\") final String serverPrefix,\n @CliOption(key = {\"scope\"},\n help = \"Scope to use when generating metadata\",\n specifiedDefaultValue = \"example.org\",\n unspecifiedDefaultValue = \"example.org\",\n optionContext = \"Scope to use when generating metadata\") final String scope,\n @CliOption(key = {\"force\"},\n specifiedDefaultValue = \"false\",\n unspecifiedDefaultValue = \"false\",\n help = \"Force metadata generation, disregarding anything that might already be available at the specified location\",\n optionContext = \"Force metadata generation, disregarding anything that might already be available at the specified location\") final boolean force) {\n\n final SamlIdPMetadataLocator locator = new DefaultSamlIdPMetadataLocator(new File(metadataLocation));\n final DefaultSamlIdPCertificateAndKeyWriter writer = new DefaultSamlIdPCertificateAndKeyWriter();\n final FileSystemSamlIdPMetadataGenerator generator = new FileSystemSamlIdPMetadataGenerator(entityId, this.resourceLoader,\n serverPrefix, scope, locator, writer);\n\n boolean generateMetadata = true;\n if (!locator.exists()) {\n LOGGER.warn(\"Metadata artifacts are available at the specified location: [{}]\", metadataLocation);\n generateMetadata = force;\n }\n if (generateMetadata) {\n generator.initialize();\n generator.generate();\n LOGGER.info(\"Generated metadata is available at [{}]\", locator.getMetadata());\n } else {\n LOGGER.info(\"No metadata was generated; it might already exist at the specified path\");\n }\n }",
"public static File getScmDbDir(ConfigurationSource conf) {\n File metadataDir = getDirectoryFromConfig(conf,\n ScmConfigKeys.OZONE_SCM_DB_DIRS, \"SCM\");\n if (metadataDir != null) {\n return metadataDir;\n }\n\n LOG.warn(\"{} is not configured. We recommend adding this setting. \" +\n \"Falling back to {} instead.\",\n ScmConfigKeys.OZONE_SCM_DB_DIRS, HddsConfigKeys.OZONE_METADATA_DIRS);\n return getOzoneMetaDirPath(conf);\n }",
"@Override\n public MethodOutcome mkdirsRootOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_TRUE);\n }",
"private static void initializeNewOmMetadataManager(\n File omDbDir)\n throws IOException {\n omConfiguration = new OzoneConfiguration();\n omConfiguration.set(OZONE_OM_DB_DIRS,\n omDbDir.getAbsolutePath());\n omConfiguration.set(OMConfigKeys\n .OZONE_OM_ENABLE_FILESYSTEM_PATHS, \"true\");\n omMetadataManager = new OmMetadataManagerImpl(\n omConfiguration, null);\n\n String volumeKey = omMetadataManager.getVolumeKey(VOL);\n OmVolumeArgs args =\n OmVolumeArgs.newBuilder()\n .setObjectID(VOL_OBJECT_ID)\n .setVolume(VOL)\n .setAdminName(TEST_USER)\n .setOwnerName(TEST_USER)\n .build();\n omMetadataManager.getVolumeTable().put(volumeKey, args);\n\n OmBucketInfo bucketInfo1 = OmBucketInfo.newBuilder()\n .setVolumeName(VOL)\n .setBucketName(BUCKET_ONE)\n .setObjectID(BUCKET_ONE_OBJECT_ID)\n .setBucketLayout(getFSOBucketLayout())\n .build();\n\n OmBucketInfo bucketInfo2 = OmBucketInfo.newBuilder()\n .setVolumeName(VOL)\n .setBucketName(BUCKET_TWO)\n .setObjectID(BUCKET_TWO_OBJECT_ID)\n .setBucketLayout(getLegacyBucketLayout())\n .build();\n\n OmBucketInfo bucketInfo3 = OmBucketInfo.newBuilder()\n .setVolumeName(VOL)\n .setBucketName(BUCKET_THREE)\n .setObjectID(BUCKET_THREE_OBJECT_ID)\n .setBucketLayout(getOBSBucketLayout())\n .build();\n\n String bucketKey = omMetadataManager.getBucketKey(\n bucketInfo1.getVolumeName(), bucketInfo1.getBucketName());\n String bucketKey2 = omMetadataManager.getBucketKey(\n bucketInfo2.getVolumeName(), bucketInfo2.getBucketName());\n String bucketKey3 = omMetadataManager.getBucketKey(\n bucketInfo3.getVolumeName(), bucketInfo3.getBucketName());\n\n omMetadataManager.getBucketTable().put(bucketKey, bucketInfo1);\n omMetadataManager.getBucketTable().put(bucketKey2, bucketInfo2);\n omMetadataManager.getBucketTable().put(bucketKey3, bucketInfo3);\n }",
"private void createEssentialDirs() throws TNotFoundEx{\n\t\tFileUtil fT = new FileUtil();\n\t\tfT.createDirOnDevice(TicklerVars.sdCardPath);\n\t\tif (!fT.isExistOnDevice(TicklerVars.sdCardPath))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.sdCardPath+\". Check your configurations in Tickler.conf file\");\n\t\tfT.createDirOnHost(TicklerVars.appTickDir);\n\t\tif (!fT.isExist(TicklerVars.appTickDir))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.appTickDir+\". Check your configurations in Tickler.conf file\");\n\t\t\n\t}",
"public String getDirectory() {\n return directoryProperty().get();\n }",
"abstract public String getImageResourcesDir();",
"public DirectoryFileLocator() {\r\n this(System.getProperty(\"user.dir\"));\r\n }",
"public static void checkFolder(String dir){\n java.nio.file.Path checkFolderPath = java.nio.file.Paths.get(dir+\"/data\");\n boolean folderExists = java.nio.file.Files.exists(checkFolderPath);\n //folder not exists, create one\n if(!folderExists) {\n new File(dir+\"/data\").mkdirs();\n }\n }",
"public Path getRemoteRepositoryBaseDir();",
"public Directory(String nm){\r\n\t\tsuper();\r\n\t}",
"String getDir();",
"private File getStorageDir(String albumName) {\n File file = null;\n try {\n file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+\"system app\"+File.separator+albumName);\n if (!file.mkdirs()) {\n Log.e(TAG, \"Directory not created\");\n }\n }catch (Exception e){\n Log.e(TAG, \"getPublicAlbumStorageDir: \",e );\n }\n\n return file;\n }",
"private static boolean checkDirectory() {\n File baseDir = new File(Environment.getExternalStorageDirectory(), \"Andevindo\");\n mImageDir = new File(baseDir.getPath() + File.separator + \"Images\");\n mVideoDir = new File(baseDir.getPath() + File.separator + \"Videos\");\n mMiscDir = new File(baseDir.getPath() + File.separator + \"Misc\");\n if (!baseDir.exists()) {\n if (!baseDir.mkdirs()) {\n\n return false;\n } else {\n\n\n if (!mImageDir.exists()) {\n if (!mImageDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mVideoDir.exists()) {\n if (!mVideoDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mMiscDir.exists()) {\n if (!mMiscDir.mkdirs()) {\n\n return false;\n }\n }\n\n }\n }\n return true;\n }",
"protected File createMetadataFile( ContinuumProjectBuildingResult result, URL metadata, String username,\n String password )\n {\n try\n {\n return createMetadataFile( metadata, username, password, result );\n }\n catch ( FileNotFoundException e )\n {\n getLogger().info( \"URL not found: \" + metadata, e );\n result.addError( ContinuumProjectBuildingResult.ERROR_POM_NOT_FOUND );\n }\n catch ( MalformedURLException e )\n {\n getLogger().info( \"Malformed URL: \" + metadata, e );\n result.addError( ContinuumProjectBuildingResult.ERROR_MALFORMED_URL );\n }\n catch ( URISyntaxException e )\n {\n getLogger().info( \"Malformed URL: \" + metadata, e );\n result.addError( ContinuumProjectBuildingResult.ERROR_MALFORMED_URL );\n } \n catch ( UnknownHostException e )\n {\n getLogger().info( \"Unknown host: \" + metadata, e );\n result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN_HOST );\n }\n catch ( IOException e )\n {\n getLogger().warn( \"Could not download the URL: \" + metadata, e );\n result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );\n }\n catch ( HttpException e )\n {\n getLogger().warn( \"Could not download the URL: \" + metadata, e );\n result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );\n } \n return null;\n }",
"private String generateMetadata() {\n ServiceMetadata metadata = new ServiceMetadata();\n\n // Populate metadata using setX() methods\n metadata.setName(this.getClass().getName());\n metadata.setAllow(Discriminators.Uri.ANY);\n metadata.setDescription(\"Mallet Topic Modeling Trainer\");\n metadata.setVersion(\"1.0.0-SNAPSHOT\");\n metadata.setVendor(\"http://www.lappsgrid.org\");\n metadata.setLicense(Discriminators.Uri.APACHE2);\n\n // JSON for input information\n IOSpecification requires = new IOSpecification();\n requires.addFormat(Discriminators.Uri.TEXT); // Plain text (form)\n requires.addLanguage(\"en\"); // Source language\n\n // JSON for output information\n IOSpecification produces = new IOSpecification();\n produces.addFormat(Discriminators.Uri.LAPPS); // LIF (form)\n produces.addLanguage(\"en\"); // Target language\n\n // Embed I/O metadata JSON objects\n metadata.setRequires(requires);\n metadata.setProduces(produces);\n\n // Serialize the metadata into LEDS string and return\n Data<ServiceMetadata> data = new Data<>(Discriminators.Uri.META, metadata);\n return data.asPrettyJson();\n }",
"public static Path locateHarvesterLogosDir(ServiceContext context) {\n ServletContext servletContext = null;\n if (context.getServlet() != null) {\n servletContext = context.getServlet().getServletContext();\n }\n return locateHarvesterLogosDir(servletContext,\n context.getApplicationContext(), context.getAppPath());\n }",
"public int mkdirs(String callingPkg, String path) throws RemoteException;",
"public interface MetadataService extends CrudService<Metadata, Integer>{\n\tMetadata createContentOfMetadata(Metadata metadata);\n}",
"private boolean isMetadataFileExist(String idpName, String metadata) {\n\n return StringUtils.isNotEmpty(idpName) && StringUtils.isNotEmpty(metadata);\n }"
]
| [
"0.5902124",
"0.5843253",
"0.56922114",
"0.568207",
"0.5616287",
"0.5390659",
"0.5362495",
"0.5342333",
"0.53312415",
"0.5289763",
"0.5281669",
"0.52684313",
"0.5232309",
"0.52306014",
"0.5227712",
"0.52035975",
"0.5192026",
"0.51340216",
"0.5129042",
"0.51287836",
"0.51239395",
"0.5078147",
"0.50574684",
"0.5055272",
"0.50057065",
"0.4994594",
"0.4982039",
"0.49801698",
"0.49633658",
"0.49592823",
"0.49566528",
"0.49489298",
"0.49441352",
"0.49299398",
"0.4926737",
"0.49262604",
"0.49252644",
"0.492113",
"0.4913017",
"0.49101084",
"0.49074584",
"0.4904292",
"0.48977777",
"0.4895299",
"0.48608348",
"0.48604375",
"0.4833749",
"0.48286128",
"0.48276865",
"0.4795645",
"0.47945184",
"0.47896275",
"0.47891685",
"0.47867337",
"0.4785136",
"0.47809672",
"0.47746766",
"0.47657323",
"0.47617298",
"0.4752605",
"0.4750645",
"0.47471073",
"0.4742103",
"0.47410053",
"0.47404087",
"0.4729969",
"0.47276258",
"0.47172397",
"0.47141105",
"0.47119385",
"0.46940628",
"0.46924776",
"0.46883377",
"0.46818423",
"0.46745554",
"0.4671054",
"0.46690628",
"0.46656114",
"0.46613333",
"0.4651549",
"0.464372",
"0.46432367",
"0.46430895",
"0.46392745",
"0.4632812",
"0.462827",
"0.46111494",
"0.46062255",
"0.46042717",
"0.45984232",
"0.4597833",
"0.45961133",
"0.4594345",
"0.45854086",
"0.45829707",
"0.45798343",
"0.45787024",
"0.45700362",
"0.45692796",
"0.45667794",
"0.45591184"
]
| 0.0 | -1 |
POST /forumroommessages : Create a new forumRoomMessage. | @PostMapping("/forum/messages")
@Timed
public ResponseEntity<ForumRoomMessage> createForumRoomMessage(@Valid @RequestBody ForumMessageDto fm)
throws URISyntaxException {
LOGGER.debug("REST request to save ForumRoomMessage : {}");
ForumRoomMessage forumRoomMessage = new ForumRoomMessage();
forumRoomMessage.setMessage(fm.getMessage());
if (forumRoomMessage.getId() != null) {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert("forumRoomMessage", "idexists",
"A new forumRoomMessage cannot already have an ID")).body(null);
}
if (forumRoomMessage.getMessageDatetime() == null) {
forumRoomMessage.setMessageDatetime(ZonedDateTime.now());
}
if (forumRoomMessage.getUser() == null) {
User user = userRepository.findByUserIsCurrentUser();
forumRoomMessage.setUser(user);
}
ForumRoom forumRoom = forumRoomRepository.findOne(fm.getCourseID());
forumRoomMessage.setForumRoom(forumRoom);
ForumRoomMessage result = forumRoomMessageRepository.save(forumRoomMessage);
return ResponseEntity.created(new URI("/api/forum-room-messages/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert("forumRoom", result.getId().toString())).body(result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PostMapping(\"/rooms\")\n public Room createRoom (\n @Valid\n @RequestBody Room room){\n return roomRepository.save(room);\n }",
"@PostMapping(\"/chat-rooms\")\n public ResponseEntity<ChatRoom> createChatRoom(@RequestBody ChatRoom chatRoom) throws URISyntaxException {\n log.debug(\"REST request to save ChatRoom : {}\", chatRoom);\n if (chatRoom.getId() != null) {\n throw new BadRequestAlertException(\"A new chatRoom cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n ChatRoom result = chatRoomRepository.save(chatRoom);\n return ResponseEntity.created(new URI(\"/api/chat-rooms/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PUT()\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n @Path(\"/CreateMessage\")\n public Response createMessage(@FormParam(\"username\") String username,\n @FormParam(\"password\") String password,\n @FormParam(\"gson_message\") String msgJsonString)\n {\n Gson gson = new Gson();\n DTO_Message messageToCreate = gson.fromJson(msgJsonString, DTO_Message.class);\n System.out.println(messageToCreate.getTitle()+\" \"+messageToCreate.getContent()+\" \"+messageToCreate.getToUsername() +\" \"+messageToCreate.getFromId()+\" \"+messageToCreate.isRead());\n\n DB_Manager databaseManager = new DB_Manager();\n DTO_User user = databaseManager.getUserByNameAndPassword(username, password);\n if(user !=null)\n {\n boolean logList = databaseManager.createMessageByUser(messageToCreate, user);\n if(logList)\n {\n return Response.status(200).entity(RESULT_SUCCESS).build();\n }\n }\n return Response.status(403).entity(RESULT_FAILURE).build();\n\n }",
"public void createMessage(int tid, int uid, int rank, String detail);",
"@OnKeyword(value = \"message\")\n\tpublic void createMessage(TeamchatAPI api) throws Exception {\n\t\tif (isBasecampnotPresent(api)) {\n\t\t\treturn;\n\t\t}\n\t\t// populating with project name list\n\t\tField f = api.objects().select().name(\"project\").label(\"Project\");\n\t\tfor (Project project : bah.getActiveProjects()) {\n\t\t\tf.addOption(project.getName() + \" | \" + project.getId());\n\t\t}\n\t\t// set topic type to message\n\t\ttopicType = \"Message\";\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get message(s) from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select Project\")\n\t\t\t\t\t\t.alias(\"createmessage2\")));\n\t}",
"Message newMessage(Uuid id, Uuid author, Uuid conversation, String body, Time creationTime);",
"@POST\n @Path(\"/{groupId}\")\n public Response createMessage(Message m,\n @PathParam(\"groupId\") long groupId,\n @QueryParam(\"actorId\") String actorId,\n @Auth Boolean isAuthenticated) throws URISyntaxException, SQLException {\n\n //check group user membership before allowing to post\n if(!isAuthorized(actorId, groupId)) {\n return Response.status(Response.Status.FORBIDDEN).build();\n }\n\n Handle handle = jdbi.open();\n handle.getConnection().setAutoCommit(false);\n try {\n handle.begin();\n MessageDAO mdao = handle.attach(MessageDAO.class);\n //create message and mark it as read for the author\n long messageId = mdao.createMessage(groupId, actorId, m.getContent());\n mdao.createMessageUser(messageId, actorId);\n handle.commit();\n return Response.created(new URI(String.valueOf(messageId))).build();\n } catch (Exception e) {\n handle.rollback();\n e.printStackTrace();\n return Response.serverError().build();\n }\n }",
"public ChatRoom createRoom(String room) {\r\n ChatRoom chatRoom = new ChatRoom(serviceAddress.withLocal(room), null, xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n return chatRoom;\r\n }",
"@PostMapping(\"/chat-messages\")\n @Timed\n public ResponseEntity<ChatMessage> createChatMessage(@RequestBody ChatMessage chatMessage) throws URISyntaxException {\n log.debug(\"REST request to save ChatMessage : {}\", chatMessage);\n if (chatMessage.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new chatMessage cannot already have an ID\")).body(null);\n }\n ChatMessage result = chatMessageRepository.save(chatMessage);\n return ResponseEntity.created(new URI(\"/api/chat-messages/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@RequestMapping(value = \"/Reservation/{reservation_reservationId}/room\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic Room newReservationRoom(@PathVariable Integer reservation_reservationId, @RequestBody Room room) {\n\t\treservationService.saveReservationRoom(reservation_reservationId, room);\n\t\treturn roomDAO.findRoomByPrimaryKey(room.getRoomId());\n\t}",
"@PostMapping(\"/rooms/create\")\n public ResponseEntity create(HttpServletRequest req, HttpServletResponse res,\n @RequestBody String roomDetails) throws JsonProcessingException {\n roomService.create(roomDetails);\n return ResponseEntity.status(200).build();\n }",
"@RequestMapping(value=\"/room/form\", method=RequestMethod.POST)\r\n\tpublic String postRoom(@Valid @ModelAttribute(\"room\") Room room,\r\n\t\t\tBindingResult bindingResult, Model model) {\r\n\t\tthis.roomValidator.validate(room, bindingResult);\r\n\t\tif(!bindingResult.hasErrors()) {\r\n\t\t\tmodel.addAttribute(\"room\", this.roomService.save(room));\r\n\t\t\treturn \"roomCreated\";\r\n\t\t}\r\n\t\treturn \"roomForm\";\r\n\t}",
"@PutMapping(\"/chat/{id}\")\n public ChatBean addMessage(@PathVariable(value = \"id\") Long chatId, @Valid @RequestBody MessageBean messageDetails) {\n ChatBean chat = chatBeanRepository.findById(chatId).get();\n chat.addMessage(messageDetails.getId());\n ChatBean updatedChat = chatBeanRepository.save(chat);\n return updatedChat;\n }",
"public abstract Message createMessage(String uid) throws MessagingException;",
"@DeleteMapping(\"/forum/message/{id}\")\n\t@Timed\n\tpublic ResponseEntity<Void> deleteForumRoomMessage(@PathVariable Long id) {\n\t\tLOGGER.debug(\"REST request to delete ForumRoomMessage : {}\", id);\n\n\t\tUser user = userRepository.findByUserIsCurrentUser();\n\t\tForumRoomMessage message = forumRoomMessageRepository.findOne(id);\n\t\tif (\"admin\".contentEquals(user.getLogin()) || message.getUser().equals(user)) {\n\t\t\tforumRoomMessageRepository.delete(id);\n\t\t}\n\n\t\treturn ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"forumRoomMessage\", id.toString()))\n\t\t\t\t.build();\n\t}",
"@OnAlias(value = \"createmessage2\")\n\tpublic void createMessage2(TeamchatAPI api) throws Exception {\n\t\t// populating with message name list\n\t\t// get option name\n\t\tString[] project = api.context().currentReply().getField(\"project\")\n\t\t\t\t.split(\"\\\\|\");\n\t\t// get topic id from option name\n\t\tprojectId = project[(project.length - 1)].trim();\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Write your message\")\n\t\t\t\t\t\t.setReplyScreen(\n\t\t\t\t\t\t\t\tapi.objects()\n\t\t\t\t\t\t\t\t\t\t.form()\n\t\t\t\t\t\t\t\t\t\t.addField(\n\t\t\t\t\t\t\t\t\t\t\t\tapi.objects().input()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.name(\"subject\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.label(\"Title\"))\n\t\t\t\t\t\t\t\t\t\t.addField(\n\t\t\t\t\t\t\t\t\t\t\t\tapi.objects().input()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.name(\"content\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.label(\"Message\")))\n\t\t\t\t\t\t.setReplyLabel(\"Send\").alias(\"createmessage3\")));\n\t}",
"@Secured(\"ROLE_SUBSCRIBED\")\n @RequestMapping(value = \"/{id}/add-message\", method = RequestMethod.POST)\n public String addMessageToTrip(@AuthenticationPrincipal User _user,\n @PathVariable(\"id\") Integer _idTrip,\n @RequestParam(\"message\") String _message,\n HttpServletRequest request,\n ModelAndView modelAndView)\n {\n try {\n request.setCharacterEncoding(\"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n if (!_message.contentEquals(\"\"))\n {\n _message = _message.replaceAll(\"[\\r\\n]+\", \"\\n\");\n _message = _message.replaceAll(\"\\n\", \"<br />\");\n\n messageService.create(new Message(_message, tripService.findById(_idTrip), _user));\n }\n\n return \"redirect:/trips/\" + _idTrip + \"#messagesList\";\n }",
"long sendMessage(int roomId, String message) throws RoomNotFoundException, RoomPermissionException, IOException;",
"@PostMapping(\"/chat\")\n public ChatBean createChat(@Valid @RequestBody ChatBean chat) {\n return chatBeanRepository.save(chat);\n }",
"@RequestMapping(method = RequestMethod.POST)\n public ResponseEntity<?> addGameRoom(@RequestBody Game gameRoom) {\n try {\n ls.addGameRoom(gameRoom);\n return new ResponseEntity<>(HttpStatus.CREATED);\n } catch (LacmanPersistenceException ex) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, ex);\n return new ResponseEntity<>(ex.getMessage(), HttpStatus.FORBIDDEN);\n }\n }",
"@POST\n @Path(\"/{groupId}/{messageId}\")\n public Response createMessageUser(@PathParam(\"groupId\") long groupId,\n @PathParam(\"messageId\") long messageId,\n @QueryParam(\"actorId\") String actorId,\n @Auth Boolean isAuthenticated) {\n\n //check group user membership before allowing to mark messages as read\n if(!isAuthorized(actorId, groupId)) {\n return Response.status(Response.Status.FORBIDDEN).build();\n }\n messageDAO.createMessageUser(messageId, actorId);\n return Response.ok().build();\n }",
"public Room createRoom(Room room);",
"public void createRoom(String roomHost, String roomName) throws IOException {\n ChatRoom newRoom = new ChatRoom(roomHost, roomName);\n chatRooms.add(newRoom);\n }",
"@RequestMapping(\"/post\")\n public String createPost(Model model) {\n if(!model.containsAttribute(\"message\")){\n model.addAttribute(\"message\", new Message());\n }\n\n return \"form\";\n }",
"public void writeUserMessage(String room, String name, String message) {\n ((GroupChatPanel)grouptabs.get(room)).writeUserMessage(name,message);\n }",
"@PostMapping(path = \"/rooms\")\n public ResponseEntity<Room> generateNewRoom() {\n Room newRoom = roomService.generateNewRoom();\n return new ResponseEntity<>(newRoom, HttpStatus.CREATED);\n }",
"@PostMapping(\"/messages\")\n\t@ResponseStatus(HttpStatus.CREATED)\n\tResponseEntity<?> newMessage(@RequestBody @Valid Message newMessage) throws URISyntaxException {\n\n\t\tResource<Message> resource = messageAssembler.toResource(messagesService.addMessage(newMessage));\n\n\t\treturn ResponseEntity.created(new URI(resource.getId().expand().getHref())).body(resource);\n\t}",
"public abstract void newChatMembersMessage(Message m);",
"RoomModel createRoomModel(RoomModel roomModel);",
"@POST\n\t@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\t@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n\t@Path(\"/{userName}\")\n\tpublic Response saveWallMessage(@PathParam(\"userName\") String userName, Message message)\n\t{\n\t\tLog.enter(userName, message);\n\t\tMessage resp = new Message();\n\t\tMessagePO po = new MessagePO();\n\t\ttry\n\t\t{\n\t\t\tIMessageDAO dao = DAOFactory.getInstance().getMessageDAO();\n\t\t\tpo = ConverterUtils.convert(message);\n\t\t\tpo.setMessageType(\"WALL\");\n\t\t\tpo.setAuthor(userName);\n\t\t\tpo.setTarget(userName);\n\t\t\tdao.save(po);\n\t\t\tresp = ConverterUtils.convert(po);\n\t\t\tSystem.out.println(\"@@@@@@@@@@@@@@@@@@@@@\"+resp.getAuthor()+\";\"+resp.getTarget());\n\t\t} catch (Exception e) {\n\t\t\thandleException(e); \n\t\t} finally {\n\t\t\tLog.exit();\n\t\t}\n\t\t\n\t\treturn created(resp);\n\t}",
"public void addRoom(Chatroom room){\n\n }",
"@PostMapping(value = \"/all/messages\", consumes = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity postMessage(@RequestBody Message message) {\n String messageId = UUID.randomUUID().toString();\n message.setMessageId(messageId);\n message.setDateTime(LocalDateTime.now());\n\n // save message in all data sources\n postgresDataService.saveMessage(message);\n mysqlDataService.saveMessage(message);\n return ResponseEntity.status(HttpStatus.CREATED).body(message);\n }",
"@RequestMapping(value=\"/create\", \n\t\t\tmethod=RequestMethod.POST, \n\t\t\theaders=\"Accept=application/json\")\n\t@ResponseBody\n\tpublic ResponseEntity<String> create(final @RequestBody String messageJson) {\n\t\t\n\t\tfinal LogMessage messageToSave = LogMessage.fromJsonToLogMessage(messageJson);\n\t\t\n\t\t//save the message\n\t\tfinal PersistedResult<LogMessage> result = logMessageService.save(messageToSave);\n\t\t\n\t\t//if does not save return bad request to client\n\t\tif(result.getPresistingErrorMessages().size()>0)\n\t\t\treturn new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\n\t\t\n\t\t//otherwise return success\n\t\treturn new ResponseEntity<String>(HttpStatus.CREATED);\n\t}",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/{recipient_id}/messages\")\n Call<ChatMessageResource> postUserMessage(\n @retrofit2.http.Path(\"recipient_id\") Integer recipientId, @retrofit2.http.Body ChatMessageRequest chatMessageRequest\n );",
"@Override\r\n\tpublic void addMessage(String ChatMessageModel) {\n\t\t\r\n\t}",
"public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }",
"public Result createRoom() {\n\n DynamicForm dynamicForm = Form.form().bindFromRequest();\n String roomType = dynamicForm.get(\"roomType\");\n Double price = Double.parseDouble(dynamicForm.get(\"price\"));\n int bedCount = Integer.parseInt(dynamicForm.get(\"beds\"));\n String wifi = dynamicForm.get(\"wifi\");\n String smoking = dynamicForm.get(\"smoking\");\n\n RoomType roomTypeObj = new RoomType(roomType, price, bedCount, wifi, smoking);\n\n if (dynamicForm.get(\"AddRoomType\") != null) {\n\n Ebean.save(roomTypeObj);\n String message = \"New Room type is created Successfully\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n } else{\n\n String message = \"Failed to create a new Room type\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n\n }\n\n\n\n }",
"public static synchronized void createMessage(MessageModel message, String parentMessageId) throws MessageException, MongoException, SQLException {\n\t\t// Verify the message parameters\n\t\tboolean valid = true;\n\t\tStringBuilder errorMessage = new StringBuilder();\n\t\t\n\t\tif(message.getMessageText() == null || !Security.isStringNotEmpty(message.getMessageText())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message text : \" + message.getMessageText());\n\t\t}\n\t\tif(message.getMessageBoardName() == null || !Security.isValidBoardName(message.getMessageBoardName())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message board name : \" + message.getMessageBoardName());\n\t\t}\n\t\tif(message.getMessagePosterId() == null || !Security.isValidUserId(message.getMessagePosterId())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message poster id : \" + message.getMessagePosterId());\n\t\t}\n\t\tif(message.getMessageDate() == null) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message date : null\");\n\t\t}\n\t\t\n\t\t// If there is an error, throw an error\n\t\tif(!valid) {\n\t\t\t\n\t\t\tthrow new MessageException(errorMessage.toString());\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// Escape the HTML special characters\n\t\t\tmessage.setMessageText(Security.htmlEncode(message.getMessageText()));\n\t\t\tmessage.setMessageBoardName(Security.htmlEncode(message.getMessageBoardName()));\n\t\t\t\n\t\t\t// Get message ID dynamically\n\t\t\tif(parentMessageId != null && !parentMessageId.equals(\"\")) {\n\t\t\t\t\n\t\t\t\t// Get the message parent\n\t\t\t\tMessageFilter parentFilter = new MessageFilter();\n\t\t\t\tparentFilter.addMessageId(parentMessageId);\n\t\t\t\tList<MessageModel> parents = MessageDatabaseManager.getMessage(parentFilter, false, true);\n\t\t\t\tif(parents.size() == 1) {\n\t\t\t\t\t\n\t\t\t\t\tMessageModel parent = parents.get(0);\n\t\t\t\t\tmessage.setMessageId(parent.getNextAnswerId());\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tthrow new MessageException(\"Parent message not found : \" + parentMessageId);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// Get the next root message ID\n\t\t\t\tmessage.setMessageId(MessageDatabaseManager.getNextRootMessageId());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Insert the new message\n\t\t\tMessageDatabaseManager.insertMessage(message);\n\t\t\t\n\t\t}\n\t}",
"public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }",
"private void sendMessage(String content, String room) {\n }",
"public void onGetRoom(GlobalMessage message) {\n JPanel newRoomPanel = new JPanel();\n NewRoomInfo newRoomInfo = (NewRoomInfo)message.getData();\n renderRoom(newRoomInfo.getRoomName(), newRoomPanel);\n roomContainer.add(newRoomPanel, roomListConstraints);\n ++roomListConstraints.gridy;\n roomEntries.put(newRoomInfo.getRoomName(), newRoomPanel);\n\n roomContainer.revalidate();\n roomContainer.repaint();\n }",
"protected void makeRoom(String roomID)\n {\n mChat.child(roomID).child(\"sender1\").setValue(uid1);\n mChat.child(roomID).child(\"sender2\").setValue(uid);\n goToChat(roomID);\n }",
"@POST\r\n\tpublic Response addMessage(Message message,@Context UriInfo uriInfo){\n\t\tMessage newMessage=messageService.addMessage(message); //Create new message\r\n\t\tString newId=String.valueOf(newMessage.getId());\r\n\t\tURI uri=uriInfo.getAbsolutePathBuilder().path(newId).build();//Appends the URI\r\n\t\treturn Response.created(uri)\r\n\t\t\t\t //.status(Status.CREATED) //Returns response code for creation\r\n\t\t\t\t\t .entity(newMessage)\r\n\t\t\t\t\t .build();\r\n\t}",
"@POST\n\t@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\t@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n\t@Path(\"/{userName}\")\n\tpublic Response addPublicMessage(MessageDetail msgDetail) {\n\t\tLog.enter(msgDetail);\n\t\ttry {\n\t\t\tIUserDAO dao = DAOFactory.getInstance().getUserDAO();\n\t\t\tUserPO existingUser = dao.findByName(msgDetail.getFrom_userName());\n\t\t\t\n\t\t\tif (existingUser != null) {\n\t\t\t\tIMessageDetailDAO mdao = DAOFactory.getInstance().getMessageDetailDAO();\n\t\t\t\tMessageDetailPO mpo = new MessageDetailPO();\n\t\t\t\tmpo.setFrom_userId(existingUser.getUserId());\n\t\t\t\tmpo.setTo_userId(0);\n\n\t\t\t\t//\t\t\t\tIf no message found then return \n\t\t\t\tif(msgDetail.getMessage().trim() == \"\")\n\t\t\t\t\t\treturn badRequest();\n\t\t\t\t\n\t\t\t\tmpo.setMessage(msgDetail.getMessage());\n\t\t\t\t//Get Time stamp\n\t\t\t\tDate date= new Date();\n\t\t //getTime() returns current time in milliseconds\n\t\t\t\tlong time = date.getTime();\n\t\t //Passed the milliseconds to constructor of Timestamp class \n\t\t\t\tTimestamp ts = new Timestamp(time);\n\t\t\t\tmpo.setMessage_timestamp(ts);\n//\t\t\t\tmpo.setLocation(msgDetail.getLocation());\n\t\t\t\t\n\t\t\t\tmdao.save(mpo);\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn badRequest();\n\t\t} catch (Exception e) {\n\t\t\thandleException(e);\n\t\t} finally {\n\t\t\tLog.exit();\n\t\t}\n\n\t\treturn ok();\n\t}",
"@PostMapping(\"/new\")\n @ResponseStatus(HttpStatus.CREATED)\n public Boolean newChat(@RequestBody NewChatEvent event) {\n notificationService.notifyAboutNewChat(event.getChatId(), event.getDepartmentId());\n scheduleService.scheduleReassignment(event.getChatId());\n return Boolean.TRUE;\n }",
"@PostMapping(\"/sendMessage\")\r\n public String sendMessage(@ModelAttribute(\"post\") PostDTO postDTO, Model model) {\r\n try {\r\n jdbcTemplate.execute(\"INSERT INTO Posts(Nickname, Message, PostDate)\\n\" +\r\n \"VALUES ('\" + postDTO.getNickname() + \"', '\" + postDTO.getMessage() + \"', '\" +\r\n new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()) + \"')\");\r\n } catch (DataAccessException exception) {\r\n LOGGER.warn(exception.getMessage());\r\n }\r\n return goToForumPage(model);\r\n }",
"@RequestMapping(value = \"\", method = RequestMethod.POST, params = {\"postMessage\"})\n public String processMessages(@RequestParam String message,\n @CookieValue(value = \"loggedInCookie\") String loggedInUserId) {\n int userId = Integer.parseInt(loggedInUserId);\n User thisUser = userDao.findOne(userId);\n Message newMessage = new Message(message);\n newMessage.setAuthor(thisUser);\n\n messageDao.save(newMessage);\n\n String subject = \"New Home Manager message from \" + newMessage.getAuthor().getName();\n String text = newMessage.getMessage();\n mailService.sendToAll(subject, text);\n return \"redirect:/messages\";\n }",
"@Override\n public void onClick(View view) {\n ChatMessage Message = new\n ChatMessage(mMessageEditText.getText().toString(),\n mUsername,\n null, dateAndTime);\n mFirebaseDatabaseReference.child(chatRoomPath)\n .push().setValue(Message);\n mMessageEditText.setText(\"\");\n\n }",
"@OnAlias(value = \"createmessage3\")\n\tpublic void createMessage3(TeamchatAPI api) throws Exception {\n\t\t// populating with message name list\n\t\t// get option name\n\t\tString subject = api.context().currentReply().getField(\"subject\"), content = api\n\t\t\t\t.context().currentReply().getField(\"content\");\n\t\t// posting the message\n\t\tHTTP_Response httpResponse = bah.sendMessage(projectId, subject,\n\t\t\t\tcontent);\n\t\tif ((httpResponse.getResponseCode() == 422)\n\t\t\t\t|| (httpResponse.getResponseCode() == 404)\n\t\t\t\t|| (httpResponse.getResponseCode() == 500)) {\n\t\t\tapi.perform(api\n\t\t\t\t\t.context()\n\t\t\t\t\t.currentRoom()\n\t\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t\t.setQuestionHtml(\"<h3 style=\\\"color:red;\\\">An error occured try again after 5 minutes !</h3>\")));\n\t\t} else {\n\t\t\tString htmlResponse = \"<h3>\"\n\t\t\t\t\t+ subject\n\t\t\t\t\t+ \"</h3>\"\n\t\t\t\t\t+ \"<h4>\"\n\t\t\t\t\t+ content\n\t\t\t\t\t+ \"</h4>\"\n\t\t\t\t\t+ \"<h5 style=\\\"color:blue;\\\">This message was posted successully!</h5>\";\n\t\t\tapi.perform(api.context().currentRoom()\n\t\t\t\t\t.post(new PrimaryChatlet().setQuestionHtml(htmlResponse)));\n\t\t}\n\t}",
"@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testCreateRoomBadResponse() {\n // given\n final CreateRoomRequest createRoomRequest = CreateRoomRequest.builder().name(TEST_ROOM).build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_CREATE_ROOM_COMMAND, createRoomRequest))\n .willReturn(BAD_RESPONSE);\n\n // when\n multiUserChatService.createRoom(TEST_ROOM);\n\n // then\n\n }",
"@Override\n public Room create(RoomResponseDTO roomResponseDTO) {\n return roomRepository.save(new Room(\n roomResponseDTO.getClassroomNumber()\n ));\n }",
"public ChatRequest(String message)\r\n\t{\r\n\t\tthis.message = message;\r\n\t}",
"public Message createMessage()\n {\n return messageFactory.createMessage();\n }",
"private void createMessageArea() {\n\t\tthis.message = new JTextArea(\"Message\");\n\t\tthis.message.setRows(1);\n\t\tthis.message.setBorder(BorderFactory.createTitledBorder(\"Message\"));\n\t\tthis.message.setLineWrap(true);\n\t\tthis.message.setWrapStyleWord(true);\n\n\t\t// maximum lenght of the message\n\t\tfinal int MAX_LENGTH = 140;\n\t\tfinal int MAX_NEWLN = 4;\n\t\tthis.message.setDocument(new PlainDocument() {\n\t\t\t@Override\n\t\t\tpublic void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\n\t\t\t\tint lines = message.getText().split(\"\\r\\n|\\r|\\n\", -1).length;\n\t\t\t\tif (str == null || message.getText().length() >= MAX_LENGTH || lines >= MAX_NEWLN) {\n\t \treturn;\n\t \t}\n\t\t\t\tsuper.insertString(offs, str, a);\n\t \t}\n\t\t});\n\t}",
"@POST\n\t@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\t@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n\t@Path(\"/{sendingUserName}/{receivingUserName}\")\n\tpublic Response sendChatMessage(@PathParam(\"sendingUserName\") String sendinguserName,\n\t\t\t@PathParam(\"receivingUserName\") String receivinguserName,\n\t\t\tMessageDetail chatmessage) {\n\t\t\n\t\tLog.enter(sendinguserName,receivinguserName,chatmessage);\n\t\tMessageDetail resp = new MessageDetail();\n\t\t\n\t\ttry {\n\t\t\tUserPO sendpo = DAOFactory.getInstance().getUserDAO().findByName(sendinguserName);\n\t\t\tUserPO receivepo = DAOFactory.getInstance().getUserDAO().findByName(receivinguserName);\n\t\t\tif(sendpo == null || receivepo == null){\n\t\t\t\treturn badRequest();\n\t\t\t}\n\n\t\t\tIMessageDetailDAO mdao = DAOFactory.getInstance().getMessageDetailDAO();\n\t\t\tjava.util.Date date= new java.util.Date();\n\t\t\tTimestamp timeStmp = new Timestamp(date.getTime());\n\t\t\t\n\t\t\tMessageDetailPO mpo = new MessageDetailPO();\n\t\t\tmpo.setFrom_userId(sendpo.getUserId());\n\t\t\tmpo.setTo_userId(receivepo.getUserId());\n\t\t\tmpo.setMessage(chatmessage.getMessage());\n\t\t\tmpo.setMessage_timestamp(timeStmp);\n//\t\t\tmpo.setLocation(\"\");\n\t\t\tmdao.save(mpo);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\thandleException(e);\n\t\t} finally {\n\t\t\tLog.exit();\n\t\t}\n\t\t\n\t\treturn created(resp);\n\t}",
"private void saveOrUpdateNewMessageRealm(_Message message) {\r\n\r\n //realm required to submit from separate thread. IF I do operation in ui thread,\r\n //I need .allowQueriesOnUiThread(true), that's no need in my case\r\n executor.execute(() -> {\r\n // use Realm on background thread\r\n _RealmController.insertOrUpdateNewMessage(message);\r\n });\r\n }",
"private void sendTextMessage(String message) {\n if ( message == null || message.length() < 1 ) {\n return;\n }\n DateFormat localDateFormat = Constant.getServerDateFormat();\n Chat chat = new Chat(0,tournamentID,clubID,receiverID, selfID,self.getDisplayName(),\n Constant.MESSAGE_TYPE_TEXT,message,localDateFormat.format(new Date()));\n RequestAction actionPostChatText = new RequestAction() {\n @Override\n public void actOnPre() {\n et_message.setText(\"\");\n }\n\n @Override\n public void actOnPost(int responseCode, String response) {\n if ( responseCode == 201 ) {\n Log.d(TAG,\"Message sent successfully!\");\n }\n }\n };\n String url;\n if ( tournament != null ) { // tournament chat\n url = UrlHelper.urlChatByTournament(tournament.id,club.id);\n } else if ( club != null ) {// club chat\n url = UrlHelper.urlChatByClub(club.id);\n } else if ( receiver != null ) { // private chat\n url = UrlHelper.urlPrivateChat(receiver.getId());\n } else {\n Toast.makeText(getContext(), \"Unknown error!\", Toast.LENGTH_SHORT).show();\n Log.e(TAG,\"Unspecified chat type.\");\n return;\n }\n RequestHelper.sendPostRequest(url,chat.toJson(),actionPostChatText);\n }",
"public void message_add(message message){\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_MESSAGES_ID, message.id_get());\n \tvalues.put(KEY_MESSAGES_FROM, message.from_get());\n \tvalues.put(KEY_MESSAGES_TIME, message.time_get());\n \tvalues.put(KEY_MESSAGES_TEXT, message.text_get());\n \tvalues.put(KEY_MESSAGES_URI, message.uri_get_string());\n\n \t// 3. insert\n \tdb.insert(TABLE_MESSAGES, // table\n \t\t\tnull, //nullColumnHack\n \t\t\tvalues); // key/value -> keys = column names/ values = column values\n\n \t// 4. close\n \tdb.close();\n }",
"@Override\n public void handleTextMessage(WebSocketSession client, TextMessage message) throws IOException {\n System.out.println(\"connecting\");\n String [] parseMessage = message.getPayload().split(\" \",2);\n boolean found = false;\n System.out.println(parseMessage[0]);\n System.out.println(parseMessage[0].equals(\"join\"));\n if (parseMessage[0].equals(\"join\")) {\n System.out.println(\"joinning\");\n for (Room room: rooms) {\n System.out.println(room.name);\n if (room.name.equals(parseMessage[1])) {\n System.out.println(\"room found\");\n room.addClient(client);\n\n found = true;\n }\n }\n if (found == false) {\n System.out.println(\"making new room\");\n Room newRoom = new Room(parseMessage[1], client);\n rooms.add(newRoom);\n }\n TextMessage newMessage;\n String json = \"{\\\"user\\\" : \\\"\" + parseMessage[0] + \"\\\", \\\"message\\\": \\\"\"\n + parseMessage[1] + \"\\\"}\";\n newMessage = new TextMessage(json);\n client.sendMessage(newMessage);\n\n }else{\n for (Room room: rooms) {\n if(room.clientInRoom(client))\n System.out.println(\"send message\");\n room.forwardMessage(message);\n }\n\n\n }\n }",
"private JSONObject postRequestWithOkHttp(String msg) {\n JSONObject json = null;\n\n RequestBody requestBody = new FormBody.Builder()\n .add(\"chatroom_id\", chatroom_id)\n .add(\"user_id\", \"1155080901\")\n .add(\"name\", name)\n .add(\"message\", msg)\n .build();\n String url = \"http://13.112.156.96/api/asgn3/send_message\";\n OkHttpClient client = new OkHttpClient();\n Log.d(POST, url);\n Request request = new Request.Builder()\n .url(url)\n .post(requestBody)\n .build();\n try {\n Response response = client.newCall(request).execute();\n String responseData = response.body().string();\n json = new JSONObject(responseData);\n Log.d(POST, String.valueOf(json.get(\"status\")));\n } catch (Exception e) {\n e.printStackTrace();\n Log.d(POST, \"POST request error\");\n }\n return json;\n }",
"private Message createMessage(final JSONObject jsonMessageSet) {\n\n final JSONArray messages = (JSONArray) jsonMessageSet.get(\"message\");\n final JSONObject jsonMessage = getRandomJsonObject(messages);\n\n final Message message = new Message();\n message.setMessageId((Integer) jsonMessage.get(\"messageId\"));\n message.setText((String) jsonMessage.get(\"text\"));\n\n final Integer tipSetId = (Integer) jsonMessage.get(\"tipSetId\");\n if (tipSetId != null) {\n message.setTipSetId(tipSetId);\n }\n\n return message;\n }",
"private void createMessage(String msg) {\n\t\tmessage = new GLabel(msg);\n\t\tmessage.setFont(MESSAGE_FONT);\n\t\tadd(message, getWidth() / 2 - message.getWidth() / 2, getHeight()\n\t\t\t\t- BOTTOM_MESSAGE_MARGIN - message.getHeight());\n\t}",
"void onRoomMessage(String roomName, EcologyMessage message) {\n message.addArgument(roomName);\n message.addArgument(ROOM_MESSAGE_ID);\n message.setSource(getMyDeviceId());\n sendConnectorMessage(message);\n }",
"public Message() {}",
"public Message() {}",
"public void postMessage(Message message){\n messageRepository.addMessage(message);\n }",
"public void addToMessageBoard(Message message) throws IOException {\n\t\tmessages.add(message);\n\t\tFileWriter writer = new FileWriter(filePath, true);\n\t\twriter.append(\"\\n\");\n\t\twriter.append(message.getMessageTitle());\n\t\twriter.append(\"\\t\");\n\t\twriter.append(message.getMessageDescription());\n\t\twriter.close();\t\n\t}",
"@Override\r\n\t@RequestMapping(\"/add\")\r\n\tpublic Message add(MeetingDetail meetingDetail) {\n\t\treturn new Message(dao.add(meetingDetail));\r\n\t}",
"private Forum newForum(long id) {\n\t\tForum forum = new Forum();\n\t\tforum.setId(id);\n\t\tforum.setName(\"forum\" + id);\n\t\tforum.setDescription(\"forum\" + id + \" description\");\n\t\treturn forum;\n\t}",
"public ServerMessage(String message, Board board) {\n this.message = message;\n this.board = board;\n }",
"@POST\n\t@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\t@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n\t@Path(\"/{sendignUserName}/{receivingUserName}\")\n\tpublic Response saveChatMessage(@PathParam(\"sendignUserName\") String sendignUserName, \n\t\t\t@PathParam(\"receivingUserName\") String receivingUserName, Message message)\n\t{\n\t\tLog.enter(sendignUserName, receivingUserName);\n\t\tMessage resp = new Message();\n\t\tMessagePO po = new MessagePO();\n\t\ttry\n\t\t{\n\t\t\tIMessageDAO dao = DAOFactory.getInstance().getMessageDAO();\n\t\t\tpo = ConverterUtils.convert(message);\n\t\t\tpo.setMessageType(\"CHAT\");\n\t\t\tpo.setAuthor(sendignUserName);\n\t\t\tpo.setTarget(receivingUserName);\n\t\t\tdao.save(po);\n\t\t\tresp = ConverterUtils.convert(po);\n\t\t\tSystem.out.println(\"@@@@@@@@@@@@@@@@@@@@@\"+resp.getAuthor()+\";\"+resp.getTarget());\n\t\t} catch (Exception e) {\n\t\t\thandleException(e);\n\t\t} finally {\n\t\t\tLog.exit();\n\t\t}\n\t\t\n\t\treturn created(resp);\n\t}",
"@RequestMapping(value = \"/threads\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n @ResponseStatus(HttpStatus.CREATED)\n @ApiOperation(value = \"Create a new thread\")\n public Thread create(@RequestBody Thread thread) throws KalipoException {\n log.debug(\"REST request to save Thread : {}\", thread);\n\n if (thread.getId() == null) {\n return threadService.create(thread);\n } else {\n return threadService.update(thread);\n }\n }",
"public void createChatRoom(String name) throws RemoteException {\n\n\t\ttry {\n\t\t\tIChatServer chatStub;\n\t\t\t// make a new chatroom with supplied name\n\t\t\tIChatroom newRoom = new Chatroom(name);\n\t\t\tview.append(\"Make new ChatRoom: \" + newRoom.getName() + \"\\n\");\n\t\t\t// make a new chatserver stub for user in the newchatroom\n\t\t\tIChatServer newChatServer = new ChatServer(user, newRoom);\n\t\t\tview.append(\"Make new ChatServer: <User:\" + newChatServer.getUser().getName() + \", ChatServer: \"\n\t\t\t\t\t+ newChatServer.getChatroom().getName() + \">\\n\");\n\t\t\t//get a chatstub for new chatserver \n\t\t\tchatStub = (IChatServer) UnicastRemoteObject.exportObject(newChatServer, IChatServer.BOUND_PORT);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + newRoom.hashCode(), chatStub);\n\t\t\tview.append(\"Make new ChatServer Stub for chatserver.\\n\");\n\t\t\t//add chatstub to newRoom\n\t\t\tnewRoom.addChatServer(chatStub);\n\t\t\tview.append(\"Add new ChatServer Stub to newRoom.\\n\");\n\t\t\t//add newchatroom to the user chatroom lists\n\t\t\tuser.addRoom(newRoom);\n\t\t\tview.append(\"Add new chatroom <\" + newRoom.getName() + \"> to user <\" + user.getName() + \">\\n\");\n\t\t\t//add all chatservers in that room to hashset\n\t\t\tHashSet<IChatServer> proxy = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer item : newChatServer.getChatroom().getChatServers()) {\n\t\t\t\tIChatServer proxyChatServer = new ProxyIChatServer(item);\n\t\t\t\tproxy.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(newChatServer, proxy);\n\t\t\tminiMVCAdpts.put(newRoom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Error creating chatroom!\");\n\t\t}\n\n\t}",
"public abstract void groupChatCreatedMessage(Message m);",
"@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }",
"@Test\n\tpublic void testPostNewMessageThenTheDatabaseContainsAMessageWithTheSameMessageAttribute() throws Exception{\n\t\t this.restTemplate\n\t\t\t.postForObject(this.url, \n\t\t\t\t\tnew DummyBoundary(\"???\", \"test\"),\n\t\t\t\t\tDummyBoundary.class);\n\t\t\n\t\t// THEN the database contains a message with the message attribute \"test\"\n\t\tDummyBoundary[] allMessages = \n\t\t\t\tthis.restTemplate\n\t\t\t\t\t.getForObject(this.url, DummyBoundary[].class);\n\t\tboolean containsTestMessage = false;\n\t\tfor (DummyBoundary m : allMessages) {\n\t\t\tif (m.getMessage().equals(\"test\")) {\n\t\t\t\tcontainsTestMessage = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!containsTestMessage) {\n\t\t\tthrow new Exception(\"failed to locate message with proper content\");\n\t\t}\n\t}",
"private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }",
"@MessageMapping(\"/chat/rooms/{groupName}/addGroup\")\r\n public void addGroupToRoom(@DestinationVariable String groupName,@Payload ChatRoom chatRoom){\r\n chatService.saveGroup(groupName,chatRoom.getRoomName());\r\n\r\n\r\n }",
"private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }",
"public void createChat(String roomname, String nickname) {\n\t\t\n\t\tboolean successful = false;\n\t\tString errormessage = \"\";\n\t\t\n\t\t// set default value for roomname\n\t\tif (roomname.equals(\"\")){\n\t\t\troomname = \"default\";\n\t\t}\n\t\t\n\t\t// set default value for nickname\n\t\tif (nickname.equals(\"\")){\n\t\t\tnickname = chatConnection.getConnectedUserID();\n\t\t}\n\t\t// if connection to room already exists, only change the nickname\n\t\tif (roomlist.containsKey(roomname)){ // room already exists\n\t\t\tChatRoom room = roomlist.get(roomname);\n\t\t\tif (!room.getNickname().equals(nickname)){\n\t\t\t\ttry {\n\t\t\t\t\troom.changeNickname(nickname);\n\t\t\t\t\tsuccessful = true;\n\t\t\t\t\troomlist.fireTableDataChanged();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\terrormessage = e.getMessage();\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t\telse { // make new connection\n\t\t\tChatRoom groupchat;\n\t\t\ttry {\n\t\t\t\tgroupchat = new ChatRoom(roomname, nickname);\n\t\t\t\troomlist.put(roomname, groupchat);\n\t\t\t\troomlist.fireTableDataChanged();\n\t\t\t\tsuccessful = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\terrormessage = e.getMessage();\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (!successful){\n\t\t\tcreateChatConnectDialog(errormessage);\n\t\t}\n\t}",
"private void sendMessage(String sender, String receiver, String msg) {\n //Map key value pairs\n Map<String, Object> message = new HashMap<>();\n message.put(\"sender\", sender);\n message.put(\"receiver\", receiver);\n message.put(\"message\", msg);\n message.put(\"isSeen\", false);\n message.put(\"createdAt\", FieldValue.serverTimestamp());\n\n //Upload to firestore\n db.collection(\"messages\").document()\n .set(message)\n .addOnSuccessListener(aVoid -> Utility.showToast(this, \"Message sent\"))\n .addOnFailureListener(e -> {\n Utility.showToast(this, \"Error: Submission failed\");\n Log.w(TAG, \"Error writing document\", e);\n });\n }",
"public void onClickSendMessage(View v) {\n\n String error = \"\";\n\n if (isEmpty(messageTittle)) {\n error = \"entra un titulo valido\";\n } else if (isEmpty(messageText)) {\n error = \"entra un mensaje valido\";\n } else {\n msgtittle = messageTittle.getText().toString();\n msgtext = messageText.getText().toString();\n\n }\n\n if (!error.equals(\"\")) {\n Toast.makeText(this, error, Toast.LENGTH_SHORT).show();\n } else {\n try {\n JMessage jmsg;\n jmsg = new JMessage(msgtext, msgtittle, gson.fromJson(MainActivity.juser, JUser.class), 1, jgroup.getGroupId());\n jmsg.setIdParent(1);\n\n\n Log.d(TAG, \"este es el jmessage a crear =\" + jmsg);\n NewMessage nm = new NewMessage(gson.toJson(jmsg));\n nm.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"@RequestMapping(value=\"/room/form\", method=RequestMethod.GET)\r\n\tpublic String getRoomForm(Model model) {\r\n\t\tmodel.addAttribute(\"room\", new Room());\r\n\t\treturn \"roomForm\";\r\n\t}",
"@PostMapping(\"/main\")\n public String add(\n @AuthenticationPrincipal User user,\n @Valid Message message,\n BindingResult bindingResult,\n Model model\n ) {\n message.setAuthor(user);\n if (bindingResult.hasErrors()) {\n final Map<String, String> errors = ControllerUtils.getErrors(bindingResult);\n model.mergeAttributes(errors);\n model.addAttribute(\"message\", message);\n } else {\n model.addAttribute(\"message\", null);\n msgRepo.save(message);\n }\n final Iterable<Message> msgs = msgRepo.findAll();\n model.addAttribute(\"messages\", msgs);\n return \"main\";\n }",
"public Message(){}",
"@RequestMapping(value = \"/api/logs/create\", method = RequestMethod.POST)\n public String logs(@RequestBody String body) throws IOException\n {\n String[] parts = body.split(\"router - \");\n String log = parts[0] + \"router - [] \" + (parts.length > 1 ? parts[1] : \"\");\n\n // Knows how to speak the language of syslog => turn syslog => into a map => into a json => into a string\n RFC6587SyslogDeserializer parser = new RFC6587SyslogDeserializer();\n InputStream is = new ByteArrayInputStream(log.getBytes());\n Map<String, ?> messages = parser.deserialize(is);\n\n // Parse json to string\n ObjectMapper mapper = new ObjectMapper();\n String json = mapper.writeValueAsString(messages);\n\n // Get Producer through dependency injection\n MessageChannel toKafka = context.getBean(\"toKafka\", MessageChannel.class);\n\n // Sends message through kafka producer\n // Send is not async, kafka producer in a background thread will queue up each message and send into the broker in batches\n // Send them in batches of the type of message that is sent\n toKafka.send(new GenericMessage<>(json));\n\n return \"ok\";\n }",
"public void putMessageWizardChannel(Message message) {\n\t\t\n\t\tint currentRoom = message.getCurrentRoom();\n\t\tString data = message.getData();\n\t\tlong tid = Thread.currentThread().getId();\n\t\t\n\t\t//mesajul ce va fi trimis pe canal\n\t\tMessage newMessage = null;\n\t\t\n\t\t//mesajele END pot fi ignorate\n\t\tif(data.equals(END)) return;\n\t\t\n\t\t//se vor pune mesaje EXIT de un singur thread pana se inchid toti Miners\n\t\t\n\t\tif(data.equals(EXIT)) {\n\t\t\tif(finishThread == -1) {\n\t\t\t\tfinishThread = tid;\n\t\t\t}else {\n\t\t\t\tif(finishThread != tid) return;\n\t\t\t}\n\t\t\t\n\t\t\tnewMessage = message;\n\t\t}\t\n\t\t//daca sunt aduse informatiile despre parinte\n\t\telse if((!map.containsKey(tid))) {\t\n\t\t\tif(data.equals(NO_PARENT)) currentRoom = -1;\n\t\t\tnewMessage = new Message(currentRoom,-1,null);\n\t\t\tmap.put(tid, newMessage);\n\t\t\treturn;\n\t\t//daca au fost aduse informatiile despre parinte si sunt adusa informatii despre un nod adiacent\n\t\t}else if(map.containsKey(tid)) {\n\t\t\tnewMessage = map.remove(tid);\n\t\t\tnewMessage.setCurrentRoom(currentRoom);\n\t\t\tnewMessage.setData(data);\n\t\t\t\n\t\t\t//nu se trimite acelasi nod de mai multe ori\n\t\t\tif(putNodes.contains(currentRoom)) return;\n\t\t\telse putNodes.add(currentRoom);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t//se pune mesajul construit in buffer\n\t\t\tbufferWizardChannel.put(newMessage);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testCreateRoomOkResponse() {\n // given\n final CreateRoomRequest createRoomRequest = CreateRoomRequest.builder().name(TEST_ROOM).build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_CREATE_ROOM_COMMAND, createRoomRequest))\n .willReturn(OK_RESPONSE);\n\n // when\n multiUserChatService.createRoom(TEST_ROOM);\n\n // then\n\n }",
"public void writeStatusMessage(String room, String message) {\n ((GroupChatPanel)grouptabs.get(room)).writeStatusMessage(message);\n }",
"@CrossOrigin(origins = \"*\", allowedHeaders = \"*\")\n @MessageMapping(\"/send/message\")\n public void onReceivedMesage(String message){\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date())+\"- \"+message);\n // this.template.convertAndSend(\"/chat2\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date())+\"- \"+message);\n\n // System.err.println(\"msg from client \"+message);\n }",
"@RequestMapping(value = \"/welcome\", method = RequestMethod.POST)\r\n\tpublic String welcome(@ModelAttribute User user, @ModelAttribute(\"newMsg\") Message newMsg, Model model) throws SQLException {\t\r\n\t\tmodel.addAttribute(\"userId\", user.getUserID());\r\n\t\tnewMsg.setFromUser(user.getUserID());\r\n\t\t//Get the Spring Context\r\n ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(\"spring.xml\");\r\n \r\n //Get the Beans; connect to both classes\r\n UserDAO userDao = ctx.getBean(\"userDao\", UserDAO.class);\r\n MessageDAO msgDao = ctx.getBean(\"messageDao\", MessageDAO.class);\r\n if(userDao.userExists(newMsg.getToUser())) {\r\n \t// create message\r\n \tmsgDao.createMessage(newMsg);\r\n \tmodel.addAttribute(\"message\", \"Message Sent!\");\r\n }\r\n else\r\n \tmodel.addAttribute(\"message\",\"Error: User doesn't exist\");\r\n model.addAttribute(\"newMsg\", new Message());\r\n\t\treturn \"welcome\";\r\n\t}",
"@Override\n\t\t\tpublic Message createMessage(Session session) throws JMSException {\n\t\t\t\tMessage m = session.createTextMessage(s);\n\t\t\t\treturn m;\n\t\t\t}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<CommunicationRoom> createRoom(CreateRoomOptions createRoomOptions) {\n return createRoom(createRoomOptions, null);\n }",
"public void addMessage(ChatMessage message) {\n sqLiteHandler.addMessageToDB(message, this);\n messages.add(message);\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }",
"public Message createMessageFromJson(JSONObject messageJson){\n\n try {\n this.setBody( messageJson.get(\"body\").toString());\n\n //recupèrer l'objet contact\n JSONObject contactObject = (JSONObject) messageJson.get(\"contact\");\n this.getContact().setName(contactObject.get(\"name\").toString());\n this.getContact().setNumber( contactObject.get(\"number\").toString());\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return this;\n }",
"@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}",
"@Deprecated\n public abstract void newChatMemberMessage(Message m);",
"private void message(\n QueryParam params,\n ChatMessage message, WebSocketSession session) throws\n InvalidRoomException,\n BroadcastException {\n\n IRoomService roomService = roomServiceFactory.getRoomService();\n \n message.setFrom(params.displayName);\n\n IRoom targetRoom = roomService.getRoom(params.RoomId);\n\n targetRoom.broadcastMessage(message);\n }",
"boolean deleteMessage(int roomId, long messageId) throws RoomNotFoundException, RoomPermissionException, IOException;"
]
| [
"0.6083494",
"0.60045105",
"0.5987288",
"0.58541584",
"0.5851931",
"0.5778985",
"0.5754994",
"0.57147145",
"0.5694147",
"0.56755143",
"0.5651011",
"0.55868495",
"0.55750644",
"0.5531131",
"0.5415439",
"0.5351009",
"0.5273951",
"0.5263897",
"0.5243514",
"0.52353346",
"0.52241206",
"0.52081084",
"0.5194464",
"0.51876944",
"0.51875824",
"0.5180724",
"0.51750654",
"0.514448",
"0.51165277",
"0.51075816",
"0.5107451",
"0.5104299",
"0.50765723",
"0.5069111",
"0.5067947",
"0.50675666",
"0.5066068",
"0.504913",
"0.50271785",
"0.50135994",
"0.5008261",
"0.5002922",
"0.49891052",
"0.49568996",
"0.49282783",
"0.49174437",
"0.49108848",
"0.49045992",
"0.48963264",
"0.48825037",
"0.48685896",
"0.48515853",
"0.4828264",
"0.4826762",
"0.4817436",
"0.4793619",
"0.4781939",
"0.4781029",
"0.47720915",
"0.4758012",
"0.47388577",
"0.47369623",
"0.4735002",
"0.47349054",
"0.47349054",
"0.4732563",
"0.47321028",
"0.47307697",
"0.4730485",
"0.47248888",
"0.4722603",
"0.47213545",
"0.4720835",
"0.47077525",
"0.47070175",
"0.47066876",
"0.46940094",
"0.46876258",
"0.46847844",
"0.46786797",
"0.46728465",
"0.4672022",
"0.46670163",
"0.466566",
"0.4657137",
"0.46545133",
"0.4650261",
"0.4648646",
"0.46402735",
"0.46391404",
"0.46388412",
"0.46362036",
"0.46354365",
"0.4630878",
"0.4626657",
"0.4617695",
"0.4610349",
"0.46092078",
"0.46028364",
"0.4586776"
]
| 0.7877846 | 0 |
DELETE /forumroommessages/:id : delete the "id" forumRoomMessage. | @DeleteMapping("/forum/message/{id}")
@Timed
public ResponseEntity<Void> deleteForumRoomMessage(@PathVariable Long id) {
LOGGER.debug("REST request to delete ForumRoomMessage : {}", id);
User user = userRepository.findByUserIsCurrentUser();
ForumRoomMessage message = forumRoomMessageRepository.findOne(id);
if ("admin".contentEquals(user.getLogin()) || message.getUser().equals(user)) {
forumRoomMessageRepository.delete(id);
}
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert("forumRoomMessage", id.toString()))
.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean deleteMessage(int roomId, long messageId) throws RoomNotFoundException, RoomPermissionException, IOException;",
"@Override\n\tpublic void delMessage(String id) {\n\t\t messageDAO.deleteMessage(id);\n\t\n\t}",
"@DeleteMapping(\"/chat-messages/{id}\")\n @Timed\n public ResponseEntity<Void> deleteChatMessage(@PathVariable Long id) {\n log.debug(\"REST request to delete ChatMessage : {}\", id);\n chatMessageRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"/chat-rooms/{id}\")\n public ResponseEntity<Void> deleteChatRoom(@PathVariable String id) {\n log.debug(\"REST request to delete ChatRoom : {}\", id);\n chatRoomRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id)).build();\n }",
"@DELETE(\"chat/messages/{id}\")\n Call<Void> deleteChatMessage(\n @retrofit2.http.Path(\"id\") String id\n );",
"@Override\r\n\tpublic void deleteMessage(Integer id) {\n\t\tString sql=\"delete from message where id=?\";\r\n\t\ttry {\r\n\t\t\tupdate(conn, sql, id);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void deleteMessage(Long id) {\n Validate.notNull(id, \"id cannot be null\");\n client.delete(StringUtils.replaceOnce(MESSAGES_ITEM_PATH, PLACEHOLDER, id.toString()));\n }",
"public String deleteMessage(Integer id ){\n repo.deleteById(id);\n return \"Mensaje Eliminado\" + id;\n }",
"public String deleteMsg(Long id){\n return messagesParser.deleteMsg(id);\n }",
"@Override\n\tpublic List<MessagePojo> deleteMessage(int id) {\n\t\treturn null;\n\t}",
"@Override\r\n public DirectMessage destroyMessage(Integer id) throws TwitterException\r\n {\n PostMethod method = new PostMethod(baseUrl + \"direct_messages/destroy/\" + id + \".xml\");\r\n\r\n // execute method\r\n Document doc = executeMethod(method);\r\n\r\n // parse message\r\n return parseDirectMessage(doc);\r\n }",
"public void deleteChatRoom(ChatRoom cr);",
"public void deleteForumById(Long idForum);",
"@Override\n\tpublic void deleteMessageByMessageId(String messageId) {\n\t\t\n\t}",
"public void deleteMessage(Integer tid, int rank);",
"MessageResource deleteMensaje(Integer mensID) throws NoPermissionException;",
"public static void deleteMessage(MessageModel message) throws MessageException, MongoException, SQLException {\n\t\t// Verify the message\n\t\tboolean valid = true;\n\t\tStringBuilder errorMessage = new StringBuilder();\n\t\t\n\t\tif(message.getMessageId() == null || !Security.isValidMessageId(message.getMessageId())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message id : \" + message.getMessageId());\n\t\t}\n\t\tif(message.getMessagePosterId() == null && !Security.isValidUserId(message.getMessagePosterId())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid messsage poster id : \" + message.getMessageId());\n\t\t}\n\t\t\n\t\t// If there is an error, throw an exception\n\t\tif(!valid) {\n\t\t\t\n\t\t\tthrow new MessageException(errorMessage.toString());\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// Delete the message from the database\n\t\t\tMessageDatabaseManager.deleteMessage(message);\n\t\t\t\n\t\t}\n\t}",
"@Override\n public DeleteMessageResult deleteMessage(DeleteMessageRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteMessage(request);\n }",
"public static void deleteMessage(Context context, long messageId, long threadId, int messageType) {\r\n \r\n \t\tif (messageId > 0) {\r\n \t\t\t// Log.v(\"id of message to delete is \" + messageId);\r\n \t\t\tUri deleteUri;\r\n \r\n \t\t\tif (SmsMmsMessage.MESSAGE_TYPE_MMS == messageType) {\r\n \t\t\t\tdeleteUri = Uri.withAppendedPath(MMS_CONTENT_URI, String.valueOf(messageId));\r\n \t\t\t} else if (SmsMmsMessage.MESSAGE_TYPE_SMS == messageType) {\r\n \t\t\t\tdeleteUri = Uri.withAppendedPath(SMS_CONTENT_URI, String.valueOf(messageId));\r\n \t\t\t} else {\r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \t\t\tint count = context.getContentResolver().delete(deleteUri, null, null);\r\n \t\t\t// Log.v(\"Messages deleted: \" + count);\r\n \t\t\tif (count == 1) {\r\n \t\t\t\t// TODO: should only set the thread read if there are no more\r\n \t\t\t\t// unread\r\n \t\t\t\t// messages\r\n \t\t\t\tsetThreadRead(context, threadId);\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"public void deleteMessageTest(){\n\t\tint messageId = 102;\n\t\tgiven()\n\t\t\t.pathParam(\"messageId\", messageId)\n\t\t.when()\n\t\t\t.delete(\"/message/{messageId}\")\n\t\t.then()\n\t\t\t.statusCode(200)\n\t\t\t.body(\"message\", is(\"Message Deleted \"+messageId));\n\t}",
"@RequestMapping(value = \"/mensajes/delete/{id}\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> deleteById(@PathVariable int id){\n\t\tMensaje mensajeBorrar = chatDAO.findById(id);\n\t\tchatDAO.delete(mensajeBorrar);\n\t\treturn new ResponseEntity<Void>(HttpStatus.OK);\n\t}",
"public Message removeMessage(long id)\n {\n return messages.remove(id);\n }",
"int deleteByPrimaryKey(Long id_message_group);",
"@Override\n\tpublic String deleteMsg(long id,CustomerUser user) throws Exception {\n\t\tCustomerMessage entity = msgDao.queryById(id);\n\t\tmsgDao.delete(entity);\n\t\treturn \"success\";\n\t}",
"@Override\n\tpublic void deleteMsgById(int mid) {\n\t\tmp.deleteMsgById(mid);\n\t}",
"@Override\r\n\tpublic Message del(int id) {\n\t\treturn new Message(dao.del(id));\r\n\t}",
"@DeleteMapping(\"/{id}\")\n @ResponseStatus(code = HttpStatus.NO_CONTENT)\n public boolean deleteMensaje(@PathVariable(\"id\") Long mensajeId){\n return mensajeServicio.deleteMessage(mensajeId);\n }",
"@Override\r\n\tpublic int deleteMessageById(int id, int parentid) {\n\t\treturn messageMapper.deleteMessageById(id,parentid);\r\n\t}",
"int deleteByPrimaryKey(Integer massageId);",
"public void deleteRoom(Room room);",
"@DeleteMapping(path = \"/rooms/{roomId}\")\n public ResponseEntity<?> deleteRoom(@PathVariable String roomId) {\n try {\n Room room = roomService.findRoomById(roomId);\n roomService.deleteRoom(room.getRoomId());\n return new ResponseEntity<>(HttpStatus.OK);\n } catch (RoomNotFoundException e) {\n throw new NotFoundException(e.getMessage());\n }\n }",
"@RequestMapping(value = \"delete\", method = RequestMethod.DELETE)\n private UserMessage delete(@RequestParam UserMessage userMessage) {\n log.debug(\"deleting \"+ userMessage.getId());\n messageRepository.delete(userMessage);\n UserMessage deletedOne = messageRepository.findOne(userMessage.getId());\n log.debug(\"\");\n return deletedOne;\n }",
"@Override\n\tpublic int deleteRoom(int room_id) {\n\t\treturn roomDao.deleteRoom(room_id);\n\t}",
"Boolean deleteRoom(String roomId);",
"@Override\n\tpublic void deleteMsg(int msgNo) {\n\t\tsession.delete(namespace + \".deleteMsg\", msgNo);\n\t}",
"public void deleteMessages() {\n\t\tmessageDAO.modifyMessageList(currentContact.getMsgId(), new LinkedList<Mensaje>());\n\t\tcurrentContact.removeMessages();\n\t\tcontactDAO.modifyContact(currentContact);\n\t\t// Groups share the message list, only single contacts has to be updated\n\t\tif (currentContact instanceof ContactoIndividual) {\n\t\t\tUsuario user = userCatalog.getUser(currentContact.getUserId());\n\t\t\tOptional<Contacto> result = user.getContacts().stream().filter(c -> c.getUserId() == currentUser.getId())\n\t\t\t\t\t.findFirst();\n\t\t\tif (!result.isPresent())\n\t\t\t\treturn;\n\t\t\tmessageDAO.modifyMessageList(result.get().getMsgId(), new LinkedList<Mensaje>());\n\t\t\tresult.get().removeMessages();\n\t\t\tcontactDAO.modifyContact(result.get());\n\t\t}\n\t}",
"private void deleteRoomClicked() {\n postRequestDelete();\n sessionManager.removeRoom(sessionManager.getRoom(), sessionManager.getID());\n sessionManager.leaveRoom();\n }",
"@Override\n public void deleteSms() {\n Uri uri = Uri.parse(\"content://sms/\");\n Cursor cursor = presenter.getContext().getContentResolver().query(uri, null, null, null, null);\n if (cursor.moveToFirst()) {\n String messageId = cursor.getString(0);\n presenter.getContext().getContentResolver().delete(Uri.parse(\"content://sms/\" + messageId), null, null);\n }\n }",
"public void deleteForum(Forum forum);",
"public void delete(Long id) {\n log.debug(\"Request to delete MsgReceiverGroup : {}\", id);\n msgReceiverGroupRepository.deleteById(id);\n }",
"void deleteTrackerNotificationMessages(final Integer id);",
"private void delete_message_reciver(final int position, final MessageHolder messageHolder){\r\n\r\n Mprogress.setTitle(\"Wait for a moment ...\");\r\n Mprogress.setMessage(\"Please wait for delete message\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference();\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n userMessageListModals.remove(position);\r\n notifyDataSetChanged();\r\n Mprogress.dismiss();\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n Mprogress.dismiss();\r\n }\r\n }\r\n });\r\n\r\n }",
"void deleteRoom(int id) throws DataAccessException;",
"public static Boolean deleteDraftMessage(String id) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tdb.execSQL(\"DELETE FROM drafts WHERE id =\" + id);\r\n\t\t\t//Log.d(\"DRAFT DELETE\", \"Record deleted!\");\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t//Log.e(\"DRAFT DELETE\", \"error : \" + e.toString());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@RequestMapping(value = \"/threads/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n @ResponseStatus(HttpStatus.OK)\n @ApiOperation(value = \"Delete the \\\"id\\\" thread\")\n public void delete(@PathVariable String id) throws KalipoException {\n log.debug(\"REST request to delete Thread : {}\", id);\n Asserts.isNotNull(id, \"id\");\n\n threadService.delete(id);\n }",
"@Override\n public void delete(MessageDTO messageDTO) {\n messageRepository.delete(MessageTransformer.transform(messageDTO));\n }",
"public static JSONObject removeMessage(String id1, String texte) {\n\t\tif(id1==null) {\n\t\t\treturn ErrorJSON.serviceRefused(\"L'utilisateur 1 n'existe pas\", -1);\n\t\t}\n\t\t//remove BD\n\t\treturn InteractionMongo.delete(tools.MessageTools.deleteMessage(id1,texte));\n\t}",
"public Message remove(String id) {\r\n return messageMap.remove(id);\r\n }",
"static boolean delete(SQLiteDatabase db, long msgId) {\n return db.delete(TABLE_NAME, _ID + \"=\" + msgId, null) > 0;\n }",
"@Override\n public void delete(Long id) {\n Room room = roomRepository.getOne(id);\n roomRepository.delete(room);\n }",
"public static JSONObject deleteMessage(String key, String id_M ) {\n\t\ttry{\n\t\t\tif(key==null || key.contentEquals(\"\")) {\n\t\t\t\treturn ErrorJSON.serviceRefused(\"informations manquantes\", ErrorJSON.ERROR_ARG);\n\t\t\t}\n\t\t\tint id=AuthentificationTools.getID(key);\n\t\t/* Pas nécessaire car utilisateur est une clé étrangère de session, si l'utilisateur n'existe pas alors la clès n'existe forcèment pas \n\t\tif(!UserTools.userExists(id)) {\n\t\t\treturn ErrorJSON.serviceRefused(\"login incorrect \", ErrorJSON.ERROR_SQL);\n\t\t}*/\n\t\t//on vérifie si la session existe\n\t\tif(!AuthentificationTools.keyExists(key)) {\n\t\t\tAuthentification.deleteConnexion(key);\n\t\t\treturn ErrorJSON.serviceRefused(\"connectez-vous\", ErrorJSON.ERROR_SQL);\n\t\t}\n\t\tif(!AuthentificationTools.checkKey(key)) {\n\t\t\treturn ErrorJSON.serviceRefused(\"Session expirée\", ErrorJSON.ERROR_SQL);\n\t\t}\n\t\t// on vérifie si la session est active\n\t\telse {\n\t\t\t MessageTools.deleteMessage(id, id_M);\n\t\t\t AuthentificationTools.updateDate(key);\n\t\t\t return ErrorJSON.serviceAccepted();\n\t\t}\n\t\t}catch( SQLException e) {\n\t\t\treturn ErrorJSON.serviceRefused(\"Operation refused\", ErrorJSON.ERROR_SQL);\n\t\t}catch(JSONException e) {\n\t\t\treturn ErrorJSON.serviceRefused(\"Error, Sorry!!\", ErrorJSON.ERROR_JSON);\n\t\t}\n\t\t\n\t}",
"public abstract void groupChatPhotoDeleteMessage(Message m);",
"@Transactional(readOnly = false)\n\tpublic void deleteChatroom(Chatroom chatroom) {\n\t\t// delete the chat logs\n\t\tmessageService.deleteAllChatMessagesOfChatroom(chatroom);\n\t\t// remove the tags\n\t\ttagService.removeAllTagsFromChatroom(chatroom);\n\t\t// delete the chatroom\n\t\tchatroomRepository.delete(chatroom);\n\t}",
"@Path(\"/remove/{id}\")\n @GET\n @ProduceMime(\"application/xml\")\n public String remove(@PathParam(\"id\") String id) {\n if (id == null || \"\".equals(id.trim()))\n return xStream.toXML(null);\n boolean result = daoForum.remove(daoForum.get(new Long(id)));\n return xStream.toXML(result);\n }",
"@Override\r\n public void onMessage(Message message) {\r\n LOG.info(\"Message received\");\r\n\r\n try {\r\n if (message instanceof TextMessage) {\r\n LOG.debug(\"Process TextMessage\");\r\n TextMessage tMsg = (TextMessage) message;\r\n LOG.debug(\"Message content is: \" + tMsg.getText());\r\n String[] param = tMsg.getText().split(\";\");\r\n\r\n if (param[0] != null && param[1] != null && !param[0].isEmpty() && !param[1].isEmpty()) {\r\n LOG.debug(\"DELETE from \" + param[0] + \" to \" + param[1]);\r\n atl.deleteBetween(param[0], param[1]);\r\n }\r\n else {\r\n LOG.warn(\"Message has wrong content\");\r\n }\r\n }\r\n else if (message instanceof ObjectMessage) {\r\n LOG.debug(\"Process ObjectMessage\");\r\n\r\n if (((ObjectMessage) message).getObject() instanceof DtIntervalMessage) {\r\n DtIntervalMessage dtiMsg = (DtIntervalMessage) ((ObjectMessage) message).getObject();\r\n\r\n if (!dtiMsg.getFrom().isEmpty() && !dtiMsg.getTo().isEmpty()) {\r\n LOG.debug(\"DELETE from \" + dtiMsg.getFrom() + \" to \" + dtiMsg.getTo());\r\n atl.deleteBetween(dtiMsg.getFrom(), dtiMsg.getTo());\r\n }\r\n else {\r\n LOG.warn(\"Message has wrong content\");\r\n }\r\n }\r\n else if (((ObjectMessage) message).getObject() instanceof KickMessage) {\r\n LOG.info(\"Kick message does nothing ;-)\");\r\n }\r\n else {\r\n LOG.warn(\"Message of wrong class:\" + ((ObjectMessage) message).getObject().getClass().getName());\r\n }\r\n }\r\n if (message != null) {\r\n LOG.error(\"Message of wrong type: \" + message.getClass().getName());\r\n }\r\n else {\r\n LOG.error(\"message == null\");\r\n }\r\n }\r\n catch (JMSException jmse) {\r\n LOG.fatal(\"\", jmse);\r\n mdc.setRollbackOnly();\r\n }\r\n\r\n LOG.info(\"Message processed\");\r\n }",
"public void removeMessageForId(Object chatWindowTag, String messageId) {\n Logger.d(TAG, \"removeMessageForWinTag() entry chatWindowTag is \"\n + chatWindowTag);\n Pair<View, ChatsStruct> findPair = getChatPairWithTag(chatWindowTag);\n if (null == findPair) {\n Logger.e(TAG,\n \"removeMessageForWinTag() not find the chatWindowTag findPair is null\");\n return;\n }\n View view = findPair.first;\n ChatsStruct chatStruct = findPair.second;\n String latestMessageId = chatStruct.getMlatestMessageId();\n if (latestMessageId.equals(messageId)) {\n chatStruct.chatItems.remove(chatStruct.chatItems.size() - 1);\n Logger.d(TAG, \"removeMessageForWinTag() findPair is \" + findPair);\n if (chatStruct.chatItems.size() == 0) {\n chatStruct.setDate(null);\n chatStruct.setLatestMessage(null);\n chatStruct.clearUnreadMessageNumber();\n chatStruct.setMlatestMessageId(\"\");\n } else {\n chatStruct.setDate(chatStruct.chatItems.get(\n chatStruct.chatItems.size() - 1).getmDate());\n chatStruct.setLatestMessage(chatStruct.chatItems.get(\n chatStruct.chatItems.size() - 1).getMlatestMessage());\n chatStruct.clearUnreadMessageNumber();\n chatStruct.setMlatestMessageId(chatStruct.chatItems.get(\n chatStruct.chatItems.size() - 1).getMlatestMessageId());\n }\n\n updateChats(view, chatStruct);\n }\n\n for (int i = 0; i < chatStruct.chatItems.size(); i++) {\n if (messageId.equals(chatStruct.chatItems.get(i)\n .getMlatestMessageId())) {\n chatStruct.chatItems.remove(i);\n }\n }\n }",
"@GetMapping(\"/deleteTopic/{id}\")\n public String deleteTopic(@PathVariable(\"id\") Integer topicId, Model model) {\n Topic topic = topicService.getTopicById(topicId);\n topicService.deleteTopic(topic);\n return \"redirect:/dashboard\";\n }",
"@DeleteMapping(\"/chat/users/{id}\")\n public ChatBean deleteUser(@PathVariable(value = \"id\") Long chatId, @Valid @RequestBody UserBean user) {\n ChatBean chat = chatBeanRepository.findById(chatId).get();\n chat.deleteUserBean(user.getId());\n UserBean deletedUser = userBeanRepository.findById(user.getId()).get();\n deletedUser.deleteChat(chat);\n userBeanRepository.save(deletedUser);\n return chatBeanRepository.save(chat);\n\n }",
"private void delete_message_sender(final int position, final MessageHolder messageHolder){\r\n\r\n Mprogress.setTitle(\"Wait for a moment ...\");\r\n Mprogress.setMessage(\"Please wait for delete message\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference();\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n userMessageListModals.remove(position);\r\n notifyDataSetChanged();\r\n Mprogress.dismiss();\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_LONG).show();\r\n Mprogress.dismiss();\r\n }\r\n }\r\n });\r\n\r\n\r\n }",
"public abstract void delete(int msg);",
"@Modifying\r\n @Query(\"delete from Window w where w.room.id= ?1\")\r\n void deleteByRoom(Long id);",
"int deleteByPrimaryKey(Integer messageId) {\n return mapper.deleteByPrimaryKey(messageId);\n }",
"public boolean deleteMessage(int idMessage) {\n Boolean aBoolean = getMessage(idMessage).map(message -> {\n messageRepository.delete(message);\n return true;\n }).orElse(false);\n return aBoolean;\n }",
"@Override\n\tpublic int deleteMessage(int message_no) {\n\t\tSystem.out.println(\"===> Mybatis deleteMessage() 호출\");\n\t\treturn mybatis.delete(\"message.deleteMessage\" , message_no);\n\t}",
"@DeleteMapping(\"/user-offer-chats/{id}\")\n @Timed\n public ResponseEntity<Void> deleteUserOfferChat(@PathVariable Long id) {\n log.debug(\"REST request to delete UserOfferChat : {}\", id);\n userOfferChatService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Override\n\tpublic void remove(Message message) {\n\t\tmessRepository.delete(message);\n\t}",
"public void deleteMessage(int i) {\n\t\tSession session;\n\t\tProperties properties = System.getProperties();\n\t\tsession = Session.getDefaultInstance(properties, new javax.mail.Authenticator(){\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication(){\n\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t}\n\t\t});\n\t\ttry {\n\t\t\tMyMessage toBeDeleted = messageList.get(i);\n\t\t\tStore store = session.getStore(\"imaps\");\t\n\t\t\tstore.connect(\"imap.gmail.com\", username,\n\t\t\t\t\tpassword);\n\t\t\tfolder = store.getDefaultFolder();\n\t\t\tfolder = folder.getFolder(\"inbox\");\n\t\t\tfolder.open(Folder.READ_WRITE);\n\t\t\tMessage[] messages = folder.getMessages();\n\t\t\t//SHOULD MAKE SURE WE HAVE THE RIGHT ONE\n\t\t\tmessages[i].setFlag(Flags.Flag.DELETED, true);\n\t\t\tfolder.close(true);\n\t\t\t\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"ERROR: COULD NOT SEND MAIL\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void delete(Room room) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.delete(room);\n\t\tsession.flush();\n\t}",
"@DELETE\n public void delete(@PathParam(\"id\") String id) {\n }",
"@RequestMapping(\"removepost.htm\")\r\n\tpublic ModelAndView removeMessage(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response,ModelMap map, @ModelAttribute(\"message\") Message message) {\n\r\n\t\t\r\n\t\tif (onBoardingPortalDAO.removeMessage(message)) \r\n\t\t{\r\n\t\t\treturn getPostsForHr(request, response, null, map);\r\n\t\t} \r\n\t\telse \r\n\t\t{\r\n\t\t\treturn getPostsForHr(request, response, null, map);\r\n\t\t}\r\n\r\n\t}",
"public void deleteTopic(int topicId);",
"int deleteByPrimaryKey(String smsId);",
"private void deleteOne(Long id) {\r\n\r\n String where = String.format(\"%s = ?\", \"_id\");\r\n String[] whereParams = new String[]{id.toString()};\r\n\r\n mContext.getContentResolver().delete(Uri.parse(MySMS.SMS_URI), where,\r\n whereParams);\r\n }",
"public void deleteMail(int mailID)\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tString query = \"delete from mails where mailID =?\";\r\n\t\t\tpreparedStatement = connect.prepareStatement(query);\r\n\t\t\tpreparedStatement.setInt(1, mailID);\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Message has been deleted\", \"Message Deleted\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t} \r\n\t\tcatch (SQLException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"private void delete_message_everyone(final int position, final MessageHolder messageHolder){\r\n\r\n Mprogress.setTitle(\"Wait for a moment ...\");\r\n Mprogress.setMessage(\"Please wait for delete message\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference();\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n\r\n if(task.isSuccessful()){\r\n /// todo finial task\r\n userMessageListModals.remove(position);\r\n notifyDataSetChanged();\r\n Mprogress.dismiss();\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n\r\n Mprogress.dismiss();\r\n }\r\n\r\n }\r\n });\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context,task.getException().getMessage(), Toast.LENGTH_LONG).show();\r\n Mprogress.dismiss();\r\n }\r\n }\r\n });\r\n }",
"@GetMapping(\"/deleteTopicFromPost/{id}\")\n public String deleteTopicFromPostPage(@PathVariable(\"id\") Integer topicId, Model model) {\n Topic topic = topicService.getTopicById(topicId);\n topicService.deleteTopic(topic);\n return \"redirect:/post\";\n }",
"@RequestMapping(value = \"/deleteBook/{id}\", method = RequestMethod.DELETE)\r\n public ResponseEntity<?> delete(@PathVariable(\"id\") long id) throws Exception{\r\n\t ProducerTemplate pt = camelContext.createProducerTemplate();\r\n\t String destination = \"direct:cm.delete\";\r\n\t\tSystem.out.println(\"Send message to \" + destination);\r\n\t\tpt.sendBody(destination, id);\r\n\t\t\r\n return ResponseEntity.ok().body(\"Book has been deleted successfully.\");\r\n }",
"public static void deleteSessionByWithJid(String userJid) {\n\n WhereBuilder whereBuilder = WhereBuilder.b(\"msgWithJid\", \"=\", userJid);\n try {\n sDbUtils.delete(Msg.class, whereBuilder);\n } catch (DbException e) {\n e.printStackTrace();\n }\n }",
"Message findById(Long id);",
"@Override\n\tpublic void delete(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"DELETE FROM room WHERE id_room = ?\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\n\t\t\tps.execute();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t}",
"@RequestMapping(\"/admin/message/{id}\")\n public Message adminMessageById(@PathVariable String id) throws MessageNotFoundException {\n\n Message message = messagesService.messageById(id);\n\n if (null == message) {\n throw new MessageNotFoundException();\n }\n return message;\n }",
"@DeleteMapping(value = \"/{id}/delete\")\n\tpublic ResponseEntity<Messenger> deleteOneById(@PathVariable(name = \"id\") int articleId, HttpServletRequest request) {\n\t\tfinal int accountId = utilities.extractAccountIdFromAuthHeader(request.getHeader(\"Authorization\"));\n\t\t\n\t\tif (accountId == -1)\n\t\t\treturn new ResponseEntity<Messenger>(HttpStatus.UNAUTHORIZED);\n\t\t\n\t\tif (!detailedArticleRepository.checkOneById(articleId))\n\t\t\treturn new ResponseEntity<Messenger>(HttpStatus.NOT_FOUND);\n\t\t\n\t\tif (accountId != detailedArticleRepository.getAccountIdById(articleId))\n\t\t\treturn new ResponseEntity<Messenger>(HttpStatus.FORBIDDEN);\n\t\t\n\t\tDetailedArticleSendover articleSendover = articleService.deleteOneById(articleId);\n\t\tif (articleSendover == null)\n\t\t\treturn new ResponseEntity<Messenger>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\telse\n\t\t\treturn new ResponseEntity<Messenger>(new Messenger(articleSendover), HttpStatus.OK);\n\t}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> deleteRoom(String roomId) {\n return deleteRoom(roomId, null);\n }",
"public void delete(String id) throws org.fermat.fermat_dap_plugin.layer.network.service.asset.transmission.developer.version_2.exceptions.CantDeleteRecordDataBaseException {\n\n if (id == null) {\n throw new IllegalArgumentException(\"The id is required can not be null\");\n }\n\n try {\n DatabaseTable table = getDAPMessagesTable();\n table.addStringFilter(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_ID_COLUMN_NAME, id, DatabaseFilterType.EQUAL);\n table.loadToMemory();\n if (table.getRecords().isEmpty()) throw new RecordsNotFoundException();\n DatabaseTableRecord record = table.getRecords().get(0);\n table.deleteRecord(record);\n\n } catch (CantDeleteRecordException e) {\n e.printStackTrace();\n } catch (RecordsNotFoundException e) {\n e.printStackTrace();\n } catch (CantLoadTableToMemoryException e) {\n e.printStackTrace();\n }\n\n }",
"public void removeMessageListener(AdHocChatRoomMessageListener listener)\n {\n synchronized (messageListeners)\n {\n messageListeners.remove(listener);\n }\n }",
"public void deleteUser(String room, String name) {\n ((GroupChatPanel)grouptabs.get(room)).deleteUser(name);\n \n }",
"int delRouteById(Long id_route) throws RouteNotFoundException;",
"@DeleteMapping(\"/boards/{id}\")\n public ResponseEntity<Void> deleteBoard(@PathVariable Long id){\n boardRepository.deleteById(id);\n return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, false, ENTITY_NAME, id.toString())).build();\n }",
"public void deleteMessage(String processorName, String messageId) throws AxisFault {\n SynapseConfiguration configuration = getSynapseConfiguration();\n try {\n\n assert configuration != null;\n if (configuration.getMessageProcessors().containsKey(processorName)) {\n MessageProcessor processor =\n configuration.getMessageProcessors().get(processorName);\n\n if (processor instanceof ScheduledMessageProcessor) {\n MessageForwardingProcessorView view =\n ((ScheduledMessageForwardingProcessor) processor).getView();\n if (!view.isActive()) {\n view.delete(messageId);\n } else {\n log.warn(\"Can't access Scheduled Message Forwarding Processor - Processor is active\");\n }\n }\n\n }\n } catch (Exception e) {\n log.error(\"Error While accessing MessageProcessor view \");\n throw new AxisFault(e.getMessage());\n }\n\n }",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"@Modifying\n @Query(value = \"delete from RWindow w where w.ROOM_ID = :roomId\", nativeQuery = true )\n int deleteWindowByRoom(@Param(\"roomId\") Long roomId);",
"public void deleteById(String id);",
"public void delete(int id){\n \n SqlSession session = sqlSessionFactory.openSession();\n \n try {\n session.delete(\"Subject.delete\", id);\n } finally {\n session.commit();\n session.close();\n }\n System.out.println(\"delete(\"+id+\")\");\n\n }",
"int deleteContentUserDraft(@Param(\"id\") long id);",
"Message get(String id);",
"void deleteById(String id);"
]
| [
"0.780749",
"0.7434069",
"0.7354817",
"0.73287034",
"0.7307741",
"0.72329307",
"0.72073114",
"0.70582026",
"0.7038991",
"0.68547976",
"0.68181235",
"0.68065023",
"0.6701734",
"0.6698212",
"0.6681966",
"0.6653636",
"0.6626339",
"0.657553",
"0.6567954",
"0.6546751",
"0.6491888",
"0.64768034",
"0.6394062",
"0.6388985",
"0.63747764",
"0.6355258",
"0.63383436",
"0.6284654",
"0.6253185",
"0.6237655",
"0.6234584",
"0.6141385",
"0.611241",
"0.60574716",
"0.6053238",
"0.60448027",
"0.5992639",
"0.59898597",
"0.59733826",
"0.5963134",
"0.5956069",
"0.5952126",
"0.5950299",
"0.5949272",
"0.59407145",
"0.592135",
"0.59083974",
"0.58946085",
"0.58725685",
"0.587214",
"0.58566535",
"0.58376384",
"0.580165",
"0.5789096",
"0.5757273",
"0.5756671",
"0.5753809",
"0.5744873",
"0.57315063",
"0.5726602",
"0.572278",
"0.5720122",
"0.5713669",
"0.57080495",
"0.5707639",
"0.5666742",
"0.5649193",
"0.5645546",
"0.5629298",
"0.5622572",
"0.5617001",
"0.5603807",
"0.5603154",
"0.55907524",
"0.55799377",
"0.5572196",
"0.5571747",
"0.5571562",
"0.55704975",
"0.55483246",
"0.55382866",
"0.5530656",
"0.5509386",
"0.5509342",
"0.5501596",
"0.5482217",
"0.54752374",
"0.5474563",
"0.54741997",
"0.54696953",
"0.54696953",
"0.54696953",
"0.54696953",
"0.54696953",
"0.54695636",
"0.5435597",
"0.54284084",
"0.5416555",
"0.54105043",
"0.5410472"
]
| 0.87128854 | 0 |
GET /users/:login : get the "login" user. | @GetMapping("/my-profile/{login:" + Constants.LOGIN_REGEX + "}")
@Timed
public ResponseEntity<ManagedUserVM> getUser(@PathVariable String login) {
LOGGER.debug("REST request to get User : {}", login);
return userService.getUserWithAuthoritiesByLogin(login).map(ManagedUserVM::new)
.map(managedUserVM -> new ResponseEntity<>(managedUserVM, HttpStatus.OK))
.orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User findUserByLogin(final String login);",
"User getUserByLogin(String login);",
"public User loadUserByLogin(String login);",
"User findUserByLogin(String login);",
"public User getUser(String login){\n\t\t\n\t\treturn users.get(login);\n\t}",
"public EOSUser findUser(String login) throws EOSNotFoundException;",
"public static User findUser(String login) {\n try (Hibernate hibernate = new Hibernate()) {\n HashMap<String, Object> params = new HashMap<>();\n params.put(\"login\", login);\n return hibernate.getSingle(\"from User where login = :login\", User.class, params);\n }\n }",
"public User findByLogin(String login) {\n LOGGER.debug(\"getting User by login\");\n String hql = \"SELECT i FROM User as i WHERE login = :name\";\n Session s = getSession();\n Query query = s.createQuery(hql);\n query.setParameter(\"name\", login);\n User u = (User) query.uniqueResult();\n return u;\n }",
"@Override\n public TechGalleryUser getUserByLogin(final String login) throws NotFoundException {\n TechGalleryUser userEntity = userDao.findByLogin(login);\n if (userEntity == null) {\n throw new NotFoundException(OPERATION_FAILED);\n } else {\n return userEntity;\n }\n }",
"User findByLogin(String login);",
"public User logInUser(final String login, final String password);",
"public User getUser(String login) {\n User user = null;\n try (PreparedStatement pst = this.conn.prepareStatement(\"SELECT * FROM users WHERE login = ?\")) {\n pst.setString(1, login);\n ResultSet rs = pst.executeQuery();\n while (rs.next()) {\n user = new User(rs.getString(\"name\"), rs.getString(\"login\"),\n rs.getString(\"email\"), rs.getTimestamp(\"createDate\"));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return user;\n }",
"@GetMapping(\"/{username}/{password}\")\n\tpublic User getUserByLogin(@PathVariable String username, @PathVariable String password) \n\t{\n\t\tUser u = userRepo.findByUsernameAndPassword(username, password); \n\t\tif(u != null)\n\t\t{\n\t\t\treturn u;\n\t\t}\n\t\telse\n\t\t\tthrow new ResponseStatusException(HttpStatus.NOT_FOUND, \"User not found\");\n\t}",
"public synchronized UserModel getUserByLogin(String login) {\r\n\t\tConnectionPooling connectionPooling;\r\n\t\tconnectionPooling = ConnectionPoolingImplementation.getInstance(1, 10);\r\n\r\n\t\tConnection con = connectionPooling.getConnection();\r\n\t\ttry {\r\n\r\n\t\t\tSystem.out.println(\"Connection: \" + con);\r\n\t\t\tPreparedStatement preparedStatement = con.prepareStatement(\"SELECT benutzerID, name, vorname, \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"login, passwort, fk_typID, kontostand \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"FROM benutzer WHERE login = ?\");\r\n\t\t\tpreparedStatement.setString(1, login);\r\n\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\r\n\t\t\tUserModel user = new UserModel();\r\n\t\t\tSystem.out.println(\"testgetuser\");\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tSystem.out.println(rs.getString(\"login\"));\r\n\t\t\t\tuser.setBenutzerID(rs.getInt(\"benutzerID\"));\r\n\t\t\t\tuser.setName(rs.getString(\"name\"));\r\n\t\t\t\tuser.setVorname((rs.getString(\"vorname\")));\r\n\t\t\t\tuser.setLogin(rs.getString(\"login\"));\r\n\t\t\t\tuser.setFk_typID(rs.getInt(\"fk_typID\"));\r\n\t\t\t\tuser.setKontostand(rs.getInt(\"kontostand\"));\r\n\t\t\t}\r\n\t\t\tconnectionPooling.putConnection(con);\r\n\t\t\tSystem.out.println(user.getLogin());\r\n\t\t\treturn user;\r\n\r\n\t\t} catch (SQLException sqle) {\r\n\t\t\tSystem.out.println(\"Es trat ein Fehler im SQL auf.\");\r\n\t\t\tsqle.printStackTrace();\r\n\t\t\tconnectionPooling.putConnection(con);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@RequestMapping(value = {\"/main\", \"/menu\", \"/pubmenu\", \"/pubnews\", \"/settings\",\n \"/userform\"}, method = RequestMethod.GET)\n public\n @ResponseBody\n Map<String, Object> getUserName(@RequestParam(\"login\") String login) throws RestException {\n try {\n if (login == null || login.equals(\"\")) {\n return Ajax.errorResponse(\"Please log in!\");\n }\n String result = dataService.getUserName(login);\n return Ajax.successResponse(result);\n } catch (Exception e) {\n throw new RestException(e);\n }\n }",
"public UserRow getUserByLogin(int domainId, String login)\n throws AdminPersistenceException {\n UserRow[] users = (UserRow[]) getRows(SELECT_USER_BY_DOMAINID_AND_LOGIN,\n new int[] { domainId }, new String[] { login }).toArray(new UserRow[0]);\n \n SynchroReport.debug(\"UserTable.getUserByLogin()\",\n \"Vérification que le login\" + login + \" du domaine no \" + domainId\n + \" n'est pas présent dans la base, requête : \"\n + SELECT_USER_BY_DOMAINID_AND_LOGIN, null);\n if (users.length == 0)\n return null;\n else if (users.length == 1)\n return users[0];\n else {\n throw new AdminPersistenceException(\"Usertable.getUserByLogin\",\n SilverpeasException.ERROR, \"admin.EX_ERR_LOGIN_FOUND_TWICE\",\n \"domain id : '\" + domainId + \"', user login: '\" + login + \"'\");\n }\n }",
"public User findByLogin(String login) throws DAOException {\n User user = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n if (connectionIsAlive()) {\n try {\n ps = connection.prepareStatement(SQL_FIND_BY_LOGIN);\n ps.setString(1, login);\n rs = ps.executeQuery();\n if (rs.next()) {\n user = build(rs);\n }\n } catch (SQLException e) {\n DAOException ex = new DAOException(SQL_FIND_BY_LOGIN, e);\n throw ex;\n } finally {\n close(rs);\n close(ps);\n }\n } else {\n throw new DAOException(ERROR_NO_CONNECTION);\n }\n return user;\n }",
"User getByLogin(String login, Connection connection) throws DAOException;",
"@Override\r\n\tpublic MemberDTO login(LoginDTO login) {\n\t\treturn session.selectOne(NAMESPACE+\".login\", login);\r\n\t}",
"public Admin getAdminByLogin(String login);",
"@Override\r\n\t@Transactional(isolation=Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\r\n\tpublic AdUser getAdUser(Login login) {\n\t\treturn adUserDao.getAdUser(login.getUserName(), login.getPassWord());\r\n\t}",
"@RequestMapping(\"login\")\r\n\tpublic String loginUser() {\n\t\treturn \"login\";\r\n\t}",
"@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n public String findAccountByLogin(Model model) {\n if (this.token == null) {\n model.addAttribute(\"tokenError\", \"no token you need to authorize\");\n return this.authorize(model);\n }\n model.addAttribute(\"login\");\n return \"findAccountByLogin\";\n }",
"@RequestMapping(value = \"/users\", method = RequestMethod.POST)\n public String findAccountAndReposByLogin(@RequestParam(\"login\") String login, Model model) {\n try {\n ResponseEntity<Account> account = this.restTemplate.exchange(this.urlLogin + login, HttpMethod.GET, setTokenToHeaders(), Account.class);\n ResponseEntity<List<Repo>> repos = this.restTemplate.exchange(Objects.requireNonNull(account.getBody()).getRepos_url(), HttpMethod.GET, setTokenToHeaders(), new ParameterizedTypeReference<List<Repo>>() {});\n account.getBody().setRepos(repos.getBody());\n account.getBody().setLanguage(this.getLanguage(Objects.requireNonNull(repos.getBody())));\n return this.getCV(account.getBody(), model);\n } catch (Exception ex) {\n model.addAttribute(\"accountLoginError\", \"account by login don`t found or your token is old\");\n return \"findAccountByLogin\";\n }\n }",
"User signIn(String login, String password);",
"@RequestMapping(value = \"/login/get/{email}/{pass}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\r\n\tpublic User Get(@PathVariable(\"email\") String email, @PathVariable(\"pass\") String pass) {\n\r\n\t\treturn login_Service.get(email, pass);\r\n\r\n\t}",
"Optional<User> findUserLoginAndPassword(String login, String password) throws LogicException;",
"User login(String username, String password);",
"UserPortfolioDTO findLogin(String login);",
"@GetMapping(\"/user\")\n public User login(@RequestParam String username, @RequestParam String password) { return userDataTierConnection.login(username,password); }",
"public void login(User user);",
"public User findUserByLogin(String login) throws DBException {\n\t\tUser user = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = DBManager.getInstance().getConnection();\n\t\t\tpstmt = con.prepareStatement(SQL_FIND_USER_BY_LOGIN);\n\t\t\tpstmt.setString(1, login);\n\t\t\trs = pstmt.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tuser = extractUser(rs);\n\t\t\t}\n\t\t\tcon.commit();\n\t\t} catch (SQLException ex) {\n\t\t\tDBManager.getInstance().rollback(con);\n\t\t\tLOG.error(Messages.ERR_CANNOT_FIND_USER_BY_LOGIN, ex);\n\t\t\tthrow new DBException(Messages.ERR_CANNOT_FIND_USER_BY_LOGIN, ex);\n\t\t} finally {\n\t\t\tDBManager.getInstance().close(con, pstmt, rs);\n\t\t}\n\t\treturn user;\n\n\t}",
"public User getLoginUser(User userLogin) {\n if (userLogin.getLoginname().equals(\"\") || (userLogin.getPassword().equals(\"\"))) {\n return null;\n } else {\n\n User user = new User();\n user = this.userDao.selectLogin(userLogin.getLoginname());\n if (user != null) {\n if (user.getPassword().equals(userLogin.getPassword())) {\n return user;\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic Security getByUserName(Security login) {\n\t\tSecurity security = null;\n\t\t\n\t\tCriteria crit = getSession().createCriteria(getPersistentClass());\n\t\tcrit.setFetchMode(\"contact\", FetchMode.JOIN);\n\t\tcrit.setFetchMode(\"contact.employees\", FetchMode.JOIN);\n\t\tcrit.setFetchMode(\"contact.employees.resourceprofiles\", FetchMode.JOIN);\n\t\tcrit.add(Restrictions.eq(\"login\", login.getLogin()));\n\t\tList<Security> list = crit.list();\n\t\t\n\t\tif (list != null && !list.isEmpty()) {\n\t\t\tsecurity = list.get(0);\n\t\t}\n\t\t\n\t\treturn security;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic Security getByLogin (Security login) {\n\t\tSecurity security = null;\n\t\t\n\t\tCriteria crit = getSession().createCriteria(getPersistentClass());\n\t\tcrit.setFetchMode(\"contact\", FetchMode.JOIN);\n\t\tcrit.setFetchMode(\"contact.employees\", FetchMode.JOIN);\n\t\tcrit.setFetchMode(\"contact.employees.resourceprofiles\", FetchMode.JOIN);\n\t\tcrit.add(Restrictions.eq(\"login\", login.getLogin()));\n\t\tList<Security> list = crit.list();\n\t\t\n\t\tif (list != null && !list.isEmpty()) {\n\t\t\tsecurity = list.get(0);\n\t\t}\n\t\t\n\t\treturn security;\n\t}",
"public static Users retieveUser(String login, String pass) {\n if (pass == null || pass.isEmpty()\n || login == null || login.isEmpty() || login.contains(\",\")) {\n return null;\n }\n\n Hashtable<String, String> ldapEnv = new Hashtable<String, String>(11);\n String dn = String.format(\"uid=%s,%s\", login, baseDN);\n\n ldapEnv.put(Context.INITIAL_CONTEXT_FACTORY, \"com.sun.jndi.ldap.LdapCtxFactory\");\n ldapEnv.put(Context.PROVIDER_URL, ldapURL);\n ldapEnv.put(Context.SECURITY_PRINCIPAL, dn);\n ldapEnv.put(Context.SECURITY_CREDENTIALS, pass);\n\n try {\n DirContext authContext = new InitialDirContext(ldapEnv);\n Attributes userAttributes = authContext.getAttributes(dn);\n\n if (userAttributes.get(\"uidNumber\") == null) {\n return null;\n }\n\n Attribute cn = userAttributes.get(\"cn\"); // commonName - eg. Marek Nowicki\n\n String name = ((String) cn.get());\n String firstName = name;\n String lastName = \"(LDAP)\";\n\n int index = name.lastIndexOf(\" \");\n if (index > 0) {\n firstName = name.substring(0, index).trim();\n lastName = name.substring(index + 1).trim();\n }\n\n Users user = new Users();\n\n user.setLogin(login);\n user.setFirstname(firstName);\n user.setLastname(lastName);\n user.setEmail(login + emailSuffix);\n\n return user;\n } catch (AuthenticationException ex) {\n } catch (NamingException ex) {\n } catch (NullPointerException ex) {\n } catch (ClassCastException ex) {\n } catch (Exception ex) {\n log.fatal(\"LDAP Exception:\", ex);\n }\n return null;\n }",
"Login findByUserName (String username);",
"@Transactional\n\t@Override\n\tpublic User Login(String login, String senha) {\n\t\tUser user = this.userDao.getUsuario(login, senha);\n\t\treturn user;\n\t}",
"public UserAccount getUserAccountByLoginId(String loginId);",
"void login(String user, String password);",
"User getUserByLoginAndPassword(String login, String password) throws DaoException;",
"@Override\n public User login(String username, String password) {\n User u = userDataMapper.getUserByUserName(username);\n if (u != null && u.getPassword().equals(password))\n return u;\n return null;\n }",
"@GET(\"/login\")\n Call<LoginResponse> loginRequest(@Path(\"username\") String username\n , @Path(\"password\") String password);",
"public void setLogin (String login) {\n this.login = login;\n }",
"public void setLogin(String login) {\n this.login = login;\n }",
"public void setLogin(String login) {\n this.login = login;\n }",
"public User getUserByLogin(String login) throws ReadException, LoginNotExistException {\n LOGGER.log(Level.INFO, \"Metodo getUserByLogin de la clase AbstractUserFacade\");\n \n User user = new User();\n List<User> users = getAllUsers();\n for (User u: users) {\n if (u.getLogin().compareToIgnoreCase(login) == 0) {\n if (u instanceof Boss){\n user.setLogin(\"Boss\");\n } else if(u instanceof Employee){\n user.setLogin(\"Employee\");\n }\n return user;\n }\n }\n throw new LoginNotExistException();\n }",
"public User(String login) {\n this.login = login;\n }",
"@Public\n\t@Get(\"/login\")\n\tpublic void login() {\n\t\tif (userSession.isLogged()) {\n\t\t\tresult.redirectTo(HomeController.class).home();\n\t\t}\n\t}",
"@GET\n\t@Path(\"/login\")\n\tpublic Response login(@QueryParam(\"user\") String user,@QueryParam(\"pass\") String pass) throws ClassNotFoundException, SQLException, InterruptedException, URISyntaxException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t// Connect to a database\n\t\tConnection con= DriverManager.getConnection(\"jdbc:mysql://localhost/ecs\",\"root\",\"\");\n\t\tStatement stmt=con.createStatement();\n\t\tString query = \"SELECT * FROM user_profiles WHERE User_Nam='\"+user+\"' AND Secret_Key='\"+pass+\"';\";\n\t\tResultSet rs = stmt.executeQuery(query) ;\n\t\tString s=\"\";\n\t\tif(rs.next()){\n\t\t\ts=\"Login successful\";\n\t\t\ttry {\n\t\t java.net.URI location = new java.net.URI(\"../adminHome.html\");\n\t\t throw new WebApplicationException(Response.temporaryRedirect(location).build());\n\t\t } catch (URISyntaxException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t}\n\t\telse\n\t\t\ts=\"Login Failed\";\n\t\treturn Response.status(200).entity(s).build();\n\t}",
"public static void getMe(final Context context, final OnLoginListener onLoginListener)\n {\n HttpClientHelper client = new HttpClientHelper(Endpoints.User.me, context);\n\n Network.newRequest(client, Network.GET, Network.WITH_COOKIE, new Delegate()\n {\n @Override\n public void requestResults(Network.Status status)\n {\n User user = null;\n boolean err = false;\n\n if(status.hasInternet)\n {\n if(status.response.getStatusLine().getStatusCode() == 200)\n {\n try\n {\n user = new User(status.result.getJSONObject(\"data\"));\n }\n catch (JSONException e)\n {\n err = true;\n e.printStackTrace();\n }\n }\n else\n {\n err = true;\n }\n }\n\n onLoginListener.onLogin(user, status, err);\n }\n });\n }",
"public LocalUser getLoginUser(){\n\t\treturn new Select().from(LocalUser.class).executeSingle();\n\t}",
"UserDisplayDto getUserInfo(String login);",
"Optional<User> findUserWithCookies(String login, String userHash) throws ServiceException;",
"public String getLogin() {\n return login;\n }",
"public User selectLogin(String username) {\n return this.userDao.selectLogin(username);\n }",
"@Override\n\tpublic User login(String user, String pass) {\n\t\treturn null;\n\t}",
"public User getUser(String userName, String password);",
"public String getLogin () {\n return login;\n }",
"@Override\r\n\tpublic User login(User user) {\n\t\treturn userdao.findByUserId(user.getId());\r\n\t}",
"public void setLogin(java.lang.String login) {\n this.login = login;\n }",
"public void setLogin(java.lang.String login) {\n this.login = login;\n }",
"@Override\n\tpublic AdminDTO login(AdminloginDTO login) {\n\t\treturn adao.login(login);\n\t}",
"@Query(\"SELECT * FROM tabUsers WHERE username=:username AND password=:password \")\n User getUserLogin(String username, String password);",
"public String getLogin(){\r\n return login;\r\n }",
"@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n public ModelAndView login() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"user/login\");\n return modelAndView;\n }",
"User getCurrentLoggedInUser();",
"String login(Integer userId);",
"public User getSpecificUser(String username);",
"@SuppressWarnings(\"unchecked\")\n public Function<Session, User> getByCredentials(String login, String password) {\n return this.functionTransaction(session -> {\n var found = (List<User>) session\n .createQuery(\"from User where login = :login and password = :password\")\n .setParameter(\"login\", login)\n .setParameter(\"password\", password)\n .list();\n return found.isEmpty() ? null : found.get(0);\n });\n }",
"User loginUser(User userLoginRequest, HttpSession httpSession) throws Exception;",
"@GetMapping(\"/login\")\n public String viewLoginPage() {\n\n return \"login/login\";\n }",
"public User getLoggedUser();",
"public Usuario getUsuario(String login) throws ValidacaoException, MissingResourceException {\n\n\t\tValidacao.validaString(login, \"Login de usuario nao pode ser vazio ou nulo.\");\n\t\t\n\t\tIterator<Usuario> it = meusUsuarios.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tUsuario usuarioProcurado = it.next();\n\t\t\tif(usuarioProcurado.getLogin().equals(login)) {\n\t\t\t\treturn usuarioProcurado;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new MissingResourceException(\"Usuario inexistente.\", \"Usuario\", \"login\");\n\t\t\n\t\t\n\t}",
"@RequestMapping(value = \"/usersettings/{login}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<UserSettingsDTO> getUserSettings(@PathVariable String login) {\n log.debug(\"REST request to get User settings : {}\", login);\n return userSettingsService.getUserSettingsByLogin(login)\n .map(UserSettingsDTO::new)\n .map(userSettingsDTO -> new ResponseEntity<>(userSettingsDTO, HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@RequestMapping(value=\"/login/{username}/{password}\")\n @ResponseBody\n public boolean login(@PathVariable String username, @PathVariable String password){\n return customUserDetailsService.login(username, password);\n\n }",
"String signIn(String userName, String password) throws UserNotFoundException;",
"@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login(Model model) {\n\t\tlogger.debug(\" A user trying to login\");\n\t\treturn \"login\";\n\t}",
"protected Response login() {\n return login(\"\");\n }",
"@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login() {\n\t\treturn \"login\";\n\t}",
"@Query(\"Select login from Login login where login.username=?1 and login.password=?2\")\n\tpublic Login getUserDetails(String username,String password);",
"public abstract User login(User data);",
"public String getLogin() {\n return this.session.sessionPersona().getUserName();\n }",
"public User login(String loginName, String password) throws UserBlockedException;",
"@Override\n\tpublic User login(String username) {\n\t\treturn userDao.login(username);\n\t}",
"@Query(\"FROM User WHERE email=?1 AND password=?2\")\n\tOptional<Student> login(String email, String password);",
"public EOSUser findTenantUser(String login, String tenantAlias) throws EOSNotFoundException;",
"public static LoginUserResponseDto loginUser(LoginUserRequestDto loginRequest) {\n\t\tif (!isRequestValid(loginRequest)) {\n\t\t\treturn null;\n\t\t}\n\t\tLoginUserResponseDto serviceResponse = null;\n\t\tHttpClient httpClient = new DefaultHttpClient();\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tHttpPost request = new HttpPost(urlRoot + loginRequest.getRequestUri());\n\t\t\tString jsonConversion = mapper.writeValueAsString(loginRequest);\n\t\t\tStringEntity params = new StringEntity(jsonConversion);\n\t\t\trequest.addHeader(\"content-type\", \"application/json\");\n\t\t\trequest.setEntity(params);\n\t\t\tLoginUserRequestDto parserRequest = mapper.readValue(jsonConversion, LoginUserRequestDto.class);\n\t\t\tHttpResponse response = httpClient.execute(request);\n\t\t\tHttpEntity entity = response.getEntity();\n\t\t\tString responseString = EntityUtils.toString(entity, \"UTF-8\");\n\t\t\tserviceResponse = mapper.readValue(responseString, LoginUserResponseDto.class);\n\t\t\treturn serviceResponse;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\thttpClient.getConnectionManager().shutdown();\n\t\t}\n\t\treturn serviceResponse;\n\t}",
"@Override\n\tpublic Users getUserBylogin(String username, String password) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString sql = \"select * from users where users_Username = ? and users_Password = ? and users.status = 1\";\n\t\t\n\t\ttry {\n\t\t\tconnection = getConnection();\n\t\t\t statement = connection.prepareStatement(sql);\n\t\t\tstatement.setString(1, username);\n\t\t\tstatement.setString(2, password);\n\t\t\tResultSet rs = statement.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tUsers users = new Users();\n\t\t\t\tusers.setId(rs.getInt(\"users_id\"));\n\t\t\t\tusers.setName(rs.getString(\"users_Name\"));\n\t\t\t\tusers.setEmail(rs.getString(\"users_Email\"));\n\t\t\t\tusers.setPassWord(rs.getString(\"users_Password\"));\n\t\t\t\tusers.setUserName(rs.getString(\"users_Username\"));\n\t\t\t\tusers.setPhone(rs.getString(\"users_Phone\"));\n\t\t\t\tusers.setRole(rs.getString(\"role\"));\n\t\t\t\tusers.setCreate_Date(rs.getDate(\"create_date\"));\n\t\t\t\tusers.setModify_Date(rs.getDate(\"modify_date\"));\n\t\t\t\tusers.setStatus(rs.getInt(\"status\"));\n\t\t\t\treturn users;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\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\tif(statement != null) {\n\t\t\t\ttry {\n\t\t\t\t\tstatement.close();\n\t\t\t\t} catch (SQLException 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\t\t\n\t\treturn null;\n\t}",
"@RequestMapping(value = \"/login/token\", method = RequestMethod.POST)\n public ResponseEntity<?> authenticateUser(@RequestBody Login login) {\n if (login.getUsername().isEmpty() || login.getPassword().isEmpty())\n return new ResponseEntity<>(\"Username of password invalid\", HttpStatus.BAD_REQUEST);\n\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(login.getUsername(), login.getPassword()));\n\n String jwt = jwtTokenManager.generateJwtToken(authentication);\n\n User user = userService.checkUser(login.getUsername());\n if (user == null)\n userService.registerUser(login.getUsername());\n\n return new ResponseEntity<>(new JWTAuthenticationResponse(Constants.HEADER_STRING, jwt, Constants.TOKEN_PREFIX), HttpStatus.OK);\n }",
"String getLoginId();",
"@Override\n public User getUser(String username, String password) {\n User optionalUser;\n try {\n optionalUser = userRepository.usernamePasswordQuery(username, password);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n optionalUser = null;\n }\n\n if (optionalUser == null) {\n return null;\n } else {\n return optionalUser;\n }\n\n }",
"public User getUserByName(String username);",
"public User getUserByName(String username);",
"public User userAuth(Login loginData)throws EntityNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tUser gotUser=userDao.getById(loginData.getEmail());\n\t\t\tif(gotUser.getPassword().equals(loginData.getPassword()))\n\t\t\t{\n\t\t\t\treturn gotUser;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tthrow new EntityNotFoundException(\"Password Incorrect\");\n\t\t\t}\n\t\t}\n\t\tcatch(EntityNotFoundException e)\n\t\t{\n\t\t\tthrow new EntityNotFoundException(\"No user exist with this email id\");\n\t\t}\t\n\t}",
"@Override\n\tpublic Optional<Login> findbyId(long usuario) {\n\t\treturn this.loginDao.findById(usuario);\n\t}",
"public User get(String username);",
"LoggedUser getLoggedUser();",
"public User getUser(String username);",
"@Query(\"SELECT u FROM usuario u WHERE email = ?1 AND password = ?2\")\n\tpublic Optional<Usuario> login(String email, String password);"
]
| [
"0.7913347",
"0.7766262",
"0.7659154",
"0.7535295",
"0.7470831",
"0.7455487",
"0.73024863",
"0.72560763",
"0.70509386",
"0.703621",
"0.70163596",
"0.6998938",
"0.6931702",
"0.6925534",
"0.6894366",
"0.67048043",
"0.66929764",
"0.6567435",
"0.65373814",
"0.65130156",
"0.646617",
"0.646499",
"0.6454447",
"0.6437218",
"0.64357287",
"0.6423203",
"0.6389726",
"0.63719684",
"0.6367041",
"0.6352119",
"0.6347681",
"0.63463527",
"0.6344924",
"0.6338737",
"0.63030463",
"0.62915725",
"0.62701535",
"0.6251687",
"0.62514675",
"0.623713",
"0.6234512",
"0.6221386",
"0.62205106",
"0.6217784",
"0.6206996",
"0.6206996",
"0.62047863",
"0.6182167",
"0.61769634",
"0.61565477",
"0.6137126",
"0.6134431",
"0.6132107",
"0.61117536",
"0.6101987",
"0.6101424",
"0.60960686",
"0.6077934",
"0.60672194",
"0.60526055",
"0.6047486",
"0.6047486",
"0.6037042",
"0.60367554",
"0.60080504",
"0.59912914",
"0.59879386",
"0.59844077",
"0.5978181",
"0.5975531",
"0.5965471",
"0.59580487",
"0.59367335",
"0.5927313",
"0.59256417",
"0.5919407",
"0.59114057",
"0.590578",
"0.58935446",
"0.58866936",
"0.5876177",
"0.5873586",
"0.58636236",
"0.5859357",
"0.5858835",
"0.58561516",
"0.58551383",
"0.5853831",
"0.58538175",
"0.5851966",
"0.5847985",
"0.58447146",
"0.5837037",
"0.5837037",
"0.5836283",
"0.58350056",
"0.58289844",
"0.5826834",
"0.58249414",
"0.5811165"
]
| 0.7413561 | 6 |
The shared context must be created on the main thread. | void start() throws LWJGLException {
this.drawable = getDrawable();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Context getContextAsync() {\n return getActivity() == null ? IotSensorsApplication.getApplication().getApplicationContext() : getActivity();\n }",
"private void setWSClientToKeepSeparateContextPerThread() {\n ((BindingProvider) movilizerCloud).getRequestContext()\n .put(THREAD_LOCAL_CONTEXT_KEY, \"true\");\n }",
"static synchronized Context getContext() {\n checkState();\n return sInstance.mContext;\n }",
"private SingletonApp( Context context ) {\n mMB = MessageBroker.getInstance( context );\n }",
"@Override\n\tpublic AsyncContext getAsyncContext() {\n\t\treturn null;\n\t}",
"public MyServiceDataSingleton(Context context) {\r\n myContext = context;\r\n }",
"@Override\n\t\tprotected Void doInBackground(Void... params)\n\t\t{\n\t\t\t//Get the current thread's token\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tMyApplication app = (MyApplication) getApplication();\n\t\t\t\twhile(app.getSyncStatus());\n\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public static Context getApplicationContext() { return mApplicationContext; }",
"@Override\n public Context getContext() {\n return this.getApplicationContext();\n }",
"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 }",
"private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}",
"private Context getContext() {\n return mContext;\n }",
"private Context getContext() {\n return mContext;\n }",
"public static Context getContext(){\n return appContext;\n }",
"Context createContext();",
"Context createContext();",
"@Override\n\tpublic AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)\n\t\t\tthrows IllegalStateException {\n\t\treturn null;\n\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\tpublic AsyncContext startAsync() throws IllegalStateException {\n\t\treturn null;\n\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n\n System.out.println(ThreadLocalInstance.getInstance());\n }",
"public void run()\n {\n CallerContextManager ccm = (CallerContextManager) ManagerManager.getInstance(CallerContextManager.class);\n CallerContext cc = ccm.getCurrentContext();\n CCData data = getCCData(cc);\n if ((data != null) && (data.listeners != null)) data.listeners.notifyChange(event);\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 Context getApplicationContext() {\n return mView.get().getApplicationContext();\n }",
"public static Context getInstance(){\n\t\treturn (Context) t.get();\n\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"public boolean needContext() {\n\t\treturn false;\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}",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"public void makeContextCurrent(){\n glfwMakeContextCurrent(handle);\n }",
"public MyApp() {\n sContext = this;\n }",
"@Override\n\tprotected Application doInBackground() throws Exception {\n\t\treturn null;\n\t}",
"private Context getApplicationContext() {\n\t\treturn this.cordova.getActivity().getApplicationContext();\n\t}",
"private Context getApplicationContext() {\n\t\treturn this.cordova.getActivity().getApplicationContext();\n\t}",
"Context getContext();",
"long getCurrentContext();",
"@Override\n public void run() {\n }",
"@Override\n public void threadStarted() {\n }",
"public Context getApplicationContext();",
"public static void startWorker(Context context) {\n if (Application.workHandler != null && Application.worker != null && Application.worker.getState() != Thread.State.TERMINATED) {\n // Clear any instance of tickerRunnable to avoid duplicate\n // and initialize to make sure ticker is running as intended.\n if (Application.workHandler != null) {\n Application.workHandler.removeCallbacks(Application.tickerRunnable);\n }\n Application.tickerRunnable = null;\n Application.tickerRunnable = new TickerRunnable(context, Application.workHandler);\n Application.tickerRunnable.tick();\n return;\n }\n Application.worker = new WorkerThread();\n Application.worker.start();\n\n Application.workHandler = Application.worker.getHandler();\n\n Application.tickerRunnable = new TickerRunnable(context, Application.workHandler);\n Application.tickerRunnable.tick();\n }",
"@Override\n public void run()\n {\n }",
"@Override\n public void run()\n {\n }",
"@Override\r\n\tpublic void run() {\n\t}",
"@Override\r\n\tpublic void run() {\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 public void run()\n {\n\n }",
"public static Context getContext() {\n\t\treturn instance;\n\t}",
"@Override\n\tpublic void run()\n\t{\n\t}",
"private AppContext()\n {\n }",
"private VolleySingleton(Context context){\n // Hacemos el contexto para todo el tiempo de vida de la aplicación, no solo para una sola actividad.\n mRequestQueue = Volley.newRequestQueue(context.getApplicationContext());\n\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}",
"public cl_context getContext() {\r\n return context;\r\n }",
"Shared shared();",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"protected void attach()\r\n {\r\n Object o = _CURRENT_CONTEXT.get();\r\n // We want to catch two different problems:\r\n // (1) A failure to call release()\r\n // (2) An attempt to attach an instance when the thread already has one\r\n // For #1, anything more than a warning is dangerous, because throwing\r\n // an exception would permanently make the thread unusable.\r\n // For #2, I'd like to throw an exception, but I can't distinguish\r\n // this scenario from #1.\r\n if (o != null)\r\n {\r\n// _LOG.warning(\"TRYING_ATTACH_RENDERERINGCONTEXT\");\r\n }\r\n\r\n _CURRENT_CONTEXT.set(this);\r\n }",
"public static synchronized void initialize(Context context) {\n instance.context = context;\n initInternal();\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"Context context();",
"Context context();",
"public static void initApplicationContext(Context appContext) {\n // Conceding that occasionally in tests, native is loaded before the browser process is\n // started, in which case the browser process re-sets the application context.\n assert mApplicationContext == null || mApplicationContext == appContext ||\n ((ContextWrapper)mApplicationContext).getBaseContext() == appContext;\n initJavaSideApplicationContext(appContext);\n }",
"@Override\r\n public void run() {\n\r\n }",
"@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}",
"public abstract ApplicationLoader.Context context();",
"@Override\r\n public void run() {}",
"@Override\n\tpublic void run()\n\t{\n\n\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() throws Throwable {\n try {\n super.run();\n } finally {\n contextView.close();\n }\n }",
"@Override\n\tpublic void run() {\n\t}",
"ApplicationContext getAppCtx();",
"@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\r\n\tpublic void run() {\n\r\n\t}",
"private Context getThreadContext() throws NamingException {\n final ThreadContext threadContext = ThreadContext.getThreadContext();\n if (skipEjbContext(threadContext)) {\n return ContextBindings.getClassLoader();\n }\n final Context context = threadContext.getBeanContext().getJndiEnc();\n return context;\n }",
"@Context\r\npublic interface ThreadContext\r\n{\r\n /**\r\n * Get the minimum thread level.\r\n *\r\n * @param min the default minimum value\r\n * @return the minimum thread level\r\n */\r\n int getMin( int min );\r\n \r\n /**\r\n * Return maximum thread level.\r\n *\r\n * @param max the default maximum value\r\n * @return the maximum thread level\r\n */\r\n int getMax( int max );\r\n \r\n /**\r\n * Return the deamon flag.\r\n *\r\n * @param flag true if a damon thread \r\n * @return the deamon thread policy\r\n */\r\n boolean getDaemon( boolean flag );\r\n \r\n /**\r\n * Get the thread pool name.\r\n *\r\n * @param name the pool name\r\n * @return the name\r\n */\r\n String getName( String name );\r\n \r\n /**\r\n * Get the thread pool priority.\r\n *\r\n * @param priority the thread pool priority\r\n * @return the priority\r\n */\r\n int getPriority( int priority );\r\n \r\n /**\r\n * Get the maximum idle time.\r\n *\r\n * @param idle the default maximum idle time\r\n * @return the maximum idle time in milliseconds\r\n */\r\n int getIdle( int idle );\r\n \r\n}",
"CTX_Context getContext();",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}"
]
| [
"0.6291447",
"0.62389153",
"0.6186917",
"0.61345136",
"0.60378337",
"0.60072064",
"0.5994177",
"0.58811414",
"0.58657324",
"0.58363026",
"0.58217895",
"0.5811627",
"0.5811627",
"0.5747953",
"0.5736435",
"0.5736435",
"0.5691615",
"0.56588674",
"0.56588674",
"0.56588674",
"0.56553674",
"0.564",
"0.564",
"0.56333095",
"0.5629557",
"0.5616332",
"0.5616332",
"0.5616332",
"0.5616332",
"0.5616332",
"0.5616332",
"0.5616332",
"0.55884486",
"0.5587581",
"0.55858606",
"0.55858606",
"0.55735636",
"0.55607826",
"0.55607826",
"0.55579525",
"0.5554745",
"0.5554745",
"0.5553207",
"0.5547149",
"0.55451673",
"0.55450886",
"0.55450886",
"0.55427265",
"0.5541549",
"0.5541432",
"0.5537715",
"0.55349505",
"0.5534593",
"0.553278",
"0.553278",
"0.552565",
"0.552565",
"0.5516622",
"0.5516622",
"0.5505126",
"0.55040073",
"0.5498141",
"0.5492877",
"0.54869217",
"0.54856646",
"0.54856646",
"0.54836965",
"0.54829633",
"0.5482617",
"0.5482617",
"0.5482286",
"0.54785776",
"0.5477921",
"0.54772806",
"0.54772806",
"0.54772806",
"0.54758775",
"0.54758775",
"0.54683393",
"0.5467664",
"0.5462849",
"0.54614455",
"0.54586864",
"0.5451212",
"0.5450591",
"0.54504347",
"0.54500127",
"0.54495263",
"0.5447978",
"0.5447978",
"0.5447978",
"0.5447978",
"0.5447978",
"0.5447978",
"0.5447978",
"0.544749",
"0.5438969",
"0.54312754",
"0.5424978",
"0.5424281",
"0.5424281"
]
| 0.0 | -1 |
TODO Autogenerated method stub | private static void mergeSortedArrays(int[] arr1, int[] arr2, int length1, int length2) {
int j = 0;
StringBuilder sb = new StringBuilder();
if (length1 > length2) {
for (int i = length1 - length2; i < length1; i++) {
arr1[i] = arr2[j++];
}
Arrays.sort(arr1);
for (int i = 0; i < arr1.length; i++) {
sb.append(arr1[i] + " ");
}
} else {
for (int i = length2 - length1; i < length2; i++) {
arr2[i] = arr1[j++];
}
Arrays.sort(arr2);
for (int i = 0; i < arr2.length; i++) {
sb.append(arr2[i] + " ");
}
}
System.out.println(sb.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO more refactoring of below methods | private static StringBuffer addOption(StringBuffer html, DataObject o, String ln, String vn, Object val) {
Object v = o.meanFieldFilter(vn) ? o.get(vn) : o.get(ln);
boolean match = checkMatch(v, val);
return html.append("<option value=\"").append(v == null ? "" : HttpUtils.htmlEncode(v.toString()))
.append(match ? "\" selected>" : "\">")
.append(o.get(ln) == null ? "" : HttpUtils.htmlEncode(o.get(ln).toString(), true, false))
.append("</option>");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"private stendhal() {\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"private void parseData() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected abstract Set method_1559();",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n protected void init() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void preprocess() {\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\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"OptimizeResponse() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"private void strin() {\n\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private void kk12() {\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}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void identify() {\n\n\t}",
"@Override\r\n protected void parseAttributes()\r\n {\n\r\n }",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"Operations operations();",
"@Override\n protected void initialize() \n {\n \n }",
"protected void additionalProcessing() {\n\t}",
"private void searchFunction() {\n\t\t\r\n\t}",
"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 }",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"protected void init() {\n // to override and use this method\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"protected void prepareEntityToNodeMap()\r\n\t{\n\t}",
"public void method_4270() {}",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\n protected void processSelect() {\n \n }",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"private void init() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n protected void execute() {\n \n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}"
]
| [
"0.55076724",
"0.5349161",
"0.53453046",
"0.5307524",
"0.5278654",
"0.5254519",
"0.52384686",
"0.5205076",
"0.5185045",
"0.51732767",
"0.51341164",
"0.5109728",
"0.51067334",
"0.5104516",
"0.51043075",
"0.5058687",
"0.5057144",
"0.50508094",
"0.50308627",
"0.50308627",
"0.5022168",
"0.50073594",
"0.5004182",
"0.50015235",
"0.49999946",
"0.49889058",
"0.49703586",
"0.49703586",
"0.49580145",
"0.49572077",
"0.49230957",
"0.4921279",
"0.49209526",
"0.49157557",
"0.48984087",
"0.4886708",
"0.4875603",
"0.48694766",
"0.48694766",
"0.48694766",
"0.48694766",
"0.48694766",
"0.48694766",
"0.48694217",
"0.48691472",
"0.48595512",
"0.48594677",
"0.48491415",
"0.48491415",
"0.48491415",
"0.48491415",
"0.48491415",
"0.48491415",
"0.48490575",
"0.48422512",
"0.48393342",
"0.48344976",
"0.48296702",
"0.48274383",
"0.48258746",
"0.48182023",
"0.48174658",
"0.48151204",
"0.48133942",
"0.48033193",
"0.47976166",
"0.47864193",
"0.4779543",
"0.4779543",
"0.47781533",
"0.47695827",
"0.47671944",
"0.47600025",
"0.47585002",
"0.47544116",
"0.47463316",
"0.47393036",
"0.47388753",
"0.4736378",
"0.4736378",
"0.47360843",
"0.47349355",
"0.47337884",
"0.47319207",
"0.47311088",
"0.47261292",
"0.47261292",
"0.47226486",
"0.47221482",
"0.47202575",
"0.47202575",
"0.47180605",
"0.4717262",
"0.4715083",
"0.47087038",
"0.4701097",
"0.46939138",
"0.46938908",
"0.4688218",
"0.4682147",
"0.4682107"
]
| 0.0 | -1 |
v list value, val field value | private static boolean checkMatch(Object v, Object val) {
Class type = val == null ? null : val.getClass();
if (v != null && type != null) {
if (type.isArray()) {
String norm = type.getComponentType() != v.getClass()?v.toString():null;
// TODO give a warning that String conv is used
//System.err.printf("COmp %s, %s, -> %s%n", type.getComponentType(), v.getClass(), norm);
if (val instanceof Object[])
for (Object e : (Object[]) val) {
if (norm != null) {
if (norm.equals(e.toString()))
return true;
} else if (v.equals(e)) {
return true;
}
}
else if (val instanceof int[])
for (int e : (int[]) val) {
if (e == ((Number) v).intValue()) {
return true;
}
}
else if (val instanceof char[] && v instanceof String )
for (char c : (char[]) val) {
if (c == ((String)v).charAt(0)) {
return true;
}
}
} else if (Collection.class.isAssignableFrom(type)) {
for (Object e : (Collection) val) {
if (v.equals(e)) {
return true;
}
}
} else {
if (val.equals(v))
return true;
if (val instanceof String)
return val.equals(v.toString());
else if (v instanceof String) {
String sv = (String) v;
if (sv.length() > 0) {
if (val instanceof Number)
return val.equals(new Integer((String) v));
else if (val instanceof Character)
return ((Character) val).charValue() == sv.charAt(0);
else if (type.isEnum()) {
return val.toString().equals(v);
}
}
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Listof<V> vals();",
"public Object getVal()\n { return val; }",
"private int cbVal(String[][] list, int val) {\r\n return parseInt(list[val][0]);\r\n }",
"public void vValInTable(String objLoc, String[] val, String browser) {\r\n\t\tselectMaxSizeinTable(\"job_show_res_id\", browser);\r\n\t\tselUtils.waitForTxtPresent(\"est_disppagenos_css\", editPageDispTxt);\r\n\t\tvals = selUtils.getLstItems(selUtils.getObjects(objLoc));\r\n\t\tfor (cnti = 0; cnti < val.length; cnti++) {\r\n\t\t\tAssert.assertTrue(vals.contains(val[cnti]), val[cnti]\r\n\t\t\t\t\t+ \" is not present in value list\");\r\n\t\t}\r\n\t\tlogger.info(\" Verified that expected value is present in list\");\r\n\t}",
"V getValue();",
"V getValue();",
"V getValue();",
"public void setV(List<String> v);",
"public abstract V getValue();",
"@Override\n\tpublic void visit(ValueListExpression arg0) {\n\t\t\n\t}",
"public void vValInTable(String objLoc, String[] val, int size,\r\n\t\t\tString browser) {\r\n\t\tselectMaxSizeinTable(\"job_show_res_id\", browser);\r\n\t\tselUtils.waitForTxtPresent(\"est_disppagenos_css\", editPageDispTxt);\r\n\t\tvals = selUtils.getLstItems(selUtils.getObjects(objLoc));\r\n\t\tfor (cnti = 0; cnti < val.length; cnti++) {\r\n\t\t\t// Assert.assertTrue(vals.size()==size,\r\n\t\t\t// \" The no of rows in table is not \"+size);\r\n\t\t\tAssert.assertTrue(vals.contains(val[cnti]), val[cnti]\r\n\t\t\t\t\t+ \" is not present in value list\");\r\n\t\t}\r\n\t\tlogger.info(\" Verified that expected value is present in list\");\r\n\t}",
"public V getValue();",
"@Override\n\t\tpublic V getValue() {\n\t\t\treturn v;\n\t\t}",
"public V getValue()\r\n\t\t{\r\n\t\t\treturn val;\r\n\t\t}",
"public List<?> getValue() {\n return value;\n }",
"Object visitArrayOfValues(ArrayOfValuesNode node, Object state);",
"public List<String> getV();",
"public void getValues(){\r\n //Get Values \r\n int k=0;\r\n String[] var;\r\n String evar;\r\n \r\n for (int i=0; i<linkVector.size(); i++){\r\n var= (String[]) linkVector.elementAt(i);\r\n evar=var[1];\r\n try { \r\n varContextField= varContextFields[linkIndex[k]]; \r\n switch (linkType[k++]){\r\n case DOUBLE: varContextField.setDouble(varContextObject,getDouble(evar)); break;\r\n case ARRAYDOUBLE: varContextField.set(varContextObject,getDoubleArray(evar)); break;\r\n case ARRAYDOUBLE2D: varContextField.set(varContextObject,getDoubleArray2D(evar)); break;\r\n case STRING: varContextField.set(varContextObject,getString(evar)); break; \r\n }\r\n \r\n } catch (java.lang.IllegalAccessException e) {\r\n System.out.println(\"Error Step: getting a value \" + e);\r\n } \r\n } \r\n }",
"List getValues();",
"public void valor(V v) {\n value = v;\n }",
"void setValue(V value);",
"@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}",
"@java.lang.Override\n public java.util.List<java.lang.Long>\n getValueList() {\n return value_;\n }",
"private static void value(ArrayList<tok> pHolder, ArrayList<tok> xmlList) {\n\t\t\r\n\t\tif(pHolder.get(index).getType() == Token_Type.TOK_APOSTROPHE){\r\n\t\t\tindex++;\r\n\t\t\tif(pHolder.get(index).getType() == Token_Type.TOK_ID){\r\n\t\t\t\tindex++;\r\n\t\t\t\tif(pHolder.get(index).getType() == Token_Type.TOK_APOSTROPHE){\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse{noError = false;}\r\n\t\t\t}\r\n\t\t\telse{noError = false;}\r\n\t\t}\r\n\t\telse if(pHolder.get(index).getType() == Token_Type.TOK_NUM){\r\n\t\t\tindex++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse{noError = false;}\r\n\t}",
"public V setValue(V value);",
"public final T getValueFrom(List<UnknownFieldData> list) {\n return list == null ? null : this.repeated ? getRepeatedValueFrom(list) : getSingularValueFrom(list);\n }",
"public static boolean field_value(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"field_value\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, FIELD_VALUE, \"<field value>\");\n r = scalar_value(b, l + 1);\n if (!r) r = array(b, l + 1);\n if (!r) r = env_var_value(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"public List<V> values()\r\n\t{\r\n\t\tList<V> values = new ArrayList<V>();\r\n\t\t\r\n\t\tfor(Entry element : data)\r\n\t\t{\r\n\t\t\tvalues.add(element.value);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn values;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn val.toString();\r\n\t}",
"Values values();",
"public ListVS<V> getValues() {\n ListVS<V> result = new ListVS<V>(getUniverse());\n for (V value : this.entries.values()) {\n result = result.add(value);\n }\n return result;\n }",
"java.util.List<java.lang.String> getValuesList();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"public List<String> getValue() {\r\n return value;\r\n }",
"public List<NeonValue> getValues();",
"private interface Valuable extends Base {\n\t\tString getValue();\n\t\tvoid setValue(String value);\n\t}",
"public static void buildElements(Object p,Object v,List<DataElement> dataVect) {\n if(!(p instanceof Iterable<?>)) p=null;\r\n if(!(v instanceof Iterable<?>)) v=null;\r\n if(p==null && v==null) return;\r\n Iterator<?> pi=(p==null)?null:((Iterable<?>)p).iterator();\r\n Iterator<?> vi=(v==null)?null:((Iterable<?>)v).iterator();\r\n while((pi!=null && pi.hasNext()) || (vi!=null && vi.hasNext())) {\r\n Object po=(pi==null)?null:pi.next();\r\n Object vo=(vi==null)?null:vi.next();\r\n int[] params=null;\r\n float[] vals=null;\r\n // if(po instanceof NativeArray) po=new IterableNativeArray((NativeArray)po);\r\n if(po instanceof int[]) params=(int[])po;\r\n else if(po instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)po;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n params=new int[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n params[cnt]=ScriptUtil.objectToInt(o);\r\n cnt++;\r\n }\r\n } else if(po!=null) {\r\n params=new int[1];\r\n params[0]=ScriptUtil.objectToInt(po);\r\n }\r\n // if(vo instanceof NativeArray) vo=new IterableNativeArray((NativeArray)vo);\r\n if(vo instanceof float[]) vals=(float[])vo;\r\n else if(vo instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)vo;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n vals=new float[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n vals[cnt]=ScriptUtil.objectToFloat(o);\r\n cnt++;\r\n }\r\n } else if(vo!=null) {\r\n vals=new float[1];\r\n vals[0]=ScriptUtil.objectToFloat(vo);\r\n }\r\n if(params==null) params=new int[0];\r\n if(vals==null) vals=new float[0];\r\n dataVect.add(new DataElement(params,vals));\r\n }\r\n }",
"public void setUnderlyingValue(List<IGwtSerializableParameter> value)\r\n\t{\r\n\t\tthis.value = value;\r\n\t}",
"public ArrayList<V> valueSet() {\n\t\t\treturn valores;\n\t\t}",
"public String val() {\n\t\treturn ValFunction.val(this.elements);\n\t}",
"public Row getValue()\n\t{\n\t\treturn valueList;\n\t}",
"@Override\n List<Value> values();",
"protected void setTableValue(Object val)\n\t\t{\n\t\t\tValue = val ;\n\t\t}",
"protected abstract void setValue(V value);",
"@SuppressWarnings(\"rawtypes\")\r\n private List<AllelicValueElement> getAllelicValueElementsFromList(List results) {\r\n List<AllelicValueElement> values = new ArrayList<AllelicValueElement>();\r\n\r\n for (Object o : results) {\r\n Object[] result = (Object[]) o;\r\n if (result != null) {\r\n Integer gid = (Integer) result[0];\r\n String data = (String) result[1];\r\n String markerName = (String) result[2];\r\n Integer peakHeight = (Integer) result[3];\r\n AllelicValueElement allelicValueElement = new AllelicValueElement(gid, data, markerName, peakHeight);\r\n values.add(allelicValueElement);\r\n }\r\n }\r\n\r\n return values;\r\n }",
"protected abstract V getValue(E entry);",
"private synchronized T val() {\n\t\t\treturn val;\n\t\t}",
"@Override\n\tpublic void visit(NextValExpression arg0) {\n\t\t\n\t}",
"public void setValues(List<Object> values);",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof ListVal)) {\n return false;\n }\n ListVal other = (ListVal) object;\n if ((this.valId == null && other.valId != null) || (this.valId != null && !this.valId.equals(other.valId))) {\n return false;\n }\n return true;\n }",
"Form setElementValue(String elementId, List<String> value);",
"public List<Object> getValues();",
"public List getFieldValues()\n {\n return (List) m_values.clone();\n }",
"ListValue createListValue();",
"Object getValueFrom();",
"public T getVal()\n\t{\n\n\t\treturn val;\n\t}",
"@SuppressWarnings(value=\"unchecked\")\n public void put(int field$, java.lang.Object value$) {\n switch (field$) {\n case 0: TokenTransactionArray = (java.util.List<com.networknt.taiji.token.TokenTransaction>)value$; break;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }",
"protected abstract void setValue(JList<?> list, T value, int index, boolean isSelected, boolean cellHasFocus);",
"@Override\n public void collect(T elem) {\n value = elem;\n }",
"V getValue() {\n return value;\n }",
"void setValue4Po(String poFieldName, Object val);",
"public Listof<V> vals() {\n return this.bst.toSortedList().map(i -> i.right);\n }",
"@Override\n\t\tpublic V setValue(V p1){\n\t\t\treturn p1;\n\t\t}",
"public V getValue() {\r\n\t\treturn value;\r\n\t}",
"public int[] get_valuelist(User theUser, String SubjectSetName,\n\t String[] SubjectSet, String field_name) {\n\tint[] list_value = new int[SubjectSet.length];\n\tString[] list_v = new String[SubjectSet.length];\n\tHashtable DataSet;\n\t// try\n\t// {\n\t// //connect to the database\n\t// Connection conn = page.survey.getDBConnection();\n\t// Statement stmt = conn.createStatement();\n\t// String sql=\"\";\n\t// DataSet = new Hashtable();\n\t// //get data from database for subject\n\t// sql = \"select subject, \"+ field_name.toUpperCase()+\" from \";\n\t// sql += page.survey.id + \"_\"+SubjectSetName+ \"_data \";\n\t// sql += \"where invitee = \"+ theUser.id;\n\t// boolean dbtype = stmt.execute(sql);\n\t// ResultSet rs = stmt.getResultSet();\n\t// while(rs.next())\n\t// {\n\t// String val=rs.getString(field_name.toUpperCase());\n\t// if(val==null || val.equalsIgnoreCase(\"\"))\n\t// val=\"0\";\n\t// DataSet.put(rs.getString(\"subject\"), val);\n\t// }\n\t// stmt.close();\n\t// conn.close();\n\t//\n\t// //get the array of column values from hashtable\n\t// if(!DataSet.isEmpty())\n\t// {\n\t// for(int i=0; i<SubjectSet.length; i++)\n\t// {\n\t// String\n\t// current_key=SubjectSet[i].substring(SubjectSet[i].lastIndexOf(\"_\")+1);\n\t// //Study_Util.email_alert(\"CONDITION GET VALUELIST: - check keys: \" +\n\t// current_key);\n\t// list_v[i]= (String) DataSet.get(current_key);\n\t// if(list_v[i]==null || list_v[i].equalsIgnoreCase(\"null\") ||\n\t// list_v[i].equalsIgnoreCase(\"\") )\n\t// list_value[i]=0;\n\t// else\n\t// list_value[i]= Integer.parseInt(list_v[i]);\n\t// }\n\t// }\n\t// else\n\t// {\n\t// Study_Util.email_alert(\"CONDITION GET VALUELIST: the hashtable is empty\");\n\t// }\n\t//\n\t// }\n\t// catch (Exception e)\n\t// {\n\t// Study_Util.email_alert(\"CONDITION GET VALUELIST: \"+e.toString());\n\t// }\n\treturn list_value;\n }",
"public abstract Object getValue();",
"public abstract Object getValue();",
"public abstract Object getValue();",
"@Override\n\tpublic Set<T> valeurs() {\n\t\treturn Set.of(val);\n\t}",
"@Override\n public void onChanged(@Nullable final List<User_Values> vals) {\n }",
"public void setData(T val) {\r\n\t\tthis.val = val;\r\n\t}",
"protected List<V> getVO(List<T> list) {\n List<V> listVO = new ArrayList();\n\n for (T t : list) {\n V vo = getVO(t);\n\n if (vo != null) {\n listVO.add(vo);\n }\n }\n\n return listVO;\n }",
"public java.util.List<java.lang.Integer> getValueList() {\n return java.util.Collections.unmodifiableList(result.value_);\n }",
"public java.util.List<java.lang.Long>\n getValueList() {\n return ((bitField0_ & 0x00000001) != 0) ?\n java.util.Collections.unmodifiableList(value_) : value_;\n }",
"public void setFieldValue(LVValue name,LVValue value) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\ttry\n\t\t{\n\t\t\tclearStatus();\n\t\t\tLDBRecord record=myData.record;\n\t\t\tif (record!=null)\n\t\t\t{\n\t\t\t\tString fieldName=name.getStringValue();\n\t\t\t\tObject nValue=new Object();\n\t\t\t\tswitch (record.getFieldSpec(fieldName).getType())\n\t\t\t\t{\n\t\t\t\t\tcase LDBFieldSpec.BYTE:\n\t\t\t\t\t\tnValue=new Byte((byte)value.getIntegerValue());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.INT:\n\t\t\t\t\t\tnValue=new Integer(value.getIntegerValue());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.LONG:\n\t\t\t\t\t\tnValue=new Long(value.getNumericValue());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.CHAR:\n\t\t\t\t\t\tnValue=value.getStringValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.BINARY:\n\t\t\t\t\t\tnValue=value.getBinaryValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trecord.setValue(background.getClient(),fieldName,nValue);\n\t\t\t}\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"@DISPID(21)\n\t// = 0x15. The runtime will prefer the VTID if present\n\t@VTID(22)\n\tvoid value(java.lang.String pVal);",
"HCollection values();",
"protected abstract IList _listValue(IScope scope, IType contentsType, boolean cast);",
"public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }",
"Listof<V> sortedVals();",
"public final void accept(List<l> list) {\n com.iqoption.core.data.b.c a = this.dlr.dlm;\n kotlin.jvm.internal.h.d(list, \"it\");\n a.setValue(list);\n }",
"org.apache.calcite.avatica.proto.Common.TypedValue getValue();",
"public Object get(ListField list, int index) {\nif ( list == _lfBoys ) {\nreturn _listBoys.elementAt(index);\n} else {\nreturn _listGirls.elementAt(index);\n}\n}",
"private static void caso4(ArrayList<Float> listaValores) {\n \n }",
"ListOfValuesType createListOfValuesType();",
"private List<Object> getConstantValue()\r\n/* 97: */ {\r\n/* 98:117 */ return (List)this.constant.getValue();\r\n/* 99: */ }",
"Collection<V> values();",
"Collection<V> values();"
]
| [
"0.6548616",
"0.6051288",
"0.6041164",
"0.60237145",
"0.599306",
"0.599306",
"0.599306",
"0.5988062",
"0.59791756",
"0.5969981",
"0.59482324",
"0.58997273",
"0.5889391",
"0.58833176",
"0.58565366",
"0.58536226",
"0.58058715",
"0.57846737",
"0.5773803",
"0.5730237",
"0.56992626",
"0.5635284",
"0.56208587",
"0.5606395",
"0.5604517",
"0.5594291",
"0.5569414",
"0.556814",
"0.5566218",
"0.55641633",
"0.55635315",
"0.5555898",
"0.55322427",
"0.55322427",
"0.55322427",
"0.55322427",
"0.55322427",
"0.55322427",
"0.55322427",
"0.5531972",
"0.552853",
"0.55243593",
"0.5494914",
"0.54756516",
"0.5472283",
"0.5470965",
"0.5467864",
"0.54535955",
"0.5442874",
"0.5432739",
"0.5424854",
"0.54159045",
"0.54099286",
"0.5407403",
"0.5405674",
"0.54041857",
"0.54041857",
"0.54041857",
"0.54041857",
"0.54041857",
"0.5400002",
"0.5394282",
"0.53916734",
"0.5382277",
"0.53724426",
"0.53706485",
"0.536479",
"0.53637373",
"0.5355702",
"0.53549415",
"0.53479904",
"0.53414345",
"0.5318956",
"0.531281",
"0.529564",
"0.52917594",
"0.52885807",
"0.52885807",
"0.52885807",
"0.52853775",
"0.528357",
"0.52803934",
"0.52795523",
"0.52784026",
"0.527364",
"0.5268389",
"0.5267774",
"0.5267774",
"0.5265087",
"0.52646345",
"0.5262811",
"0.52607715",
"0.52607524",
"0.5259331",
"0.52491516",
"0.5242778",
"0.5240107",
"0.5234367",
"0.5232348",
"0.5231176",
"0.5231176"
]
| 0.0 | -1 |
Test of isNotConstructorInvocation method, of class MethodInvoktion. | @Test
public void testIsNotConstructorInvocation() {
MethodInvokation init = new MethodInvokation(null,"<init>",null,null,null,null);
assertFalse("Standard constructor", init.isNotConstructorInvocation() );
MethodInvokation clinit = new MethodInvokation(null,"<clinit>",null,null,null,null);
assertFalse("Static constructor", clinit.isNotConstructorInvocation() );
MethodInvokation ordinaryMethod = new MethodInvokation(null,"ordinary",null,null,null,null);
assertTrue("Ordinary method", ordinaryMethod.isNotConstructorInvocation() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected boolean checkConstructorInvocation(AnnotatedDeclaredType dt,\n AnnotatedExecutableType constructor, NewClassTree src) {\n return true;\n }",
"@Test( expected = IllegalStateException.class )\n\tpublic void constructorShouldNotBeInstantiable() {\n\t\tnew ReflectionUtil() {\n\t\t\t// constructor is protected\n\t\t};\n\t}",
"public boolean callsConstructor(ClassOrInterfaceDeclaration classToVerify) {\n boolean instanceMethod = true;\n List<MethodDeclaration> methods = new ArrayList<>();\n classToVerify.findAll(MethodDeclaration.class).forEach(methodDeclaration -> {\n methods.add(methodDeclaration);\n });\n for (MethodDeclaration declaration : methods) {\n if (declaration.getTypeAsString().equals(classToVerify.getNameAsString())) {\n if (declaration.isStatic()) {\n if (declaration.isPrivate()) {\n classToVerify.findAll(ConstructorDeclaration.class).forEach(\n constructor -> constDeclList.add(constructor));\n instanceMethod &= !isMethodCalledFromPublic(methods, declaration)\n .getIsError(); //\n } else {\n instanceMethod &= true;\n }\n } else {\n instanceMethod = false;\n }\n }\n }\n return instanceMethod;\n }",
"public void testBeforeConstructor() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test {}\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new ConstructorInterceptor() {\r\n public Object beforeConstructor(Object[] args, InvocationCallback callback) {\r\n callback.markInvoked();\r\n return \"success\";\r\n }\r\n public Object afterConstructor(Object[] args, Object instantiatedInstance) {\r\n return instantiatedInstance;\r\n }\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n return null;\r\n }\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return null;\r\n }\r\n });\r\n\r\n Object instance = go.getMetaClass().invokeConstructor(new Object[0]);\r\n assertNotNull(instance);\r\n assertEquals(\"success\",instance);\r\n }",
"public boolean isConstructor();",
"protected boolean methodForbidden() {\n return methodToTest.getName().equals(\"getClassNull\")\n || methodToTest.getName().startsWith(\"isA\")\n || methodToTest.getName().equals(\"create\")\n || methodToTest.getName().equals(\"getTipString\")\n || methodToTest.getName().equals(\"toString\");\n }",
"public InvalidInvocationException()\n {\n super(DEFAULT_MESSAGE);\n }",
"public void ensureInvocationNotTimeout() throws InvocationException {\n EventManager.post(new InvocationTimeoutCheckEvent(this));\n }",
"private static boolean matchName(@NotNull PsiMethod method, @NotNull IHasParameterInfos targetMethodInfo, @NotNull String targetMethodName, boolean isConstructor) {\n if (targetMethodName.startsWith(\"@\")) {\n IType returnType = ((IGosuMethodInfo) targetMethodInfo).getReturnType();\n if ((returnType.equals(JavaTypes.BOOLEAN()) || returnType.equals(JavaTypes.pBOOLEAN()) &&\n !method.getName().equals(\"is\" + targetMethodName.substring(1)))) {\n return true;\n }\n if (!method.getName().equals(\"get\" + targetMethodName.substring(1)) && !method.getName().equals(\"set\" + targetMethodName.substring(1))) {\n return true;\n }\n } else if (!targetMethodName.equals(method.getName()) && !(isConstructor && \"construct\".equals(method.getName()))) {\n return true;\n }\n return false;\n }",
"boolean hasInvoke();",
"@Test\n public void testAssertObjectNoGetMethodsType() {\n // setup\n final NoGetMethodsType noGetMethodsType = new NoGetMethodsType(TEST);\n final ChangedProperty<String> jokerProperty = Property.change(NoGetMethodsType.PROPERTY, TEST + TEST);\n\n // method\n assertObject(EMPTY_STRING, noGetMethodsType, jokerProperty);\n }",
"public boolean hasConstructor(Class<?>... parmTypes) {\n boolean result = false;\n\n try {\n cut.getConstructor(parmTypes);\n result = true;\n } catch (Exception e) {\n }\n\n return result;\n }",
"@Test\n @Order(3)\n void testInvalidClassId() {\n assertNull(noArgsRegistry.getConstructor(0));\n }",
"public MissingMethodArgumentException() {\n }",
"@Test\n public void testUnwrapInvocationTargetExceptionWithoutCause() {\n InvocationTargetException iteWithoutCause = new InvocationTargetException(null);\n assertTrue(iteWithoutCause == ExceptionUtil.unwrapInvocationTargetException(iteWithoutCause));\n }",
"public boolean isConstructor() {\n return isConstructor;\n }",
"@Test(expectedExceptions = JodaEngineRuntimeException.class)\n public void testInvokingNonExistingMethodAndEvaluate() {\n\n new MethodInvokingEventCondition(DummyAdapterEvent.class, \"get123\", STRING_TO_MATCH);\n\n Assert.fail(\"An JodaEngineRuntimeException should already been raised.\");\n }",
"public boolean hasInvocationKind() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"public void testConstructor() {\r\n assertNotNull(new BaseAuditContestInterceptor() { });\r\n }",
"private boolean isConstructorOrDestructor(ExecutableElement method) {\n String methodName = ElementUtil.getName(method);\n return ElementUtil.isConstructor(method) || methodName.equals(\"dealloc\");\n }",
"@SuppressWarnings(\"unchecked\")\n private boolean hasValidConstructor(java.lang.Class<?> aClass) {\n Constructor<? extends TestCase>[] constructors\n = (Constructor<? extends TestCase>[]) aClass.getConstructors();\n for (Constructor<? extends TestCase> constructor : constructors) {\n if (Modifier.isPublic(constructor.getModifiers())) {\n java.lang.Class[] parameterTypes = constructor.getParameterTypes();\n if (parameterTypes.length == 0 ||\n (parameterTypes.length == 1 && parameterTypes[0] == String.class)) {\n return true;\n }\n }\n }\n Log.i(LOG_TAG, String.format(\n \"TestCase class %s is missing a public constructor with no parameters \" +\n \"or a single String parameter - skipping\",\n aClass.getName()));\n return false;\n }",
"@Test\n\tvoid onPrivateMethod() {\n\t\tString classContent =\n\t\t//@formatter:off\n\t\t\t\t\"package methodinterception;\"\n\n\t\t\t\t+ \"import io.github.swingboot.concurrency.AssertUi;\"\n\t\t\t\t\n\t\t\t\t+ \"public class N {\"\n\t\t\t\t+ \"\tpublic N() {}\"\n\t\t\t\t\n\t\t\t\t+ \"\t@AssertUi\"\n\t\t\t\t+ \"\tprivate void doSomething() {}\"\n\t\t\t\t\n\t\t\t\t+ \"}\";\n\t\t//@formatter:on\n\t\tReflectException ex = assertThrows(ReflectException.class, () -> compile(\"N\", classContent));\n\t\tassertTrue(ex.getMessage().toLowerCase().contains(\"private methods\"));\n\t}",
"@Test\n public void testConstructor() {\n assertNotEquals(null, up);\n }",
"public void testBeforeInvoke() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def invokeMe() {'hello'} }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new Interceptor() {\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n callback.markInvoked();\r\n return \"success\";\r\n }\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return result;\r\n }\r\n });\r\n\r\n Object result = go.invokeMethod(\"invokeMe\", null);\r\n assertNotNull(result);\r\n assertEquals(\"success\",result);\r\n }",
"public boolean hasInvocationKind() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"@Test\n @Order(2)\n void testNoArgsClass() {\n final RuntimeConstructable r =\n noArgsRegistry.getConstructor(ConstructableExample.CLASS_ID).get();\n assertTrue(r instanceof ConstructableExample);\n\n // checks the objects class ID\n assertEquals(ConstructableExample.CLASS_ID, r.getClassId());\n }",
"private boolean isConstructor() {\n \tif (line.contains(\"new \")) {\n \t\treturn false;\n \t}\n int bracket = line.indexOf(\"(\");\n if(bracket==-1) {\n return false;\n }\n String declaration = line.substring(0,bracket);\n String[] words = declaration.split(\"\\\\s+\");\n return words[words.length-1].equals(className);\n }",
"public InvalidInvocationException(String detailMessage)\n {\n super(detailMessage);\n }",
"public void testAfterConstructor() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test {}\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new ConstructorInterceptor() {\r\n public Object beforeConstructor(Object[] args, InvocationCallback callback) {\r\n return null;\r\n }\r\n public Object afterConstructor(Object[] args, Object instantiatedInstance) {\r\n assertNotNull(instantiatedInstance);\r\n assertEquals(testClass,instantiatedInstance.getClass());\r\n return instantiatedInstance;\r\n }\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n return null;\r\n }\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return null;\r\n }\r\n });\r\n\r\n Object instance = go.getMetaClass().invokeConstructor(new Object[0]);\r\n assertNotNull(instance);\r\n assertEquals(testClass,instance.getClass());\r\n }",
"@Test\n void testEmptyConstructor() {\n assertNotNull(isLockedRequest1);\n }",
"@Test\n\tvoid testConstructor() {\n\t\tassertDoesNotThrow(() -> {UdpCommunicator communicator = this.getCommunicatorImplementation(64324);});\n\t\tassertThrows(IllegalArgumentException.class, () -> {UdpCommunicator communicator = this.getCommunicatorImplementation(-54);});\n\t\tassertThrows(IllegalArgumentException.class, () -> {UdpCommunicator communicator = this.getCommunicatorImplementation(70000);});\n\t}",
"@Test\n void constructorTest() {\n super.checkConstruction();\n }",
"@Test\n\tpublic void testConstructor() {\n @SuppressWarnings(\"unused\")\n ConstructorTestClass constructorTestClass = new ConstructorTestClass();\t\t\n }",
"@Test\n\tpublic void testConstructor() {\n @SuppressWarnings(\"unused\")\n ConstructorTestClass constructorTestClass = new ConstructorTestClass();\t\t\n }",
"@Test\n\tpublic void testConstructor() {\n @SuppressWarnings(\"unused\")\n ConstructorTestClass constructorTestClass = new ConstructorTestClass();\t\t\n }",
"public void testConstructor() {\r\n assertNotNull(\"unable to create instance\", instance);\r\n }",
"private void validateConstructor () throws ModelValidationException\n\t\t\t{\n\t\t\t\t// no constructor or no arg constructor\n\t\t\t\tModel model = getModel();\n\t\t\t\tboolean hasConstr = model.hasConstructor(keyClassName);\n\t\t\t\tObject noArgConstr = \n\t\t\t\t\tmodel.getConstructor(keyClassName, Model.NO_ARGS);\n\t\t\t\tint modifiers = model.getModifiers(noArgConstr);\n\n\t\t\t\tif (hasConstr && \n\t\t\t\t\t((noArgConstr == null) || !Modifier.isPublic(modifiers)))\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_constructor\", //NOI18N\n\t\t\t\t\t\tkeyClassName, getClassName()));\n\t\t\t\t}\n\t\t\t}",
"@Test\npublic void testFilter() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = VirtualCoinCtrl.getClass().getMethod(\"filter\", VirtualCoin.class, VirtualCoinAddReq.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}",
"public boolean isUsingDefaultConstructor() {\n return this.getMethodName() == null;\n }",
"@Test\n public void testCheckFinalClass_prototypeMethodMarkedCtor_butNotOwnerFunction_doesNotCrash() {\n testSame(\n lines(\n \"function Foo() {}\",\n \"\",\n \"Foo.prototype = {\",\n \" /** @constructor */\",\n \" init: function() { }\",\n \"};\"));\n }",
"public boolean hasInvocations() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public interface IMethodInfo extends IMemberInfo {\n \n /**\n * Returns the method parameters type information.\n * \n * @return A non-null, but possibly empty, array of type info.\n */\n public ITypeInfo[] getParameters();\n \n /**\n * Returns the method return type information. This may not have location information in case of X10 void type.\n * \n * @return A non-null type information.\n */\n public ITypeInfo getReturnType();\n \n /**\n * Indicates if the current method is a constructor or not.\n * \n * @return True if it is a constructor, false otherwise.\n */\n public boolean isConstructor();\n \n}",
"public boolean hasInvocations() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"@Test\n void testNonEmptyConstructor() {\n assertNotNull(isLockedRequest2);\n assertTrue(isLockedRequest2.getToken().equals(token)\n && isLockedRequest2.getId() == id);\n }",
"@Test\n public void testPrivateCtor() throws Exception {\n Constructor<?> privateCtor = Helper.class.getDeclaredConstructors()[0];\n assertTrue(Modifier.isPrivate(privateCtor.getModifiers()));\n privateCtor.setAccessible(true);\n privateCtor.newInstance(new Object[] {});\n }",
"@Override\n public Description matchNewClass(NewClassTree tree, VisitorState state) {\n JCExpression receiverTree = (JCExpression) tree.getEnclosingExpression();\n if (receiverTree != null) {\n Description result =\n checkExpression(\n receiverTree,\n state,\n qual ->\n String.format(\n \"Outer object %s for %s is %s null\",\n state.getSourceForNode(receiverTree),\n state.getSourceForNode(tree.getIdentifier()),\n qual));\n if (result != null) {\n return result;\n }\n }\n\n // 2. Check call arguments like a method call\n return checkCallArguments(tree.getArguments(), getSymbol(tree), state);\n }",
"public boolean findConstructorCall(\n MethodDeclaration declaration, ConstructorDeclaration constructor) {\n List<ObjectCreationExpr> calledMethods = new ArrayList<>();\n declaration.findAll(ObjectCreationExpr.class).forEach(methodDeclaration -> {\n if (methodDeclaration.getTypeAsString().equals(constructor.getNameAsString())) {\n calledMethods.add(methodDeclaration);\n }\n });\n return !calledMethods.isEmpty();\n }",
"@Test\r\n public void testBadConstructor() {\r\n try {\r\n SnakeSquare instance = new SnakeSquare(33,44);\r\n fail();\r\n } catch (IllegalArgumentException e) { }\r\n }",
"public MethodInfoImpl() {\n }",
"@Override\n public String visit(ExplicitConstructorInvocationStmt n, Object arg) {\n return null;\n }",
"@Test\n public void testUnwrapInvocationTargetExceptionWithCause() {\n RuntimeException rte = new RuntimeException();\n InvocationTargetException iteWithCause = new InvocationTargetException(rte);\n assertTrue(rte == ExceptionUtil.unwrapInvocationTargetException(iteWithCause));\n }",
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"@Override\r\n\tpublic void beforeInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\t\r\n\t}",
"public boolean isFactoryMethod(Method candidate)\n/* */ {\n/* 285 */ return (candidate != null) && (candidate.getName().equals(getFactoryMethodName()));\n/* */ }",
"public void test_ctor() {\n assertNotNull(\"instance should be created.\", instance);\n }",
"public void testEmptyConstructor() {\n Agent agent = new Agent();\n assertNull(agent.getName(), \"Agent name should have not been initialized.\");\n assertNull(agent.getVersion(), \"Agent version should have not been initialized.\");\n assertEquals(agent.toString(), \"\", \"Agent display representation should not be valid.\");\n }",
"@Test\r\n\tpublic void testConstructor()\r\n\t{\r\n\t\tassertEquals(false, testCanPlaceBombBehavior.placeBomb());\r\n\t}",
"@Test(expected=UnsupportedOperationException.class)\n public void ValidatorConstructorTest(){\n underTest = new Validator();\n //THEN exception thrown\n \n }",
"private void processConstructor(ClassNode cls, MethodNode mn, Type[] syntheticParams) {\n String methodInfo = mn.name + mn.desc + \" in \" + cls.name;\n Type[] params = Type.getArgumentTypes(mn.desc);\n\n if (beginsWith(params, syntheticParams)) {\n mn.visibleParameterAnnotations = process(methodInfo, \"RuntimeVisibleParameterAnnotations\", params.length, syntheticParams.length, mn.visibleParameterAnnotations);\n mn.invisibleParameterAnnotations = process(methodInfo, \"RuntimeInvisibleParameterAnnotations\", params.length, syntheticParams.length, mn.invisibleParameterAnnotations);\n // ASM uses this value, not the length of the array\n // Note that this was added in ASM 6.1\n if (mn.visibleParameterAnnotations != null) {\n mn.visibleAnnotableParameterCount = mn.visibleParameterAnnotations.length;\n }\n if (mn.invisibleParameterAnnotations != null) {\n mn.invisibleAnnotableParameterCount = mn.invisibleParameterAnnotations.length;\n }\n } else {\n if (SpecialSource.verbose()) LOGGER.warning(\"Unexpected lack of synthetic args to the constructor: expected \" + Arrays.toString(syntheticParams) + \" at the start of \" + methodInfo);\n }\n }",
"@Test\n public void testInvokeEffectorStartFailing_Method() {\n FailingEntity entity = createFailingEntity();\n assertStartMethodFails(entity);\n }",
"private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }",
"@SuppressWarnings(\"PMD.LinguisticNaming\")\n public Feedback hasPrivateConstructor(ClassOrInterfaceDeclaration classToTest) {\n List<ConstructorDeclaration> publicConstructors = new ArrayList<>();\n // Finds and checks if the constructors are private or not.\n classToTest.findAll(ConstructorDeclaration.class).forEach(constructor -> {\n if (!constructor.isPrivate()) {\n publicConstructors.add(constructor);\n }\n\n });\n List<Feedback> childFeedbacks = new ArrayList<>();\n if (publicConstructors.isEmpty()) {\n return Feedback.getSuccessfulFeedback();\n } else {\n publicConstructors.forEach(constr -> {\n childFeedbacks.add(Feedback.getNoChildFeedback(\n \"Non-private constructor found, \" + \"class can be instantiated \" + \"elsewhere\",\n new FeedbackTrace(constr)));\n });\n }\n return Feedback.getFeedbackWithChildren(new FeedbackTrace(classToTest), childFeedbacks);\n }",
"@Test \n\tpublic void testIfNumberisNotInArray()\n\t{\n \tData d = new Data();\n\t\tassertFalse(d.isMember(1)); // 1 is the value not in the array. \n\t}",
"@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }",
"@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }",
"public static Object invokeNoArgumentMethod(String methodName, Object objectToInvokeUpon) {\n try {\n Method method = objectToInvokeUpon.getClass().getMethod(methodName);\n method.setAccessible(true);\n return method.invoke(objectToInvokeUpon);\n } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n throw new ReflectionInvocationException(e);\n }\n }",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"public void testCreateEmptyMethod() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n assertSourceEquals(\"source code incorrect\", \"public void foo() {\\n\" + \"}\\n\", method.getContents());\n }",
"@Test\n public void testConstructorEmptyName() {\n String name = \"\";\n int cost = 10;\n\n assertThrows( IllegalArgumentException.class, () -> {\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n });\n }",
"@Test\n public void testConstructionNegative()\n {\n String constructed = StateUtils.construct(TEST_DATA, externalContext);\n constructed = constructed.substring(1);\n try\n {\n Object object = StateUtils.reconstruct(constructed, externalContext);\n Assertions.assertFalse(TEST_DATA.equals(object));\n }\n catch (Exception e)\n {\n // do nothing\n }\n }",
"@Test\n public void testConstructorNegativeCost() {\n String name = \"A modifier\";\n int cost = -1;\n\n assertThrows( IllegalArgumentException.class, () -> {\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n });\n }",
"@Test\n public final void testConstructorEmpty() {\n Set<String> s = this.constructorTest();\n Set<String> sExpected = this.constructorRef();\n /*\n * Assert that values of variables match expectations\n */\n assertEquals(sExpected, s);\n }",
"private boolean hasTestMethodSigniture(Method method) {\n\t\tBoolean result = method.getName().startsWith(\"test\");\n\t\tresult = result && (method.getReturnType() == Void.TYPE);\n\t\tresult = result && (method.getParameterCount() == 0);\n\t\treturn result;\n\t}",
"@Test\npublic void testCalTransactionUTF() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"calTransactionUTF\", int.class, int.class, int.class, EstimationTransactionData.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}",
"@Test\n\tpublic void testConstructor() {\n\t\tnew ConstructorTestClass();\n\t}",
"@Test\n\tpublic void testConstructor() {\n\t\tnew ConstructorTestClass();\n\t}",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void test_voidFoo_exception() throws IllegalAccessException {\n\t\t\n\t}",
"@Override\n\tboolean isRegistedMethodNotNeed() {\n\t\treturn true;\n\t}",
"@Test\r\n\tpublic void testConstructor() {\r\n\t\tnew ConstructorTestClass();\r\n\t}",
"@Test\r\n\tpublic void testConstructor() {\r\n\t\tnew ConstructorTestClass();\r\n\t}",
"private MethodClass() {\r\n super(IMethodClass.TYPE_ID);\r\n }",
"@Test\npublic void testSendMessage() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = HandlerClient.getClass().getMethod(\"sendMessage\", Socket.class, String.class, boolean.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}",
"@Test\npublic void testPrivateChat() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = HandlerClient.getClass().getMethod(\"privateChat\", String.class, String.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}",
"@Test\n public void testStaticMethodStaticClassNotKept() throws Exception {\n Class<?> mainClass = MainCallStaticMethod.class;\n runTest(\n mainClass,\n ImmutableList.of(mainClass, StaticMethod.class),\n keepMainProguardConfiguration(mainClass),\n this::checkOnlyMainPresent);\n }",
"public void testMethodInfo889() throws Exception {\n\t\tClassInfo var2788 = instantiateClassInfo431();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2789 = new MethodInfo(var2788, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2789.isSetter();\n\t\tvar2789.isSetter();\n\t}",
"public void testMethodInfo887() throws Exception {\n\t\tClassInfo var2782 = instantiateClassInfo428();\n\t\tLocalField var2783 = instantiateLocalField427();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tMethodInfo var2784 = new MethodInfo(var2782, \"voidX()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tvar2783.getDescription();\n\t\tvar2783.getDescription();\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2784.isSetter();\n\t\tvar2784.isSetter();\n\t}",
"@Test\n public void testGetBeanCopier() {\n//TODO: Test goes here... \n/* \ntry { \n Method method = BeanUtil.getClass().getMethod(\"getBeanCopier\", Class<?>.class, Class<?>.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }",
"public void testMethodInfo886() throws Exception {\n\t\tClassInfo var2776 = instantiateClassInfo426();\n\t\tLocalField var2777 = instantiateLocalField425();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2778 = new MethodInfo(var2776, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tvar2777.getDescription();\n\t\tvar2777.getDescription();\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2778.isSetter();\n\t\tvar2778.isSetter();\n\t}",
"public void testIsNewDependency() {\n assertTrue(\"Un-implemented method.\", true);\n }",
"@Test\n public void testConstructorZeroCost() {\n String name = \"A modifier\";\n int cost = 0;\n\n assertThrows( IllegalArgumentException.class, () -> {\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n });\n }",
"@Test\n public void testInvokingStringMethodAndEvaluateWithWrongValue() {\n\n // Calling the String-Method and it should be avaluated with an int, the result should be false\n MethodInvokingEventCondition invokingEventCondition = new MethodInvokingEventCondition(DummyAdapterEvent.class,\n DummyAdapterEvent.METHOD_RETURNS_STRING, INT_TO_MATCH);\n\n Assert.assertFalse(invokingEventCondition.evaluate(dummyAdapterEvent));\n }",
"@Test\n public void allImplementorsOfComparatorMustNotContainFields() throws Exception {\n Freud.iterateOver(Class.class).\n assertThat(no(subTypeOf(Comparator.class)).or(no(withFields()))).\n in(classOf(asList(\"examples.classobject.StatelessComparator\"))).analyse(listener);\n }",
"public InvalidInvocationException(Throwable throwable)\n {\n super(DEFAULT_MESSAGE, throwable);\n }",
"boolean isSetMethod();",
"private void findConstructor() {\n BeanScannerConstructor constructor = BeanScannerConstructor.CACHE.get(beanClass);\n\n Constructor<?> con = constructor.constructor();\n\n MethodHandle mh = unreflectConstructor(con);\n\n OperationTemplate ot;\n if (bean.lifetime.lifetimes().isEmpty()) {\n ot = OperationTemplate.defaults();\n } else {\n ot = bean.lifetime.lifetimes().get(0).template;\n }\n ot = ot.returnType(beanClass);\n\n OperationSetup os = new MemberOperationSetup(bean.installedBy, bean, constructor.operationType(), ot,\n new OperationConstructorTarget(constructor.constructor()), mh);\n bean.operations.add(os);\n resolveNow(os);\n }",
"@Test\n\tpublic void testClassHasCopyAndReplaceLessThanMethod() {\n\t\t// EDIT THESE TO MATCH YOUR METHOD\n\t\tmethodName = \"copyAndReplaceLessThan\";\n\t\targTypes = \"\";\n\t\treturnType = \"int[]\";\n\t\t// END EDIT\n\t\t// class exists\n\t\ttry {\n\t\t\tPackage pkg = getClass().getPackage();\n\t\t\tString path = pkg == null ? \"\" : pkg.getName() + \".\";\n\t\t\tcls = Class.forName(path + className);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tfail(\"File \\\"\" + className + \".class\\\" doesn't have a \\\"\" + className\n\t\t\t\t\t+ \"\\\" class. (is the class name spelled right?)\");\n\t\t}\n\n\t\t// class has method\n\t\ttry {\n\t\t\t// EDIT HERE TO GIVE PARAMETER TYPES\n\t\t\tmethod = cls.getMethod(methodName, int[].class, int.class);\n\t\t\t// END EDIT\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tfail(\"Class \\\"\" + className + \"\\\" doesn't have a \\\"\" + methodName + \"(\" + argTypes\n\t\t\t\t\t+ \")\\\" method. (is the method name spelled right? are its parameters correct?)\");\n\t\t}\n\t\tinvokation = className + \".\" + methodName + \"(\" + argTypes + \")\";\n\t}",
"@Override\n public boolean isInstantiable() {\n return false;\n }",
"private void assertStreamItemViewHasNoOnClickListener() {\n assertFalse(\"listener should have not been invoked yet\", mListener.clicked);\n mView.performClick();\n assertFalse(\"listener should have not been invoked\", mListener.clicked);\n }",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.996 -0500\", hash_original_method = \"CB9D9CAF93B6F7C6AC078700B30D5B3A\", hash_generated_method = \"6EEF3712392D06942F0E7086316BBAB4\")\n \n private void nativeConstructor(){\n }"
]
| [
"0.6575212",
"0.6116202",
"0.5947082",
"0.59009415",
"0.57496846",
"0.5746165",
"0.5686494",
"0.5657204",
"0.5636377",
"0.56129014",
"0.5542732",
"0.5443215",
"0.5432421",
"0.5414781",
"0.53937775",
"0.5390605",
"0.53816336",
"0.5368992",
"0.5366429",
"0.53659576",
"0.5359414",
"0.5346661",
"0.53443545",
"0.53327006",
"0.5331662",
"0.53143543",
"0.5311426",
"0.53025615",
"0.5273055",
"0.5272235",
"0.52288413",
"0.52190477",
"0.5211443",
"0.5211443",
"0.5211443",
"0.52052355",
"0.519572",
"0.51761675",
"0.5166158",
"0.5147531",
"0.51449585",
"0.5141265",
"0.5140244",
"0.5139041",
"0.51227105",
"0.509468",
"0.5092722",
"0.5087601",
"0.50790936",
"0.50555694",
"0.50497544",
"0.50367695",
"0.50367695",
"0.5036611",
"0.5033973",
"0.5031767",
"0.5029864",
"0.50259274",
"0.50191224",
"0.50173527",
"0.49693578",
"0.49608108",
"0.49578652",
"0.49570277",
"0.49561003",
"0.49561003",
"0.49546608",
"0.4950353",
"0.49366906",
"0.49176693",
"0.4917044",
"0.49123216",
"0.49060845",
"0.49014854",
"0.4898772",
"0.48972145",
"0.48972145",
"0.48895568",
"0.48862427",
"0.48772094",
"0.48772094",
"0.48739412",
"0.48735115",
"0.48726687",
"0.48618236",
"0.4861487",
"0.48538366",
"0.48503858",
"0.48487628",
"0.48481038",
"0.4840268",
"0.48341608",
"0.48320016",
"0.48263437",
"0.48218983",
"0.48200196",
"0.4818928",
"0.4818834",
"0.48149854",
"0.48136726"
]
| 0.8294858 | 0 |
not comprehensive obviously, more doing this for superrares rather than the general case. | public String getRelicTierString(AbstractRelic.RelicTier tier){
switch (tier){
case BOSS:
return uiStrings.TEXT[0];
case SPECIAL:
return uiStrings.TEXT[1];
case SHOP:
return uiStrings.TEXT[2];
}
return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"protected abstract Set method_1559();",
"public void method_4270() {}",
"@Override\n\tprotected void interr() {\n\t}",
"abstract int pregnancy();",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"public abstract void mo70713b();",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void method_6349() {\r\n super.method_6349();\r\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"public abstract Object mo26777y();",
"@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}",
"@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}",
"private SBomCombiner()\n\t{}",
"@Override\n\tpublic void anular() {\n\n\t}",
"default boolean isSpecial() { return false; }",
"private void level7() {\n }",
"private void kk12() {\n\n\t}",
"private void m50366E() {\n }",
"public abstract int mo9754s();",
"@Override\n\tprotected void getExras() {\n\n\t}",
"protected boolean func_70041_e_() { return false; }",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void method_6191() {\r\n super.method_6191();\r\n }",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"abstract void uminus();",
"public final void mo51373a() {\n }",
"public abstract Object mo1771a();",
"protected Item func_146068_u() { return Item.func_150899_d(0); }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}",
"public abstract void mo27385c();",
"@Override\n protected void getExras() {\n }",
"protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"private ArraySetHelper() {\n\t\t// nothing\n\t}",
"@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"public abstract void mo27386d();",
"private static void addShapeless()\n {}",
"public abstract void wrapup();",
"public abstract int getCntOther();",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tprotected Integer deriveLower() {\r\n\t return 0;\r\n\t}",
"private void sub() {\n\n\t}",
"public abstract void mo56925d();",
"public abstract Object mo1185b();",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"public abstract void mo6549b();",
"private void strin() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"public abstract String mo118046b();",
"@Override\n public Integer reduceInit() { return 0; }",
"public abstract String mo13682d();",
"public abstract String mo41079d();",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}",
"private void level6() {\n }",
"public abstract long mo9229aD();",
"public abstract String mo9239aw();",
"@Override\n\tpublic void jugar() {}",
"@Override\n\tpublic void effetCase() {\n\t\t\n\t}",
"double defendre();",
"@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public int getExtendedID()\r\n/* 12: */ {\r\n/* 13:17 */ return 10;\r\n/* 14: */ }",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public abstract Integer gethourNeed();",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void func_70295_k_() {}",
"public Set a()\r\n/* 44: */ {\r\n/* 45: 47 */ return this.e;\r\n/* 46: */ }",
"public int b()\r\n/* 45: */ {\r\n/* 46: 58 */ g();\r\n/* 47: */ \r\n/* 48: 60 */ return super.b();\r\n/* 49: */ }",
"public ho e_()\r\n/* 455: */ {\r\n/* 456:469 */ if (k_()) {\r\n/* 457:470 */ return new hy(d_());\r\n/* 458: */ }\r\n/* 459:472 */ return new hz(d_(), new Object[0]);\r\n/* 460: */ }",
"@Override\n\tpublic void abs1_m1() {\n\t\t\n\t}",
"public abstract void mo30696a();",
"public abstract void mo2624j();",
"public void mo21877s() {\n }",
"protected void method_4157() {\r\n super.method_4157();\r\n this.method_4211(class_1840.field_9390).method_390(200.0D);\r\n }",
"static int size_of_sub(String passed){\n\t\treturn 1;\n\t}",
"public int getSuperTypeIndex() {\n/* 390 */ return (short)((this.value & 0xFFFF00) >> 8);\n/* */ }"
]
| [
"0.5924219",
"0.58822036",
"0.5855301",
"0.5821847",
"0.5653399",
"0.54316413",
"0.5425359",
"0.54221755",
"0.53918797",
"0.53542274",
"0.5341872",
"0.5324965",
"0.5324285",
"0.5307772",
"0.53004646",
"0.5299797",
"0.529376",
"0.5270741",
"0.5257601",
"0.5255707",
"0.52491736",
"0.5238583",
"0.5237944",
"0.52340263",
"0.5219016",
"0.521834",
"0.5213754",
"0.5213149",
"0.52090013",
"0.52088773",
"0.5207902",
"0.51906615",
"0.517724",
"0.5153339",
"0.51441693",
"0.5141185",
"0.51385725",
"0.5131638",
"0.5130243",
"0.5121994",
"0.5113096",
"0.5098244",
"0.50980973",
"0.50654286",
"0.5063776",
"0.50637233",
"0.5054132",
"0.5045167",
"0.50438505",
"0.50346094",
"0.5029695",
"0.5027357",
"0.50260943",
"0.5024332",
"0.5022972",
"0.5021907",
"0.502023",
"0.5019961",
"0.50131434",
"0.5011945",
"0.5011945",
"0.49965137",
"0.49950957",
"0.4994982",
"0.49936464",
"0.49886796",
"0.49882203",
"0.49876627",
"0.49849024",
"0.49791318",
"0.49535176",
"0.49535176",
"0.49535176",
"0.49475953",
"0.49475953",
"0.4946239",
"0.49431768",
"0.49397486",
"0.49372503",
"0.49299568",
"0.49251735",
"0.49214926",
"0.49070796",
"0.49059802",
"0.49026385",
"0.49023914",
"0.49009606",
"0.48966828",
"0.48940203",
"0.4892961",
"0.48923928",
"0.48919055",
"0.48885974",
"0.48849747",
"0.48846906",
"0.4884639",
"0.48829657",
"0.48814014",
"0.48800224",
"0.48749262",
"0.4873206"
]
| 0.0 | -1 |
/ hide animated images of scada | static void SetUpScadaAndControllers() {
pumpForSolutionOn.setVisible(false);
pumpForTitrationOn.setVisible(false);
mixerOn.setVisible(false);
valveTitrationOpened.setVisible(false);
valveSolutionOpened.setVisible(false);
valveWaterOpened.setVisible(false);
valveOutOpened.setVisible(false);
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.out.println("connection closed");
InitialClass.arduino.closeConnection();
}
});
log.setFont(fontMarker);
log.setRows(10);
log.setPreferredSize(new Dimension(200, 400));
log.setBackground(new Color(19, 28, 48));
log.setForeground(Color.WHITE);
visualPH.setBounds(460, 90, 150, 30);
visualPH.setText("_.__pH");
visualPH.setForeground(Color.WHITE);
visualPH.setFont(new Font("Montserrat", Font.PLAIN, 32));
JToggleButton titrationStart = new JToggleButton();
titrationStart.setPreferredSize(new Dimension(200, 30));
titrationStart.setText("Автоматическое измерение");
titrationStart.addItemListener(ev -> {
if (ev.getStateChange() == ItemEvent.SELECTED) {
Chart.series.clear();
Chart.secondSeries.clear();
Chart.dot.clear();
titrationStart.setText("В процессе");
new Thread(auto).start();
} else if (ev.getStateChange() == ItemEvent.DESELECTED) {
forScanner = false;
log.append("Завершение" + "\n");
}
});
JButton washing = new JButton();
washing.setPreferredSize(new Dimension(200, 30));
washing.setText("Промывка");
washing.addActionListener(e -> {
washing.setText("В процессе");
new Thread(new Flushing()).start();
washing.setText("Промывка");
});
JButton handMode = new JButton();
handMode.setPreferredSize(new Dimension(200, 30));
handMode.setText("Начать ручной режим");
handMode.addActionListener(e -> {
if (handMode.getText().equals("Начать ручной режим")) {
handMode.setText("Включен ручной режим !");
titrationStart.setEnabled(false);
washing.setEnabled(false);
Chart.series.clear();
Chart.secondSeries.clear();
Chart.dot.clear();
forScanner = true;
new Thread(listeningThe_pH).start();
} else if (handMode.getText().equals("Включен ручной режим !")) {
forScanner = false;
titrationStart.setEnabled(true);
washing.setEnabled(true);
log.append("Ручной режим отключен\n");
handMode.setText("Начать ручной режим");
}
});
JPanel flaskLevel = new JPanel();
flaskLevel.setBounds(225, 200, 200, 200);
flaskLevel.setBackground(Color.orange);
/*
*Setting SCADA layered window
*/
scada.setPreferredSize(new Dimension(620, 400));
scada.add(flaskLevel, 1);
scada.add(mixerLayer, 2);
scada.add(waterTube, 3);
scada.add(pumpForTitration, 4);
scada.add(pumpForSolution, 5);
scada.add(pumpForTitrationOn, 6);
scada.add(pumpForSolutionOn, 7);
scada.add(mixerOn, 8);
scada.add(valveTitrationClosed, 9);
scada.add(valveTitrationOpened, 10);
scada.add(valveSolutionClosed, 11);
scada.add(valveSolutionOpened, 12);
scada.add(valveOutClosed, 13);
scada.add(valveOutOpened, 14);
scada.add(valveWaterClosed, 15);
scada.add(valveWaterOpened, 16);
scada.add(visualPH, 17);
result.setPreferredSize(new Dimension(200, 50));
result.setText("0.00 ml");
result.setFont(new Font("Montserrat", Font.PLAIN, 32));
result.setForeground(Color.WHITE);
panelRightTop.setPreferredSize(new Dimension(200, 75));
panelRightTop.add(titrationStart);
panelRightTop.add(washing);
panelRightTop.setBackground(new Color(10, 70, 90));
JLabel mode = new JLabel("Ручной режим");
mode.setForeground(Color.WHITE);
mode.setFont(fontMarker);
panelRightBot.setLayout(new FlowLayout());
panelRightBot.setPreferredSize(new Dimension(200, 325));
panelRightBot.setBackground(new Color(19, 28, 48));
panelRightBot.add(mode);
panelRightBot.add(handMode);
panelRightBot.add(addToggle("Помпа раствора", '5', '4', pumpForSolutionOn));
panelRightBot.add(addToggle("Помпа титранта", '3', '2', pumpForTitrationOn));
panelRightBot.add(addToggle("Клапан для воды", 'D', 'C', valveWaterOpened));
panelRightBot.add(addToggle("Клапан для раствора", '9', '8', valveSolutionOpened));
panelRightBot.add(addToggle("Клапан для титранта", 'B', 'A', valveTitrationOpened));
panelRightBot.add(addToggle("Клапан для слива", '1', '0', valveOutOpened));
panelRightBot.add(addToggle("Мешалка", '7', '6', mixerOn));
panelRightBot.add(addToggle("Датчик", 'Y', 'X'));
panelRightBot.add(result);
panelRight.setLayout(new BorderLayout());
panelRight.setPreferredSize(new Dimension(200, 400));
panelRight.add(panelRightBot, BorderLayout.CENTER);
panelRight.add(panelRightTop, BorderLayout.NORTH);
panelRight.setBackground(new Color(19, 28, 48));
panel.setLayout(new BorderLayout());
panel.setBackground(new Color(19, 28, 48));
panel.add(scada, BorderLayout.WEST);
panel.add(panelRight, BorderLayout.CENTER);
panel.add(log, BorderLayout.EAST);
panelRightTop.setLayout(new FlowLayout());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setMinimumSize(new Dimension(850, 500));
frame.add(panel);
frame.pack();
frame.setVisible(true);
frame.setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void hidePics(){\n\t\t\tfor (int i = 0; i < 3; i++)\n\t\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\t\tpics[i][j].setVisible(false);\n\t\t}",
"Animation getHideAnimation();",
"private void fadeOutAndHideView(final MaterialCardView img)\n {\n Animation fadeOut = new AlphaAnimation(1, 0);\n fadeOut.setInterpolator(new AccelerateInterpolator());\n fadeOut.setDuration(50);\n\n fadeOut.setAnimationListener(new Animation.AnimationListener()\n {\n public void onAnimationEnd(Animation animation)\n {\n img.setVisibility(View.GONE);\n }\n public void onAnimationRepeat(Animation animation) {}\n public void onAnimationStart(Animation animation) {}\n });\n\n img.startAnimation(fadeOut);\n }",
"public void hide() {\n\t\t// Useless if called in outside animation loop\n\t\tactive = false;\n\t}",
"public void toggleAnim(boolean show) {\n if (animatorSet != null) {\n if (preAnimationEndAlpha == (show ? 1f : 0f)) {\n return;\n } else {\n animatorSet.cancel();\n }\n }\n if (show) {\n toogleVisible(mContainer, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n /* boolean needShow = false;\n for (View control : mControlsVisible.keySet()) {\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 begin\n Boolean prevVisibility = mControlsVisible.get(control);\n needShow = needShow || prevVisibility;\n if (!prevVisibility) {\n continue;\n }\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 end\n toogleVisible(control, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n }\n if (needShow) {\n toogleVisible(mContainer, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n }*/\n preAnimationEndAlpha = 1f;\n } else {\n toogleVisible(mContainer, 1f, 0f, SmoothImageView.ANIMATION_DURATION);\n /* for (View control : mControlsVisible.keySet()) {\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 begin\n Boolean prevVisibility = mControlsVisible.get(control);\n if (!prevVisibility) {\n continue;\n }\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 end\n toogleVisible(control, 1f, 0f, SmoothImageView.ANIMATION_DURATION);\n }*/\n preAnimationEndAlpha = 0f;\n }\n if (animatorSet != null) {\n animatorSet.start();\n }\n }",
"@Override\n\tpublic void hide() {\n\t\thits.remove();\n\t\ttimeLeft.remove();\n\t\tdarken.remove();\n\t\tcontainer.remove();\n\t\ttimer = null;\n\t\ttrainingBag = null;\n\t}",
"public void hideMultipleImages(boolean hide){\n this.hideMultipleImages = hide;\n }",
"void hide();",
"public void onFinish() {\n\n imageView_gif_confeti.setVisibility(View.INVISIBLE);\n }",
"public void unsetShowAnimation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(SHOWANIMATION$20);\n }\n }",
"public void hideProgress() {\n search_progress.setVisibility(View.GONE);\n img_left_action.setAlpha(0.0f);\n img_left_action.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(img_left_action, \"alpha\", 0.0f, 1.0f).start();\n }",
"public void stopAnimation() {\r\n\t\tani.stop();\r\n\t}",
"public void hide(){\n background.setOpacity(0);\n text.setOpacity(0);\n }",
"@Override\n\t public void onClick(View v) {\n \t\t smia.setVisibility(View.INVISIBLE);\n \t\t kfja.setVisibility(View.INVISIBLE);\n \t\t croa.setVisibility(View.INVISIBLE);\n \t\t dancea.setVisibility(View.INVISIBLE);\n \t\t starters.setVisibility(View.INVISIBLE);\n \t\t diz1.setVisibility(View.INVISIBLE); \n \t\t\t diz2.setVisibility(View.INVISIBLE);\n \t\t plaa.setVisibility(View.VISIBLE);\n \t\tstarteres.setVisibility(View.INVISIBLE);\n\t\t diz3.setVisibility(View.INVISIBLE); \n\t\t diz4.setVisibility(View.INVISIBLE);\n\t\t tjza.setVisibility(View.INVISIBLE);\n \t startAnimationbas();\n \t b = 1 ;\n \t player.stop();\n \t }",
"@Override\r\n public void hide() {\r\n bgMusic.pause();\r\n }",
"private void hide() {\n\t}",
"private void hideSplash() {\n \t\tthis.splashInfoContainer.startAnimation( this.splashFadeOut );\n \t}",
"public void hide() {\n hidden = true;\n }",
"private void ensureVisibility(ImageView image) {\n\n if(image==tweenAnimation){\n\n frameAnimation.setVisibility(View.GONE);\n tweenAnimation.setVisibility(View.VISIBLE);\n }\n else if(image==frameAnimation){\n\n tweenAnimation.setVisibility(View.GONE);\n frameAnimation.setVisibility(View.VISIBLE);\n\n }\n\n }",
"@Override\n public void onAnimationStart(Animator animation) {\n findViewById(R.id.btn_camera_sticker_album).setVisibility(View.VISIBLE);\n findViewById(R.id.btn_camera_filter_album).setVisibility(View.VISIBLE);\n findViewById(R.id.btn_return).setVisibility(View.VISIBLE);\n\n //瞬间隐藏掉面板上的东西\n findViewById(R.id.btn_camera_beauty).setVisibility(View.GONE);\n findViewById(R.id.btn_camera_filter1).setVisibility(View.GONE);\n findViewById(R.id.btn_camera_lip).setVisibility(View.GONE);\n mFilterLayout.setVisibility(View.GONE);\n }",
"@Override\n public void onAnimationStart(Animator animation) {\n findViewById(R.id.btn_sticker1).setVisibility(View.GONE);\n findViewById(R.id.btn_sticker2).setVisibility(View.GONE);\n findViewById(R.id.btn_sticker3).setVisibility(View.GONE);\n findViewById(R.id.btn_camera_sticker_album).setVisibility(View.VISIBLE);\n findViewById(R.id.btn_camera_filter_album).setVisibility(View.VISIBLE);\n findViewById(R.id.btn_return).setVisibility(View.VISIBLE);\n\n\n\n //瞬间隐藏掉面板上的东西\n mStickerLayout.setVisibility(View.GONE);\n }",
"public void hideIn1() {\r\n\t\thideTimer.schedule(500);\r\n\t}",
"public void blueTapped(View view){\n ImageView blue = (ImageView)findViewById(R.id.bluebulb);\n\n ImageView green = (ImageView)findViewById(R.id.greenbulb);\n //the above two lines is nothing but the visibility of image\n\n\n /* animation is avialble in blue . animate property, and i can set the alpha to zero, and i can set the duration\n that it should go from 1 to 0, here 1000 means 1 second\n\n */\n blue.animate().alpha(1).setDuration(1000);//alpha of blue should be one becuase blue is tapped\n green.animate().alpha(0).setDuration(1000);//alpha of green should be zero becuase blue is tapped\n }",
"public void mo84055a() {\n if (getVisibility() == 0) {\n animate().cancel();\n setLayerType(2, null);\n animate().alpha(0.0f).setListener(new Animator.AnimatorListener() {\n /* class com.zhihu.android.article.widget.ArticleFloatingTipsView.C172711 */\n\n public void onAnimationCancel(Animator animator) {\n }\n\n public void onAnimationRepeat(Animator animator) {\n }\n\n public void onAnimationStart(Animator animator) {\n }\n\n public void onAnimationEnd(Animator animator) {\n ArticleFloatingTipsView.this.setVisibility(4);\n ArticleFloatingTipsView.this.setLayerType(0, null);\n }\n }).start();\n }\n }",
"public void hide() {\n }",
"public void hide() {\n visible=false;\n }",
"private void mo71771s() {\n if (this.f74252h != null) {\n this.f74252h.mo60134a(\"stopPlayAnimation\", (Object) Boolean.valueOf(true));\n }\n }",
"public void hide() {\n\t\thidden = true;\n\t}",
"@Override\n\t public void onClick(View v) {\n \t\t croa.setVisibility(View.VISIBLE);\n \t dancea.setVisibility(View.INVISIBLE);\n \t\t kfja.setVisibility(View.INVISIBLE);\n \t\t starters.setVisibility(View.INVISIBLE);\n \t\t smia.setVisibility(View.INVISIBLE);\n \t\t diz1.setVisibility(View.INVISIBLE); \n \t\t diz2.setVisibility(View.INVISIBLE);\n \t\t plaa.setVisibility(View.INVISIBLE);\n \t\t starteres.setVisibility(View.INVISIBLE);\n \t\t diz3.setVisibility(View.INVISIBLE); \n\t\t diz4.setVisibility(View.INVISIBLE);\n\t\t tjza.setVisibility(View.INVISIBLE);\n \t startAnimationcroc();\n \t b = 0 ;\n \t player.stop();\n \t }",
"public void deten(){\n\t \tanimacion2.stop();\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}",
"@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\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 hideContents() {\n\t\tprogram.remove(Play);\n\t\tprogram.remove(Settings);\n\t\tprogram.remove(Credits);\n\t\tprogram.remove(Exit);\n\t\tprogram.remove(tank);\n\t\tprogram.remove(barrel);\n\t\tprogram.remove(explosion);\n\t\tprogram.remove(title);\n\t\tshootCounter = 0;\n\t\tdelayCounter = 0;\n\t\tbarrel = new GameImage(\"../media/TanksPNGS/large_greenTank_cannon.png\");\n\t\tbarrel.setLocation(15, 475);\n\t\tp = false;\n\t\ts= false;\n\t\tc = false;\n\t\tq = false;\n\t}",
"public void stopAnimation()\n {\n animationTimer.stop();\n }",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n public void hide() {\n \n }",
"@Override\r\n public void hide() {\r\n\r\n }",
"@Override\n public void makeHidden(Player viewer) {\n \n }",
"@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}",
"Animation getShowAnimation();",
"@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}",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"public void mapImageProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapImageBinding.tourMapImageProgress.getVisibility() != View.GONE) {\n tabTourMapImageBinding.tourMapImageProgress.setVisibility(View.GONE);\n }\n if (tabTourMapImageBinding.tourMapImageLayout.getVisibility() != View.VISIBLE) {\n tabTourMapImageBinding.tourMapImageLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }",
"@Override\r\n public void hide() {\n }",
"void stopAnimation()\n {\n animationTimer.cancel();\n }",
"@Override\n\t public void onClick(View v) {\n \t\tkfja.setVisibility(View.VISIBLE);\n \t\t croa.setVisibility(View.INVISIBLE);\n \t\t dancea.setVisibility(View.INVISIBLE);\n \t\t starters.setVisibility(View.INVISIBLE);\n \t\t smia.setVisibility(View.INVISIBLE);\n \t\t diz1.setVisibility(View.INVISIBLE); \n \t\t\t diz2.setVisibility(View.INVISIBLE);\n \t\t\t plaa.setVisibility(View.INVISIBLE);\n \t\t\tstarteres.setVisibility(View.INVISIBLE);\n \t \t\t diz3.setVisibility(View.INVISIBLE); \n \t\t\t diz4.setVisibility(View.INVISIBLE);\n \t\t\ttjza.setVisibility(View.INVISIBLE);\n \t startAnimationkfj();\n \t b = 0 ;\n \t player.stop();\n \t }",
"@Override\n public void onClick(View v) {\n \t\t croa.setVisibility(View.INVISIBLE);\n \t dancea.setVisibility(View.INVISIBLE);\n \t\t kfja.setVisibility(View.INVISIBLE);\n \t\t starters.setVisibility(View.VISIBLE);\n \t\t smia.setVisibility(View.INVISIBLE);\n \t\t diz1.setVisibility(View.INVISIBLE); \n \t\t diz2.setVisibility(View.INVISIBLE);\n \t\t plaa.setVisibility(View.INVISIBLE);\n \t\t starteres.setVisibility(View.VISIBLE);\n \t\t diz3.setVisibility(View.INVISIBLE); \n \t\t diz4.setVisibility(View.INVISIBLE);\n \t\t tjza.setVisibility(View.INVISIBLE);\n \t\t b = 0 ;\n \t\t player.stop();\n \t }",
"@Override\n public void onAnimationEnd(Animation animation) {\n textViewImageName.setVisibility(View.GONE);\n }",
"protected void hideAllPics() {\n\t\tfor (int i = 0; i < ROWS; i++) { //hide pictures in all rooms\n\t\t\tfor (int j = 0; j < COLS; j++){\n\t\t\t\tsquares[i][j].setBackground(Color.WHITE);\n\t\t\t\tsquares[i][j].hidePics();\n\t\t\t}\n\t\t}\n\t}",
"public void mo5967d() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{-((float) C1413m.f5711i.getHeight()), 0.0f}).setDuration(240);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{0.0f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f}).setDuration(240);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5436pa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.0f}).setDuration(j).start();\n LinearLayout linearLayout = this.f5438qa;\n ObjectAnimator.ofFloat(linearLayout, \"translationY\", new float[]{0.0f, (float) ((linearLayout.getMeasuredHeight() - this.f5384D.getmImageViewHeight()) - C1413m.m6828a(27, this.f5389I))}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5438qa, \"alpha\", new float[]{1.0f, 0.0f}).setDuration(j).start();\n duration.addListener(new C1304Ya(this));\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t mImgLayout.setVisibility(View.GONE);\n\t\t\t\t \n\t\t\t}",
"public void onAnimationEnd(Animation animation)\n {\n txtNotifications.setVisibility(View.INVISIBLE);\n imgNotifications.setImageResource(0);\n }",
"@Override\n\t public void onClick(View v) {\n\t\t tjza.setVisibility(View.VISIBLE);\n\t\t smia.setVisibility(View.INVISIBLE);\n\t\t kfja.setVisibility(View.INVISIBLE);\n\t\t croa.setVisibility(View.INVISIBLE);\n\t\t dancea.setVisibility(View.INVISIBLE);\n\t\t starters.setVisibility(View.INVISIBLE);\n\t\t diz1.setVisibility(View.INVISIBLE); \n\t\t\t diz2.setVisibility(View.INVISIBLE);\n\t\t\t plaa.setVisibility(View.INVISIBLE);\n\t\t\tstarteres.setVisibility(View.INVISIBLE);\n\t \t\t diz3.setVisibility(View.INVISIBLE); \n\t\t\t diz4.setVisibility(View.INVISIBLE);\n\t startAnimationtjz();\n\t b = 0 ;\n\t }",
"@Override\n public void hide() {\n mHandler.post(mHide);\n }"
]
| [
"0.69172984",
"0.68315685",
"0.6752849",
"0.66134715",
"0.6590342",
"0.65486926",
"0.6542631",
"0.65048087",
"0.64571345",
"0.6429833",
"0.64159656",
"0.64019614",
"0.63632655",
"0.6359731",
"0.6302152",
"0.6300949",
"0.6278243",
"0.6260043",
"0.62591034",
"0.6240536",
"0.62004024",
"0.61837816",
"0.61798805",
"0.6178392",
"0.61748755",
"0.61597544",
"0.61401546",
"0.6130634",
"0.61295444",
"0.61194175",
"0.61145014",
"0.61145014",
"0.61145014",
"0.61145014",
"0.61145014",
"0.61145014",
"0.61145014",
"0.61145014",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.61105657",
"0.6072819",
"0.6072819",
"0.6072819",
"0.6072819",
"0.6072819",
"0.6072819",
"0.6072819",
"0.6072819",
"0.6072819",
"0.6072819",
"0.60553694",
"0.60481495",
"0.6046592",
"0.6046592",
"0.6041336",
"0.6040853",
"0.6028059",
"0.60280484",
"0.60280484",
"0.60280484",
"0.60280484",
"0.6027232",
"0.60144615",
"0.60144615",
"0.60144615",
"0.60144615",
"0.6012164",
"0.6012164",
"0.6012164",
"0.6007254",
"0.59992236",
"0.5993358",
"0.59923065",
"0.5991582",
"0.5975521",
"0.5967172",
"0.59375924",
"0.5937217",
"0.59341604",
"0.59301645",
"0.5919054"
]
| 0.0 | -1 |
/ close all valve and make motors off | private static void setNormalState() {
InitialClass.arduino.serialWrite('0');
InitialClass.arduino.serialWrite('6');
InitialClass.arduino.serialWrite('2');
InitialClass.arduino.serialWrite('8');
InitialClass.arduino.serialWrite('C');
InitialClass.arduino.serialWrite('A');
InitialClass.arduino.serialWrite('4');
/// hide animated images of scada
pumpForSolutionOn.setVisible(false);
pumpForTitrationOn.setVisible(false);
mixerOn.setVisible(false);
valveTitrationOpened.setVisible(false);
valveSolutionOpened.setVisible(false);
valveWaterOpened.setVisible(false);
valveOutOpened.setVisible(false);
log.append("Клапана закрыты\nдвигатели выключены\n");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void stopMotors() {\n pidDrive.disable();\n pidRotate.disable();\n robot.rightDrive.setPower(0);\n robot.leftDrive.setPower(0);\n }",
"public void stopMotors() {\n\t\tRobotMap.frontLeft.set(0);\n\t\tRobotMap.backLeft.set(0);\n\t\tRobotMap.frontRight.set(0);\n\t\tRobotMap.backRight.set(0);\n\t}",
"public static void stopAllMotors() {\r\n\t\tleftMotorReg.stop(true);\r\n\t\trightMotorReg.stop(true);\r\n\t\tarmMotor1Reg.stop(true);\r\n\t\tarmMotor2Reg.stop(true);\r\n\t}",
"public void stopRobot(){\n LAM.setPower(0);\n RAM.setPower(0);\n ILM.setPower(0);\n IRM.setPower(0);\n BLM.setPower(0);\n BRM.setPower(0);\n FLM.setPower(0);\n FRM.setPower(0);\n }",
"public void stopMotors(){\n\t\tsynchStop(MMXCOMMAND_BRAKE);\n\t}",
"public void completeStop(){\n motorFrontLeft.setPower(0);\n motorFrontRight.setPower(0);\n motorBackLeft.setPower(0);\n motorBackRight.setPower(0);\n }",
"void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }",
"public void stop(){\n started = false;\n for (DcMotor motor :this.motors) {\n motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor.setPower(0);\n }\n this.reset();\n }",
"public void stop() {\n climberMotors.stopMotor();\n }",
"protected void end() {\n \t//Robot.motor.disable();\n \tRobot.motor.disable();\n }",
"public void stop()\n {\n robot.FL_drive.setPower(0);\n robot.FR_drive.setPower(0);\n robot.BL_drive.setPower(0);\n robot.BR_drive.setPower(0);\n }",
"public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }",
"public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }",
"public void close(){\n \tisClosed = true;\n \tClawAct.set(true);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }",
"public void closeArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(80, true);\n\t\tleftArmMotor.rotate(80, false);\n\t}",
"private void safeStop() {\n getRobotDrive().stop();\n //pneumatics.stop();\n }",
"void stopAll();",
"public static synchronized void idleAllLiftMotors() {\r\n\t\t\tsynchronized(armStage1.motorLock) {\r\n//\t\t\t\tsynchronized(armStage2.motorLock) {\r\n\t\t\t\t\tarmStage1.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage1.auxMotorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage2.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n\t\t\t\t\tarmStage1.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t\tarmStage2.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void stop() {\n leftFrontDrive.setPower(0.0);\n rightFrontDrive.setPower(0.0);\n leftRearDrive.setPower(0.0);\n rightRearDrive.setPower(0.0);\n\n // Disable Tracking when we are done;\n targetsUltimateGoal.deactivate();\n\n //closes object detection to save system resouces\n if (tfod != null) {\n tfod.shutdown();\n }\n }",
"protected void end() {\n \tdrivemotors.stop();\n }",
"protected void end() {\n\t\tRobot.conveyor.Stop();\n\t}",
"protected void end() {\n \tRobot.conveyor.stop();\n }",
"@Override\n public final void stopMotor() {\n stop();\n }",
"public void stop()\n {\n mLeftMaster.stopMotor();\n mRightMaster.stopMotor();\n }",
"private void end() {\r\n isRunning = false;\r\n if( mineField.exploder.isRunning() ) mineField.exploder.stop();\r\n if( settingsOpen ) settingsFrame.dispose();\r\n }",
"protected void end() {\n \tRobot.chassisSubsystem.setShootingMotors(0);\n }",
"public void reset() {\n // stop motors\n Motor.A.stop();\t\n Motor.A.setPower(0);\t\n Motor.B.stop();\n Motor.B.setPower(0);\t\n Motor.C.stop();\n Motor.C.setPower(0);\t\n // passivate sensors\n Sensor.S1.passivate();\n Sensor.S2.passivate();\n Sensor.S3.passivate();\n for(int i=0;i<fSensorState.length;i++)\n fSensorState[i] = false;\n }",
"public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}",
"private void closeMainStage(){\r\n serialConnection.closeSerialConnection();//zamkniecie polaczenai serialowego i wyczyszczenie zasobow\r\n controlThreadRunFlag = false;//zastopowanie wątku kontrolnego\r\n closeAllAutomaticSendThreads(automaticSendThreadArraylist);//zamkniecie wszystkich watkow automatycznej wiadomości\r\n System.gc();//poinformowanie maszyny wirtualnej o usunieciu referencji na nieuzywane obiekty\r\n Platform.exit();//zamkniecie apliakcji - DO ZMIANY !!!!!!!!!!!!!!!!\r\n }",
"public void setEngineOff();",
"@Override\r\n public void close(){\r\n if(!isOpened){\r\n log.warning(\"close(): not open\");\r\n return;\r\n }\r\n \r\n if(servoCommandWriter!=null) {\r\n// log.info(\"disabling all servos\");\r\n// disableAllServos();\r\n try{\r\n Thread.sleep(10);\r\n }catch(InterruptedException e){\r\n \r\n }\r\n servoCommandWriter.shutdownThread();\r\n }\r\n servoCommandWriter.close(); // unbinds pipes too\r\n if(gUsbIo!=null) gUsbIo.close();\r\n UsbIo.destroyDeviceList(gDevList);\r\n log.info(\"device closed\");\r\n errorString=null;\r\n isOpened=false;\r\n \r\n }",
"public void stop() {\n\t\tsetPower(Motor.STOP);\r\n\t}",
"protected void end() {\n Robot.wedge.stop();\r\n Robot.driveTrain.stop();\r\n Robot.ballIntake.stop();\r\n }",
"public static void shutDown(){\n for(int i = PS3_LIST_.size()-1; i >= 0; i--){\n PS3 instance = PS3_LIST_.get(i);\n instance.setLed(false);\n instance.destroy();\n }\n PS3Logger.log(PS3Logger.TYPE.DEBUG, null, \"PS3 SHUTDOWN\");\n }",
"void atras(){\n\t\tMotorA.stop();\n\t\tMotorB.setSpeed(700);\n\t\tMotorC.setSpeed(700);\n\t\t\n\t\tMotorB.backward();\n\t\tMotorC.backward();\n\t}",
"@Override public void close() {\n\t\tthis.timer.cancel();\n\t\tthis.motionStream.removeListener(this);\n\t}",
"public void arm_kill() {\n arm_analog(0);\n }",
"private void pararCancion() {\n clip.stop();\n clip.close();\n clip = null;\n }",
"@SimpleFunction(description = \"Stop the drive motors of the robot.\")\n public void Stop() {\n String functionName = \"Stop\";\n if (!checkBluetooth(functionName)) {\n return;\n }\n\n for (NxtMotorPort port : driveMotorPorts) {\n setOutputState(functionName, port, 0,\n NxtMotorMode.Brake, NxtRegulationMode.Disabled, 0, NxtRunState.Disabled, 0);\n }\n }",
"public void stopFeeding() {\n motor.set(0);\n }",
"protected void end() {\n \tRobotMap.feedMotor1.set(0);\n \tRobotMap.shootAgitator.set(0);\n }",
"public void stop() {\n \t\tfor (Expirator e : expirators) {\n \t\t\te.stop();\n \t\t}\n \t}",
"@Override\n\tpublic void close() {\n\t\tframe = null;\n\t\tclassic = null;\n\t\trace = null;\n\t\tbuild = null;\n\t\tbt_classic = null;\n\t\tbt_race = null;\n\t\tbt_build = null;\n\t\tGameView.VIEW.removeDialog();\n\t}",
"@Override\n public void stop() {\n smDrive.stop();\n smArm.stop();\n }",
"public void stop() {\n\t\tif (getMainMotor() != null) {\n\t\t\tgetMainMotor().stop(0);\n\t\t}\n\t}",
"@Override\n public void end(boolean interrupted) {\n // stop the motors\n drive.stop();\n limelight.enableDriverMode();\n limelight.disableLEDs();\n Robot.getRobotContainer().getSwerveController().setRumble(RumbleType.kLeftRumble, 0.0);\n\n }",
"protected void end() {\r\n motorWithEncoder.disable();\r\n }",
"public void stop() {\n\t\tmotor1.set( Constants.CLAW_MOTOR_STOPPED );\n\t\t}",
"protected void end() {\n // Robot.drive.setMoveVisionAssist(0);\n // Robot.drive.setTurnVisionAssist(0);\n Robot.limelight.setPipeline(1.0); \n }",
"protected void end() {\n \n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n }",
"public void pleaseStop()\n {\n\t this.doorgaan_thread = false;\n\t this.doorgaan_wheel = true;\n draad = null; // waarom? \n }",
"public void switchOff();",
"@Override\n\tpublic void turnOff() {\n\n\t}",
"private void stopServices(){\n if(_handlers!=null){\n for(PlugMotionHandler handler : _handlers) {\n if (handler != null)\n handler.stopSimulation();\n //Log.i(TAG, \"stoping simulation\");\n }\n }\n }",
"public void stop() {\n elevator1.set(0);\n elevator2.set(0); \n \n }",
"public void resetMotors() {\n\t\tRobotMap.frontLeft.setSafetyEnabled(true);\n\t\tRobotMap.backLeft.setSafetyEnabled(true);\n\t\tRobotMap.frontRight.setSafetyEnabled(true);\n\t\tRobotMap.backLeft.setSafetyEnabled(true);\n\n\t\tRobotMap.frontRight.setInverted(false);\n\t\tRobotMap.backRight.setInverted(false);\n\t\tRobotMap.frontLeft.setInverted(false);\n\t\tRobotMap.backLeft.setInverted(false);\n\t\tSystem.out.println(RobotMap.backLeft.getSelectedSensorPosition(0));\n\t}",
"public void turnOffAllTheLights() {\r\n for (Light li : lightsArray) {\r\n li.turnOffLight();\r\n }\r\n }",
"protected void end() {\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\t\tlcd.clear();\n\n\t\tRobotMap.chassisfrontLeft.set(0);\n\t\tRobotMap.chassisfrontRight.set(0);\n\t\tRobotMap.chassisrearLeft.set(0);\n\t\tRobotMap.chassisrearRight.set(0);\n\t\t\n\t\tRobotMap.climberclimbMotor.set(0);\n\t\tRobotMap.floorfloorLift.set(0);\n\t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\n\n\t}",
"@Override\n public void stop() {\n\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n armMotor.setPower(0);\n // extendingArm.setPower(0);\n\n telemetry.addData(\"Status\", \"Terminated Interative TeleOp Mode\");\n telemetry.update();\n\n\n }",
"@Override\n public void stop() {\n if (FLM != null) FLM.setPower(0);\n if (FRM != null) FRM.setPower(0);\n if (BLM != null) BLM.setPower(0);\n if (BRM != null) BRM.setPower(0);\n if (BigSuck != null) BigSuck.setPower(0);\n if (SmallSuck != null) SmallSuck.setPower(0);\n if (UpLift != null) UpLift.setPower(0);\n if (DragArm != null) DragArm.setPosition(DragArmRestPosition);\n if (LiftGrab != null) LiftGrab.setPosition(LiftGrabRestPosition);\n if (LiftSwivel != null) LiftSwivel.setPosition(LiftSwivelRestPosition);\n }",
"void robotStop();",
"public void resetAllOperations() {\n\t\t/*\n\t\t * Check to see if we are in any countdown modes\n\t\t */\n\t\tif(inCountdown1Mode) {\n\t\t\twarmUpWindow1.dismiss();\n\t\t}\t\t\n\t\tif(inBaselineMode) {\n\t\t\tbaselineWindow.dismiss();\n\t\t}\n\t\t\n\t\t/**\n\t\t * Turn off any red leds\n\t\t */\n\t\tledOn1.setVisibility(View.INVISIBLE);\n\t\tledOn2.setVisibility(View.INVISIBLE);\n\t\tledOn3.setVisibility(View.INVISIBLE);\n\t\tledOn4.setVisibility(View.INVISIBLE);\n\t\tledOn5.setVisibility(View.INVISIBLE);\n\t\tledOn6.setVisibility(View.INVISIBLE);\n\t\tledOn7.setVisibility(View.INVISIBLE);\n\t\tledOn8.setVisibility(View.INVISIBLE);\n\t\tledOn9.setVisibility(View.INVISIBLE);\n\t\t\n\t\t/*\n\t\t * Reset any program flow variables\n\t\t */\n\t\tinCountdown1Mode = false;\n\t\tinBaselineMode = false;\n\t\ton = false;\n\t\tmodeChange = false;\n\t\twarmedUp = false;\n\t\t\n\t\t/*\n\t\t * Reset counts\n\t\t */\n\t\tcountdown1 = WARMUP_COUNT;\n\t\tcountdown2 = BASELINE_COUNT;\n\t\ttvUpdate(tvSensorValue, \"--\");\n\t\t\n\t\tcountdown1Handler.removeCallbacksAndMessages(null);\n\t\tcountdown2Handler.removeCallbacksAndMessages(null);\n\t\tmodeHandler.removeCallbacksAndMessages(null);\n\t\ttickHandler.removeCallbacksAndMessages(null);\n\t\tsetLEDsHandler.removeCallbacksAndMessages(null);\n\t\t\n\t\t// Stop taking measurements\n\t\tstreamer.disable();\n\t\t// Disable the sensor\n\t\tdroneApp.myDrone.quickDisable(qsSensor);\n\t}",
"@Override\n\tprotected void takeOff(){\n\t\tgvh.log.i(TAG, \"Drone taking off\");\n\t\tsetControlInput(0, 0, 0, 1);\n\t}",
"protected void end() {\n \n this.getPIDController().disable();\n shooter.setShooterMotor(0.0);\n }",
"public void turn_off () {\n this.on = false;\n }",
"@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }",
"@Override\n protected void end() {\n sClimber.setMotorSpeed(0);\n sIntake.StopWrist();\n sElevator.StopMotors();\n RobotMap.WristMotor.config_kD(0, Constants.kElevatorDGain);\n RobotMap.WristMotor.config_kP(0, Constants.kElevatorPGain);\n RobotMap.WristMotor.config_kI(0, Constants.kElevatorIGain);\n }",
"@Override\n\tprotected void end()\n\t{\n\t\tRobotMap.joshsPID.disable();\n\t\tRobotMap.TestingMotor.set(0.0);\n\t}",
"public void off() {\n\n\t}",
"public void stopElevators(){\n\t\tfor(int liftNum=0;liftNum<NUM_OF_ELEVATORS;liftNum++){\n\t\t\tlift[liftNum].stopElevator();\n\t\t}\n\t}",
"public void stop() {\n activePickups = new ArrayList<Pickup>();\n\n fogLightsTimer.cancel();\n fogLightsTimer.purge();\n\n slowMotionTimer.cancel();\n slowMotionTimer.purge();\n\n invincibilityTimer.cancel();\n invincibilityTimer.purge();\n\n coinTimer.cancel();\n coinTimer.purge();\n }",
"private void halt() {\n robot.leftFront.setPower(0);\n robot.leftBack.setPower(0);\n robot.rightFront.setPower(0);\n robot.rightBack.setPower(0);\n }",
"@Override\n protected void end() {\n Robot.climber.frontStop();\n Robot.climber.rearStop();\n Robot.isAutonomous = false;\n }",
"public void stop() {\n intake(0.0);\n }",
"public void stopWheel()\n {\n setVectorTarget(Vector2D.ZERO);\n\n turnMotor.setPosition(0.5);\n\n if (driveMotor != null)\n driveMotor.setVelocity(0);\n }",
"public void brake() {\n\t\tsetPower(Motor.STOP);\r\n\t}",
"public void stop() {\n done=true;\n bridges.forEach(Bridge::stop);\n bridges.clear();\n }",
"public void forceStop() {\r\n\t\tchaseObj = false;\r\n\t}",
"public void clearMotors() {\n\t\tmotors.clear();\n\t}",
"protected void end() {\r\n\t \tRobotMap.armarm_talon.changeControlMode(CANTalon.ControlMode.PercentVbus);\r\n\t }",
"protected void end() {\r\n // stop motor, reset position on the dumper, enable closed loop\r\n }",
"protected void end() {\n \tRobot.driveTrain.setPower(0, 0);\n }",
"@Override\n public void stopMachine() {\n cleanOrExplode();\n\n for (GT_MetaTileEntity_Hatch_OutputData data : eOutputData) {\n data.q = null;\n }\n\n mOutputItems = null;\n mOutputFluids = null;\n mEfficiency = 0;\n mEfficiencyIncrease = 0;\n mProgresstime = 0;\n mMaxProgresstime = 0;\n eAvailableData = 0;\n hatchesStatusUpdate_EM();\n getBaseMetaTileEntity().disableWorking();\n }",
"public void deshabilitarBotones()\n\t{\n\t\tbotonPlay.setClickable(false);\n\t\tbotonPause.setClickable(false);\n\t\tbotonPonerRingtone.setClickable(false);\n\t\tbotonDescargar.setClickable(false);\n\t}",
"private final void kill() {\n\t\tgrown=false;\t\t\n\t}",
"protected void end() {\n\t\tRobot.resetSensors();\n\t}",
"private void stopAllMunitions() {\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\t\t\ttry {\n\t\t\t\tif (el.getCurrentMissile() != null) {\n\t\t\t\t\tel.getCurrentMissile().join();\n\t\t\t\t}\n\n\t\t\t\tel.stopRunning();\n\t\t\t\tel.interrupt();\n\t\t\t\tel.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tfor (LauncherDestructor ld : launcherDestractorArr) {\n\t\t\ttry {\n\t\t\t\tif (ld.getCurrentMissile() != null) {\n\t\t\t\t\tld.getCurrentMissile().join();\n\t\t\t\t}\n\n\t\t\t\tld.stopRunning();\n\t\t\t\tld.interrupt();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tfor (IronDome ironDome : ironDomeArr) {\n\t\t\ttry {\n\t\t\t\tif (ironDome.getCurrentMissile() != null) {\n\t\t\t\t\tironDome.getCurrentMissile().join();\n\t\t\t\t}\n\n\t\t\t\tironDome.stopRunning();\n\t\t\t\tironDome.interrupt();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"public void Close() { // in {FF} Arduino\r\n if (SpeakEasy) System.out.println(\"F%%F/Close..\"); // SpeakEasy=true\r\n if (GoodOpen) try {\r\n surrealPort.closePort();\r\n DoMore = null;\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n GoodOpen = false;\r\n }",
"public void stop () {\n driveRaw (0);\n }",
"@Override\n protected void end() {\n armPID_SetZero.disable();\n armPID_SetZero.armMotor.set(0);\n }",
"private void detener() {\n player.stop();\n player.release();\n player = null;\n }",
"protected void close()\n {\n stopped = true;\n }",
"void close(){\r\n // check precondition: device must be opened\r\n if (!checkOpen()){\r\n return;\r\n }\r\n // turn off antenna and LED\r\n cardReader.power(handle, (byte)0);\r\n cardReader.close(handle);\r\n handle = -1;\r\n message = \"Device closed\";\r\n }",
"public void stop() {\n m_servo.setSpeed(0.0);\n }",
"@Override\n protected void end() {\n drive.setEnabled(false);\n drive.setLeftPower(0);\n drive.setRightPower(0);\n }",
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void intakeStop()\n {\n intake_up.set(ControlMode.PercentOutput, 0.0f);\n intake_down.set(ControlMode.PercentOutput, 0.0f);\n }",
"public void stopEngine(){\n currentSpeed = 0;\n }",
"public void stopEngine(){\n currentSpeed = 0;\n }",
"protected void end() {\n\t\tnotifier.stop();\n\n\t\tleftTalon.clearMotionProfileTrajectories();\n\t\trightTalon.clearMotionProfileTrajectories();\n\n\t\tleftTalon.set(ControlMode.MotionProfile, SetValueMotionProfile.Disable.value);\n\t\trightTalon.set(ControlMode.MotionProfile, SetValueMotionProfile.Disable.value);\n\n\t}",
"public void stop() {\n enable = false;\n }"
]
| [
"0.7290732",
"0.7132945",
"0.7047432",
"0.6957313",
"0.68567234",
"0.6825478",
"0.6823482",
"0.67682046",
"0.6688237",
"0.653028",
"0.6488791",
"0.64844686",
"0.6378069",
"0.63758016",
"0.6349449",
"0.6348743",
"0.63198274",
"0.63087755",
"0.6288663",
"0.6246145",
"0.62439275",
"0.6227463",
"0.6200708",
"0.61989415",
"0.6186366",
"0.6182133",
"0.615679",
"0.61312664",
"0.6123742",
"0.61087286",
"0.6107932",
"0.6101341",
"0.6052043",
"0.6047459",
"0.6040337",
"0.6033708",
"0.6027133",
"0.6019694",
"0.6004354",
"0.60031193",
"0.6002171",
"0.599897",
"0.599754",
"0.5952926",
"0.5941311",
"0.5939778",
"0.592729",
"0.5919524",
"0.5916013",
"0.5911999",
"0.5901934",
"0.59012544",
"0.5900473",
"0.58847034",
"0.5882445",
"0.5879359",
"0.5877216",
"0.5874713",
"0.5870564",
"0.58656776",
"0.58647656",
"0.5855795",
"0.58486706",
"0.5840405",
"0.5823198",
"0.5818805",
"0.5818481",
"0.5815997",
"0.5815827",
"0.5811566",
"0.5808289",
"0.5808135",
"0.58030194",
"0.5781954",
"0.5774584",
"0.5773086",
"0.576504",
"0.5762049",
"0.57590646",
"0.5758748",
"0.5744112",
"0.57415533",
"0.57402694",
"0.57374597",
"0.5737417",
"0.57347286",
"0.572902",
"0.5722433",
"0.5715808",
"0.5707129",
"0.5704166",
"0.5703091",
"0.5703063",
"0.56983644",
"0.56976366",
"0.5697509",
"0.5696376",
"0.56960833",
"0.56960833",
"0.56928784",
"0.5692306"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
for (int i = 9; i >= 1; --i) {
for (int j = 9; j > 2; j--)
System.out.printf("%3d X %d = %3d ", j, i, j*i);
System.out.println();
}
} | {
"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 |
Test of getlibrary method, of class SongLibrary. | @Test
public void testGetlibrary() {
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), new HashMap<String,Rights>());
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), new HashMap<String,Rights>());
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
songs.add(song2);
SongLibrary library = new SongLibrary(songs);
ArrayList<Song> expResult = songs;
ArrayList<Song> result = library.getlibrary();
assertEquals(expResult, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n\n Song result = library.getSong(songId);\n assertTrue(result.getTitle().equals(\"titre2\"));\n assertTrue(result.getAlbum().equals(\"album2\"));\n assertTrue(result.getArtist().equals(\"artiste2\"));\n assertTrue(result.getSongId().equals(\"2\"));\n\n }",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"@Test\n public void testAddSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n SongLibrary library = new SongLibrary(songs);\n \n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n library.addSong(song2);\n \n assertTrue(library.islocal(song2.getSongId()));\n assertTrue(library.islocal(song1.getSongId()));\n\n }",
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}",
"public Library getLibrary() {\r\n\t\treturn library;\t\r\n\t}",
"@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}",
"public void loadingLibrary(String libraryFilename);",
"public String getLibrary() {\n return library;\n }",
"public Library getLibrary() {\r\n\t\treturn library;\r\n\t}",
"public static void getALibrary()\n \t{\n \t\tProject.pmActive = true;\n \n \t\t// find a list of files (libraries) in the repository\n \t\tString dirName = Project.getRepositoryLocation();\n \t\tFile dir = new File(dirName);\n \t\tFile [] filesInDir = dir.listFiles();\n \t\tif (filesInDir == null && dirName.length() == 0)\n \t\t{\n \t\t\tJob.getUserInterface().showInformationMessage(\"No repository location is set. Use the 'Project Management' Preferences to set it.\", \"Warning\");\n \t\t\treturn;\n \t\t}\n \n \t\t// choose one and read it in\n \t\tnew LibraryDialog(filesInDir);\n \t}",
"@Test\n public void testRemoveSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"1\";\n \n library.removeSong(songId);\n \n assertFalse(library.islocal(\"1\"));\n assertTrue(library.islocal(\"2\"));\n \n\n }",
"public ArrayList getLibrary() {\n return Library;\n }",
"public void printLibrary() {\n System.out.println(\"\\nLIBRARY OWNER: \" + ownerName); //uses the name that the user specified for owner name\r\n System.out.println(\"\\nSONGS IN LIBRARY: \" );\r\n this.home.printSongs(); //lists all of the songs that were added by the user, including demo songs\r\n this.playlists.forEach((name, playlist) -> { // each playlist is listed after one another\r\n System.out.println(\"\\nPLAYLIST NAME: \" + playlist.getName()); //states name of playlist based on user input\r\n System.out.println(\"PLAYLIST DESCRIPTION: \" + playlist.getDescription()); //states name of description of playlist based on user input\r\n playlist.printSongs();\r\n });\r\n\r\n\r\n\r\n }",
"public void testGetLibraryPath() {\n assertEquals(mb.getLibraryPath(), System\n .getProperty(\"java.library.path\"));\n }",
"public void libraryLoaded();",
"private static void setupLibrary() {\r\n /*\r\n * For using over http:// and https://\r\n */\r\n DAVRepositoryFactory.setup();\r\n /*\r\n * For using over svn:// and svn+xxx://\r\n */\r\n SVNRepositoryFactoryImpl.setup();\r\n\r\n /*\r\n * For using over file:///\r\n */\r\n FSRepositoryFactory.setup();\r\n }",
"@Test\n public void testIslocal() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n boolean result = library.islocal(songId);\n assertTrue(result);\n\n }",
"protected static Library readALibrary(URL fileURL, Library lib, String libName, FileType type, Map<Setting,Object> projectSettings)\n \t{\n \t\t// handle different file types\n \t\tLibraryFiles in;\n \t\tif (type == FileType.ELIB)\n \t\t{\n \t\t\tin = new ELIB();\n \t\t\tif (in.openBinaryInput(fileURL)) return null;\n \t\t} else if (type == FileType.JELIB || type == FileType.DELIB)\n \t\t{\n try {\n LibId libId = lib != null ? lib.getId() : EDatabase.serverDatabase().getIdManager().newLibId(libName);\n in = new JELIB(libId, fileURL, type);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n \t\t} else if (type == FileType.READABLEDUMP)\n \t\t{\n \t\t\tin = new ReadableDump();\n \t\t\tif (in.openTextInput(fileURL)) return null;\n \t\t} else\n \t\t{\n \t\t\tSystem.out.println(\"Unknown import type: \" + type);\n \t\t\treturn null;\n \t\t}\n \n \t\t// determine whether this is top-level\n \t\tin.topLevelLibrary = false;\n \t\tif (lib == null)\n \t\t{\n \t\t\tmainLibDirectory = TextUtils.getFilePath(fileURL);\n if (type == FileType.DELIB) {\n mainLibDirectory = mainLibDirectory.replaceAll(libName+\".\"+type.getExtensions()[0], \"\");\n }\n \t\t\tin.topLevelLibrary = true;\n \t\t}\n \n \t\tif (lib == null)\n \t\t{\n \t\t\t// create a new library\n \t\t\tlib = Library.newInstance(libName, fileURL);\n \t\t}\n \n \t\tin.lib = lib;\n \n \t\t// read the library\n \t\tboolean error = in.readInputLibrary();\n \t\tin.closeInput();\n \t\tif (error)\n \t\t{\n \t\t\tSystem.out.println(\"Error reading \" + lib);\n \t\t\tif (in.topLevelLibrary) mainLibDirectory = null;\n \t\t\treturn null;\n \t\t}\n // if (CVS.isEnabled()) {\n // CVSLibrary.addLibrary(lib);\n // }\n if (projectSettings != null)\n projectSettings.putAll(in.projectSettings);\n \t\treturn in.lib;\n \t}",
"public MusicLibrary() {\n\t\tthis.idMap = new HashMap<String, Song>();\n\t\tthis.titleMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.artistMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.tagMap = new TreeMap<String, TreeSet<String>>(new StringComparator());\n\t\t//this.artistList = new ArrayList<>();\n\t}",
"@Test\n public void testGetLibraryName() {\n System.out.println(\"getLibraryName\");\n JsnParser instance = new JsnParser();\n String expResult = \"\";\n String result = instance.getLibraryName();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"private URL getLibrary(String libFileName, String originalPath, StringBuffer errmsg, boolean checkElectricLib)\n {\n // library does not exist: see if file is in the same directory as the main file\n \t\tURL firstURL = TextUtils.makeURLToFile(mainLibDirectory + libFileName);\n boolean exists = TextUtils.URLExists(firstURL, errmsg);\n if (exists) return firstURL;\n HashMap<String,String> searchedURLs = new HashMap<String,String>();\n \n // try secondary library file locations\n for (Iterator<String> libIt = LibDirs.getLibDirs(); libIt.hasNext(); )\n {\n \t\t\tURL url = TextUtils.makeURLToFile(libIt.next() + File.separator + libFileName);\n exists = TextUtils.URLExists(url, errmsg);\n if (exists) return url;\n if (url != null) searchedURLs.put(url.getFile(), url.getFile());\n }\n \n // check the current working dir\n // (Note that this is not necessarily the same as the mainLibDirectory above)\n // Do NOT search User.getCurrentWorkingDir, as another Electric process can\n // modify that during library read instead, search System.getProperty(\"user.dir\");\n URL thirdURL = TextUtils.makeURLToFile(System.getProperty(\"user.dir\") + File.separator + libFileName);\n if (thirdURL != null && !searchedURLs.containsKey(thirdURL.getFile()))\n {\n exists = TextUtils.URLExists(thirdURL, errmsg);\n if (exists) return thirdURL;\n if (thirdURL != null) searchedURLs.put(thirdURL.getFile(), thirdURL.getFile());\n }\n \n // try the exact path specified in the reference\n if (originalPath != null) {\n \t\tURL url = TextUtils.makeURLToFile(originalPath);\n \tString fileName = url.getFile();\n File libFile = new File(fileName);\n originalPath = libFile.getParent();\n \n URL secondURL = TextUtils.makeURLToFile(originalPath + File.separator + libFileName);\n if (secondURL != null && !searchedURLs.containsKey(secondURL.getFile()))\n {\n exists = TextUtils.URLExists(secondURL, errmsg);\n if (exists) return secondURL;\n if (secondURL != null) searchedURLs.put(secondURL.getFile(), secondURL.getFile());\n }\n }\n \n \t\tif (checkElectricLib)\n {\n // try the Electric library area\n URL url = LibFile.getLibFile(libFileName);\n exists = TextUtils.URLExists(url, errmsg);\n if (exists) return url;\n }\n return null;\n }",
"public static void main(String[] args) {\n Library<String> lib1 = new Library<String>();\n lib1.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n lib1.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n lib1.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\n String patron1 = \"Jane Doe\";\n\n if (!lib1.checkout(9780330351690L, patron1, 1, 1, 2008))\n System.err.println(\"TEST FAILED: first checkout\");\n if (!lib1.checkout(9780374292799L, patron1, 1, 1, 2008))\n System.err.println(\"TEST FAILED: second checkout\");\n ArrayList<LibraryBook<String>> booksCheckedOut1 = lib1\n .lookup(patron1);\n if (booksCheckedOut1 == null\n || booksCheckedOut1.size() != 2\n || !booksCheckedOut1.contains(new Book(9780330351690L, \"Jon Krakauer\",\n \"Into the Wild\"))\n || !booksCheckedOut1.contains(new Book(9780374292799L,\n \"Thomas L. Friedman\", \"The World is Flat\"))\n || !booksCheckedOut1.get(0).getHolder().equals(patron1)\n || !booksCheckedOut1.get(0).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1))\n || !booksCheckedOut1.get(1).getHolder().equals(patron1)\n || !booksCheckedOut1.get(1).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1)))\n System.err.println(\"TEST FAILED: lookup(holder)\");\n if (!lib1.checkin(patron1))\n System.err.println(\"TEST FAILED: checkin(holder)\");\n\n // test a library that uses phone numbers (PhoneNumber) to id patrons\n Library<PhoneNumber> lib2 = new Library<PhoneNumber>();\n lib2.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n lib2.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n lib2.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\n PhoneNumber patron2 = new PhoneNumber(\"305.555.1234\");\n\n if (!lib2.checkout(9780330351690L, patron2, 1, 1, 2008))\n System.err.println(\"TEST FAILED: first checkout\");\n if (!lib2.checkout(9780374292799L, patron2, 1, 1, 2008))\n System.err.println(\"TEST FAILED: second checkout\");\n ArrayList<LibraryBook<PhoneNumber>> booksCheckedOut2 = lib2\n .lookup(patron2);\n if (booksCheckedOut2 == null\n || booksCheckedOut2.size() != 2\n || !booksCheckedOut2.contains(new Book(9780330351690L, \"Jon Krakauer\",\n \"Into the Wild\"))\n || !booksCheckedOut2.contains(new Book(9780374292799L,\n \"Thomas L. Friedman\", \"The World is Flat\"))\n || !booksCheckedOut2.get(0).getHolder().equals(patron2)\n || !booksCheckedOut2.get(0).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1))\n || !booksCheckedOut2.get(1).getHolder().equals(patron2)\n || !booksCheckedOut2.get(1).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1)))\n System.err.println(\"TEST FAILED: lookup(holder)\");\n if (!lib2.checkin(patron2)) \n System.err.println(\"TEST FAILED: checkin(holder)\");\n \n System.out.println(\"Testing done.\");\n \n // FILL IN for tests\n // test a library that uses phone numbers (PhoneNumber) to id patrons\n// Library<PhoneNumber> lib3 = new Library<PhoneNumber>();\n// lib3.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n// lib3.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n// lib3.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n//\n// PhoneNumber patron3 = new PhoneNumber(\"631-353-9789\");\n//\n// if (!lib3.checkout(9780330351690L, patron3, 1, 1, 2008))\n// System.err.println(\"TEST FAILED: first checkout\");\n// if (!lib3.checkout(9780374292799L, patron3, 1, 1, 2008))\n// System.err.println(\"TEST FAILED: second checkout\");\n// ArrayList<LibraryBook<PhoneNumber>> booksCheckedOut3 = lib3\n// .lookup(patron3);\n// if (booksCheckedOut3 == null\n// || booksCheckedOut3.size() != 2\n// || !booksCheckedOut3.contains(new Book(9780330351690L, \"Jon Krakauer\",\n// \"Into the Wild\"))\n// || !booksCheckedOut3.contains(new Book(9780374292799L,\n// \"Thomas L. Friedman\", \"The World is Flat\"))\n// || !booksCheckedOut3.get(0).getHolder().equals(patron3)\n// || !booksCheckedOut3.get(0).getDueDate().equals(\n// new GregorianCalendar(2008, 1, 1))\n// || !booksCheckedOut3.get(1).getHolder().equals(patron3)\n// || !booksCheckedOut3.get(1).getDueDate().equals(\n// new GregorianCalendar(2008, 1, 1)))\n// System.err.println(\"TEST FAILED: lookup(holder)\");\n// if (!lib3.checkin(patron3)) \n// System.err.println(\"TEST FAILED: checkin(holder)\");\n \n // FOR LAB: write tests for getInventoryList\n ArrayList<LibraryBook<String>> lib1Inventory = lib1.getInventoryList();\n for(int i = 1; i < lib1Inventory.size(); ++i) {\n \tif(lib1Inventory.get(i).getIsbn() < lib1Inventory.get(i - 1).getIsbn()) {\n \t\t System.err.println(\"TEST FAILED: getInventoryList for Library<String>\");\n \t}\n }\n ArrayList<LibraryBook<PhoneNumber>> lib2Inventory = lib2.getInventoryList();\n for(int i = 1; i < lib2Inventory.size(); ++i) {\n \tif(lib2Inventory.get(i).getIsbn() < lib2Inventory.get(i - 1).getIsbn()) {\n \t\t System.err.println(\"TEST FAILED: getInventoryList for Library<String>\");\n \t}\n }\n \n // test a medium library: you will use this for homework\n Library<String> lib3 = new Library<String>(); \n lib3.addAll(\"Mushroom_Publishing.txt\");\n \n String patron3 = \"Barack Obama\";\n lib3.checkout(9781843190028L, patron3, 1, 1, 1989);\n lib3.checkout(9781843190400L, patron3, 1, 1, 3975);\n lib3.checkout(9781843190936L, patron3, 1, 1, 1889);\n lib3.checkout(9781843193319L, patron3, 1, 1, 2063);\n lib3.checkout(9781843190998L, patron3, 1, 1, 1990);\n \n ArrayList<LibraryBook<String>> lib3Inventory = lib3.getOrderedByAuthor();\n for(int i = 1; i < lib3Inventory.size(); ++i) {\n \tif(lib3Inventory.get(i).getAuthor().compareTo(lib3Inventory.get(i - 1).getAuthor()) < 0 || (lib3Inventory.get(i).getAuthor().compareTo(lib3Inventory.get(i - 1).getAuthor()) == 0 && lib3Inventory.get(i).getTitle().compareTo(lib3Inventory.get(i - 1).getTitle()) < 0) ) {\n \t\t System.err.println(\"TEST FAILED: getOrderedByAuthor for Library<String>\"); \n \t}\n }\n ArrayList<LibraryBook<String>> lib3DueDates = lib3.getOverdueList(12, 13, 2000);\n for(int i = 1; i < lib3DueDates.size(); ++i) {\n \tif(lib3DueDates.get(i).getDueDate().compareTo(lib3DueDates.get(i - 1).getDueDate()) < 0) {\n \t\t System.err.println(\"TEST FAILED: getOverdueList for Library<String>\");\n \t}\n }\n }",
"public void startLibrary();",
"ISOAErrLibrary getLibrary();",
"public Library(String setName) {\n name = setName;\n }",
"@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }",
"public interface Libraries {\n Library getByIdentifier(LibraryIdentifier libraryIdentifier);\n}",
"public static void main(String[] args) {\n\t// write your code here\n\n\n Library library = new Library();\n //new students array for this library\n ArrayList<Student> studentsInLibrary = new ArrayList<>();\n ArrayList<Book> booksInLibrary = new ArrayList<>();\n ArrayList<Tablet> tabletsInLibrary = new ArrayList<>();\n\n //set the created arraylist to library registered students and fill it\n library.setRegisteredStudents(fillStudentsArray(studentsInLibrary));\n library.setBooksBank(fillBooksArray(booksInLibrary));\n library.setTabletsBank(fillTabletsArray(tabletsInLibrary));\n\n\n System.out.println(!false);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// //Debugging\n// for ( Student student1 : library.getRegisteredStudents() ) {\n//\n//\n// System.out.println(student1.toString());\n// }\n//\n//\n// for ( Book book : library.getBooksBank() ) {\n//\n//\n// System.out.println(book.toString());\n// }\n//\n// System.out.println(\"***********************************\");\n//\n// for ( Tablet tablet : library.getTabletsBank() ) {\n//\n//\n// System.out.println(tablet.toString());\n// }\n\n\n\n LibraryManager libraryManager =new LibraryManager();\n\n\n\n\n\n\n\n\n //pass the library to its manager\n libraryManager.setTheLibrary(library);\n\n }",
"void loadAlbums();",
"public static void getLibrary(String user, UsoApi<ArrayList> needResult)\n {\n final String[] response = new String[1];\n final SyncHttpClient client = new SyncHttpClient();\n client.setTimeout(5000);\n\n\n String api = host + \"/library/\" + user;\n\n client.get(api,\n new TextHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, final String res) {\n response[0] = res;\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, final String res, Throwable t) {\n response[0] = res;\n }\n }\n );\n\n ArrayList<BibliotecaTab.BiblioItem> items = new ArrayList<>();\n\n JsonArray listas = new JsonParser().parse(response[0]).getAsJsonObject().get(\"listas\").getAsJsonArray();\n BibliotecaTab.BiblioItem title1 = new BibliotecaTab.BiblioItem();\n title1.tipo = BibliotecaTab.BiblioItem.TITLE;\n title1.title = \"Tus listas de reproducción\";\n items.add(title1);\n\n if(listas.size() == 0)\n {\n BibliotecaTab.BiblioItem title3 = new BibliotecaTab.BiblioItem();\n title3.tipo = BibliotecaTab.BiblioItem.NOTHING;\n title3.title = \"No tienes ninguna lista de reproducción\";\n items.add(title3);\n }\n for(int i=0; i<listas.size(); i++) {\n BibliotecaTab.BiblioItem biblioItem = new BibliotecaTab.BiblioItem();\n biblioItem.tipo = BibliotecaTab.BiblioItem.PLAYLIST;\n Lista lista = new Lista(listas.get(i).getAsJsonObject());\n biblioItem.lista = lista;\n items.add(biblioItem);\n }\n\n JsonArray marchas = new JsonParser().parse(response[0]).getAsJsonObject().get(\"marchas\").getAsJsonArray();\n BibliotecaTab.BiblioItem title2 = new BibliotecaTab.BiblioItem();\n title2.tipo = BibliotecaTab.BiblioItem.TITLE;\n title2.title = \"Tus marchas más escuchadas\";\n items.add(title2);\n if(marchas.size() == 0)\n {\n BibliotecaTab.BiblioItem title3 = new BibliotecaTab.BiblioItem();\n title3.tipo = BibliotecaTab.BiblioItem.NOTHING;\n title3.title = \"Aún no has escuchado ninguna marcha :(\";\n items.add(title3);\n }\n for(int i=0; i<marchas.size(); i++) {\n BibliotecaTab.BiblioItem biblioItem = new BibliotecaTab.BiblioItem();\n biblioItem.tipo = BibliotecaTab.BiblioItem.SONG;\n Marcha marcha = new Marcha(marchas.get(i).getAsJsonObject());\n biblioItem.marcha = marcha;\n items.add(biblioItem);\n }\n\n needResult.result(items);\n }",
"public Library(String name, int id) {\n super(name); // invoking superclass constructor\n this.ID = id;\n this.albums = new HashSet<Album>();\n }",
"private void testGetDocumentLibraryFolder() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n NodeRef documentLibraryFolder = getDocumentLibraryFolder();\n assertNotNull(documentLibraryFolder);\n LOG.debug(\"Got Document_Library Folder NodeRef: \" + documentLibraryFolder); \n\n }",
"public Library(String n, int i) { \r\n super(n);\r\n id = i;\r\n albums = new HashSet<Album>();\r\n\r\n }",
"public LibraryBuilder() {\n\t\tthis.addToLibrary = new MyMusicLibrary();\n\t\tthis.addToArtiLibrary = new MyArtistLibrary();\n\t}",
"public String getLibraryNumber()\r\n {\r\n return libraryNumber;\r\n }",
"public Library() {\n this.okToPrint = true;\n this.libraryBooks = this.readBookCollection();\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\n }",
"public boolean searchLibrary(String key)\n\t{\n\t\tif(availableBooks!=0)\n\t\t{\n\t\t\tboolean val=b.searchBook(key);\n\t\t\treturn val;\n\t\t}\n\t\treturn false;\t\n\t\t\t\n\t}",
"public Library (){\r\n\t\tthis.inverntory = new List();\r\n\t}",
"@Test\n public void testAddCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String name = \"karate\";\n Rights rights = new Rights(false, true, false, true);\n library.addCategory(name, rights);\n \n assertTrue(library.getSong(\"1\").getRightsByCategory().containsKey(\"karate\"));\n assertTrue(library.getSong(\"2\").getRightsByCategory().containsKey(\"karate\"));\n\n }",
"private static void setupLibVLC() throws LibraryNotFoundException {\n\t new NativeDiscovery().discover();\n\t // discovery()'s method return value is WRONG on Linux\n\t try {\n\t LibVlcVersion.getVersion();\n\t } catch (Exception e) {\n\t throw new LibraryNotFoundException();\n\t }\n\t}",
"public void loadLibrary(String str) {\n _lancet.com_ss_android_ugc_aweme_lancet_launch_LoadSoLancet_loadLibrary(str);\n }",
"public ArrayList addSong(Song newSong) {\n Library.add(newSong);\n return Library;\n }",
"@Test(expected = NullPointerException.class)\n public void testSelectSongNoSong()\n {\n MusicPlayer.getInstance().selectSong(\"foo\");\n }",
"public Library() {\n books = new Book[0];\n numBooks = 0;\n }",
"private void checkExternalLibDir() throws TNotFoundEx{\n\t\tString jarLoc = this.getJarLocation();\n\t\tString libDirLoc=jarLoc+TicklerConst.generalLibName;\n\t\tFile tickLib = new File (libDirLoc);\n\t\tif (tickLib.exists()){\n\t\t\tTicklerVars.isLib = true;\n\t\t\tTicklerVars.libDir = libDirLoc;\n\t\t}\n\t\t//Lib directory not found\n\t\telse\n\t\t{\n\t\t\tthrow new TNotFoundEx(\"Lib directory not found. \\nMake sure that \"+TicklerConst.generalLibName+\" directory exists in the same directory as Tickler.jar\");\n\t\t}\n\t\t\n\t}",
"public AppLibrary(String testName) {\n\t\tthis.currentTestName = testName;\n\t}",
"public void testGetSongTitle()\r\n {\r\n assertTrue(songTitle.equals(song.\r\n getSongTitle()));\r\n }",
"private void getSongs() {\n new SongContent(this, Constants.URL).execute();\n }",
"public void testArtistSort() {\n sorter.inssortArtist();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getArtist(), \"Hayley\");\n assertEquals(list.get(1).getArtist(), \"James\");\n assertEquals(list.get(2).getArtist(), \"Jason\");\n }",
"@Test\n\tpublic void testDiffLibs() \n\t{\n\t\tString id = \"diffLib\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertLCVol2NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t}",
"@Test\n public void getAlbumsTest() {\n Integer id = null;\n Integer userId = null;\n List<Album> response = api.getAlbums(id, userId);\n\n // TODO: test validations\n }",
"@Test()\n public void testGetMedia() {\n System.out.println(\"getMedia\");\n String type = \"b\";\n DBManager instance=null;\n try {\n instance = new ODSDBManager(\"test.ods\");\n } catch (ODSKartException ex) {\n fail(\"Neocekavana vyjimka \" +ex);\n } catch (FileNotFoundException ex) {\n fail(\"Neocekavana vyjimka \" + ex);\n }\n \n List<Medium> expResult = new ArrayList<Medium>();\n Medium medium = new MediumImpl();\n medium.addTitle(\"ba\");\n medium.addTitle(\"bb\");\n expResult.add(medium);\n List<Medium> result = instance.getMedia(type);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }",
"public String getLibraryName() {\n return getProperty(Property.LIBRARY_NAME);\n }",
"public void addSong(Song s) \r\n {\r\n \tSong mySong = s;\r\n \t\r\n \t//Adding to the first HashTable - the Title One\r\n \tmusicLibraryTitleKey.put(mySong.getTitle(), mySong);\r\n \t \r\n \t// Checking if we already have the artist\r\n \t if(musicLibraryArtistKey.get(mySong.getArtist()) != null)\r\n \t {\r\n \t\t //Basically saying that get the key (get Artist) and add mySong to it (i.e. the arraylist)\r\n \t\t musicLibraryArtistKey.get(mySong.getArtist()).add(mySong);\r\n \t }\r\n \t \r\n \t // If artist is not present, we add the artist and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryArtistKey.put(mySong.getArtist(), arrayListOfSongs);\r\n \t }\r\n \t \r\n \t// Checking if we already have the year\r\n \t if (musicLibraryYearKey.get(mySong.getYear()) != null)\r\n \t {\r\n \t \t musicLibraryYearKey.get(mySong.getYear()).add(mySong);\r\n \t }\r\n \t \r\n \t// If year is not present, we add the year and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryYearKey.put(mySong.getYear(), arrayListOfSongs);\r\n \t }\r\n\t\r\n }",
"private static void checkLibraryXML() throws IOException{\n File libraryXML = new File(\"src/resources/library.xml\");\n \n\n if (libraryXML.exists()){\n System.out.print(\"library exists\");\n //check to see if we need to add a song to XMl from last run\n \n }\n else{\n System.out.print(\"library does not exist, creating xml\");\n try{\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n \n Element rootElement= doc.createElement(\"library\");\n doc.appendChild(rootElement);\n Element musicLibrary = doc.createElement(\"musicLibrary\");\n rootElement.appendChild(musicLibrary);\n Element songs = doc.createElement(\"songs\");\n rootElement.appendChild(songs);\n Element playlists = doc.createElement(\"playlists\");\n rootElement.appendChild(playlists);\n Element currentPlayingList = doc.createElement(\"currentPlayingList\");\n rootElement.appendChild(currentPlayingList);\n \n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(libraryXML);\n transformer.transform(source, result);\n \n } catch (ParserConfigurationException ex) {\n ex.printStackTrace();\n } catch (TransformerException ex) {\n ex.printStackTrace();\n }\n }\n \n }",
"public void setLibrary(Library library2) {\r\n\t\tthis.library = library2;\r\n\t}",
"public static Library readLibrary(URL fileURL, String libName, FileType type, boolean quick, Map<Setting,Object> projectSettings) {\n \t\tif (fileURL == null) return null;\n \t\tlong startTime = System.currentTimeMillis();\n errorLogger = ErrorLogger.newInstance(\"Library Read\");\n \n File f = new File(fileURL.getPath());\n \n if (f != null && f.exists()) {\n LibDirs.readLibDirs(f.getParent());\n }\n \t\tLibraryFiles.initializeLibraryInput();\n \n \t\tLibrary lib = null;\n \t\tboolean formerQuiet = isChangeQuiet();\n \t\tif (!formerQuiet) changesQuiet(true);\n \t\ttry {\n \t\t\t// show progress\n \t\t\tif (!quick) startProgressDialog(\"library\", fileURL.getFile());\n \n \t\t\tCell.setAllowCircularLibraryDependences(true);\n \n \t\t\tStringBuffer errmsg = new StringBuffer();\n \t\t\tboolean exists = TextUtils.URLExists(fileURL, errmsg);\n \t\t\tif (!exists)\n \t\t\t{\n \t\t\t\tSystem.out.print(errmsg.toString());\n \t\t\t\t// if doesn't have extension, assume DEFAULTLIB as extension\n \t\t\t\tString fileName = fileURL.toString();\n \t\t\t\tif (fileName.indexOf(\".\") == -1)\n \t\t\t\t{\n \t\t\t\t\tfileURL = TextUtils.makeURLToFile(fileName+\".\"+type.getExtensions()[0]);\n \t\t\t\t\tSystem.out.print(\"Attempting to open \" + fileURL+\"\\n\");\n \t\t\t\t\terrmsg.setLength(0);\n \t\t\t\t\texists = TextUtils.URLExists(fileURL, errmsg);\n \t\t\t\t\tif (!exists && (type != FileType.DELIB)) { // Check if this is a DELIB\n \t\t\t\t\t\tfileURL = TextUtils.makeURLToFile(fileName+\".\"+FileType.DELIB.getExtensions()[0]);\n \t\t\t\t\t\tSystem.out.print(\"Attempting to open \" + fileURL+\"\\n\");\n \t\t\t\t\t\terrmsg.setLength(0);\n \t\t\t\t\t\texists = TextUtils.URLExists(fileURL, errmsg);\n \t\t\t\t\t\tif (exists) { // If it is a DELIB\n \t\t\t\t\t\t\tlibName = null; // Get the library name from fileURL\n \t\t\t\t\t\t\ttype = FileType.DELIB; // Set the type to DELIB\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tif (!exists) System.out.print(errmsg.toString());\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (exists)\n \t\t\t{\n \t\t\t\t// get the library name\n \t\t\t\tif (libName == null) libName = TextUtils.getFileNameWithoutExtension(fileURL);\n \t\t\t\tlib = readALibrary(fileURL, null, libName, type, projectSettings);\n \t\t\t}\n \t\t\tif (LibraryFiles.VERBOSE)\n \t\t\t\tSystem.out.println(\"Done reading data for all libraries\");\n \n \t\t\tLibraryFiles.cleanupLibraryInput();\n \t\t\tif (LibraryFiles.VERBOSE)\n \t\t\t\tSystem.out.println(\"Done instantiating data for all libraries\");\n \t\t} finally {\n \t\t\tif (!quick) stopProgressDialog();\n \t\t\tCell.setAllowCircularLibraryDependences(false);\n \t\t}\n \t\tif (!formerQuiet) changesQuiet(formerQuiet);\n \t\tif (lib != null && !quick)\n \t\t{\n \t\t\tlong endTime = System.currentTimeMillis();\n \t\t\tfloat finalTime = (endTime - startTime) / 1000F;\n \t\t\tSystem.out.println(\"Library \" + fileURL.getFile() + \" read, took \" + finalTime + \" seconds\");\n \t\t}\n \n // if CVS is enabled, get status of library\n // if (CVS.isEnabled()) {\n // Update.updateOpenLibraries(Update.UpdateEnum.STATUS);\n // }\n \t\terrorLogger.termLogging(true);\n \n \t\treturn lib;\n \t}",
"public AbstractLibrary getOwningLibrary();",
"@Test\n public void testToevoegen_Album() {\n System.out.println(\"toevoegen album\");\n Album album = new Album(\"Album\", 2020, nummers);\n instance.toevoegen(album);\n ArrayList<Nummer> expResult = nummers;\n ArrayList<Nummer> result = instance.getAlbumNummers();\n assertEquals(expResult, result);\n }",
"@Test\n public void testAddGetDVD() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n Assert.assertEquals(1, dvd2.getID());\n \n \n Assert.assertEquals(\"The Lion King\", lib.getById(1).getTitle());\n }",
"public static final boolean libraryLoaded(){\n return PS3_Library.loaded();\n }",
"public abstract String play(SoundLibrary library, String... sound);",
"ISong getSong();",
"public void beginLoad(int libraryCount);",
"protected void loadMockData() {\n\n int ctr;\n InputStream inputStream = getResources().openRawResource(R.raw.song_list);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n\n try {\n ctr = inputStream.read();\n while (ctr != -1) {\n byteArrayOutputStream.write(ctr);\n ctr = inputStream.read();\n }\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Parse the data.\n try {\n JSONObject jObject = new JSONObject(byteArrayOutputStream.toString());\n\n String status_code = jObject.getString(\"statusCode\");\n\n if (status_code.equalsIgnoreCase(\"200\")) {\n JSONArray jArray = jObject.getJSONArray(\"data\");\n\n audioList = new ArrayList<>();\n\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject song = jArray.getJSONObject(i);\n\n String genre = song.getString(\"genre\");\n String album = song.getString(\"album\");\n String author = song.getString(\"author\");\n String title = song.getString(\"title\");\n String url = song.getString(\"url\");\n String imgUrl = song.getString(\"img\");\n\n Audio audio = new Audio(genre, album, author, title, url, imgUrl);\n\n // Save to audioList.\n audioList.add(audio);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public static void addLibrary(ILibrary library) {\n \t\tLIBRARIES.add(library);\n \t}",
"static void testMusicOnCompletionListener()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t}\n\t\t\n\t\tmusicOnCompletionListener.onCompletion(null);\n\t}",
"public ArrayList<Book> getLibraryBooks() {\n return this.libraryBooks;\n }",
"public void removeSong(Song song) {\n\n for(int ii = 0; ii < Library.size(); ii++) {\n if(Library.get(ii).equals(song)) {\n Library.remove(ii);\n }\n \n }\n }",
"protected Library readExternalLibraryFromFilename(String theFileName, FileType defaultType)\n \t{\n \t\t// get the path to the library file\n \t\tString legalLibName = TextUtils.getFileNameWithoutExtension(theFileName);\n // Checking if the library is already open\n \t\tLibrary elib = Library.findLibrary(legalLibName);\n \t\tif (elib != null) return elib;\n \n //\t\tURL url = TextUtils.makeURLToFile(theFileName);\n //\t\tString fileName = url.getFile();\n //\t\tFile libFile = new File(fileName);\n \n \t\t// see if this library is already read in\n \t\tString libFileName = theFileName;\n //\t\tString libFileName = libFile.getName();\n \n \t\t// special case if the library path came from a different computer system and still has separators\n \t\twhile (libFileName.endsWith(\"\\\\\") || libFileName.endsWith(\":\") || libFileName.endsWith(\"/\"))\n \t\t\tlibFileName = libFileName.substring(0, libFileName.length()-1);\n \t\tint backSlashPos = libFileName.lastIndexOf('\\\\');\n \t\tint colonPos = libFileName.lastIndexOf(':');\n \t\tint slashPos = libFileName.lastIndexOf('/');\n \t\tint charPos = Math.max(backSlashPos, Math.max(colonPos, slashPos));\n \t\tif (charPos >= 0)\n \t\t{\n \t\t\tlibFileName = libFileName.substring(charPos+1);\n \t\t}\n \t\tString libName = libFileName;\n \t\tFileType importType = OpenFile.getOpenFileType(libName, defaultType);\n FileType preferredType = importType;\n \n // this is just to remove the extension from the lib name string\n \t\tif (libName.endsWith(\".elib\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-5);\n \t\t} else if (libName.endsWith(\".jelib\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-6);\n } else if (libName.endsWith(\".delib\"))\n {\n libName = libName.substring(0, libName.length()-6);\n \t\t} else if (libName.endsWith(\".txt\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-4);\n \t\t} else\n \t\t{\n \t\t\t// no recognizable extension, add one to the file name\n \t\t\tlibFileName += \".\" + defaultType.getExtensions()[0];\n \t\t}\n \n StringBuffer errmsg = new StringBuffer();\n \n // first try the library name with the extension it came with\n // However, do not look in electric library area to avoid problems with spice configurations for old chips\n URL externalURL = getLibrary(libName + \".\" + preferredType.getExtensions()[0], theFileName, errmsg, true);\n // Now try all file types, starting with jelib\n // try JELIB\n if (externalURL == null && preferredType != FileType.JELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.JELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try ELIB\n if (externalURL == null && preferredType != FileType.ELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.ELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try DELIB\n if (externalURL == null && preferredType != FileType.DELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.DELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try txt\n if (externalURL == null && preferredType != FileType.READABLEDUMP) {\n externalURL = getLibrary(libName + \".\" + FileType.READABLEDUMP.getExtensions()[0], theFileName, errmsg, true);\n }\n \n boolean exists = (externalURL == null) ? false : true;\n // last option: let user pick library location\n \t\tif (!exists)\n \t\t{\n \t\t\tSystem.out.println(\"Error: cannot find referenced library \" + libName+\":\");\n \t\t\tSystem.out.print(errmsg.toString());\n \t\t\tString pt = null;\n \t\t\twhile (true) {\n \t\t\t\t// continue to ask the user where the library is until they hit \"cancel\"\n \t\t\t\tString description = \"Reference library '\" + libFileName + \"'\";\n \t\t\t\tpt = OpenFile.chooseInputFile(FileType.LIBFILE, description);\n \t\t\t\tif (pt == null) {\n \t\t\t\t\t// user cancelled, break\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t// see if user chose a file we can read\n \t\t\t\texternalURL = TextUtils.makeURLToFile(pt);\n \t\t\t\tif (externalURL != null) {\n \t\t\t\t\texists = TextUtils.URLExists(externalURL, null);\n \t\t\t\t\tif (exists) {\n \t\t\t\t\t\t// good pt, opened it, get out of here\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tif (exists)\n \t\t{\n \t\t\tSystem.out.println(\"Reading referenced library \" + externalURL.getFile());\n importType = OpenFile.getOpenFileType(externalURL.getFile(), defaultType);\n elib = Library.newInstance(legalLibName, externalURL);\n \t\t}\n \n if (elib != null)\n {\n // read the external library\n String oldNote = getProgressNote();\n setProgressValue(0);\n setProgressNote(\"Reading referenced library \" + legalLibName + \"...\");\n \n \t\t\t// get the library name\n \t\t\tString eLibName = TextUtils.getFileNameWithoutExtension(externalURL);\n elib = readALibrary(externalURL, elib, eLibName, importType, null);\n setProgressValue(100);\n setProgressNote(oldNote);\n }\n \n if (elib == null)\n {\n System.out.println(\"Error: cannot find referenced library \" + theFileName);\n System.out.println(\"...Creating new \"+legalLibName+\" Library instead\");\n elib = Library.newInstance(legalLibName, null);\n elib.setLibFile(TextUtils.makeURLToFile(theFileName));\n elib.clearFromDisk();\n }\n //\t\tif (failed) elib->userbits |= UNWANTEDLIB; else\n //\t\t{\n //\t\t\t// queue this library for announcement through change control\n //\t\t\tio_queuereadlibraryannouncement(elib);\n //\t\t}\n \n \t\treturn elib;\n \t}",
"public Library()\r\n\t{\r\n\t\titems = new ArrayList<Book>();\r\n\t}",
"public T caseLibrary(Library object) {\n\t\treturn null;\n\t}",
"public void setLibraryId(Integer libraryId) {\n this.libraryId = libraryId;\n }",
"@Test\n public void testGetMediaTypes() throws ODSKartException, FileNotFoundException {\n System.out.println(\"getMediaTypes\");\n DBManager instance = new ODSDBManager(\"test.ods\");\n List<String> expResult = new ArrayList<String>();\n expResult.add(\"b\");\n List<String> result = instance.getMediaTypes();\n assertEquals(expResult, result);\n instance = new ODSDBManager(\"long.ods\");\n expResult.add(\"c\");\n result = instance.getMediaTypes();\n assertEquals(expResult,result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }",
"public void setUp() {\n burr = new Song(\"Hannibal Burress\", \"rap\", 2018, \"Morpheus Rap\");\n }",
"public static void loadPlaylist()\n {\n if (JSoundsMainWindowViewController.alreadyPlaying)\n JSoundsMainWindowViewController.stopSong();\n \n JSoundsMainWindowViewController.shutDownPlayer();\n JSoundsMainWindowViewController.isPlaylist=true;\n JSoundsMainWindowViewController.playlistOrderBy(true, false, false);\n }",
"public void testExtendsLibSet() {\n final LinkerDef baseLinker = new LinkerDef();\n final LibrarySet libset = new LibrarySet();\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n libset.setProject(baseLinker.getProject());\n final CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(\"advapi32\");\n libset.setLibs(libs);\n baseLinker.addLibset(libset);\n final CommandLineLinkerConfiguration config = (CommandLineLinkerConfiguration) getConfiguration(extendedLinker);\n final String[] libnames = config.getLibraryNames();\n assertEquals(1, libnames.length);\n assertEquals(\"advapi32\", libnames[0]);\n }",
"private void initModuleLibraries() {\r\n // local path in the temporarily directory for this module\r\n String localTmpPath = \"soundModule\";\r\n\r\n // path to jar\r\n String jarPath = System.getProperty(\"user.dir\") + File.separator\r\n + \"modules\" + File.separator + \"soundModule.jar\";\r\n\r\n // extract the jar files for sound module\r\n try {\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\", \"jl1.0.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"mp3spi1.9.4.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"tritonus_share-0.3.6.jar\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n // add this path in the library path...\r\n JarUtil.setLibraryPath(localTmpPath);\r\n\r\n // load jars from that temporarily directory (sound required jars)\r\n JarUtil.loadJar(localTmpPath, \"tritonus_share-0.3.6.jar\");\r\n JarUtil.loadJar(localTmpPath, \"mp3spi1.9.4.jar\");\r\n JarUtil.loadJar(localTmpPath, \"jl1.0.jar\");\r\n }",
"public Song searchByTitle(String title) \r\n {\r\n return musicLibraryTitleKey.get(title);\r\n \t\r\n }",
"@Test\n public void fTestGetPlaylist() {\n given()\n .header(\"X-Authorization\", token)\n .get(\"/playlists/\" + playlistId)\n .then()\n .statusCode(200);\n }",
"public String getLibraryTitle() {\n return getProperty(Property.LIBRARY_TITLE);\n }",
"Library(){\n library = new ArrayList<>();\n shoppingCart = new ArrayList<>();\n }",
"public void testGenreSort() {\n sorter.inssortGenre();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getGenre(), \"Hip-Hop\");\n assertEquals(list.get(1).getGenre(), \"R&B\");\n assertEquals(list.get(2).getGenre(), \"Rock\");\n }",
"public void testGetGenre()\r\n {\r\n assertTrue(genre.equals(song.getGenre()));\r\n }",
"@Test\n public void getPlaylistTest() {\n if (playlists.size() > 0) {\n PlaylistRepresentation expectedPlaylistRepresenation = new PlaylistRepresentation(playlists.get(0));\n ResponseEntity<PlaylistRepresentation> responseEntity = rest.getForEntity(BASE_URL + \"/\" +\n expectedPlaylistRepresenation.getPlaylist().getPlaylistId(), PlaylistRepresentation.class, Collections.EMPTY_MAP);\n assertEquals(\"Asserting status code\", HttpStatus.OK, responseEntity.getStatusCode());\n assertEquals(\"Asserting entity\", expectedPlaylistRepresenation, responseEntity.getBody());\n }\n }",
"public LibraryAnalysis(String option) throws IOException{\n \n if(option.equals(\"1\")){\n loadEnAfinnLibrary();\n } \n else if(option.equals(\"2\"))\n {\n loadFrAfinnLibrary(); \n }\n else if(option.equals(\"3\")){\n mohanLibrary = myLibrary.getLibrary();\n }\n else if(option.equals(\"4\")){\n loadEnAfinnLibrary();\n mohanLibrary = myLibrary.getLibrary();\n loadStopWords();\n }\n }",
"public ArrayList<Song> searchByYear(Integer year) \r\n {\r\n return musicLibraryYearKey.get(year);\r\n \r\n }",
"public void setup(LdBookCB cb);",
"static public Map<String, Library> generateLibrariesFromRepo(String repoDir) {\r\n try {\r\n\r\n HashMap<String, Library> libraries = new HashMap<String, Library>();\r\n\r\n // get all third party libraries\r\n // give me all the first level directories of the repo\r\n // this CAN BE DONE REMOTELY TOO !!! - using v3 githup json api !!!\r\n List<File> dirs = FindFile.find(repoDir, \"^[^.].*[^-_.]$\", false, true);\r\n log.info(\"found {} files\", dirs.size());\r\n for (int i = 0; i < dirs.size(); ++i) {\r\n File f = dirs.get(i);\r\n if (f.isDirectory()) {\r\n try {\r\n // log.info(\"looking in {}\", f.getAbsolutePath());\r\n List<File> subDirsList = FindFile.find(f.getAbsolutePath(), \".*\", false, true);\r\n ArrayList<File> filtered = new ArrayList<File>();\r\n for (int z = 0; z < subDirsList.size(); ++z) {\r\n File dir = subDirsList.get(z);\r\n if (dir.isDirectory()) {\r\n filtered.add(dir);\r\n }\r\n }\r\n\r\n File[] subDirs = filtered.toArray(new File[filtered.size()]);\r\n Arrays.sort(subDirs);\r\n // get latest version\r\n File ver = subDirs[subDirs.length - 1];\r\n log.info(\"adding third party library {} {}\", f.getName(), ver.getName());\r\n libraries.put(getKey(f.getName(), ver.getName()), new Library(getKey(f.getName(), ver.getName())));\r\n } catch (Exception e) {\r\n log.error(\"folder {} is hosed !\", f.getName());\r\n Logging.logError(e);\r\n }\r\n\r\n } else {\r\n log.info(\"skipping file {}\", f.getName());\r\n }\r\n }\r\n return libraries;\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n return null;\r\n }",
"@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Library instance = new Library();\n instance.setName(\"Test\");\n String expResult = \"Test\";\n String result = instance.getName();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }",
"public Integer getLibraryId() {\n return libraryId;\n }",
"public void searchByAlbum()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the album you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase();\n \n Collections.sort(catalog);\n int index = Collections.binarySearch(catalog, new Album(\"\",input,null), null);\n if(index >= 0)\n System.out.println(\"Album:\\t\" + catalog.get(index).getAlbum()\n + \"\\nArtist: \" + catalog.get(index).getArtist()+\"\\n\");\n else System.err.println(\"Album '\" + input + \"' not found!\\n\"); \n }",
"public String getLibraryId() {\n return getProperty(Property.LIBRARY_ID);\n }",
"@Ignore(\"Function written without GUI for JUnit Testing\")\r\n public Song AddSongTest(String SongTitle, String SongArtist, String SongDuration, String SongFile,HashST<String,Song> songs) {\r\n String empty = \"\";\r\n String fileformat = \"([a-zA-Z0-9\\\\s_\\\\\\\\.\\\\-\\\\(\\\\):])+(.avi|.mp4|.mkv|.mov)$\";\r\n\r\n if (SongTitle.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongArtist.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongDuration.equalsIgnoreCase(empty)) {\r\n return null;\r\n\r\n } else if ((!intCheck(SongDuration)) || (SongDuration.equalsIgnoreCase(\"0\"))) {\r\n return null;\r\n\r\n } else if (SongFile.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (!SongFile.matches(fileformat)) {\r\n return null;\r\n }\r\n\r\n int b = Integer.parseInt(SongDuration);\r\n\r\n if(songs.get(SongTitle.toLowerCase())==null) {\r\n Song addsong = new Song(SongTitle, SongArtist, b, SongFile);\r\n return addsong;\r\n }\r\n else {\r\n return null;\r\n }\r\n\r\n\r\n }",
"public abstract @NotNull LibraryTable getLibraryTable();",
"@Generated(hash = 290165030)\r\n public Library getLibrary() {\r\n Long __key = this.id;\r\n if (library__resolvedKey == null || !library__resolvedKey.equals(__key)) {\r\n final DaoSession daoSession = this.daoSession;\r\n if (daoSession == null) {\r\n throw new DaoException(\"Entity is detached from DAO context\");\r\n }\r\n LibraryDao targetDao = daoSession.getLibraryDao();\r\n Library libraryNew = targetDao.load(__key);\r\n synchronized (this) {\r\n library = libraryNew;\r\n library__resolvedKey = __key;\r\n }\r\n }\r\n return library;\r\n }",
"@Test\n\tpublic void getAlbumTest() throws ClientProtocolException, IOException {\n\t\tHttpGet getRequest = new HttpGet(\"https://jsonplaceholder.typicode.com/posts\");\n\t\t// Step 3 - setting the content type, here we are setting to json format\n\t\tgetRequest.addHeader(\"accept\", \"application/json\");\n\n\t\t// Step 4 - Execute the request and get the response, same as send which gives\n\t\t// response and\n\t\t// we are storing the response\n\n\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t// Step 5 Get the status code from response\n\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t\tSystem.out.println(\"Status code is\" + statusCode);\n\t\t// Step 6- Validate the status code\n\t\tAssert.assertTrue(statusCode == 200, \"jsonplaceholder typicode tests failed\");\n\n\t}",
"public Library() {\r\n initComponents();\r\n }",
"private static void loadMusic()\n\t{\n\t\t// TODO: update this with the correct file names.\n\t\tmusic = new ArrayList<Music>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"Lessons-8bit.mp3\"))));\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"bolo_menu.mp3\"))));\n\t\t\t//music.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"song2.ogg\"))));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(e);\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Test\n public void testGetPanel()\n {\n assertNotNull(MusicPlayer.getInstance().getPanel());\n }"
]
| [
"0.73402524",
"0.71173936",
"0.68020666",
"0.6476109",
"0.6423278",
"0.6395376",
"0.6353783",
"0.6353757",
"0.62539226",
"0.6130649",
"0.60939705",
"0.60775757",
"0.6034604",
"0.6029112",
"0.59622836",
"0.5931472",
"0.5908417",
"0.5878085",
"0.58764",
"0.58705485",
"0.58675945",
"0.57180834",
"0.55982316",
"0.55818164",
"0.5562236",
"0.5552985",
"0.5544567",
"0.55377686",
"0.5530706",
"0.5528374",
"0.5523195",
"0.5484742",
"0.54826295",
"0.5472516",
"0.54587054",
"0.54459786",
"0.5442193",
"0.54232806",
"0.54063296",
"0.53817683",
"0.53770417",
"0.5363895",
"0.5339812",
"0.5335957",
"0.53311175",
"0.53310376",
"0.5319659",
"0.52977675",
"0.5293675",
"0.52900976",
"0.5263055",
"0.52549887",
"0.52453816",
"0.5242269",
"0.52408534",
"0.52330136",
"0.5225331",
"0.5217102",
"0.5215971",
"0.5210578",
"0.5208421",
"0.52000153",
"0.51990765",
"0.51879287",
"0.51839536",
"0.5170256",
"0.5168712",
"0.51596487",
"0.5150925",
"0.51387256",
"0.51383835",
"0.51368994",
"0.5123775",
"0.51223034",
"0.511682",
"0.50836426",
"0.5082331",
"0.50819653",
"0.50819564",
"0.50813097",
"0.50779814",
"0.50747746",
"0.50562626",
"0.5048897",
"0.50488263",
"0.5048557",
"0.5044093",
"0.5039239",
"0.50328165",
"0.5031344",
"0.50291",
"0.50255865",
"0.50177586",
"0.5016314",
"0.50038075",
"0.50026774",
"0.5002141",
"0.49895498",
"0.49871764",
"0.49863327"
]
| 0.75740623 | 0 |
Test of setlibrary method, of class SongLibrary. | @Test
public void testSetlibrary() {
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), new HashMap<String,Rights>());
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), new HashMap<String,Rights>());
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
songs.add(song2);
SongLibrary library = new SongLibrary(songs);
library.setlibrary(new ArrayList<Song>());
assertTrue(library.getlibrary().isEmpty());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testAddSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n SongLibrary library = new SongLibrary(songs);\n \n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n library.addSong(song2);\n \n assertTrue(library.islocal(song2.getSongId()));\n assertTrue(library.islocal(song1.getSongId()));\n\n }",
"@Test\n public void testGetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n ArrayList<Song> expResult = songs;\n ArrayList<Song> result = library.getlibrary();\n assertEquals(expResult, result);\n\n }",
"@Test\n public void testGetSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n\n Song result = library.getSong(songId);\n assertTrue(result.getTitle().equals(\"titre2\"));\n assertTrue(result.getAlbum().equals(\"album2\"));\n assertTrue(result.getArtist().equals(\"artiste2\"));\n assertTrue(result.getSongId().equals(\"2\"));\n\n }",
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}",
"public void setLibrary(Library library2) {\r\n\t\tthis.library = library2;\r\n\t}",
"public Library(String setName) {\n name = setName;\n }",
"@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}",
"@Generated(hash = 1817530046)\r\n public void setLibrary(Library library) {\r\n synchronized (this) {\r\n this.library = library;\r\n id = library == null ? null : library.getId();\r\n library__resolvedKey = id;\r\n }\r\n }",
"private static void setupLibrary() {\r\n /*\r\n * For using over http:// and https://\r\n */\r\n DAVRepositoryFactory.setup();\r\n /*\r\n * For using over svn:// and svn+xxx://\r\n */\r\n SVNRepositoryFactoryImpl.setup();\r\n\r\n /*\r\n * For using over file:///\r\n */\r\n FSRepositoryFactory.setup();\r\n }",
"@Test\n public void testRemoveSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"1\";\n \n library.removeSong(songId);\n \n assertFalse(library.islocal(\"1\"));\n assertTrue(library.islocal(\"2\"));\n \n\n }",
"public LibraryBuilder() {\n\t\tthis.addToLibrary = new MyMusicLibrary();\n\t\tthis.addToArtiLibrary = new MyArtistLibrary();\n\t}",
"public void loadingLibrary(String libraryFilename);",
"public void setUp() {\n burr = new Song(\"Hannibal Burress\", \"rap\", 2018, \"Morpheus Rap\");\n }",
"public MusicLibrary() {\n\t\tthis.idMap = new HashMap<String, Song>();\n\t\tthis.titleMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.artistMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.tagMap = new TreeMap<String, TreeSet<String>>(new StringComparator());\n\t\t//this.artistList = new ArrayList<>();\n\t}",
"public Library(String name, int id) {\n super(name); // invoking superclass constructor\n this.ID = id;\n this.albums = new HashSet<Album>();\n }",
"public void testExtendsLibSet() {\n final LinkerDef baseLinker = new LinkerDef();\n final LibrarySet libset = new LibrarySet();\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n libset.setProject(baseLinker.getProject());\n final CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(\"advapi32\");\n libset.setLibs(libs);\n baseLinker.addLibset(libset);\n final CommandLineLinkerConfiguration config = (CommandLineLinkerConfiguration) getConfiguration(extendedLinker);\n final String[] libnames = config.getLibraryNames();\n assertEquals(1, libnames.length);\n assertEquals(\"advapi32\", libnames[0]);\n }",
"public Library(String n, int i) { \r\n super(n);\r\n id = i;\r\n albums = new HashSet<Album>();\r\n\r\n }",
"public String getLibrary() {\n return library;\n }",
"public Library getLibrary() {\r\n\t\treturn library;\t\r\n\t}",
"public void testGetLibraryPath() {\n assertEquals(mb.getLibraryPath(), System\n .getProperty(\"java.library.path\"));\n }",
"@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }",
"public RemoteLibrary putLibrary(String path, Object library);",
"public void setLibraryId(Integer libraryId) {\n this.libraryId = libraryId;\n }",
"public void libraryLoaded();",
"@Test\n public void testIslocal() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n boolean result = library.islocal(songId);\n assertTrue(result);\n\n }",
"@Test\n public void testAddCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String name = \"karate\";\n Rights rights = new Rights(false, true, false, true);\n library.addCategory(name, rights);\n \n assertTrue(library.getSong(\"1\").getRightsByCategory().containsKey(\"karate\"));\n assertTrue(library.getSong(\"2\").getRightsByCategory().containsKey(\"karate\"));\n\n }",
"public static void main(String[] args) {\n\t// write your code here\n\n\n Library library = new Library();\n //new students array for this library\n ArrayList<Student> studentsInLibrary = new ArrayList<>();\n ArrayList<Book> booksInLibrary = new ArrayList<>();\n ArrayList<Tablet> tabletsInLibrary = new ArrayList<>();\n\n //set the created arraylist to library registered students and fill it\n library.setRegisteredStudents(fillStudentsArray(studentsInLibrary));\n library.setBooksBank(fillBooksArray(booksInLibrary));\n library.setTabletsBank(fillTabletsArray(tabletsInLibrary));\n\n\n System.out.println(!false);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// //Debugging\n// for ( Student student1 : library.getRegisteredStudents() ) {\n//\n//\n// System.out.println(student1.toString());\n// }\n//\n//\n// for ( Book book : library.getBooksBank() ) {\n//\n//\n// System.out.println(book.toString());\n// }\n//\n// System.out.println(\"***********************************\");\n//\n// for ( Tablet tablet : library.getTabletsBank() ) {\n//\n//\n// System.out.println(tablet.toString());\n// }\n\n\n\n LibraryManager libraryManager =new LibraryManager();\n\n\n\n\n\n\n\n\n //pass the library to its manager\n libraryManager.setTheLibrary(library);\n\n }",
"public AppLibrary(String testName) {\n\t\tthis.currentTestName = testName;\n\t}",
"public static void addLibrary(ILibrary library) {\n \t\tLIBRARIES.add(library);\n \t}",
"public void startLibrary();",
"public Library getLibrary() {\r\n\t\treturn library;\r\n\t}",
"@Before\n public void setup() {\n // arrange\n array = new ArrayList<>();\n array.add(\"Hans\");\n array.add(\"Mans\");\n isbn = \"159\";\n publisher = \"Pesho\";\n book = mock(Book.class);\n }",
"public Library (){\r\n\t\tthis.inverntory = new List();\r\n\t}",
"@Test\n public void testSetLooping()\n {\n MusicPlayer.getInstance().selectSong(Songs.CREDITS);\n assertEquals(MusicPlayer.getInstance().setLooping(true), false);\n }",
"public void printLibrary() {\n System.out.println(\"\\nLIBRARY OWNER: \" + ownerName); //uses the name that the user specified for owner name\r\n System.out.println(\"\\nSONGS IN LIBRARY: \" );\r\n this.home.printSongs(); //lists all of the songs that were added by the user, including demo songs\r\n this.playlists.forEach((name, playlist) -> { // each playlist is listed after one another\r\n System.out.println(\"\\nPLAYLIST NAME: \" + playlist.getName()); //states name of playlist based on user input\r\n System.out.println(\"PLAYLIST DESCRIPTION: \" + playlist.getDescription()); //states name of description of playlist based on user input\r\n playlist.printSongs();\r\n });\r\n\r\n\r\n\r\n }",
"@BeforeEach\n\tvoid setUp() throws Exception {\n\t\tnameLib = new LibraryGeneric<String>();\n\t\tnameLib.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n\t\tnameLib.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n\t\tnameLib.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\n\t\tphoneLib = new LibraryGeneric<PhoneNumber>();\n\t\tphoneLib.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n\t\tphoneLib.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n\t\tphoneLib.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\t}",
"public void setLibraryActivity(LibraryActivity libraryActivity) {\n mLibraryActivity = libraryActivity;\n }",
"public void setImageLibrary(PhotoContainer newImageLibrary) {\n\t\timageLibrary = newImageLibrary;\n\t}",
"public void addSong(Song s) \r\n {\r\n \tSong mySong = s;\r\n \t\r\n \t//Adding to the first HashTable - the Title One\r\n \tmusicLibraryTitleKey.put(mySong.getTitle(), mySong);\r\n \t \r\n \t// Checking if we already have the artist\r\n \t if(musicLibraryArtistKey.get(mySong.getArtist()) != null)\r\n \t {\r\n \t\t //Basically saying that get the key (get Artist) and add mySong to it (i.e. the arraylist)\r\n \t\t musicLibraryArtistKey.get(mySong.getArtist()).add(mySong);\r\n \t }\r\n \t \r\n \t // If artist is not present, we add the artist and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryArtistKey.put(mySong.getArtist(), arrayListOfSongs);\r\n \t }\r\n \t \r\n \t// Checking if we already have the year\r\n \t if (musicLibraryYearKey.get(mySong.getYear()) != null)\r\n \t {\r\n \t \t musicLibraryYearKey.get(mySong.getYear()).add(mySong);\r\n \t }\r\n \t \r\n \t// If year is not present, we add the year and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryYearKey.put(mySong.getYear(), arrayListOfSongs);\r\n \t }\r\n\t\r\n }",
"public void setup(LdBookCB cb);",
"@Test\n public void testSetSize() {\n System.out.println(\"setSize\");\n int size = 5;\n Library instance = new Library();\n instance.setSize(size);\n instance.setSize(5);\n }",
"public ArrayList getLibrary() {\n return Library;\n }",
"public void setMusic(Music music);",
"public void setDefinitionLibrary(AnchorListItem definitionLibrary) {\n\t\tthis.definitionLibrary = definitionLibrary;\n\t}",
"public OtmBuiltInLibrary(BuiltInLibrary lib, OtmModelManager mgr) {\r\n\t\tsuper(mgr);\r\n\t\ttlLib = lib;\r\n\t}",
"public void addSongToPlayList(String playListTitle, String description, String songDirectory) {\n if (!playListPanels.containsKey(playListTitle)) {//if this playlist doesn't exist.\n createPlayList(playListTitle, description);//creating new one\n }\n try {//adding song to playlist\n MP3Info currentSong = new MP3Info(songDirectory);//creating mp3 info file\n AlbumPanel songAlbum = albumPanels.get(currentSong.getAlbum());//getting song's album\n for (SongPanel songPanel : songAlbum.getSongPanels()) {\n if (songPanel.getMp3Info().getTitle().equals(currentSong.getTitle())) {//if we found that song\n playListPanels.get(playListTitle).getPlayListSongs().add(songPanel);//adding to given playlist\n playListPanels.get(playListTitle).updateImage();//updating playlist image\n break;\n }\n }\n } catch (IOException | NoSuchFieldException e) {\n JOptionPane.showMessageDialog(null, \"Error reading mp3 file\", \"An Error Occurred\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"private static void setupLibVLC() throws LibraryNotFoundException {\n\t new NativeDiscovery().discover();\n\t // discovery()'s method return value is WRONG on Linux\n\t try {\n\t LibVlcVersion.getVersion();\n\t } catch (Exception e) {\n\t throw new LibraryNotFoundException();\n\t }\n\t}",
"public void loadLibrary(String str) {\n _lancet.com_ss_android_ugc_aweme_lancet_launch_LoadSoLancet_loadLibrary(str);\n }",
"public Library() {\n books = new Book[0];\n numBooks = 0;\n }",
"public VirtualLibraryButler(VirtualLibrary virtLib) {\n\tproperties = new HashMap<String, String>();\n\tproperties.put(\"library\", virtLib.getProperty(\"name\"));\n\torg.encog.util.logging.Logging.stopConsoleLogging();\n\tCollection<Bookshelf> allShelfs = new HashSet<Bookshelf>();\n\tif (virtLib.getMasterShelf().size() > 0) {\n\t for (Bookshelf b : virtLib)\n\t\tallShelfs.add(b);\n\t this.initialize(allShelfs);\n\t} else\n\t initialized = false;\n }",
"public void setParameterLibrary(AnchorListItem parameterLibrary) {\n\t\tthis.parameterLibrary = parameterLibrary;\n\t}",
"@Before\n public void setup()\n {\n assumeFalse(\"No audio devices are available. Skipping...\",\n AudioDetector.getInstance().isNoAudio());\n MusicPlayer.init();\n }",
"@Override\n\tpublic void libraryStateChanged(boolean updating) {\n\t\t\n\t}",
"@Override\n\tpublic void libraryStateChanged(boolean updating) {\n\t\t\n\t}",
"protected static Library readALibrary(URL fileURL, Library lib, String libName, FileType type, Map<Setting,Object> projectSettings)\n \t{\n \t\t// handle different file types\n \t\tLibraryFiles in;\n \t\tif (type == FileType.ELIB)\n \t\t{\n \t\t\tin = new ELIB();\n \t\t\tif (in.openBinaryInput(fileURL)) return null;\n \t\t} else if (type == FileType.JELIB || type == FileType.DELIB)\n \t\t{\n try {\n LibId libId = lib != null ? lib.getId() : EDatabase.serverDatabase().getIdManager().newLibId(libName);\n in = new JELIB(libId, fileURL, type);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n \t\t} else if (type == FileType.READABLEDUMP)\n \t\t{\n \t\t\tin = new ReadableDump();\n \t\t\tif (in.openTextInput(fileURL)) return null;\n \t\t} else\n \t\t{\n \t\t\tSystem.out.println(\"Unknown import type: \" + type);\n \t\t\treturn null;\n \t\t}\n \n \t\t// determine whether this is top-level\n \t\tin.topLevelLibrary = false;\n \t\tif (lib == null)\n \t\t{\n \t\t\tmainLibDirectory = TextUtils.getFilePath(fileURL);\n if (type == FileType.DELIB) {\n mainLibDirectory = mainLibDirectory.replaceAll(libName+\".\"+type.getExtensions()[0], \"\");\n }\n \t\t\tin.topLevelLibrary = true;\n \t\t}\n \n \t\tif (lib == null)\n \t\t{\n \t\t\t// create a new library\n \t\t\tlib = Library.newInstance(libName, fileURL);\n \t\t}\n \n \t\tin.lib = lib;\n \n \t\t// read the library\n \t\tboolean error = in.readInputLibrary();\n \t\tin.closeInput();\n \t\tif (error)\n \t\t{\n \t\t\tSystem.out.println(\"Error reading \" + lib);\n \t\t\tif (in.topLevelLibrary) mainLibDirectory = null;\n \t\t\treturn null;\n \t\t}\n // if (CVS.isEnabled()) {\n // CVSLibrary.addLibrary(lib);\n // }\n if (projectSettings != null)\n projectSettings.putAll(in.projectSettings);\n \t\treturn in.lib;\n \t}",
"Library(){\n library = new ArrayList<>();\n shoppingCart = new ArrayList<>();\n }",
"private void initModuleLibraries() {\r\n // local path in the temporarily directory for this module\r\n String localTmpPath = \"soundModule\";\r\n\r\n // path to jar\r\n String jarPath = System.getProperty(\"user.dir\") + File.separator\r\n + \"modules\" + File.separator + \"soundModule.jar\";\r\n\r\n // extract the jar files for sound module\r\n try {\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\", \"jl1.0.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"mp3spi1.9.4.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"tritonus_share-0.3.6.jar\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n // add this path in the library path...\r\n JarUtil.setLibraryPath(localTmpPath);\r\n\r\n // load jars from that temporarily directory (sound required jars)\r\n JarUtil.loadJar(localTmpPath, \"tritonus_share-0.3.6.jar\");\r\n JarUtil.loadJar(localTmpPath, \"mp3spi1.9.4.jar\");\r\n JarUtil.loadJar(localTmpPath, \"jl1.0.jar\");\r\n }",
"public Library() {\n this.okToPrint = true;\n this.libraryBooks = this.readBookCollection();\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\n }",
"public void setSongList(ArrayList<Song> songList) {\n\t\tthis.songList = songList;\n\t}",
"void setUpLibraryDependency(@NotNull Module module,\n @NotNull IdeModifiableModelsProvider modelsProvider,\n @NotNull String libraryName,\n @NotNull DependencyScope scope,\n @NotNull File artifactPath,\n @NotNull File[] binaryPaths,\n boolean exported) {\n String prefix = GradleConstants.SYSTEM_ID.getReadableName() + \": \";\n libraryName = libraryName.isEmpty() || StringUtil.startsWith(libraryName, prefix) ? libraryName : prefix + libraryName;\n\n LibraryFilePaths libraryFilePaths = LibraryFilePaths.getInstance(module.getProject());\n File sourceJarPath = libraryFilePaths.findSourceJarPath(libraryName, artifactPath);\n File javadocJarPath = libraryFilePaths.findJavadocJarPath(libraryName, artifactPath);\n boolean newLibrary = false;\n Library library = modelsProvider.getLibraryByName(libraryName);\n if (library == null || !isLibraryValid(modelsProvider.getModifiableLibraryModel(library), binaryPaths, javadocJarPath, sourceJarPath)) {\n if (library != null) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(library.getName() + \" not valid after sync.\");\n }\n modelsProvider.removeLibrary(library);\n }\n library = modelsProvider.createLibrary(libraryName);\n newLibrary = true;\n }\n\n if (newLibrary) {\n updateLibraryRootTypePaths(library, CLASSES, modelsProvider, binaryPaths);\n\n // It is common that the same dependency is used by more than one module. Here we update the \"sources\" and \"documentation\" paths if they\n // were not set before.\n\n // Example:\n // In a multi-project project, there are 2 modules: 'app'' (an Android app) and 'util' (a Java lib.) Both of them depend on Guava. Since\n // Android artifacts do not support source attachments, the 'app' module may not indicate where to find the sources for Guava, but the\n // 'util' method can, since it is a plain Java module.\n // If the 'Guava' library was already defined when setting up 'app', it won't have source attachments. When setting up 'util' we may\n // have source attachments, but the library may have been already created. Here we just add the \"source\" paths if they were not already\n // set.\n if (sourceJarPath != null) {\n updateLibraryRootTypePaths(library, SOURCES, modelsProvider, sourceJarPath);\n }\n if (javadocJarPath != null) {\n updateLibraryRootTypePaths(library, JavadocOrderRootType.getInstance(), modelsProvider, javadocJarPath);\n }\n\n // Add external annotations.\n // TODO: Add this to the model instead!\n for (File binaryPath : binaryPaths) {\n String pathName = binaryPath.getPath();\n if (pathName.endsWith(FD_RES) && pathName.length() > FD_RES.length() &&\n pathName.charAt(pathName.length() - FD_RES.length() - 1) == separatorChar) {\n File annotations = new File(pathName.substring(0, pathName.length() - FD_RES.length()), FN_ANNOTATIONS_ZIP);\n if (annotations.isFile()) {\n updateLibraryRootTypePaths(library, AnnotationOrderRootType.getInstance(), modelsProvider, annotations);\n }\n }\n else if ((libraryName.startsWith(ANDROIDX_ANNOTATIONS_ARTIFACT, prefix.length()) ||\n libraryName.startsWith(ANNOTATIONS_LIB_ARTIFACT, prefix.length())) &&\n pathName.endsWith(DOT_JAR)) {\n // The support annotations is a Java library, not an Android library, so it's not distributed as an AAR\n // with its own external annotations. However, there are a few that we want to make available in the\n // IDE (for example, code completion on @VisibleForTesting(otherwise = |), so we bundle these in the\n // platform annotations zip file instead. We'll also need to add this as a root here.\n File annotations = new File(pathName.substring(0, pathName.length() - DOT_JAR.length()) + \"-\" + FN_ANNOTATIONS_ZIP);\n if (annotations.isFile()) {\n updateLibraryRootTypePaths(library, AnnotationOrderRootType.getInstance(), modelsProvider, annotations);\n }\n }\n }\n }\n\n addLibraryAsDependency(library, libraryName, scope, module, modelsProvider, exported);\n }",
"public Library(ArrayList<Book> collection){\n this.okToPrint = false;\n this.libraryBooks = collection;\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\n }",
"protected void sequence_Library(ISerializationContext context, Library semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"void changeMusic(AudioTrack newSong);",
"public static void main(String[] args) {\n Library<String> lib1 = new Library<String>();\n lib1.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n lib1.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n lib1.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\n String patron1 = \"Jane Doe\";\n\n if (!lib1.checkout(9780330351690L, patron1, 1, 1, 2008))\n System.err.println(\"TEST FAILED: first checkout\");\n if (!lib1.checkout(9780374292799L, patron1, 1, 1, 2008))\n System.err.println(\"TEST FAILED: second checkout\");\n ArrayList<LibraryBook<String>> booksCheckedOut1 = lib1\n .lookup(patron1);\n if (booksCheckedOut1 == null\n || booksCheckedOut1.size() != 2\n || !booksCheckedOut1.contains(new Book(9780330351690L, \"Jon Krakauer\",\n \"Into the Wild\"))\n || !booksCheckedOut1.contains(new Book(9780374292799L,\n \"Thomas L. Friedman\", \"The World is Flat\"))\n || !booksCheckedOut1.get(0).getHolder().equals(patron1)\n || !booksCheckedOut1.get(0).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1))\n || !booksCheckedOut1.get(1).getHolder().equals(patron1)\n || !booksCheckedOut1.get(1).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1)))\n System.err.println(\"TEST FAILED: lookup(holder)\");\n if (!lib1.checkin(patron1))\n System.err.println(\"TEST FAILED: checkin(holder)\");\n\n // test a library that uses phone numbers (PhoneNumber) to id patrons\n Library<PhoneNumber> lib2 = new Library<PhoneNumber>();\n lib2.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n lib2.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n lib2.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\n PhoneNumber patron2 = new PhoneNumber(\"305.555.1234\");\n\n if (!lib2.checkout(9780330351690L, patron2, 1, 1, 2008))\n System.err.println(\"TEST FAILED: first checkout\");\n if (!lib2.checkout(9780374292799L, patron2, 1, 1, 2008))\n System.err.println(\"TEST FAILED: second checkout\");\n ArrayList<LibraryBook<PhoneNumber>> booksCheckedOut2 = lib2\n .lookup(patron2);\n if (booksCheckedOut2 == null\n || booksCheckedOut2.size() != 2\n || !booksCheckedOut2.contains(new Book(9780330351690L, \"Jon Krakauer\",\n \"Into the Wild\"))\n || !booksCheckedOut2.contains(new Book(9780374292799L,\n \"Thomas L. Friedman\", \"The World is Flat\"))\n || !booksCheckedOut2.get(0).getHolder().equals(patron2)\n || !booksCheckedOut2.get(0).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1))\n || !booksCheckedOut2.get(1).getHolder().equals(patron2)\n || !booksCheckedOut2.get(1).getDueDate().equals(\n new GregorianCalendar(2008, 1, 1)))\n System.err.println(\"TEST FAILED: lookup(holder)\");\n if (!lib2.checkin(patron2)) \n System.err.println(\"TEST FAILED: checkin(holder)\");\n \n System.out.println(\"Testing done.\");\n \n // FILL IN for tests\n // test a library that uses phone numbers (PhoneNumber) to id patrons\n// Library<PhoneNumber> lib3 = new Library<PhoneNumber>();\n// lib3.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n// lib3.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n// lib3.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n//\n// PhoneNumber patron3 = new PhoneNumber(\"631-353-9789\");\n//\n// if (!lib3.checkout(9780330351690L, patron3, 1, 1, 2008))\n// System.err.println(\"TEST FAILED: first checkout\");\n// if (!lib3.checkout(9780374292799L, patron3, 1, 1, 2008))\n// System.err.println(\"TEST FAILED: second checkout\");\n// ArrayList<LibraryBook<PhoneNumber>> booksCheckedOut3 = lib3\n// .lookup(patron3);\n// if (booksCheckedOut3 == null\n// || booksCheckedOut3.size() != 2\n// || !booksCheckedOut3.contains(new Book(9780330351690L, \"Jon Krakauer\",\n// \"Into the Wild\"))\n// || !booksCheckedOut3.contains(new Book(9780374292799L,\n// \"Thomas L. Friedman\", \"The World is Flat\"))\n// || !booksCheckedOut3.get(0).getHolder().equals(patron3)\n// || !booksCheckedOut3.get(0).getDueDate().equals(\n// new GregorianCalendar(2008, 1, 1))\n// || !booksCheckedOut3.get(1).getHolder().equals(patron3)\n// || !booksCheckedOut3.get(1).getDueDate().equals(\n// new GregorianCalendar(2008, 1, 1)))\n// System.err.println(\"TEST FAILED: lookup(holder)\");\n// if (!lib3.checkin(patron3)) \n// System.err.println(\"TEST FAILED: checkin(holder)\");\n \n // FOR LAB: write tests for getInventoryList\n ArrayList<LibraryBook<String>> lib1Inventory = lib1.getInventoryList();\n for(int i = 1; i < lib1Inventory.size(); ++i) {\n \tif(lib1Inventory.get(i).getIsbn() < lib1Inventory.get(i - 1).getIsbn()) {\n \t\t System.err.println(\"TEST FAILED: getInventoryList for Library<String>\");\n \t}\n }\n ArrayList<LibraryBook<PhoneNumber>> lib2Inventory = lib2.getInventoryList();\n for(int i = 1; i < lib2Inventory.size(); ++i) {\n \tif(lib2Inventory.get(i).getIsbn() < lib2Inventory.get(i - 1).getIsbn()) {\n \t\t System.err.println(\"TEST FAILED: getInventoryList for Library<String>\");\n \t}\n }\n \n // test a medium library: you will use this for homework\n Library<String> lib3 = new Library<String>(); \n lib3.addAll(\"Mushroom_Publishing.txt\");\n \n String patron3 = \"Barack Obama\";\n lib3.checkout(9781843190028L, patron3, 1, 1, 1989);\n lib3.checkout(9781843190400L, patron3, 1, 1, 3975);\n lib3.checkout(9781843190936L, patron3, 1, 1, 1889);\n lib3.checkout(9781843193319L, patron3, 1, 1, 2063);\n lib3.checkout(9781843190998L, patron3, 1, 1, 1990);\n \n ArrayList<LibraryBook<String>> lib3Inventory = lib3.getOrderedByAuthor();\n for(int i = 1; i < lib3Inventory.size(); ++i) {\n \tif(lib3Inventory.get(i).getAuthor().compareTo(lib3Inventory.get(i - 1).getAuthor()) < 0 || (lib3Inventory.get(i).getAuthor().compareTo(lib3Inventory.get(i - 1).getAuthor()) == 0 && lib3Inventory.get(i).getTitle().compareTo(lib3Inventory.get(i - 1).getTitle()) < 0) ) {\n \t\t System.err.println(\"TEST FAILED: getOrderedByAuthor for Library<String>\"); \n \t}\n }\n ArrayList<LibraryBook<String>> lib3DueDates = lib3.getOverdueList(12, 13, 2000);\n for(int i = 1; i < lib3DueDates.size(); ++i) {\n \tif(lib3DueDates.get(i).getDueDate().compareTo(lib3DueDates.get(i - 1).getDueDate()) < 0) {\n \t\t System.err.println(\"TEST FAILED: getOverdueList for Library<String>\");\n \t}\n }\n }",
"private void initialMusic(){\n\n }",
"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}",
"public void addLib(String lib) {\r\n\t\tgetLibs().add(lib);\r\n\t}",
"public void beginLoad(int libraryCount);",
"public static void getALibrary()\n \t{\n \t\tProject.pmActive = true;\n \n \t\t// find a list of files (libraries) in the repository\n \t\tString dirName = Project.getRepositoryLocation();\n \t\tFile dir = new File(dirName);\n \t\tFile [] filesInDir = dir.listFiles();\n \t\tif (filesInDir == null && dirName.length() == 0)\n \t\t{\n \t\t\tJob.getUserInterface().showInformationMessage(\"No repository location is set. Use the 'Project Management' Preferences to set it.\", \"Warning\");\n \t\t\treturn;\n \t\t}\n \n \t\t// choose one and read it in\n \t\tnew LibraryDialog(filesInDir);\n \t}",
"void loadAlbums();",
"@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"Test\";\n Library instance = new Library();\n instance.setName(name);\n String result = instance.getName();\n assertEquals(name, result);\n }",
"@Override\n public void setTestItem(){\n expectedName = \"Common lightMagicBook\";\n expectedPower = 10;\n expectedMinRange = 1;\n expectedMaxRange = 2;\n lightMagicBook = new LightMagicBook(expectedName,expectedPower,expectedMinRange,expectedMaxRange);\n animaMagicBook1 = new AnimaMagicBook(\"\",30,1,2);\n darknessMagicBook1 = new DarknessMagicBook(\"\",30,1,2);\n }",
"public Library()\r\n\t{\r\n\t\titems = new ArrayList<Book>();\r\n\t}",
"public ArrayList addSong(Song newSong) {\n Library.add(newSong);\n return Library;\n }",
"public T caseLibrary(Library object) {\n\t\treturn null;\n\t}",
"@Before\n\tpublic void setUp() throws Exception {\n\t\tlib.addAll(\"Mushroom_Publishing.txt\");\n\t}",
"public void testExtendsSysLibSet() {\n final LinkerDef baseLinker = new LinkerDef();\n final SystemLibrarySet libset = new SystemLibrarySet();\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n libset.setProject(baseLinker.getProject());\n final CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(\"advapi32\");\n libset.setLibs(libs);\n baseLinker.addSyslibset(libset);\n final CommandLineLinkerConfiguration config = (CommandLineLinkerConfiguration) getConfiguration(extendedLinker);\n final String[] libnames = config.getLibraryNames();\n assertEquals(1, libnames.length);\n assertEquals(\"advapi32\", libnames[0]);\n }",
"public void setSongInfoList(ArrayList<SongInfo> list)\n {\n songInfos = list;\n }",
"public void setFunctionLibrary(AnchorListItem functionLibrary) {\n\t\tthis.functionLibrary = functionLibrary;\n\t}",
"@Override\r\n\tpublic void setMusic() {\r\n\t\tmanager.getMusicManager().setMusic((Music) Gdx.audio.newMusic(Gdx.files.internal(\"Music/Bandit Camp.mp3\")));\r\n\t}",
"public abstract void setLibelle(String unLibelle);",
"private URL getLibrary(String libFileName, String originalPath, StringBuffer errmsg, boolean checkElectricLib)\n {\n // library does not exist: see if file is in the same directory as the main file\n \t\tURL firstURL = TextUtils.makeURLToFile(mainLibDirectory + libFileName);\n boolean exists = TextUtils.URLExists(firstURL, errmsg);\n if (exists) return firstURL;\n HashMap<String,String> searchedURLs = new HashMap<String,String>();\n \n // try secondary library file locations\n for (Iterator<String> libIt = LibDirs.getLibDirs(); libIt.hasNext(); )\n {\n \t\t\tURL url = TextUtils.makeURLToFile(libIt.next() + File.separator + libFileName);\n exists = TextUtils.URLExists(url, errmsg);\n if (exists) return url;\n if (url != null) searchedURLs.put(url.getFile(), url.getFile());\n }\n \n // check the current working dir\n // (Note that this is not necessarily the same as the mainLibDirectory above)\n // Do NOT search User.getCurrentWorkingDir, as another Electric process can\n // modify that during library read instead, search System.getProperty(\"user.dir\");\n URL thirdURL = TextUtils.makeURLToFile(System.getProperty(\"user.dir\") + File.separator + libFileName);\n if (thirdURL != null && !searchedURLs.containsKey(thirdURL.getFile()))\n {\n exists = TextUtils.URLExists(thirdURL, errmsg);\n if (exists) return thirdURL;\n if (thirdURL != null) searchedURLs.put(thirdURL.getFile(), thirdURL.getFile());\n }\n \n // try the exact path specified in the reference\n if (originalPath != null) {\n \t\tURL url = TextUtils.makeURLToFile(originalPath);\n \tString fileName = url.getFile();\n File libFile = new File(fileName);\n originalPath = libFile.getParent();\n \n URL secondURL = TextUtils.makeURLToFile(originalPath + File.separator + libFileName);\n if (secondURL != null && !searchedURLs.containsKey(secondURL.getFile()))\n {\n exists = TextUtils.URLExists(secondURL, errmsg);\n if (exists) return secondURL;\n if (secondURL != null) searchedURLs.put(secondURL.getFile(), secondURL.getFile());\n }\n }\n \n \t\tif (checkElectricLib)\n {\n // try the Electric library area\n URL url = LibFile.getLibFile(libFileName);\n exists = TextUtils.URLExists(url, errmsg);\n if (exists) return url;\n }\n return null;\n }",
"@Test\n\tpublic void testAddBook() {\n\t\t//System.out.println(\"Adding book to bookstore...\");\n\t\tstore.addBook(b5);\n\t\tassertTrue(store.getBooks().contains(b5));\n\t\t//System.out.println(store);\n\t}",
"public Library() {\r\n initComponents();\r\n }",
"public void setList(ArrayList<Song> theSongs) {\n songs1 = theSongs;\n songsNumber = songs1.size();\n }",
"public void addFromLibrary() {\n btAddFromLibrary().push();\n }",
"public void connectLibrary() throws IOException {\n }",
"private void SaveAlbum() {\n }",
"@Test\n public void testRemoveCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n library.removeCategory(\"family\");\n assertFalse(library.getSong(\"1\").getRightsByCategory().containsKey(\"family\"));\n\n }",
"public void removeSong(Song song) {\n\n for(int ii = 0; ii < Library.size(); ii++) {\n if(Library.get(ii).equals(song)) {\n Library.remove(ii);\n }\n \n }\n }",
"@Test\n public void setVolume() {\n final int volume = 16;\n\n getApplicationHandler().setVolume(volume, true);\n\n assertTrue(getApplicationHandler().getVolume() == volume);\n expandPanel();\n onView(withId(R.id.vli_seek_bar)).check(matches(withProgress(volume)));\n onView(withId(R.id.vli_volume_text)).check(matches(withText(String.valueOf(volume))));\n }",
"void startMusic(AudioTrack newSong);",
"@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }",
"public String getLibraryNumber()\r\n {\r\n return libraryNumber;\r\n }",
"private static void init() {\n __lib = new JnaGmpLib();\n }",
"public void testArtistSort() {\n sorter.inssortArtist();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getArtist(), \"Hayley\");\n assertEquals(list.get(1).getArtist(), \"James\");\n assertEquals(list.get(2).getArtist(), \"Jason\");\n }",
"@Before\n\tpublic void setUp()\n\t{\n\t\tOptionsManager.getSingleton().setTestMode(true);\n\t\tQuestManager.resetSingleton();\n\t}",
"static void testMusicOnCompletionListener()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t}\n\t\t\n\t\tmusicOnCompletionListener.onCompletion(null);\n\t}",
"public void setLibele(String lib){\n\t\tlibeleService = lib;\n\t}",
"public LibraryAnalysis(String option) throws IOException{\n \n if(option.equals(\"1\")){\n loadEnAfinnLibrary();\n } \n else if(option.equals(\"2\"))\n {\n loadFrAfinnLibrary(); \n }\n else if(option.equals(\"3\")){\n mohanLibrary = myLibrary.getLibrary();\n }\n else if(option.equals(\"4\")){\n loadEnAfinnLibrary();\n mohanLibrary = myLibrary.getLibrary();\n loadStopWords();\n }\n }"
]
| [
"0.67032075",
"0.6700526",
"0.6506099",
"0.6469011",
"0.64477015",
"0.6315573",
"0.629337",
"0.61330134",
"0.6133007",
"0.6091552",
"0.60277593",
"0.5975028",
"0.5895823",
"0.58368045",
"0.5776639",
"0.57290804",
"0.57166344",
"0.5659335",
"0.56528646",
"0.56376415",
"0.56266534",
"0.56229174",
"0.5585961",
"0.55615836",
"0.554248",
"0.5530591",
"0.5526123",
"0.55258507",
"0.5524239",
"0.552105",
"0.5478625",
"0.5463615",
"0.5459666",
"0.54386055",
"0.5406759",
"0.53779",
"0.5344756",
"0.53293353",
"0.53100246",
"0.5309934",
"0.52883404",
"0.5287769",
"0.52817976",
"0.52612084",
"0.52519196",
"0.52321845",
"0.522796",
"0.52143526",
"0.5208694",
"0.52048546",
"0.5194456",
"0.5177453",
"0.5171061",
"0.5171061",
"0.51654017",
"0.5150318",
"0.51479715",
"0.5143858",
"0.51338124",
"0.51254636",
"0.5123723",
"0.5116877",
"0.51126254",
"0.51116097",
"0.51083",
"0.51039857",
"0.50981486",
"0.5085653",
"0.50847286",
"0.5075928",
"0.5064738",
"0.505239",
"0.5049573",
"0.50443995",
"0.50349796",
"0.50272113",
"0.5023807",
"0.5022538",
"0.5012605",
"0.50013804",
"0.49939716",
"0.4989025",
"0.4984978",
"0.49820754",
"0.49817112",
"0.49691284",
"0.49667555",
"0.49652255",
"0.49621317",
"0.4958691",
"0.4958009",
"0.49525884",
"0.49495593",
"0.4945811",
"0.49368832",
"0.4934146",
"0.49306533",
"0.49273342",
"0.4921667",
"0.49198866"
]
| 0.79407716 | 0 |
Test of islocal method, of class SongLibrary. | @Test
public void testIslocal() {
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), new HashMap<String,Rights>());
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), new HashMap<String,Rights>());
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
songs.add(song2);
SongLibrary library = new SongLibrary(songs);
String songId = "2";
boolean result = library.islocal(songId);
assertTrue(result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isLocal();",
"public boolean isLocal();",
"public boolean _is_local() {\n throw new NO_IMPLEMENT(reason);\n }",
"public boolean isLocal()\n {\n return true;\n }",
"public boolean isItemLocal ();",
"@Override\n\tpublic boolean isLocal() {\n\t\treturn heldObj.isLocal();\n\t}",
"public boolean isLocal() {\n return local;\n }",
"public boolean isLocal() {\n\t\treturn _local;\n\t}",
"protected void setupLocal() {}",
"@Test\n public void testAddSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n SongLibrary library = new SongLibrary(songs);\n \n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n library.addSong(song2);\n \n assertTrue(library.islocal(song2.getSongId()));\n assertTrue(library.islocal(song1.getSongId()));\n\n }",
"@Test\n public void testRemoveSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"1\";\n \n library.removeSong(songId);\n \n assertFalse(library.islocal(\"1\"));\n assertTrue(library.islocal(\"2\"));\n \n\n }",
"public boolean isLocal() {\n return mIsLocal;\n }",
"@Override\n\tpublic boolean isProtectedLocalPlaylist(String paramString)\n\t{\n\t\treturn false;\n\t}",
"public static boolean isLocal(Symbol symbol) {\n if (symbol instanceof PseudoSymbol) {\n symbol = ((PseudoSymbol)symbol).getIRSymbol();\n }\n Traversable tr = (Traversable)symbol;\n while (tr != null && !(tr instanceof SymbolTable)) {\n tr = tr.getParent();\n }\n return (tr != null && !(tr instanceof TranslationUnit));\n }",
"public boolean IsLocal() {\r\n\t\treturn BrickFinder.getDefault().isLocal();\r\n\t}",
"public static void checkLocal(Token t) {\n int k = find(t.instanc);\n if (k == -1) {\n checkGlobal(t);\n }\n }",
"protected boolean initLocalData() {\n return true;\n }",
"private boolean isLocalDeclaration() {\n return currentFile;\n }",
"private boolean isLocalRepository() {\n\r\n File file = new File(m_Path.toString() + \"/.magit/Remote\");\r\n return file.exists();\r\n }",
"private static boolean isLocalVariableForFunction(String scopedVarName, String function) {\n return scopedVarName.startsWith(function + \"::\");\n }",
"public void setLocal(boolean isLocal);",
"public void addIsLocalClause() {\n if (!queryTarget.isCompatibleLocal()) {\n throw new IllegalArgumentException(\"Cannot addIsLocalFolderClause b/c DBQueryOperation already has a remote target\");\n }\n queryTarget = QueryTarget.LOCAL;\n allResultsQuery = false;\n includeIsLocalFolders = true;\n }",
"public boolean isLocalFile(String path) {\n System.out.println(path);\n if (path.contains(\"http://\") || path.contains(\"https://\")) {\n System.out.println(\"no es local\");\n return false;\n }\n System.out.println(\"es local\");\n return true;\n }",
"boolean ignoreExternal();",
"public boolean isLocalTransaction()\n {\n if (_connectionConfig.isReadOnly())\n return false;\n else if (_driverList.size() > 0) {\n DriverConfig driver = _driverList.get(0);\n \n return driver.isLocalTransaction();\n }\n else\n return false;\n }",
"public boolean isLocal()\n {\n try\n {\n Member member = getMember();\n return member == null || member.equals(\n getService().getCluster().getLocalMember());\n }\n catch (RuntimeException e)\n {\n // the local services are stopped\n // there is no good answer...\n return true;\n }\n }",
"public boolean isLocalFile() {\n\t\ttry {\n\t\t\tFile localFile = getLocalFile();\n\t\t\treturn localFile != null && localFile.exists();\n\t\t} catch (CoreException e) {\n\t\t\tlogger.debug(\"Unable to determine if file is local\", e);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isSetLocal()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(LOCAL$0) != 0;\r\n }\r\n }",
"boolean isLocal(Eid eid);",
"private final void setupLocal() {\n _topLocal = true;\n // Check for global vs local work\n if( _nlo >= 0 && _nlo < _nhi-1 ) { // Have global work?\n // Note: some top-level calls have no other global work, so\n // \"topLocal==true\" does not imply \"nlo < nhi-1\".\n int selfidx = H2O.SELF.index();\n if( _nlo < selfidx ) _nleft = remote_compute(_nlo, selfidx );\n if( selfidx+1 < _nhi ) _nrite = remote_compute(selfidx+1,_nhi);\n }\n _lo = 0; _hi = _fr.firstReadable().nChunks(); // Do All Chunks\n // If we have any output vectors, make a blockable Futures for them to\n // block on.\n if( _fr.hasAppendables() )\n _fs = new Futures();\n init(); // Setup any user's shared local structures\n }",
"boolean isLocalExecutionEnabled();",
"public static void show_local() {\n\n\t}",
"boolean isInternal();",
"public Boolean obtenerLocalPorNumeroLocal(String numeroLocal);",
"boolean isDummy() {\n return var == null;\n }",
"@java.lang.Override\n public boolean hasLocality() {\n return locality_ != null;\n }",
"@java.lang.Override\n public boolean hasLocalSearchRequest() {\n return localSearchRequest_ != null;\n }",
"public boolean getUseLocal() {return this.databaseConfig.getProperty(\"useLocal\").equals(\"true\");}",
"boolean getIsLocalClient();",
"private void playlistCheck() {\n\t\t\tif (mServicePlayerEngine != null) {\n\t\t\t\tif (mServicePlayerEngine.getPlaylist() == null\n\t\t\t\t\t\t&& mPlaylist != null) {\n\t\t\t\t\tmServicePlayerEngine.openPlaylist(mPlaylist);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private static boolean assetHasLocalReference(MD5Key id) {\n \n \t\treturn getLocalReference(id) != null;\n \t}",
"private boolean isLocalFile(Uri uri) {\n String auth = uri.getHost();\n\n if (auth.equals(\"localhost\") || uri.getScheme().equals(\"file\")) {\n return true;\n }\n return false;\n }",
"@Test\n public void installLocals_always_returns_empty() {\n assertThat(underTest.installLocals()).isEmpty();\n }",
"public boolean hasLocality() {\n return localityBuilder_ != null || locality_ != null;\n }",
"@Override\n public boolean localMirrorExists( Corpus corp, Ice.Current __current )\n {\n CorpusI cs = checkValidityAndLookup( corp );\n // don't query if no local mirror required in the first place;\n // this protects directory-based corpora from being queried\n if (null==cs || !cs.isImmutableMirror) return false;\n return cs.localMirrorExists();\n }",
"boolean hasLocalSearchRequest();",
"protected void closeLocal() { }",
"public boolean isInstanciated(ObjModule localSymbols, ObjModule globalSymbols) {\n\t\treturn true;\n\t}",
"public boolean isInstanciated(ObjModule localSymbols, ObjModule globalSymbols) {\n\t\treturn true;\n\t}",
"public boolean isMCLinkLocal() {\n\t\treturn javaNetAddress.isMCLinkLocal();\n\t}",
"public boolean isLocalTransactionIdentifier() {\n return getNodeId().equals( PUID.EMPTY_PUID ) && getUserId().equals( PUID.EMPTY_PUID ) && getConnectionId().equals( PUID.EMPTY_PUID );\n }",
"protected void testForLocality(URI modelUri) throws QueryException {\n String protocol = modelUri.getScheme();\n if (!DistributedResolverFactory.getProtocols().contains(protocol)) {\n throw new IllegalStateException(\"Bad Protocol sent to distributed resolver.\");\n }\n String host = modelUri.getHost();\n if (ServerInfo.getHostnameAliases().contains(host)) {\n // on the same machine. Check if the server is different.\n if (ServerInfo.getServerURI().getPath().equals(modelUri.getPath())) {\n throw new QueryException(\"Attempt to resolve a local model through the distributed resolver.\");\n }\n }\n }",
"@java.lang.Override\n public boolean hasLocalSearchResponse() {\n return localSearchResponse_ != null;\n }",
"public boolean librarianTested() \n {\n return false; \n }",
"private boolean isReferenceToLocal(@Nullable LighterASTNode operand, @NotNull LighterASTNode var) {\n return operand != null &&\n operand.getTokenType() == REFERENCE_EXPRESSION &&\n Objects.requireNonNull(tree.getParent(operand)).getTokenType() != METHOD_CALL_EXPRESSION &&\n findExpressionChild(tree, operand) == null && // non-qualified\n Objects.equals(getNameIdentifierText(tree, operand), getNameIdentifierText(tree, var));\n }",
"public static boolean isSongAvailable(Song details) {\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.isSongAlreadyAvailable(details);\n\t}",
"private boolean isTestScope() {\n return TEST_SCOPE.equals(scope);\n }",
"boolean internal();",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"static void testMusicOnCompletionListener()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t}\n\t\t\n\t\tmusicOnCompletionListener.onCompletion(null);\n\t}",
"public void testParseLocalCodes() throws Exception {\r\n \t\tCObject node = archetype.node(\"/types[at0001]/items[at10003]/value\");\r\n \t\tString[] codeList = { \"at1311\",\"at1312\", \"at1313\", \"at1314\",\"at1315\" }; \r\n \t\tassertCCodePhrase(node, \"local\", codeList, null);\r\n \t}",
"private boolean checkLocalFile() throws IOException {\n\t\tPath localfile = Paths.get(userdir, filename);\n\t\tif (Files.exists(localfile, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\tthis.downloadStatus = DownloadEnum.ERROR;\n\t\t\tthis.message = \"same name file on download directory, download has stopped\";\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlocalfiletmp = Paths.get(localfile.toAbsolutePath().toString() + \".tmp\");\n\t\t\tif (Files.exists(localfiletmp, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tlocalFileSize = localfiletmp.toFile().length();\n\t\t\t} else {\n\t\t\t\tFiles.createFile(localfiletmp);\n\t\t\t}\n\t\t\tcfgpath = Paths.get(localfile.toAbsolutePath().toString() + \".pcd.dl.cfg\");// local cache of download file\n\t\t\tif (!Files.exists(cfgpath, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tFiles.createFile(cfgpath);\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(cfgpath.toFile());\n\t\t\tfw.write(url);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\treturn true;\n\t\t}\n\t}",
"boolean hasLocalSearchResponse();",
"public boolean hasLocalSearchRequest() {\n return localSearchRequestBuilder_ != null || localSearchRequest_ != null;\n }",
"@Test\n public void testGetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n ArrayList<Song> expResult = songs;\n ArrayList<Song> result = library.getlibrary();\n assertEquals(expResult, result);\n\n }",
"@Test\n public void testLocalClient()\n {\n generateEvents(\"local-client\");\n checkEvents(true, false);\n }",
"@Test\n public void checkStockWithoutProduction () {\n\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock);\n\n }",
"public boolean hasSong(){\n return numSongs < MAX_SONG;\n }",
"public interface LocalMusicCallback {\n\n void onSuccess(List<Song> list);\n\n void onError();\n}",
"public boolean isGlobal();",
"private static boolean isLocalRequest(String remoteIPAddress, String uri) {\r\n return (remoteIPAddress.equals(getLocalIPAddress()) || remoteIPAddress.equals(LOCAL_HOST_IP) ||\r\n uriExceptions.contains(uri));\r\n }",
"boolean isUsed();",
"boolean isUsed();",
"private boolean canPlayNetMusicWithCache(Track mTrack){\n\t\tDocumentItem doc = mTrack.getDocument();\n\t\t\n\t\tif (doc == null) {\n\t\t\tmTrack.setType(Track.MIME_TYPE_DAT);\t\t\t\t\n\t\t\tdoc = new DocumentItem(mTrack.getCurrentStreamUrl(),\n\t\t\t\t\tmTrack.getName(), Config.mDjCachedPath,\n\t\t\t\t\tDocumentItem.TYPE_ONLINE);\n\t\t\tmTrack.setDocument(doc);\n\t\t\t//\t\t\t\tMediaDownloadManager.getInstance().addFile(doc);\n\t\t\tif (mPlayerEngineListener != null) {\n\t\t\t\t// 在这里开启下载\n\t\t\t\tmPlayerEngineListener.onTrackNetwork();\n\t\t\t\tLog.i(this.getClass().getSimpleName(), \" 下载 初开始: \"\n\t\t\t\t\t\t+ mTrack.getName());\n\t\t\t}\n\t\t\tMediaDownloadManager.getInstance().onLoadStart(doc, context);\n\t\t\tMediaView.setCachePause(true);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!doc.isFinished() && !doc.isInLoading()) {\n\t\t\tMediaDownloadManager.getInstance().onLoadStart(doc, context);\n\t\t\tLog.i(this.getClass().getSimpleName(),\n\t\t\t\t\t\"重新开始下载文件总长:\" + doc.getFileSize() + \" 当前下载长:\"\n\t\t\t\t\t\t\t+ doc.getLoadedSize());\n\t\t}\n\t\tint len = doc.getLoadedSize();\n\t\t// 当文件小于PLAY_CONTINUE时,稍后启动播放器。\n\t\tif (len < Constant.PLAY_CONTINUE) {\n\t\t\tMediaView.setCachePause(true);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn canPlayLocalMusic( mTrack );\n\t}",
"void testLocalStaticClass() {\n // static class LocalStaticClass {\n // }\n }",
"public void playLocal(String directoryName, int presetPressed, boolean sorted){\r\n\t\t//Stop playing and reset if we are currently playing songs.\r\n\t\tif(!(player.getStatus() == BasicPlayer.STOPPED || player.getStatus() == BasicPlayer.UNKNOWN)){\r\n\t\t\tstopPlaying();\r\n\t\t}\r\n\t\tsongsToPlay = RadioManager.getMusicFiles(directoryName, sorted);\r\n\t\tselectedPreset = presetPressed;\r\n\t\tselectedSource = directoryName;\r\n\t}",
"public Engine.LocalLock getLocalInterface(Engine.LocalLock pLocalInterface);",
"public void setMarkAsLocalSupported(java.lang.Boolean markAsLocalSupported) {\r\n this.markAsLocalSupported = markAsLocalSupported;\r\n }",
"@Override\n\tpublic void visitXlocal(Xlocal p) {\n\n\t}",
"@Test\n\tpublic void notifiesOnLocalChatReceived() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\t\n\t\tQualifiedObserver obs = EasyMock.createMock(QualifiedObserver.class);\n\t\tChatReceivedReport report = new ChatReceivedReport(\"message\", \"sender\", ChatType.Local);\n\t\tQualifiedObservableConnector.getSingleton().registerObserver(obs,\n\t\t\t\tChatReceivedReport.class);\n\t\tobs.receiveReport(EasyMock.eq(report));\n\t\tEasyMock.replay(obs);\n\n\t\tChatManager.getSingleton().sendChatToUI(\"message\", \"sender\", new Position(0,0), ChatType.Local);\n\n\t\tEasyMock.verify(obs);\n\t}",
"public boolean getIsLocalClient() {\n return isLocalClient_;\n }",
"public Transaction getLocalTransaction(GlobalTransaction gtx, boolean assertExists)\n {\n Transaction ltx = getLocalTransaction(gtx);\n if (!assertExists)\n {\n return ltx;\n }\n if (ltx != null)\n {\n if (log.isDebugEnabled()) log.debug(\"Found local TX=\" + ltx + \", global TX=\" + gtx);\n return ltx;\n }\n else\n {\n throw new IllegalStateException(\" found no local TX for global TX \" + gtx);\n }\n }",
"public boolean shouldIncludeInGlobalSearch() {\n/* 255 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void testPlaybackToLocalAndRemote() throws Exception {\n MediaController controller = mSession.getController();\n controller.registerCallback(mCallback, mHandler);\n\n synchronized (mWaitLock) {\n // test setPlaybackToRemote, do this before testing setPlaybackToLocal\n // to ensure it switches correctly.\n mCallback.resetLocked();\n try {\n mSession.setPlaybackToRemote(null);\n fail(\"Expected IAE for setPlaybackToRemote(null)\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n VolumeProvider vp = new VolumeProvider(VolumeProvider.VOLUME_CONTROL_FIXED,\n TEST_MAX_VOLUME, TEST_CURRENT_VOLUME) {};\n mSession.setPlaybackToRemote(vp);\n\n MediaController.PlaybackInfo info = null;\n for (int i = 0; i < MAX_AUDIO_INFO_CHANGED_CALLBACK_COUNT; ++i) {\n mCallback.mOnAudioInfoChangedCalled = false;\n mWaitLock.wait(TIME_OUT_MS);\n assertTrue(mCallback.mOnAudioInfoChangedCalled);\n info = mCallback.mPlaybackInfo;\n if (info != null && info.getCurrentVolume() == TEST_CURRENT_VOLUME\n && info.getMaxVolume() == TEST_MAX_VOLUME\n && info.getVolumeControl() == VolumeProvider.VOLUME_CONTROL_FIXED\n && info.getPlaybackType()\n == MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE) {\n break;\n }\n }\n assertNotNull(info);\n assertEquals(MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE, info.getPlaybackType());\n assertEquals(TEST_MAX_VOLUME, info.getMaxVolume());\n assertEquals(TEST_CURRENT_VOLUME, info.getCurrentVolume());\n assertEquals(VolumeProvider.VOLUME_CONTROL_FIXED, info.getVolumeControl());\n\n info = controller.getPlaybackInfo();\n assertNotNull(info);\n assertEquals(MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE, info.getPlaybackType());\n assertEquals(TEST_MAX_VOLUME, info.getMaxVolume());\n assertEquals(TEST_CURRENT_VOLUME, info.getCurrentVolume());\n assertEquals(VolumeProvider.VOLUME_CONTROL_FIXED, info.getVolumeControl());\n\n // test setPlaybackToLocal\n AudioAttributes attrs = new AudioAttributes.Builder().addTag(TEST_VALUE).build();\n mSession.setPlaybackToLocal(attrs);\n\n info = controller.getPlaybackInfo();\n assertNotNull(info);\n assertEquals(MediaController.PlaybackInfo.PLAYBACK_TYPE_LOCAL, info.getPlaybackType());\n Set<String> tags = info.getAudioAttributes().getTags();\n assertNotNull(tags);\n assertTrue(tags.contains(TEST_VALUE));\n }\n }",
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}",
"@Override\n\tpublic boolean isProtectedOnlinePlaylist(String paramString)\n\t{\n\t\treturn false;\n\t}",
"@Local\r\npublic interface EventManagerLocal\r\n extends EventManager\r\n{\r\n\r\n\r\n}",
"public void testSetLocalRessources() {\n\t\ttry {\n\t\t\tthis.part.setLocalRessources(null);\n\t\t\tfail(\"NullPointerException must be thrown\");\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\t/* all clear */\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tfail(\"wrong Exception\");\n\t\t}\n\n\t\ttry {\n\t\t\tDotplotFile file = new DotplotFile(\"./testfiles/fmatrix/test.txt\");\n\t\t\tCollection<DotplotFile> coll = new Vector<DotplotFile>();\n\t\t\tcoll.add(file);\n\t\t\tassertNotNull(this.part.getSourceList());\n\t\t\tassertEquals(0, this.part.getSourceList().size());\n\t\t\tthis.part.setLocalRessources(coll);\n\t\t\tISourceList list = this.part.getSourceList();\n\t\t\tassertEquals(1, list.size());\n\t\t\tassertTrue(list.contains(file));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tfail(\"no exception:\" + e.getClass().getName() + \":\"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}",
"private void searchLocalFiles(TwitchVideoInfo videoInfo) {\n if (videoInfo.getState().equals(INITIAL)) {\n File playlist = new File(playlistFolderPath + videoInfo.getId() + \".m3u\");\n if (playlist.exists() && playlist.isFile() && playlist.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(playlist);\n videoInfo.putRelatedFile(\"playlist\", playlist);\n\n try {\n InputStream is = new FileInputStream(playlist);\n Scanner sc = new Scanner(is);\n int i = 0;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n File file = new File(line);\n if (file.exists()) {\n i++;\n String key = String.format(\"playlist_item_%04d\", i);\n videoInfo.putRelatedFile(key, file);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n videoInfo.setState(DOWNLOADED);\n }\n\n ffmpegFileListFile = new File(playlistFolderPath + videoInfo.getId() + \".ffmpeglist\");\n if (ffmpegFileListFile.exists()) {\n videoInfo.putRelatedFile(\"ffmpegFileListFile\", ffmpegFileListFile);\n }\n\n File mp4Video = getVideoFile(videoInfo, true);\n\n if (mp4Video.exists() && mp4Video.isFile() && mp4Video.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(mp4Video);\n videoInfo.putRelatedFile(\"mp4Video\", mp4Video);\n videoInfo.setState(CONVERTED);\n }\n }\n }",
"public boolean isMCNodeLocal() {\n\t\treturn javaNetAddress.isMCNodeLocal();\n\t}",
"@Override\n\tpublic boolean isLocallyLoaded(String instanceId)\n\t{\n\t\treturn m_models.isLocal(instanceId);\n\t}",
"public boolean hasLocalSearchResponse() {\n return localSearchResponseBuilder_ != null || localSearchResponse_ != null;\n }",
"@Test\n\tpublic void canReceiveLocalMessageValid() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\t\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(5,5)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,5)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(5,0)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,0)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(6,6)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(10,10)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,10)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(10,0)));\n\t}",
"boolean hasUknown();",
"public void testLocalType() throws JavaModelException {\n\t\tASTNode node = buildAST(\n\t\t\t\"public class X {\\n\" +\n\t\t\t\" void foo() {\\n\" +\n\t\t\t\" /*start*/class Y {\\n\" +\n\t\t\t\" }/*end*/\\n\" +\n\t\t\t\" }\\n\" +\n\t\t\t\"}\"\n\t\t);\n\t\tIBinding binding = ((TypeDeclarationStatement) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"Y [in foo() [in X [in [Working copy] X.java [in <default> [in <project root> [in P]]]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}",
"protected boolean atGlobalScope() {\n return !currentScope.hasParent();\n }",
"public LocalObject() {}",
"public void setLocalId(String localId) {\n\t\t\n\t}",
"boolean hasImported();",
"public static boolean isGlobal(Symbol symbol) {\n if (symbol instanceof PseudoSymbol) {\n symbol = ((PseudoSymbol)symbol).getIRSymbol();\n }\n Traversable tr = (Traversable)symbol;\n while (tr != null && !(tr instanceof SymbolTable)) {\n tr = tr.getParent();\n }\n return (tr instanceof TranslationUnit);\n }"
]
| [
"0.7108121",
"0.7097227",
"0.7090449",
"0.6926728",
"0.6811906",
"0.6631989",
"0.6555892",
"0.6497608",
"0.63174444",
"0.6310645",
"0.62809336",
"0.62338805",
"0.6133516",
"0.610973",
"0.58902043",
"0.5828328",
"0.57510215",
"0.5649702",
"0.56347036",
"0.5610298",
"0.5587448",
"0.5580314",
"0.55713534",
"0.5459381",
"0.5438504",
"0.54357964",
"0.5412587",
"0.5397496",
"0.5349776",
"0.534188",
"0.53030825",
"0.5270475",
"0.5267937",
"0.52504647",
"0.52416337",
"0.52390796",
"0.5236908",
"0.52288646",
"0.5225691",
"0.52205247",
"0.5218711",
"0.51988125",
"0.5197034",
"0.5196227",
"0.5188664",
"0.5165979",
"0.5162925",
"0.51527846",
"0.51527846",
"0.51352954",
"0.51350015",
"0.5110206",
"0.510438",
"0.50421864",
"0.50398874",
"0.5031444",
"0.502786",
"0.50278336",
"0.50175047",
"0.5009829",
"0.50079113",
"0.49987555",
"0.49903017",
"0.49883473",
"0.49863628",
"0.49802935",
"0.4979691",
"0.49747756",
"0.49681878",
"0.49500132",
"0.49487492",
"0.4947661",
"0.4947661",
"0.49406728",
"0.49265856",
"0.49152216",
"0.49084246",
"0.4905857",
"0.48926848",
"0.48835254",
"0.48809588",
"0.48773816",
"0.48767465",
"0.48709047",
"0.48638973",
"0.48601535",
"0.48585582",
"0.48488265",
"0.4845975",
"0.48416418",
"0.48399368",
"0.4839064",
"0.48362052",
"0.48333985",
"0.48329952",
"0.48303938",
"0.48256344",
"0.48237562",
"0.48202813",
"0.48189232"
]
| 0.78496104 | 0 |
Test of getSong method, of class SongLibrary. | @Test
public void testGetSong() {
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), new HashMap<String,Rights>());
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), new HashMap<String,Rights>());
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
songs.add(song2);
SongLibrary library = new SongLibrary(songs);
String songId = "2";
Song result = library.getSong(songId);
assertTrue(result.getTitle().equals("titre2"));
assertTrue(result.getAlbum().equals("album2"));
assertTrue(result.getArtist().equals("artiste2"));
assertTrue(result.getSongId().equals("2"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ISong getSong();",
"@Test\n public void testGetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n ArrayList<Song> expResult = songs;\n ArrayList<Song> result = library.getlibrary();\n assertEquals(expResult, result);\n\n }",
"@Test\n public void testAddSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n SongLibrary library = new SongLibrary(songs);\n \n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n library.addSong(song2);\n \n assertTrue(library.islocal(song2.getSongId()));\n assertTrue(library.islocal(song1.getSongId()));\n\n }",
"public void testGetSongTitle()\r\n {\r\n assertTrue(songTitle.equals(song.\r\n getSongTitle()));\r\n }",
"private void getSongs() {\n new SongContent(this, Constants.URL).execute();\n }",
"@Override\n\tpublic Vn getSong(int id) {\n\t\treturn songDao.getSong(id);\n\t}",
"@Test(expected = NullPointerException.class)\n public void testSelectSongNoSong()\n {\n MusicPlayer.getInstance().selectSong(\"foo\");\n }",
"@Test\n public void testRemoveSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"1\";\n \n library.removeSong(songId);\n \n assertFalse(library.islocal(\"1\"));\n assertTrue(library.islocal(\"2\"));\n \n\n }",
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}",
"public SongEntity getSong()\r\n {\r\n return song;\r\n }",
"public void playSong() {\n player.reset();\n Song playedSong;\n //get the right song\n if (shuffle) {\n int newSong = shuffleIndexes.get(songPosn);\n playedSong = songs1.get(newSong);\n } else {\n playedSong = songs1.get(songPosn);\n }\n songTitle = playedSong.getSongName();\n Uri uri = Uri.parse(playedSong.getSongLocation());\n try {\n player.setDataSource(getApplicationContext(), uri);\n } catch (Exception e) {\n Log.e(\"MUSIC SERVICE\", \"Error setting data source\", e);\n }\n state = PlaybackStateCompat.STATE_PLAYING;\n player.prepareAsync();\n showNotification();\n }",
"public Song findSongs(String search) {\n Optional<Song> optionalSong = songRepo.findByArtistContaining(search);\n if(optionalSong.isPresent()) {\n return optionalSong.get();\n } else {\n return null;\n }\n }",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}",
"public void testGetArtistName()\r\n {\r\n assertTrue(artistName.equals(song.\r\n getArtistName()));\r\n }",
"@Override\n public Song getSong(String title) {\n Song s = null;\n try {\n s = em.createQuery(\"SELECT s FROM Song s WHERE s.title = :title\", Song.class)\n .setParameter(\"title\", title)\n .getSingleResult();\n } catch (NoResultException e) {\n\n }\n return s;\n }",
"private Song findSong(String songName){\n for(Song checkedSong : this.songAlbum){\n if(checkedSong.getSongTitle().equals(songName))\n return checkedSong;\n }\n return null;\n }",
"@Ignore(\"Function written without GUI for JUnit Testing\")\r\n public Song AddSongTest(String SongTitle, String SongArtist, String SongDuration, String SongFile,HashST<String,Song> songs) {\r\n String empty = \"\";\r\n String fileformat = \"([a-zA-Z0-9\\\\s_\\\\\\\\.\\\\-\\\\(\\\\):])+(.avi|.mp4|.mkv|.mov)$\";\r\n\r\n if (SongTitle.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongArtist.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongDuration.equalsIgnoreCase(empty)) {\r\n return null;\r\n\r\n } else if ((!intCheck(SongDuration)) || (SongDuration.equalsIgnoreCase(\"0\"))) {\r\n return null;\r\n\r\n } else if (SongFile.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (!SongFile.matches(fileformat)) {\r\n return null;\r\n }\r\n\r\n int b = Integer.parseInt(SongDuration);\r\n\r\n if(songs.get(SongTitle.toLowerCase())==null) {\r\n Song addsong = new Song(SongTitle, SongArtist, b, SongFile);\r\n return addsong;\r\n }\r\n else {\r\n return null;\r\n }\r\n\r\n\r\n }",
"@Override\n public Song getSong(long id) {\n Song s = null;\n try {\n s = em.createQuery(\"SELECT s FROM Song s WHERE s.id = :id\", Song.class)\n .setParameter(\"id\", id)\n .getSingleResult();\n } catch (NoResultException e) {\n\n }\n return s;\n }",
"public void getSong(View view) {\n switch (view.getId()) {\n case R.id.play_song:\n // Play or Pause Song\n if (mPlayStatus) {\n if (mMediaPlayer != null && mMediaPlayer.isPlaying()) {\n mMediaPlayer.pause();\n mPlayImg.setImageResource(R.drawable.ic_play);\n mPlayStatus = false;\n }\n } else {\n if (mMediaPlayer != null) {\n mMediaPlayer.start();\n handler.postDelayed(mMoveSeekBarThread, 100); //call the thread after 100 milliseconds\n mPlayImg.setImageResource(R.drawable.ic_pause);\n mPlayStatus = true;\n }\n }\n break;\n case R.id.prev_song:\n // Previous Song Button\n mSongPosition = (mSongPosition - 1) % mSongs.size();\n if (mSongPosition < 0)\n mSongPosition = mSongs.size() - 1;\n updateCurrentSong();\n break;\n case R.id.next_song:\n // Forward Song Button\n mSongPosition = (mSongPosition + 1) % mSongs.size();\n updateCurrentSong();\n break;\n }\n }",
"public Music getMusic();",
"private int getCurrentSong() {\n return currentSong;\n }",
"public Song getSong(int index) {\n\t\treturn this.songList.get(index);\n\n\t}",
"@Test\n public void testIslocal() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n boolean result = library.islocal(songId);\n assertTrue(result);\n\n }",
"List<SongVO> searchSong(String searchText) throws Exception;",
"@Override\n public Song getSongRepresentation() {\n\n try {\n final Track track = en.uploadTrack(mp3File, true);\n\n // Wait for a predefined period of time in which the track is analyzed\n track.waitForAnalysis(30000);\n\n if (track.getStatus() == Track.AnalysisStatus.COMPLETE) {\n\n final double tempo = track.getTempo();\n final String title = Modulo7Utils.stringAssign(track.getTitle());\n final String artistName = Modulo7Utils.stringAssign(track.getArtistName());\n\n // Gets the time signature\n final int timeSignatureRatio = track.getTimeSignature();\n TimeSignature timeSignature = guessTimeSigntureRatio(timeSignatureRatio);\n\n // Getting the key signature information from the echo nest meta data analysis in integer format\n final int key = track.getKey();\n final int mode = track.getMode();\n\n try {\n keySignature = EchoNestKeySignatureEstimator.estimateKeySignature(key, mode);\n } catch (Modulo7BadKeyException e) {\n logger.error(e.getMessage());\n }\n\n // Gets the duration of the track\n final double duration = track.getDuration();\n\n TrackAnalysis analysis = track.getAnalysis();\n\n Voice voiceOfSong = new Voice();\n\n /**\n * There is no clear distinguishing way of acquiring timbral approximations\n * Hence the only possible approximation I can think of it call the a part of a\n * single voice\n */\n for (final Segment segment : analysis.getSegments()) {\n VoiceInstant songInstant = ChromaAnalysis.getLineInstantFromVector(segment.getPitches(), segment.getDuration());\n voiceOfSong.addVoiceInstant(songInstant);\n }\n if (keySignature == null) {\n return new Song(voiceOfSong, new SongMetadata(artistName, title, (int) tempo), MusicSources.MP3, duration);\n } else {\n if (timeSignature == null) {\n return new Song(voiceOfSong, new SongMetadata(keySignature, artistName, title, (int) tempo),\n MusicSources.MP3, duration);\n } else {\n return new Song(voiceOfSong, new SongMetadata(keySignature, timeSignature, artistName, title,\n (int) tempo), MusicSources.MP3, duration);\n }\n }\n\n } else {\n logger.error(\"Trouble analysing track \" + track.getStatus());\n return null;\n }\n } catch (IOException e) {\n logger.error(\"Trouble uploading file to track analyzer\" + e.getMessage());\n } catch (Modulo7InvalidVoiceInstantSizeException | EchoNestException | Modulo7BadIntervalException | Modulo7BadNoteException e) {\n logger.error(e.getMessage());\n }\n\n // Return null if no song is inferred\n return null;\n }",
"public Song getSingleSong(Long id) {\n\t\treturn this.songRepo.findById(id).orElse(null); //id is an optional(a boolean) (return everything or nothing)\n\t}",
"@Override\r\n public void getNextSongAndPlaySuccess(SyncListenerSongInfo syncListenerSongInfo) {\n }",
"public Song find_song_by_id(int song_id) {\n\t\treturn lp.find_song_by_id(song_id);\n\t}",
"@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }",
"public String getSongName() {\n return mSongName;\n }",
"public SongIdentifier getSongIdentifier() { return (SongIdentifier)identifier; }",
"public Song searchByTitle(String title) \r\n {\r\n return musicLibraryTitleKey.get(title);\r\n \t\r\n }",
"public void testGetGenre()\r\n {\r\n assertTrue(genre.equals(song.getGenre()));\r\n }",
"public void addSong(Song s) \r\n {\r\n \tSong mySong = s;\r\n \t\r\n \t//Adding to the first HashTable - the Title One\r\n \tmusicLibraryTitleKey.put(mySong.getTitle(), mySong);\r\n \t \r\n \t// Checking if we already have the artist\r\n \t if(musicLibraryArtistKey.get(mySong.getArtist()) != null)\r\n \t {\r\n \t\t //Basically saying that get the key (get Artist) and add mySong to it (i.e. the arraylist)\r\n \t\t musicLibraryArtistKey.get(mySong.getArtist()).add(mySong);\r\n \t }\r\n \t \r\n \t // If artist is not present, we add the artist and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryArtistKey.put(mySong.getArtist(), arrayListOfSongs);\r\n \t }\r\n \t \r\n \t// Checking if we already have the year\r\n \t if (musicLibraryYearKey.get(mySong.getYear()) != null)\r\n \t {\r\n \t \t musicLibraryYearKey.get(mySong.getYear()).add(mySong);\r\n \t }\r\n \t \r\n \t// If year is not present, we add the year and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryYearKey.put(mySong.getYear(), arrayListOfSongs);\r\n \t }\r\n\t\r\n }",
"public void getSongList() {\n\t\t// retrieve song info\n\t\tsongList = new ArrayList<Song>();\n\t\tContentResolver musicResolver = getContentResolver();\n\t\tUri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\n\t\tCursor musicCursor = musicResolver.query(musicUri, null, null, null,\n\t\t\t\tnull);\n\n\t\tif (musicCursor != null && musicCursor.moveToFirst()) {\n\t\t\t// get columns\n\t\t\tint titleColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media.TITLE);\n\t\t\tint idColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media._ID);\n\t\t\tint artistColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media.ARTIST);\n\t\t\t// add songs to list\n\t\t\tdo {\n\t\t\t\tlong thisId = musicCursor.getLong(idColumn);\n\t\t\t\tString thisTitle = musicCursor.getString(titleColumn);\n\t\t\t\tString thisArtist = musicCursor.getString(artistColumn);\n\t\t\t\tsongList.add(new Song(thisId, thisTitle, thisArtist));\n\t\t\t} while (musicCursor.moveToNext());\n\n\t\t\tmusicCursor.close();\n\t\t}\n\t}",
"public void setSong(SongEntity song)\r\n {\r\n this.song = song;\r\n }",
"public static void nextSong()\n {\n MusicPlayerControl.nextSong();\n }",
"public Song parserSong(JSONObject jsonTrack) throws JSONException {\n if (jsonTrack == null) return null;\n Song song = new Song();\n song.setArtworkUrl(jsonTrack.optString(SongEntry.ARTWORK_URL, null));\n song.setCommentCount(jsonTrack.optInt(SongEntry.COMMENT_COUNT, 0));\n song.setDescription(jsonTrack.optString(SongEntry.DESCRIPTION, \"\"));\n song.setDownloadable(jsonTrack.optBoolean(SongEntry.DOWNLOADABLE, false));\n song.setDownloadUrl(jsonTrack.optString(SongEntry.DOWNLOAD_URL, \"\"));\n song.setDuration(jsonTrack.optInt(SongEntry.DURATION, 0));\n song.setGenre(jsonTrack.optString(SongEntry.GENRE, \"\"));\n song.setId(jsonTrack.optInt(SongEntry.ID, 0));\n song.setKind(jsonTrack.optString(SongEntry.KIND, \"\"));\n song.setLikesCount(jsonTrack.optInt(SongEntry.LIKES_COUNT, 0));\n song.setPermalinkUrl(jsonTrack.optString(SongEntry.PERMALINK, \"\"));\n song.setPlaybackCount(jsonTrack.optInt(SongEntry.PLAYBACK_COUNT, 0));\n song.setTitle(jsonTrack.optString(SongEntry.TITLE, \"\"));\n song.setUri(StringUtils.createUri(jsonTrack.optString(SongEntry.URI, \"\")));\n song.setUserId(jsonTrack.optInt(SongEntry.USER_ID, 0));\n JSONObject jsonUser = jsonTrack.getJSONObject(SongEntry.USER);\n song.setAvatarUrl(jsonUser.optString(SongEntry.AVATAR_URL, null));\n song.setUsername(jsonUser.optString(SongEntry.USERNAME, \"\"));\n song.setPublic(jsonTrack.optBoolean(SongEntry.PUBLIC, false));\n if (song.getArtworkUrl() == null) {\n song.setArtworkUrl(song.getAvatarUrl());\n }\n if (song.getArtworkUrl() == null) return null;\n return song;\n }",
"private ArrayList<Song> songList(){\n ArrayList<Song> songs = new ArrayList<Song>();\n\n if(!isStorageAvailable()){\n Toast.makeText(this, R.string.nosd, Toast.LENGTH_SHORT).show();\n return songs;\n }\n Cursor music = getContentResolver().query( // using content resolver to read music from media storage\n MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,\n new String[]{\n MediaStore.Audio.Media.ARTIST,\n MediaStore.Audio.Media.ALBUM,\n MediaStore.Audio.Media.DISPLAY_NAME,\n MediaStore.Audio.Media.DATA},\n MediaStore.Audio.Media.IS_MUSIC + \" > 0 \",\n null, null\n );\n\n if (music.getCount() > 0){\n music.moveToFirst();\n Song previous = null;\n do{\n Song song = new Song(music.getString(0), music.getString(1), music.getString(2), music.getString(3));\n\n if (previous != null) {\n previous.setNext(song);\n song.setPrevious(previous);\n }\n previous = song;\n songs.add(song);\n }\n while(music.moveToNext());\n\n previous.setNext(songs.get(0));\n }\n music.close();\n\n songs.get(0).setPrevious(songs.get(songs.size()-1));\n songs.get(songs.size()-1).setNext(songs.get(0));\n return songs;\n }",
"public Song findSong(Long id) {\n\t\tOptional<Song> optionalSong = lookifyRepository.findById(id);\n\t\tif (optionalSong.isPresent()) {\n\t\t\treturn optionalSong.get();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public List<Song> getAllSongs(){\n\t\treturn this.songRepo.findAll();\n\t}",
"public boolean playSong(String song)\n {\n System.out.println(\"Playing song '\" + song + \"'\");\n\n if(mPaused && null != mWaitTimer)\n {\n mWaitTimer.cancel();\n mWaitTimer.purge();\n }\n\n //mPaused = false;\n\n // Play song\n try\n {\n currentSong = song;\n\n if (null == currentSong)\n {\n preparePlayer();\n return false;\n } else\n {\n mPlayer.reset();\n mPlayer.setDataSource(currentSong);\n mPlayer.setVolume(FLOAT_VOLUME_MAX, FLOAT_VOLUME_MAX);\n mPlayer.prepare();\n mPlayer.start();\n\n mInitialized = false;\n mPaused = false;\n updateMetadata();\n return true;\n }\n\n }\n catch (IllegalArgumentException e)\n {\n e.printStackTrace();\n }\n catch (IllegalStateException e)\n {\n e.printStackTrace();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n\n return false;\n }",
"public List<Song> getSongInfo(int songid) {\n\t\treturn sd.getSonginfo(songid);\r\n\t}",
"public int getSongIndex()\r\n\t{\r\n\t\treturn songIndex;\r\n\t}",
"public Song GetSong(String songName) {\n\t\tfor (Song curSong : songList) {\n\t\t\tif (curSong.GetName().equalsIgnoreCase(songName))\n\t\t\t\treturn curSong;\n\t\t}\n\n\t\t// No song matches.\n\t\treturn null;\n\t}",
"private Song findSong(String title){\n for (Song checkedSong : this.songArrayList){\n if (checkedSong.getTitle().equals(title)){\n return checkedSong;\n }\n }\n return null;\n }",
"public boolean hasSong(){\n return numSongs < MAX_SONG;\n }",
"public List<Song> findArtistSongs(String search) {\n\t\treturn lookifyRepository.findByArtistContaining(search);\n\t}",
"Song() {\n\t\tmEnsemble = ensemble;\n\t\tmTitle = \"Strawberry Fields\";\n\t\tmYearReleased = 1969;\n\t}",
"public Songs() {\n }",
"Observable<Optional<SongInfo>> getSong(String songId, String userId);",
"public Song() {}",
"public static int search (String searching)\n {\n ListAlbum listAlbum = new ListAlbum(true, false, false);\n AlbumXmlFile.readAllAlbumsFromDataBase(listAlbum, true);\n Iterator albumIterator = listAlbum.iterator();\n Album actualAlbum;\n int actualAlbumIndex=0;\n while (albumIterator.hasNext())\n {\n \n actualAlbum = (Album) albumIterator.next();\n \n if (actualAlbum.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n else if (actualAlbum.getArtist().getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n actualAlbum.getSongs();\n Iterator songsIterator = actualAlbum.getSongs().iterator();\n int actualSongIndex = 0;\n\n while (songsIterator.hasNext())\n {\n /* Se añade el número de la canción al modelo de la lista */\n Song song = (Song) songsIterator.next();\n if (song.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showSongResults(true, false, false, actualAlbum,song,actualSongIndex);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n indexFromSearchedSong=actualSongIndex;\n if (alreadyPlaying)\n {\n JSoundsMainWindowViewController.stopSong();\n alreadyPlaying=false;\n dontInitPlayer=true;\n }\n //playListSongs(true);\n return 1;\n }\n actualSongIndex++;\n }\n actualAlbumIndex++;\n }\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Not Found :( \");\n return 0;\n }",
"private static String getAlbum(String songID) throws SQLException {\n albumStatement = conn.createStatement();\n albumResultSet = albumStatement.executeQuery(\"SELECT * FROM album, trackAlbum WHERE trackAlbum.track_id = '\" + songID + \"' AND trackAlbum.album_id = album.id;\");\n albumResultSet.next();\n return albumResultSet.getString(\"name\");\n }",
"public void testGetYear()\r\n {\r\n assertTrue(year.equals(song.getYear()));\r\n }",
"public static void playListSongs(boolean iSelectASong)\n {\n Album actualAlbum = AlbumXmlFile.getAlbumFromDataBase(JSoundsMainWindowViewController.jlActualListSongs.getAlbumName(), true);\n\n \n if ((selectedAlbum!=null) && (!actualAlbum.getName().equals(selectedAlbum.getName())))\n {\n JSoundsMainWindowViewController.listSongs=null;\n JSoundsMainWindowViewController.listSongs=new JMusicPlayerList();\n alreadyPlaying=false;\n if((!isPlaylist) && (!shutDown))\n dontInitPlayer=true;\n }\n \n if (JSoundsMainWindowViewController.iAmPlaying && JSoundsMainWindowViewController.jlActualListSongs != null)\n { \n if (alreadyPlaying==false)\n {\n ViewUtilFunctions.changeIconFromButton(JSoundsMainWindowViewController.jBPlayButton, \"src/view/images/IBPause.png\");\n JSoundsMainWindowViewController.iAmPlaying = false;\n JSoundsMainWindowViewController.iAmPausing = true;\n JSoundsMainWindowViewController.iAmResuming = false;\n \n selectedAlbum=actualAlbum;\n \n Song actualSong = null;\n int position;\n if (!isPlaylist) //Si no estoy tratando de reproducir una lista de reproduccion.\n { \n \n \n if (actualAlbum != null)\n {\n Iterator songsIterator = actualAlbum.getSongs().iterator();\n \n position = 0;\n \n while (songsIterator.hasNext())\n {\n actualSong = (Song) songsIterator.next();\n \n if (actualSong != null)\n {\n listSongs.addSongToPlayerList(new JMusicSong(position, UtilFunctions.removeStrangeCharacters(actualSong.getName()), UtilFunctions.removeStrangeCharacters(actualSong.getName()), actualSong.getName(), UtilFunctions.removeStrangeCharacters(actualSong.getArtist().getName()), actualSong.getArtist().getName(), UtilFunctions.removeStrangeCharacters(actualAlbum.getName()), actualAlbum.getName()));\n position++;\n }\n }\n }\n }\n else //Si es una lista de reproduccion\n {\n Album actualAlbumPlaylist = PlaylistXmlFile.getPlaylistAlbumFromDataBase(JSoundsMainWindowViewController.jlActualListSongs.getAlbumName(), true);\n \n \n if (actualAlbumPlaylist != null)\n {\n Iterator songsIterator = actualAlbumPlaylist.getSongs().iterator();\n \n position = 0;\n \n while (songsIterator.hasNext())\n {\n \n actualSong = (Song) songsIterator.next();\n \n if (actualSong != null)\n {\n listSongs.addSongToPlayerList(new JMusicSong(position, UtilFunctions.removeStrangeCharacters(actualSong.getName()), UtilFunctions.removeStrangeCharacters(actualSong.getName()), actualSong.getName(), UtilFunctions.removeStrangeCharacters(actualSong.getArtist().getName()), actualSong.getArtist().getName(), UtilFunctions.removeStrangeCharacters(actualAlbumPlaylist.getName()), actualAlbumPlaylist.getName()));\n position++;\n }\n }\n }\n } \n if (!dontInitPlayer) // Inicio el reproductor\n {\n MusicPlayerControl.initMusicPlayer(Util.JSOUNDS_LIBRARY_PATH, JSoundsMainWindowViewController.jlActualListSongs, JSoundsMainWindowViewController.jLInformationSong, JSoundsMainWindowViewController.jlActualListSongs.getjLLastPlayedSongList(), table, JSoundsMainWindowViewController.LIST_SONG_COLUMN, JSoundsMainWindowViewController.jlActualListSongs.getRowInJTable(), JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN);\n MusicPlayerControl.loadSongs(listSongs);\n shutDown=false;\n }\n else // El reproductor ya esta iniciado\n {\n MusicPlayerControl.loadSongs(listSongs);\n dontInitPlayer=false;\n }\n \n if (iSelectASong)\n {\n if (indexFromSearchedSong>(-1))\n {\n MusicPlayerControl.changeSongFromIndexSong(indexFromSearchedSong);\n iSelectASong=false;\n indexFromSearchedSong=-1;\n }\n else\n {\n MusicPlayerControl.changeSongFromIndexSong(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex());\n iSelectASong = false;\n }\n \n }\n EditSongWindow.songName =listSongs.getSongAtIndex(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex()).getSongName();\n EditSongWindow.index = JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex();\n EditSongWindow.list = listSongs;\n JSoundsMainWindowViewController.fillEditWindow(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex());\n MusicPlayerControl.playSong();\n alreadyPlaying = true;\n }\n if ((alreadyPlaying==true) && (iSelectASong==true) && (fixedIndex== true))\n {\n ViewUtilFunctions.changeIconFromButton(JSoundsMainWindowViewController.jBPlayButton, \"src/view/images/IBPause.png\");\n JSoundsMainWindowViewController.iAmPlaying = false;\n JSoundsMainWindowViewController.iAmPausing = true;\n JSoundsMainWindowViewController.iAmResuming = false;\n MusicPlayerControl.changeSongFromIndexSong(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex()-1);\n \n JSoundsMainWindowViewController.fillEditWindow(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex()-1);\n \n MusicPlayerControl.playSong();\n }\n if ((alreadyPlaying==true) && (iSelectASong==true) && (iAmPausing==true) && (!fixedIndex))\n {\n MusicPlayerControl.changeSongFromIndexSong(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex());\n \n JSoundsMainWindowViewController.fillEditWindow(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex());\n \n MusicPlayerControl.playSong();\n }\n if ((alreadyPlaying==true) && (iSelectASong==true) && (iAmPlaying==true) && (!fixedIndex))\n {\n ViewUtilFunctions.changeIconFromButton(JSoundsMainWindowViewController.jBPlayButton, \"src/view/images/IBPause.png\");\n JSoundsMainWindowViewController.iAmPlaying = false;\n JSoundsMainWindowViewController.iAmPausing = true;\n JSoundsMainWindowViewController.iAmResuming = false;\n MusicPlayerControl.changeSongFromIndexSong(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex());\n \n JSoundsMainWindowViewController.fillEditWindow(JSoundsMainWindowViewController.jlActualListSongs.getSelectedIndex());\n \n MusicPlayerControl.playSong();\n }\n \n }\n else\n {\n if (JSoundsMainWindowViewController.iAmPausing && JSoundsMainWindowViewController.jlActualListSongs != null)\n {\n ViewUtilFunctions.changeIconFromButton(JSoundsMainWindowViewController.jBPlayButton, \"src/view/images/IBPlay.png\");\n JSoundsMainWindowViewController.iAmPlaying = false;\n JSoundsMainWindowViewController.iAmPausing = false;\n JSoundsMainWindowViewController.iAmResuming = true;\n \n MusicPlayerControl.pauseSong();\n }\n else\n {\n if (JSoundsMainWindowViewController.iAmResuming && JSoundsMainWindowViewController.jlActualListSongs != null)\n {\n ViewUtilFunctions.changeIconFromButton(JSoundsMainWindowViewController.jBPlayButton, \"src/view/images/IBPause.png\");\n \n JSoundsMainWindowViewController.iAmPlaying = false;\n JSoundsMainWindowViewController.iAmPausing = true;\n JSoundsMainWindowViewController.iAmResuming = false;\n \n MusicPlayerControl.resumeSong();\n }\n \n }\n }\n }",
"public SongRecord getSong(int position) throws IllegalArgumentException, EmptyPlaylistException\n\t{\n\t\tif(numOfSongs < 1)\n\t\t\tthrow new EmptyPlaylistException(\"This playlist is empty.\");\n\t\telse if(position < 0 || position > numOfSongs)\n\t\t\tthrow new IllegalArgumentException(\"That is an invalid choice\");\n\t\telse\n\t\t\treturn song[position-1];\n\t}",
"public void btnPlaySong() {\n\t\tMusicApp.getAudioPlayer().playSong(track);\n\t}",
"void startMusic(AudioTrack newSong);",
"@Test\n public void getPlaylistTest() {\n if (playlists.size() > 0) {\n PlaylistRepresentation expectedPlaylistRepresenation = new PlaylistRepresentation(playlists.get(0));\n ResponseEntity<PlaylistRepresentation> responseEntity = rest.getForEntity(BASE_URL + \"/\" +\n expectedPlaylistRepresenation.getPlaylist().getPlaylistId(), PlaylistRepresentation.class, Collections.EMPTY_MAP);\n assertEquals(\"Asserting status code\", HttpStatus.OK, responseEntity.getStatusCode());\n assertEquals(\"Asserting entity\", expectedPlaylistRepresenation, responseEntity.getBody());\n }\n }",
"public SCSong getSong(String id) {\n\t\t\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\n//\t\tCursor cursor = db.query(SONG_TABLE_NAME, new String[] { SONG_KEY_ID, SONG_KEY_TITLE, SONG_KEY_ARTIST, SONG_KEY_ARTWORK_URL, SONG_KEY_DURATION, SONG_KEY_GERNE, SONG_KEY_STREAM_URL, SONG_KEY_TAG },\n//\t\t\t\tSONG_KEY_ID + \"=?\", new String[] { id}, null, null,\n//\t\t\t\tnull, null);\n\t\t\n\t\tString query = \"SELECT * FROM \" + SONG_TABLE_NAME + \" WHERE \" + SONG_KEY_ID + \"=\" + id;\n\t\tCursor cursor = db.rawQuery(query, new String[]{});\n\t\tif (cursor == null || cursor.getCount() == 0){\n\t\t\tdb.close();\n\t\t\treturn null;\n\t\t}\n\t\tif (cursor != null) {\n\t\t\tcursor.moveToFirst();\n\t\t}\n\t\tSCSong onlineSong = new SCSong(\n\t\t\t\tcursor.getString(cursor.getColumnIndex(SONG_KEY_ID)),\n\t\t\t\tcursor.getString(cursor.getColumnIndex(SONG_KEY_TITLE)),\n\t\t\t\t\"\",\n\t\t\t\t\"soundcloud.com\",\n\t\t\t\tcursor.getString(cursor.getColumnIndex(SONG_KEY_STREAM_URL)),\n\t\t\t\tLong.parseLong(cursor.getString(cursor.getColumnIndex(SONG_KEY_DURATION))));\n\t\t\n\t\tonlineSong.setGenre(cursor.getString(cursor.getColumnIndex(SONG_KEY_GERNE)));\n\t\tonlineSong.setTagList(cursor.getString(cursor.getColumnIndex(SONG_KEY_TAG)));\n\t\tonlineSong.setUserId(cursor.getString(cursor.getColumnIndex(SONG_KEY_ARTIST)));\n\t\t\n\t\tcursor.close();\n\t\tdb.close();\n\t\treturn onlineSong;\n\t}",
"public void apiFindSongsOnAppleMusic(Messenger handler){\n transferPlaylists = new ArrayList<>();\n\n for(int i = 0; i < playlists.size(); i++){\n transferPlaylists.add(new Playlist(playlists.get(i).getName(),\"APPLE_MUSIC\"));\n for(int j = 0; j < playlists.get(i).getTracks().size(); j++){\n\n Song song = playlists.get(i).getTracks().get(j);\n String termSearch = (song.getTrack() + \"+\" + song.getArtist());\n termSearch = termSearch.replace(\"&\", \"\");\n termSearch = termSearch.replace(\"?\", \"\");\n termSearch = termSearch.replace(\"#\", \"\");\n termSearch.replace(' ', '+');\n Log.v(TAG, \"Term Search: \" + termSearch);\n\n Request request = new Request.Builder()\n .url(getString(R.string.api_apple_search_track) + \"?term=\"+termSearch+\"&limit=20\"+\"&types=songs\")\n .header(\"Authorization\", \"Bearer \"+ getString(R.string.apple_dev_token))\n .build();\n\n try(Response response = client.newCall(request).execute()){\n if(response.isSuccessful()){\n String res = response.body().string();\n //Log.v(TAG,\"Apple Music Find Songs Response: \" + res);\n appleMusicMatchSong(handler,res,i,song,false);\n } else {\n Log.v(TAG,\"Failed \" + response.toString());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n try {\n updateMessage(handler,3);\n apiCreatePlaylistsAppleMusic(handler);\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"Song(Ensemble pEnsemble, String pTitle) {\n\t\tthis.mEnsemble = pEnsemble;\n\t\tthis.mTitle = pTitle;\n\t\tmYearReleased = 0;\n\t}",
"public void addSong(Song song)\n {\n if( !songs.contains(song)) {\n songs.add(song);\n System.out.println(\"song added successfully.\");\n }\n else\n System.out.println(\"this song is already in the collection.\");\n }",
"boolean addSong(Song in)\n\t\tthrows IllegalArgumentException, NullPointerException;",
"public ArrayList<Song> getSongList() {\n\t\treturn songList;\n\t}",
"public void addSong(String song){\n\t\tqueueInsertion(song);\n\t}",
"public String getSong() {\n\t\tSystem.out.println(\"PlaylistPanel \" + panel.getName() + \" - song chosen: \" + song);\n\t\treturn song;\n\t}",
"public interface MediaMusicCollection {\n\n public Collection<SongInfo> getAllSongs();\n\n public SenseComponent getComponent(String name);\n\n public Config getConfig(String user);\n\n public SongInfo getFirstSong();\n\n public SongInfo getNextSong();\n\n public SongInfo getSong(int idx);\n\n /**\n * Get song count.\n * @return number of songs in library.\n */\n public int getSongCount();\n\n /**\n * Get a shuffled list of songs. The list is reshuffled each time\n * this method is called, unless shuffle is false.\n * @param reshuffle If true then the list will be reshuffled.\n * @return list of songs in music collection, in random order.\n */\n public ArrayList<SongInfo> getShuffledSongs(boolean reshuffle);\n\n}",
"void add(Song song) {\n songlist.add(song);\n }",
"public Song retrieveSongFromRequest(HttpServletRequest request) throws InvalidArtistNameException, InvalidSongNameException, InvalidFeaturedArtistsException, InvalidSongGenresException, TooLongOrEmptyLyricsException, InvalidYouTubeVideoIDException, InvalidFeaturedArtistNameException, LyricsParsingException {\n\n Song song = new Song();\n\n String songName = request.getParameter(RequestConstants.RequestParameters.SONG_NAME);\n String artistName = request.getParameter(RequestConstants.RequestParameters.SONG_ARTIST);\n String songFeaturedArtists = request.getParameter(RequestConstants.RequestParameters.FEATURED_ARTISTS);\n String songGenres = request.getParameter(RequestConstants.RequestParameters.SONG_GENRES);\n String songLyricsAsString = request.getParameter(RequestConstants.RequestParameters.SONG_LYRICS);\n String youTubeVideoID = request.getParameter(RequestConstants.RequestParameters.YOUTUBE_VIDEO_ID);\n\n if (!validateArtistName(artistName)) {\n throw new InvalidArtistNameException();\n }\n\n if (!validateSongName(songName)) {\n throw new InvalidSongNameException();\n }\n\n if (!validateFeaturedArtists(songFeaturedArtists)) {\n throw new InvalidFeaturedArtistsException();\n }\n\n if (!validateSongGenres(songGenres)) {\n throw new InvalidSongGenresException();\n }\n\n if (!validateLyrics(songLyricsAsString)) {\n throw new TooLongOrEmptyLyricsException();\n }\n\n if (!validateYouTubeVideoID(youTubeVideoID)) {\n throw new InvalidYouTubeVideoIDException();\n }\n\n song.setName(songName);\n song.setArtist(new Artist(artistName));\n song.setYouTubeVideoID(youTubeVideoID);\n\n if (songFeaturedArtists != null) {\n if (!songFeaturedArtists.trim().isEmpty()) {\n StringTokenizer stringTokenizer = new StringTokenizer(songFeaturedArtists, \";\");\n\n List<Artist> featuredArtists = new ArrayList<>();\n\n while (stringTokenizer.hasMoreTokens()) {\n String featuredArtistName = stringTokenizer.nextToken().trim();\n\n if (!validateArtistName(featuredArtistName)) {\n throw new InvalidFeaturedArtistNameException();\n }\n\n featuredArtists.add(new Artist(featuredArtistName));\n }\n\n song.setFeaturedArtists(featuredArtists);\n }\n }\n\n\n if (songGenres != null) {\n if (!songGenres.isEmpty()) {\n List<String> songGenresList = new ArrayList<>();\n\n StringTokenizer stringTokenizer = new StringTokenizer(songGenres, \";\");\n\n while (stringTokenizer.hasMoreTokens()) {\n songGenresList.add(stringTokenizer.nextToken().trim());\n }\n\n song.setGenres(songGenresList);\n }\n }\n\n\n LyricsParser lyricsParser = new LyricsParser();\n\n SongLyrics songLyrics = lyricsParser.parseLyrics(songLyricsAsString);\n\n song.setLyrics(songLyrics);\n\n return song;\n\n }",
"public ArrayList<Song> searchByArtist(String artist) \r\n {\r\n \treturn musicLibraryArtistKey.get(artist);\r\n \t\r\n }",
"public Song getSong(int index, boolean a) {\n\t\treturn (Song)this.getCurrentList(a).getNodeValue(index);\n\t}",
"@Test\n public void fTestGetPlaylist() {\n given()\n .header(\"X-Authorization\", token)\n .get(\"/playlists/\" + playlistId)\n .then()\n .statusCode(200);\n }",
"public static List<Song> searchSong(Song songName) {\n\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.getSongBySongName(songName);\n\t}",
"@Test\n public void getAlbumsTest() {\n Integer id = null;\n Integer userId = null;\n List<Album> response = api.getAlbums(id, userId);\n\n // TODO: test validations\n }",
"public void removeSong(Song song) {\n\n for(int ii = 0; ii < Library.size(); ii++) {\n if(Library.get(ii).equals(song)) {\n Library.remove(ii);\n }\n \n }\n }",
"@Override\n public Observable<ArtistShowsModel> getSongs(String eventId) {\n return Observable.defer(() -> uploadVideoService.getSongs(eventId)).retryWhen(\n observable ->\n observable.flatMap(o -> {\n if (o instanceof IOException) {\n return Observable.just(null);\n }\n return Observable.error(o);\n }));\n }",
"public static boolean addSong(Song detail) {\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.addSongs(detail);\n\n\t}",
"private int nextSong() {\n if (playListAdapter != null) {\n playListAdapter.clickPreviousNext(2);\n }\n serviceBound = false;\n player.stopMedia();\n int size = audioList.size();\n if (currentSong < size) {\n currentSong++;\n } else {\n currentSong = 0;\n }\n return currentSong;\n }",
"public void play(Song song)\n {\n\n String location = song.getLocation();\n File file = new File(location);\n filePath = file.toURI().toString();\n media = new Media(filePath);\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.play();\n\n }",
"@Test\n\tpublic void getAlbumTest() throws ClientProtocolException, IOException {\n\t\tHttpGet getRequest = new HttpGet(\"https://jsonplaceholder.typicode.com/posts\");\n\t\t// Step 3 - setting the content type, here we are setting to json format\n\t\tgetRequest.addHeader(\"accept\", \"application/json\");\n\n\t\t// Step 4 - Execute the request and get the response, same as send which gives\n\t\t// response and\n\t\t// we are storing the response\n\n\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t// Step 5 Get the status code from response\n\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t\tSystem.out.println(\"Status code is\" + statusCode);\n\t\t// Step 6- Validate the status code\n\t\tAssert.assertTrue(statusCode == 200, \"jsonplaceholder typicode tests failed\");\n\n\t}",
"public ArrayList addSong(Song newSong) {\n Library.add(newSong);\n return Library;\n }",
"protected void loadMockData() {\n\n int ctr;\n InputStream inputStream = getResources().openRawResource(R.raw.song_list);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n\n try {\n ctr = inputStream.read();\n while (ctr != -1) {\n byteArrayOutputStream.write(ctr);\n ctr = inputStream.read();\n }\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Parse the data.\n try {\n JSONObject jObject = new JSONObject(byteArrayOutputStream.toString());\n\n String status_code = jObject.getString(\"statusCode\");\n\n if (status_code.equalsIgnoreCase(\"200\")) {\n JSONArray jArray = jObject.getJSONArray(\"data\");\n\n audioList = new ArrayList<>();\n\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject song = jArray.getJSONObject(i);\n\n String genre = song.getString(\"genre\");\n String album = song.getString(\"album\");\n String author = song.getString(\"author\");\n String title = song.getString(\"title\");\n String url = song.getString(\"url\");\n String imgUrl = song.getString(\"img\");\n\n Audio audio = new Audio(genre, album, author, title, url, imgUrl);\n\n // Save to audioList.\n audioList.add(audio);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public void apiFindSongsOnSpotify(Messenger handler){\n transferPlaylists = new ArrayList<>();\n updateMessage(handler,2);\n\n for(int i = 0; i < playlists.size(); i++){\n transferPlaylists.add(new Playlist(playlists.get(i).getName(),\"SPOTIFY\"));\n for(int j = 0; j < playlists.get(i).getTracks().size(); j++){\n\n Song song = playlists.get(i).getTracks().get(j);\n String termSearch = (removeFeat(song.getTrack()) + \" \" + song.getArtist());\n termSearch = termSearch.replace(\"&\", \"\");\n termSearch = termSearch.replace(\"?\", \"\");\n termSearch = termSearch.replace(\"#\", \"\");\n termSearch.replace(' ', '+');\n Log.v(TAG, \"Term Search: \" + termSearch);\n\n Request request = new Request.Builder()\n .url(getString(R.string.api_spotify_search) + \"?q=\"+termSearch+\"&type=track\"+\"&limit=50\")\n .header(\"Authorization\", \"Bearer \"+ dh.getSpotifyUserToken())\n .build();\n\n try(Response response = client.newCall(request).execute()){\n if(response.isSuccessful()){\n String res = response.body().string();\n //Log.v(TAG,\"Spotify Find Songs Response: \" + res);\n spotifyMatchSong(handler,res,i,song,false);\n } else {\n Log.v(TAG,\"Failed \" + response.toString());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }\n\n\n\n try {\n updateMessage(handler,3);\n apiCreatePlaylistsSpotify(handler);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }",
"private void loadLastSong() {\n\t\tif(preferences.getBoolean(Preferences.PREFERENCE_OPENLASTSONGONSTART, Preferences.DEFAULT_OPENLASTSONGONSTART)) {\n\t String lastPlayingSong = preferences.getString(Preferences.PREFERENCE_LASTPLAYINGSONG, Preferences.DEFAULT_LASTPLAYINGSONG);\n \tlong lastPlayingSongFromPlaylistId = preferences.getLong(Preferences.PREFERENCE_LASTPLAYINGSONGFROMPLAYLISTID, Preferences.DEFAULT_LASTPLAYINGSONGFROMPLAYLISTID);\n \tif(lastPlayingSong!=null && (new File(lastPlayingSong).exists())) {\n \t\tif(lastPlayingSongFromPlaylistId!=-1) {\n \t\t\tPlaylistSong savedSong = Playlists.getSavedSongFromPlaylist(lastPlayingSongFromPlaylistId);\n \t\t\tif(savedSong!=null) {\n \t\t\t\tplayItem(savedSong, false);\n \t\t\t}\n \t\t} else {\n \t\t\tFile songDirectory = new File(lastPlayingSong).getParentFile();\n \t\t\tBrowserSong song = new BrowserSong(lastPlayingSong, new BrowserDirectory(songDirectory));\n \t\t\t((MusicPlayerApplication)getApplication()).gotoDirectory(songDirectory);\n \t\t\tplayItem(song, false);\n \t\t}\n\t\t if(preferences.getBoolean(Preferences.PREFERENCE_SAVESONGPOSITION, Preferences.DEFAULT_SAVESONGPOSITION)) {\n\t\t \tint lastSongPosition = preferences.getInt(Preferences.PREFERENCE_LASTSONGPOSITION, Preferences.DEFAULT_LASTSONGPOSITION);\n\t\t \tif(lastSongPosition<getDuration()) seekTo(lastSongPosition);\n\t\t }\n \t}\n }\n\t}",
"private ArchiveSongObj getCurrentSong() {\n\t\tif(nowPlayingPosition==-1){\n\t\t\treturn null;\n\t\t}\n\t\treturn songArray.get(nowPlayingPosition);\n\t}",
"public ArrayList<String> getListSongs() {\n\t\tArrayList<String> ret = new ArrayList<String>();\n\t\tList<Song> songs = controller.getSongs();\n\t\tfor (Iterator<Song> it = songs.iterator(); it.hasNext(); ) {\n\t\t\tSong song = it.next();\n\t\t\tret.add(song.getTitle() + \" - \" + song.getArtist());\n\t\t}\n\t\treturn ret;\n\t}",
"public void playSong(Song song) {\n // Release the media player if it currently exists because we are about to\n // play a different sound file\n releaseMediaPlayer();\n\n // Request audio focus so in order to play the audio file. The app needs to play a\n // short audio file, so we will request audio focus with a short amount of time\n // with AUDIOFOCUS_GAIN_TRANSIENT.\n int result = mAudioManager.requestAudioFocus(mOnAudioFocusChangeListener,\n AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);\n\n if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n // We have audio focus now.\n\n // Create and setup the {@link MediaPlayer} for the audio resource associated\n // with the current song\n mMediaPlayer = MediaPlayer.create(this, song.getSongResourceID());\n\n // Set the Seek Bar\n int mediaPos = mMediaPlayer.getCurrentPosition();\n int mediaMax = mMediaPlayer.getDuration();\n\n mSongSeekBar.setMax(mediaMax); // Set the Maximum range of the\n mSongSeekBar.setProgress(mediaPos);// set current progress to song's\n\n handler.removeCallbacks(mMoveSeekBarThread);\n handler.postDelayed(mMoveSeekBarThread, 100); //call the thread after 100 milliseconds\n\n // Start the audio file\n mMediaPlayer.start();\n\n // Setup a listener on the media player, so that we can stop and release the\n // media player once the sound has finished playing.\n mMediaPlayer.setOnCompletionListener(mCompletionListener);\n }\n }",
"public void addSong(Song song) {\n\t\tsongs.add(song);\n\t}",
"public boolean addSongstoAlbums(String songTitle, double songDuration){\n\n if(findSong(songTitle) == null){\n songAlbum.add(new Song(songTitle, songDuration));\n return true;\n }\n System.out.println(\"Song already exist\");\n return false;\n }",
"@Override\n public void onClick(View view) {\n if (spotifyBroadcastReceiver.getAlbumName() == null ||\n spotifyBroadcastReceiver.getArtistName() == null ||\n spotifyBroadcastReceiver.getTrackName() == null) {\n Log.d(TAG, \"Song's Information Not Complete!\");\n } else {\n // search song\n getLyrics();\n }\n }",
"public static boolean isSongAvailable(Song details) {\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.isSongAlreadyAvailable(details);\n\t}",
"public List<Song> getsongalbumsid(String albumsname) {\n\t\treturn sd.allsongalbumsname(albumsname);\r\n\t}",
"public void startSong() {\n if (trackPlaying) {\n trackPlaying = false;\n mp.finish();\n\n System.out.print(mp.isFinished() + \"+\" + mp.isPaused());\n }\n\t\n\t//The startSong overloads start and pause. If the song is pause, then resume.\n if (mp.isPaused() && !mp.isFinished()) {\n mp.resume();\n return;\n }\n\n sequence = sc.getSongSequence();\n try {\n mp.start(sequence);\n } catch (InvalidMidiDataException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (MidiUnavailableException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void addSong(Song song) {\n\t\t\n\t\tString title = song.getTitle();\n\t\tString artist = song.getArtist();\n\t\tString id = song.getTrackId();\n\t\tArrayList<String> tags = song.getTags();\n\t\t\n\t\tif(!this.titleMap.containsKey(title)) {\n\t\t\tthis.titleMap.put(title, new TreeSet<Song>(new TitleComparator()));\n\t\t}\n\t\t\n\t\tTreeSet<Song> titleTmp = this.titleMap.get(title);\n\t\ttitleTmp.add(song);\n\t\t\n\t\tif(!this.artistMap.containsKey(artist)) {\n\t\t\tthis.artistMap.put(artist, new TreeSet<Song>(new ArtistComparator()));\n\t\t}\n\t\t\n\t\tTreeSet<Song> artistTmp = this.artistMap.get(artist);\n\t\tartistTmp.add(song);\n\t\t\n\t\tfor(String tag: tags) {\n\t\t\tif(!this.tagMap.containsKey(tag)) {\n\t\t\t\tthis.tagMap.put(tag, new TreeSet<String>(new StringComparator()));\n\t\t\t}\n\t\t\t\n\t\t\tTreeSet<String> tagTmp = this.tagMap.get(tag);\n\t\t\ttagTmp.add(id);\n\t\t}\n\t\t\n\t\tif(!this.idMap.containsKey(id)) {\n\t\t\tthis.idMap.put(id, song);\n\t\t}\n\t\t//if(!this.artistList.contains(artist))\n\t\t\t//this.artistList.add(artist);\n\t}",
"public static void previusSong()\n {\n MusicPlayerControl.prevSong();\n }",
"public List<Song> allSongs() {\n return songRepository.findAll();\n }",
"public String sing(){\r\n\t\tlinesOfSong = new ArrayList<String>();\r\n\t\tString line;\r\n String fileName = \"OompaLoompaSong.txt\";\r\n\t\t\r\n\t\ttry{\r\n BufferedReader br = new BufferedReader(new FileReader(fileName));\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t//line = br.readLine();\t\r\n\t\t\t\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n linesOfSong.add(line);\r\n\t\t\t}\r\n\t\t\tbr.close(); \r\n\t\t}\r\n\t\tcatch(IOException e){\r\n\t\t\tSystem.out.println(\"Sorry, we couldn't make this song! \");\r\n\t\t}\r\n\t\tRandomSong();\r\n\t\treturn song;\r\n\t}"
]
| [
"0.73736656",
"0.73193014",
"0.70786107",
"0.6995954",
"0.68267286",
"0.67620814",
"0.67438745",
"0.66596097",
"0.6526902",
"0.64530265",
"0.64441824",
"0.6438061",
"0.6417762",
"0.6391431",
"0.63861775",
"0.63758683",
"0.6319707",
"0.63176686",
"0.6277298",
"0.62724817",
"0.6266081",
"0.6264662",
"0.61984277",
"0.61652166",
"0.61634433",
"0.61464673",
"0.61160696",
"0.6113645",
"0.61106",
"0.60861063",
"0.6083939",
"0.60724217",
"0.60703",
"0.6068327",
"0.6062891",
"0.60610366",
"0.60445863",
"0.6024181",
"0.60237104",
"0.60228246",
"0.60041714",
"0.6002272",
"0.5997056",
"0.5978843",
"0.5975972",
"0.5973167",
"0.5948649",
"0.59368235",
"0.59269375",
"0.5914503",
"0.5899056",
"0.5895433",
"0.5878643",
"0.58780134",
"0.58763814",
"0.5875527",
"0.5866079",
"0.58482325",
"0.58415073",
"0.5838313",
"0.5832752",
"0.580967",
"0.5797581",
"0.57935816",
"0.579313",
"0.5783439",
"0.57827836",
"0.5781752",
"0.57645",
"0.5763977",
"0.5763394",
"0.57597476",
"0.57529014",
"0.5748931",
"0.57431996",
"0.57415676",
"0.57307994",
"0.5730442",
"0.5725711",
"0.57134354",
"0.57111675",
"0.57035583",
"0.56978935",
"0.5697862",
"0.5696713",
"0.5696114",
"0.5691173",
"0.5679747",
"0.56777817",
"0.5677098",
"0.5675329",
"0.5669877",
"0.5668279",
"0.56638724",
"0.5652137",
"0.5651373",
"0.5648361",
"0.5629302",
"0.56093407",
"0.5608681"
]
| 0.83569765 | 0 |
Test of removeSong method, of class SongLibrary. | @Test
public void testRemoveSong() {
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), new HashMap<String,Rights>());
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), new HashMap<String,Rights>());
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
songs.add(song2);
SongLibrary library = new SongLibrary(songs);
String songId = "1";
library.removeSong(songId);
assertFalse(library.islocal("1"));
assertTrue(library.islocal("2"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeSong(Song song) {\n\n for(int ii = 0; ii < Library.size(); ii++) {\n if(Library.get(ii).equals(song)) {\n Library.remove(ii);\n }\n \n }\n }",
"@Test\n public void removeSongsFromPlaylist() {\n onView(withId(R.id.playlistNav)).perform(click());\n onView(withId(R.id.playlist_recycler_view))\n .perform(RecyclerViewActions.actionOnItem(\n hasDescendant(withText(\"Playlist 1\")), click()));\n onView(withId(R.id.playlist_songs_recycler_view))\n .perform(RecyclerViewActions.actionOnItem(\n hasDescendant(withText(\"All that\")), longClick()));\n onView(withText(\"Remove from Playlist\")).perform(click());\n\n\n // Verify that it was removed.\n onView(withId(R.id.playlist_songs_recycler_view))\n .check(matches(not(hasDescendant(withText(\"All that\")))));\n }",
"Song removeSong(Song out)\n\t\tthrows IllegalArgumentException, NullPointerException;",
"@Test\n public void testDeletePlaylist(){\n Playlist playlist = new Playlist();\n playlist.setId(ID);\n playlist.setGenre(GENRE);\n playlist.setDescription(DESCRIPTION);\n ReturnValue ret = Solution.deletePlaylist(playlist);\n assertEquals(NOT_EXISTS, ret);\n ret = Solution.addPlaylist(playlist);\n assertEquals(OK, ret);\n Playlist retrieved = Solution.getPlaylist(ID);\n assertEquals(playlist, retrieved);\n ret = Solution.deletePlaylist(playlist);\n assertEquals(OK, ret);\n retrieved = Solution.getPlaylist(ID);\n assertEquals(Playlist.badPlaylist(), retrieved);\n }",
"public void deleteSong(Song_it3 song) {\r\n\t\tDBBroker conex = new DBBroker();\r\n\t\t try {\r\n\t\t Statement estatuto = conex.getConnection();\r\n\t\t estatuto.executeUpdate(\"DELETE FROM song WHERE idSong= \" + song.getIdSong());\r\n\t\t JOptionPane.showMessageDialog(null, \"Se ha registrado Exitosamente\", \"Información\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t estatuto.close();\r\n\t\t conex.desconectar();\r\n\t\t \r\n\t\t } catch (SQLException e) {\r\n\t\t System.out.println(e.getMessage());\r\n\t\t JOptionPane.showMessageDialog(null, \"No se eliminó la canción\");\r\n\t\t }\r\n\t}",
"@Override\n\tpublic String removeSong(int id) {\n\t\tsongRepository.deleteById(id);\n\t\treturn id+\" is deleted successfully\";\n\t}",
"public void RemoveSong(Song toRemove) {\n\t\tsongList.remove(toRemove);\n\t}",
"public Song removeSong(Song s) {\n\t\tif (this.songList.contains(s)) {\n\t\t\tthis.songList.removeAll(Collections.singleton(s));\n\t\t}\n\t\treturn s;\n\t}",
"public static boolean deleteSong(Song details) {\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.deleteSong(details);\n\t}",
"private void doDeleteSong() {\n int result = dbHelper.deleteSong(selectedSong.getId());\n Log.d(TAG + \"in doDeleteSong\", \"Result > \" + result);\n\n // Check Status\n if (result == 1) {\n Toast.makeText(this, \"Successfully deleted the song\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Failed to delete the song\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void removeSong(int index)\n {\n if( validIndex(index) ) {\n System.out.println(songs.get(index).getFile() + \" deleted\");\n songs.remove(index);\n }\n }",
"@Override\n public void removeSong(Song song) {\n if (song != null && !em.contains(song)) {\n song = em.merge(song);\n }\n em.remove(song);\n }",
"@Test\n public void testAddSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n SongLibrary library = new SongLibrary(songs);\n \n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n library.addSong(song2);\n \n assertTrue(library.islocal(song2.getSongId()));\n assertTrue(library.islocal(song1.getSongId()));\n\n }",
"@Test\n public void testGetSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n\n Song result = library.getSong(songId);\n assertTrue(result.getTitle().equals(\"titre2\"));\n assertTrue(result.getAlbum().equals(\"album2\"));\n assertTrue(result.getArtist().equals(\"artiste2\"));\n assertTrue(result.getSongId().equals(\"2\"));\n\n }",
"private void removeAlbumFromCollection() {\n //\n }",
"@Test\n public void testRemoveCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n library.removeCategory(\"family\");\n assertFalse(library.getSong(\"1\").getRightsByCategory().containsKey(\"family\"));\n\n }",
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}",
"@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}",
"@Override\n public void delete(Song song) {\n create.deleteFrom(T_SONG)\n .where(T_SONG.SONGID.eq(song.getId()))\n .execute();\n }",
"public Song removeSong(int index) {\n\t\tSong output = null;\n\t\t//try {\n\t\t\t// if (!this.songList.isEmpty()) {\n\t\t\toutput = this.songList.get(index);\n\t\t\tthis.songList.remove(index);\n\t\t\t// }\n\t\t//} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"Index has to be greater than 0\");\n\t\t//} catch (IndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"Playlist is empty\");\n\t\t//}\n\t\treturn output;\n\t}",
"@DELETE @Path(\"/id/{albumId}/songs/{songName}\")\n public void deleteSong(@PathParam(\"albumId\") String albumId,\n @PathParam(\"songName\") String songName) {\n return;\n }",
"@Test\n public void testremovePlayer() {\n session.removePlayer(playerRemco);\n // There already was 1 player, so now there should be 0\n assertEquals(0, session.getPlayers().size());\n }",
"@Test\n void removeItem() {\n }",
"public void deleteSong(Long id) {\n\t\tSong deleteSong = this.findSong(id);\n\t\tlookifyRepository.delete(deleteSong);\n\t}",
"@Test\n public void testRemove() {\n System.out.println(\"remove\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.remove(piece);\n\n assertFalse(instance.getBagContent().contains(piece));\n\n }",
"public void removeSong(String id) throws SQLException{\n\t\tStatement s = null;\n\t\t\n\t\ttry {\n\t\t\ts = derbyConn.createStatement();\n\t\t\t//* has id, artist, title, song, newest, oldest, count\n\t\t\ts.executeUpdate(\"DELETE FROM \" + tableName + \" WHERE ID = \" + id);\n } finally {\n \ts.close();\n }\n\t}",
"@Test\n void removeItem() {\n\n }",
"@Test\n\tpublic void testRemoveStock() {\n\t\tStock stockRes = null;\n\t\tString productId = \"HY-1000\";\n\t\tTestFactory tf = new TestFactory();\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tif (!tf.createStock(em, productId)) {\n\t\t\t\tfail(\"Unable to create Stock\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tem.getTransaction().begin();\n\t\t\t// Remove Business Partner\n\t\t\tassertTrue(\"Stock not deleted\", tf.deleteStock(em, productId));\n\t\t\t// Search for deleted business partner.\n\t\t\tstockRes = em.find(Stock.class, productId);\n\t\t\tassertNull(\n\t\t\t\t\t\"Search via find method for removed Stock: Removed Stock with Product HT-1000 still exists \",\n\t\t\t\t\tstockRes);\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}",
"public int removeTrack(final Song song) {\n\t\tint numremoved = 0;\n\t\tsynchronized (this) {\n\t\t\tfor (int i = 0; i < mPlayListLen; i++) {\n\t\t\t\tif (mPlayList[i].equals(song)) {\n\t\t\t\t\tnumremoved += removeTracksInternal(i, i);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (numremoved > 0) {\n\t\t\tnotifyChange(EVENT_QUEUE_CHANGED);\n\t\t}\n\t\treturn numremoved;\n\t}",
"@Test\n public void testRemove(){\n DogHouse testDogHouseRem = new DogHouse();\n Integer expected = 0;\n\n Dog newDog = new Dog(\"Thor\", new Date(), 23);\n testDogHouseRem.add(newDog);\n\n testDogHouseRem.remove(newDog);\n Integer actual = testDogHouseRem.getNumberOfDogs();\n\n Assert.assertEquals(expected, actual);\n }",
"@Test\n public void hTestDeletePlaylist() {\n given()\n .header(\"X-Authorization\", token)\n .delete(\"/playlists/\" + playlistId)\n .then()\n .statusCode(200);\n }",
"@Override\n\tpublic void deleteSongFromPlaylist(long paramLong1, long paramLong2,\n\t\t\tint paramInt)\n\t{\n\n\t}",
"public void removeSong(int position) throws IllegalArgumentException, EmptyPlaylistException\n\t{\n\t\tif(numOfSongs == 0)\n\t\t\tthrow new EmptyPlaylistException(\"This playlist is empty.\");\n\t\telse if(position < 1 || position > numOfSongs)\n\t\t\tthrow new IllegalArgumentException(\"Position must be 1 - \" + numOfSongs);\n\t\telse\n\t\t{\n\t\t\tfor(int i = (position-1); i < (numOfSongs-1); i++)\n\t\t\t{\n\t\t\t\tthis.song[i] = this.song[i+1];\n\t\t\t}\n\t\t\tnumOfSongs--;\n\t\t\tupdateTable();\n\t\t}\n\t}",
"@FXML\n private void deleteSongOnPlaylist(ActionEvent event) {\n Song s = lstSOP.getSelectionModel().getSelectedItem();\n int plId = lstPlaylists.getSelectionModel().getSelectedItem().getId();\n bllfacade.deleteSongOnPlaylist(plId,s.getId(),s.getPosition());\n bllfacade.reloadPlaylists();\n init();\n }",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}",
"@Test\n public void testRemovePositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n\n Assert.assertTrue(itemDao.delete(item.getName()));\n Assert.assertNull(itemDao.read(item.getName()));\n }",
"public void deleteSong(String id) {\n\t\t\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\t//System.out.println (\"GET WRITE = \" + db);\n\t\tdb.delete(SONG_TABLE_NAME, SONG_KEY_ID + \" = ?\",\n\t\t\t\tnew String[] { id });\n\t\tdb.close();\n\t}",
"public AccountEdgeApiResponseMessage removeSongFromLibrary(String songId, String timestamp,\n String sessionToken) {\n ResteasyWebTarget target =\n client.target(String.format(\"%s/account-edge/users/mylibrary/removesong/%s/%s\",\n ClientConstants.getInstance().BASE_URL, songId, timestamp));\n\n Response response =\n target.request().cookie(new NewCookie(\"sessionToken\", sessionToken)).delete();\n\n if (response.getStatus() != 200) {\n throw new RuntimeException(String.format(\"Failed : HTTP error code : %s\",\n response.getStatus()));\n }\n return response.readEntity(AccountEdgeApiResponseMessage.class);\n }",
"public static boolean removeMusicFromPlaylist(String username, String playlist, String music, String clientData){\n String optional = null;\n //Open a database connection\n if (Connect.connect(clientData)){\n //Basic checks\n if (!checkExistenceAndOwner(username, clientData, playlist)){\n return false;\n }\n\n //Check if playlist has the music\n int[] keysToDelete = CheckExistence.playlistHasMusic(playlist, music);\n if (keysToDelete == null){\n System.out.println(clientData + \" | \" + username\n + \" | Music not found in the playlist.\");\n return false;\n }\n\n //Delete the music from the playlist\n try{\n Statement statement = Connect.connection.createStatement();\n statement.executeUpdate(\"DELETE FROM playlist_music WHERE playlist_nplaylist=\" + keysToDelete[0] + \" AND music_nmusic=\" + keysToDelete[1] + \";\");\n Connect.disconnect(clientData);\n return true;\n } catch (SQLException e) {\n if (e.getMessage() != null) optional = e.getMessage();\n if (Request.DEV_MODE) e.printStackTrace();\n System.out.println(clientData + \" | \" + username\n + \" | Failed to remove music from playlist \" + (optional==null?\".\":\" | \" + optional));\n return false;\n }\n }\n return false;\n }",
"public void testRemove() {\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n tree.insert(\"bagel\");\r\n\r\n tree.remove(\"apple\");\r\n tree.remove(\"bagel\");\r\n\r\n tree.insert(\"ab\");\r\n tree.remove(\"ab\");\r\n\r\n try {\r\n tree.remove(\"apple\");\r\n }\r\n catch (ItemNotFoundException e) {\r\n assertNotNull(e);\r\n }\r\n }",
"int deleteByExample(SportAlbumPictureExample example);",
"public void testGetSongTitle()\r\n {\r\n assertTrue(songTitle.equals(song.\r\n getSongTitle()));\r\n }",
"@Test\n public void testRemoveItem() throws Exception {\n \n System.out.println(\"RemoveItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n fail(\"No existe\");\n \n }*/\n \n /*---------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n assertTrue(instance.isEmpty());\n \n }\n \n }",
"@Test\n public void removeByIdTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n catHouse.remove(1);\n Integer expected = 0;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }",
"@Test\n public void deletion() {\n repo.addDocument(\"test1\", \"{\\\"test\\\":1}\", \"arthur\", \"test version 1\", false);\n repo.addDocument(\"test1\", \"{\\\"test\\\":2}\", \"arthur\", \"this is version 2\", false);\n repo.removeDocument(\"test1\", \"arthur\", \"removal\");\n\n String result = repo.getDocument(\"test1\");\n assertTrue(result == null);\n\n }",
"public void testRemove() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService ser = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(ser); \r\n\t\tint id = -1;\r\n\t\tLinkedList<Service> list = modelDS.findAll();\r\n\t\tfor (Service a : list) {\r\n\t\t\tif (a.equals(ser))\r\n\t\t\t\tid = a.getId();\r\n\t\t}\r\n\t\t\r\n\t\tService service = modelDS.findByKey(id);\r\n\t\tmodelDS.remove(service.getId()); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT count(*) FROM \" + TABLE_NAME + \" WHERE id = ?\");\r\n\t\tps.setInt(1, id);\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tint expected = 0;\r\n\t\tif (rs.next())\r\n\t\t\texpected = rs.getInt(1);\r\n\t\tassertEquals(expected, 0);\r\n\t}",
"public void removeFromShuffleList(Song song) {\n\t\t// iterate through the shuffle list, mark all deleted songs\n\t\tfor (int i = shuffleOrder.size() - 1; i >= 0; i--) {\n\t\t\tif (shuffleOrder.get(i).equals(song)) {\n\t\t\t\tshuffleOrder.remove(i);\n\t\t\t\tif (i < this.shuffleSongIndex)\n\t\t\t\t\tshuffleSongIndex -= 1;\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testGetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n ArrayList<Song> expResult = songs;\n ArrayList<Song> result = library.getlibrary();\n assertEquals(expResult, result);\n\n }",
"@Test\n public void testRemove() {\n System.out.println(\"remove\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Ismael\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n Persona personaAEliminar = (Persona) repo.buscar(persona.getId());\n assertNotNull(personaAEliminar);\n \n //eliminacion\n repo.eliminar(personaAEliminar);\n Persona personaEliminada = (Persona) repo.buscar(persona.getId());\n assertNull(personaEliminada);\n }",
"public void removeAlbum(Album album)\r\n {\r\n\talbumCollection.remove(album);\r\n }",
"@RequestMapping(value = \"/delete\", method = RequestMethod.POST)\n @ResponseStatus(HttpStatus.OK)\n void deleteSong(@RequestBody Song song) {\n String message = messageSource.getMessage(\"song.delete\", null,\"locale not found\", Locale.getDefault());\n logger.info(message);\n songService.delete(song);\n }",
"@Test\n public void testRemoveProduct() {\n }",
"@Test\n public void removeMovie_test() {\n theater.getMovies().remove(\"Jumanji\");\n int expected = 3;\n int actual = theater.getMovies().size();\n Assert.assertEquals(expected,actual);\n }",
"@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }",
"@Test(expected = NullPointerException.class)\n public void testSelectSongNoSong()\n {\n MusicPlayer.getInstance().selectSong(\"foo\");\n }",
"@Test\n\tpublic void testRemove() {\n\t\ttry {\n\t\t\tVRDevice v1 = new VRDevice(\"Serial\", \"Name\", 0);\n\t\t\ts1.putOnWaitingList(v1);\n\t\t} catch (BadDeviceInformationException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\ts1.remove(null, 0);\n\n\t\tassertEquals(\"\", s1.printWaitList(null));\n\t\t\n\t\ttry {\n\t\t\tVRDevice v1 = new VRDevice(\"Serial\", \"Name\", 0);\n\t\t\ts1.putOnWaitingList(v1);\n\t\t} catch (BadDeviceInformationException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\ts1.remove(\"n\", 0);\n\t\tassertEquals(\"\", s1.printWaitList(null));\n\t}",
"@Test\n public void removeByCatTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n catHouse.remove(tom);\n Integer expected = 0;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }",
"public abstract BossBar removePlayer(UUID uuid);",
"public void removeSongFromPlayList(String playListTitle, String songTitle) {\n if (playListPanels.containsKey(playListTitle))//if playlist exist\n playListPanels.get(playListTitle).removeSong(songTitle);\n }",
"@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String isbn = \"1222111131\";\r\n int expResult = 1;\r\n int result = TitleDao.delete(isbn);\r\n assertEquals(expResult, result);\r\n }",
"@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String doc = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.delete(doc);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test\r\n\tpublic void testRemoveItem() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"B\");\r\n\t\tassertEquals(test, vendMachine.removeItem(\"B\"));\r\n\t}",
"@Test\n public void testRemoveCard() {\n d_gameData.getD_playerList().get(1).addCard(GameCard.BOMB);\n d_gameData.getD_playerList().get(1).removeCard(GameCard.BOMB);\n assertEquals(false, d_gameData.getD_playerList().get(1).getD_cards().contains(GameCard.BOMB));\n }",
"@Test\n public void testRemoveACopy() {\n }",
"@Test\n public void remove() {\n testList.add(42);\n testList.remove(42);\n assertEquals(0, testList.count());\n }",
"public boolean removeSongByName(String name) {\n\n\t\tIterator<Song> itr = songList.iterator();\n\n\t\t// remove all even numbers\n\t\twhile (itr.hasNext()) {\n\t\t\tSong s = itr.next();\n\n\t\t\tif (s.GetName().equalsIgnoreCase(name)) {\n\t\t\t\tsongList.remove(s);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"boolean removePlayer(String player);",
"public boolean deleteSong(Song song) {\n boolean removed = false;\n int idx;\n while ((idx = queue.indexOf(song)) >= 0) { // if duplicates are allowed, there could be multiple instances of a song, remove them all\n if (idx < index) {\n removed = queue.remove(idx) != null;\n if (removed) index--;\n } else removed = queue.remove(idx) != null;\n }\n\n if (isEmpty()) clear();\n else currentSong = queue.get(index);\n\n return removed;\n }",
"public void addSong(Song song)\n {\n if( !songs.contains(song)) {\n songs.add(song);\n System.out.println(\"song added successfully.\");\n }\n else\n System.out.println(\"this song is already in the collection.\");\n }",
"@Test\n public void testRemovePatient() throws RemoveException {\n register.registerPatient(\"Mikke\",\"Mus\",\"24120012345\", \"Doctor Proctor\");\n register.registerPatient( \"Donald\", \"Duck\",\"16120012345\", \"Doctor Proctor\");\n register.removePatient(\"24120012345\"); // Remove Mikke Mus\n assertEquals(1, register.getRegisterSize());\n }",
"@Test\r\n\tvoid testRemove3() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\ttest.remove(10);\r\n\t\tassertEquals(8, test.list.length);\r\n\t}",
"public void doDeleteAlbum(AlbumDTO dto)\n/* */ {\n/* 64 */ this.galleryManager.deleteAlbum(dto);\n/* 65 */ this.albumList.remove(dto);\n/* */ }",
"protected abstract void removeItem();",
"@Test\r\n public void testDeleteRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.deleteRecipe(0));\r\n assertNull(coffeeMaker.deleteRecipe(0)); // Test already delete recipe\r\n }",
"@Test\r\n public void testRemove() {\n Game g = new Game();\r\n g.customDeal(0, 3, 6, 9);\r\n g.remove(2);\r\n assertEquals(0, g.columns.get(2).cards.size());\r\n }",
"@Test\n public void removeTest() {\n reservation3.setId(14L);\n reservationService.remove(reservation3);\n Mockito.verify(reservationDao, Mockito.times(1)).remove(reservation3);\n }",
"@Override\n\tpublic boolean deleteSongsFromPlaylist(long paramLong,\n\t\t\tlong[] paramArrayOfLong, int paramInt)\n\t{\n\t\treturn false;\n\t}",
"@Test\n public void deleteRecipe_Deletes(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipe(returned);\n assertEquals(\"deleteRecipe - Deletes From Database\", null, testDatabase.getRecipe(returned));\n }",
"private static void testRemove(BagInterface<String> aBag, String[] tests)\n {\n for (int index = 0; index < tests.length; index++)\n {\n String aString = tests[index];\n if (aString.equals(\"\") || (aString == null))\n {\n // Test remove()\n System.out.println(\"\\nRemoving a string from the bag:\");\n String removedString = aBag.remove();\n System.out.println(\"remove() returns \" + removedString);\n }\n else\n {\n // Test remove(aString)\n System.out.println(\"\\nRemoving \\\"\" + aString + \"\\\" from the bag:\");\n boolean result = aBag.remove(aString);\n System.out.println(\"remove(\\\"\" + aString + \"\\\") returns \" + result);\n } // end if\n\n displayBag(aBag);\n } // end for\n }",
"public void deleteSongFromList(boolean a, Song song) {\n\t\t// iterate through the list from songIndex, move all songs forward 1 index\n\t\tfor (int i = song.getIndex(a)-1; i < this.getCurrentList(a).getHeapSize()-1; i++)\n\t\t\tthis.getCurrentList(a).getInternalArray()[i] = this.getCurrentList(a).getInternalArray()[i+1];\n\t\t// decrease heapsize\n\t\tthis.getCurrentList(a).setHeapSize(this.getCurrentList(a).getHeapSize() - 1);\n\t\tsong.setIndex(a, -1);\n\t}",
"@Test\n public void testDeleteBySsoId() {\n System.out.println(\"deleteBySsoId\");\n try {\n String ssoId = \"sam\";\n\n userRepo.removeByFirstName(\"Sam\");\n AppUser result = userRepo.findBySsoId(ssoId);\n assertNull(result);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic boolean deleteAllSongsFromMixPlaylist(long paramLong, int paramInt)\n\t{\n\t\treturn false;\n\t}",
"@Test\n public void testRemove() {\n map.put(\"Hello\", \"World\");\n map.put(\"Hi\", \"World2\");\n\n configureAnswer();\n\n testObject.remove(\"Hello\");\n\n verify(helper).fireRemove(entry(\"Hello\", \"World\"));\n\n verifyNoMoreInteractions(helper);\n }",
"int deleteByExample(UserAlbumExample example);",
"@Override\n\tpublic DbQueryStatus deleteSongById(String songId) {\n\t\tif (songId == null){\n\t\t\tdbQueryStatus.setMessage(\"parameters are missing, please double check the parameters\");\n\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_BAD_REQUEST);\n\t\t}\n\t\t// if there are some parameters missing\n\t\telse {\n\t\t\t//store the id and change the type to be used in a mongodb query\n\t\t\ttry {\n\t\t\t\tobjectId = new ObjectId(songId);\n\t\t\t} catch (Exception e) {\n\t\t\t\tdbQueryStatus.setMessage(\"The input songId is invalid\");\n\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_BAD_REQUEST);\n\t\t\t\treturn dbQueryStatus;\n\t\t\t}\n\t\t\tHashtable queryPair = new Hashtable();\n\t\t\tqueryPair.put(\"_id\", objectId);\n\t\t\tDocument query = new Document(queryPair);\n\t\t\t// interact with database for deletion\n\t\t\tif (collection.deleteOne(query).getDeletedCount() != 0) {\n\t\t\t\tdbQueryStatus.setMessage(\"Log: SongMicroService-delete operation is completed\");\n\t\t\t\t//result for server-client interaction\n\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_OK);\n\n\t\t\t\tString profileMicroDelete = \"http://localhost:3002/deleteAllSongsFromDb/{songId}\";\n\t\t\t\t// URL parameters\n\t\t\t\tMap<String, String> urlParam = new HashMap<String, String>();\n\t\t\t\turlParam.put(\"songId\", songId);\n\t\t\t\t// Query parameters\n\t\t\t\tUriComponentsBuilder builder = UriComponentsBuilder.fromUriString(profileMicroDelete);\n\t\t\t\t// communication with ProfileMicroService\n\t\t\t\tResponseEntity<String> res = restTemplate\n\t\t\t\t\t\t.exchange(builder.buildAndExpand(urlParam).toUri(), HttpMethod.PUT,\n\t\t\t\t\t\t\t\tHttpEntity.EMPTY, String.class);\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\ttry {\n\t\t\t\t\tJsonNode resJSON = mapper.readTree(res.getBody());\n\t\t\t\t\tJsonNode updateStatus = resJSON.get(\"status\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tdbQueryStatus.setMessage(\"something went wrong with profileMicroService\");\n\t\t\t\t\t//result for server-client interaction\n\t\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_GENERIC);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdbQueryStatus.setMessage(\"Error Message: SongMicroService-the post is not found in the\"\n\t\t\t\t\t\t+ \" database, delete did not complete\");\n\t\t\t\t//result for server-client interaction\n\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\t// log message no matter success or failure\n\t\tSystem.out.println(dbQueryStatus.getMessage());\n\t\tdbQueryStatus.setData(null);\n\t\treturn dbQueryStatus;\n\t}",
"@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }",
"@Test\r\n public void testRemover() {\r\n TipoItem item = new TipoItem();\r\n \r\n item.setDescricao(\"tipoItemDescrição\");\r\n TipoItemRN rn = new TipoItemRN();\r\n rn.salvar(item);\r\n \r\n if (item != null){\r\n rn.remover(item);\r\n }\r\n assertFalse(false);\r\n }",
"@Test(expected = BusinessException.class)\n public void removeNo() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n mockProductDAO.get(1L);\n times = 1;\n returns(null);\n }\n };\n\n productService.remove(pProductId);\n }",
"@Test\n public void remove() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n PartialUserBO writer = new PartialUserBO();\n writer.setId(1L);\n ProductBO product = new ProductBO();\n product.setId(1L);\n\n Date now = new Date();\n\n ProductBO productBO = new ProductBO();\n productBO.setId(1L);\n productBO.setStatus(Status.CREATED);\n\n mockProductDAO.get(1L);\n times = 1;\n returns(productBO);\n\n ProductBO productBOExpected = new ProductBO();\n productBOExpected.setId(1L);\n productBOExpected.setStatus(Status.DELETED);\n\n mockProductDAO.update(with(productBOExpected, new ProductBOMatcher(productBOExpected)));\n }\n };\n\n productService.remove(pProductId);\n }",
"@Test\n public void removeShiftCatch(){\n Shift dummy = new Shift(4, 1, 1, 1);\n shiftDAO.createShift(dummy);\n\n //test\n assertFalse(shiftDAO.removeShift(5));\n //clean up\n shiftDAO.removeShift(dummy.getShift_id());\n }",
"public AccountEdgeApiResponseMessage removeAlbumFromLibrary(String albumId, String timestamp,\n String sessionToken) {\n ResteasyWebTarget target =\n client.target(String.format(\"%s/account-edge/users/mylibrary/removealbum/%s/%s\",\n ClientConstants.getInstance().BASE_URL, albumId, timestamp));\n\n Response response =\n target.request().cookie(new NewCookie(\"sessionToken\", sessionToken)).delete();\n\n if (response.getStatus() != 200) {\n throw new RuntimeException(String.format(\"Failed : HTTP error code : %s\",\n response.getStatus()));\n }\n return response.readEntity(AccountEdgeApiResponseMessage.class);\n }",
"public void testRemoveOrder() {\n }",
"@Test\n public void removeAlreadyDELETED() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n ProductBO productBO = new ProductBO();\n productBO.setStatus(Status.DELETED);\n mockProductDAO.get(1L);\n times = 1;\n returns(productBO);\n }\n };\n\n productService.remove(pProductId);\n }",
"@Test\r\n\tvoid testdeleteProductFromCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tcart=cartdao.deleteProductByIdInCart(1001);\r\n\t\tassertEquals(1,l.size());\r\n\t}",
"@Test\n public void deleteRecipeIngredient_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeIngredient - Returns True\",true, testDatabase.deleteRecipeIngredients(returned));\n }",
"@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}",
"@Test\n public void testRemoveHub() {\n System.out.println(\"removeHub\");\n String hub = \"\";\n VM instance = null;\n instance.removeHub(hub);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\r\n public void testAdiciona() {\r\n TipoItemRN rn = new TipoItemRN();\r\n TipoItem tipoitem = new TipoItem();\r\n \r\n if (tipoitem != null){\r\n rn.remover(tipoitem);\r\n }\r\n tipoitem = new TipoItem();\r\n tipoitem.setDescricao(\"TesteAdiciona\");\r\n assertEquals(tipoitem.getDescricao(),\"TesteAdiciona\");\r\n \r\n rn.remover(tipoitem);\r\n \r\n }",
"@Test\n public void testRemove_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 1;\n boolean expResult = true;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }"
]
| [
"0.75050527",
"0.7038123",
"0.69873106",
"0.68942565",
"0.68932056",
"0.68235904",
"0.67141855",
"0.6683378",
"0.6640663",
"0.66367966",
"0.6579286",
"0.6578827",
"0.6559862",
"0.6556619",
"0.65464085",
"0.6533517",
"0.6425825",
"0.6425691",
"0.6406224",
"0.6344358",
"0.62992793",
"0.62963176",
"0.6287379",
"0.6283681",
"0.62387484",
"0.62284404",
"0.62277484",
"0.6222302",
"0.6198333",
"0.6181011",
"0.6172226",
"0.61130965",
"0.61058956",
"0.61042935",
"0.60915625",
"0.6082443",
"0.6070309",
"0.606949",
"0.60466784",
"0.6042006",
"0.5984008",
"0.597109",
"0.5963529",
"0.5957068",
"0.59473234",
"0.5943249",
"0.5941736",
"0.5885826",
"0.588041",
"0.5877654",
"0.5875449",
"0.5875207",
"0.5870027",
"0.5855455",
"0.58546466",
"0.5853791",
"0.5853154",
"0.5836573",
"0.58271116",
"0.58242154",
"0.58228266",
"0.57926214",
"0.5792449",
"0.57861173",
"0.578565",
"0.5769738",
"0.5761555",
"0.5761",
"0.5742062",
"0.5741806",
"0.5741336",
"0.5737577",
"0.57262063",
"0.57176536",
"0.5712045",
"0.5700409",
"0.56939876",
"0.5693389",
"0.56925285",
"0.5686443",
"0.56855744",
"0.56742007",
"0.5673996",
"0.56710196",
"0.56681335",
"0.5664104",
"0.5659661",
"0.56534076",
"0.5652226",
"0.5631128",
"0.5621394",
"0.56169057",
"0.5609897",
"0.56002635",
"0.55972934",
"0.5597224",
"0.55941963",
"0.55912733",
"0.5589898",
"0.5589111"
]
| 0.83585924 | 0 |
Test of addSong method, of class SongLibrary. | @Test
public void testAddSong() {
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), new HashMap<String,Rights>());
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
SongLibrary library = new SongLibrary(songs);
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), new HashMap<String,Rights>());
library.addSong(song2);
assertTrue(library.islocal(song2.getSongId()));
assertTrue(library.islocal(song1.getSongId()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}",
"@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}",
"@Test\n public void testGetSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n\n Song result = library.getSong(songId);\n assertTrue(result.getTitle().equals(\"titre2\"));\n assertTrue(result.getAlbum().equals(\"album2\"));\n assertTrue(result.getArtist().equals(\"artiste2\"));\n assertTrue(result.getSongId().equals(\"2\"));\n\n }",
"public void addSong(Song song)\n {\n if( !songs.contains(song)) {\n songs.add(song);\n System.out.println(\"song added successfully.\");\n }\n else\n System.out.println(\"this song is already in the collection.\");\n }",
"public void addSong(String song){\n\t\tqueueInsertion(song);\n\t}",
"boolean addSong(Song in)\n\t\tthrows IllegalArgumentException, NullPointerException;",
"@Ignore(\"Function written without GUI for JUnit Testing\")\r\n public Song AddSongTest(String SongTitle, String SongArtist, String SongDuration, String SongFile,HashST<String,Song> songs) {\r\n String empty = \"\";\r\n String fileformat = \"([a-zA-Z0-9\\\\s_\\\\\\\\.\\\\-\\\\(\\\\):])+(.avi|.mp4|.mkv|.mov)$\";\r\n\r\n if (SongTitle.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongArtist.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongDuration.equalsIgnoreCase(empty)) {\r\n return null;\r\n\r\n } else if ((!intCheck(SongDuration)) || (SongDuration.equalsIgnoreCase(\"0\"))) {\r\n return null;\r\n\r\n } else if (SongFile.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (!SongFile.matches(fileformat)) {\r\n return null;\r\n }\r\n\r\n int b = Integer.parseInt(SongDuration);\r\n\r\n if(songs.get(SongTitle.toLowerCase())==null) {\r\n Song addsong = new Song(SongTitle, SongArtist, b, SongFile);\r\n return addsong;\r\n }\r\n else {\r\n return null;\r\n }\r\n\r\n\r\n }",
"void add(Song song) {\n songlist.add(song);\n }",
"public void addSong(Song song) {\n\t\tsongs.add(song);\n\t}",
"public void addSong(Song s) \r\n {\r\n \tSong mySong = s;\r\n \t\r\n \t//Adding to the first HashTable - the Title One\r\n \tmusicLibraryTitleKey.put(mySong.getTitle(), mySong);\r\n \t \r\n \t// Checking if we already have the artist\r\n \t if(musicLibraryArtistKey.get(mySong.getArtist()) != null)\r\n \t {\r\n \t\t //Basically saying that get the key (get Artist) and add mySong to it (i.e. the arraylist)\r\n \t\t musicLibraryArtistKey.get(mySong.getArtist()).add(mySong);\r\n \t }\r\n \t \r\n \t // If artist is not present, we add the artist and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryArtistKey.put(mySong.getArtist(), arrayListOfSongs);\r\n \t }\r\n \t \r\n \t// Checking if we already have the year\r\n \t if (musicLibraryYearKey.get(mySong.getYear()) != null)\r\n \t {\r\n \t \t musicLibraryYearKey.get(mySong.getYear()).add(mySong);\r\n \t }\r\n \t \r\n \t// If year is not present, we add the year and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryYearKey.put(mySong.getYear(), arrayListOfSongs);\r\n \t }\r\n\t\r\n }",
"public boolean addSongstoAlbums(String songTitle, double songDuration){\n\n if(findSong(songTitle) == null){\n songAlbum.add(new Song(songTitle, songDuration));\n return true;\n }\n System.out.println(\"Song already exist\");\n return false;\n }",
"@Test\n public void testGetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n ArrayList<Song> expResult = songs;\n ArrayList<Song> result = library.getlibrary();\n assertEquals(expResult, result);\n\n }",
"public void addSong(Song aSong)\n {\n if(countSong==playlist.length)\n {\n increaseSize();\n }\n playlist[countSong] = aSong;\n countSong++;\n }",
"public boolean addSong(Song s) {\n\t\tthis.songList.add(this.songList.size(), s);\n\t\treturn true;\n\t}",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"@Test\n public void testRemoveSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"1\";\n \n library.removeSong(songId);\n \n assertFalse(library.islocal(\"1\"));\n assertTrue(library.islocal(\"2\"));\n \n\n }",
"public static boolean addSong(Song detail) {\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.addSongs(detail);\n\n\t}",
"@POST @PUT @Path(\"/id/{albumId}/songs/{songName}\")\n public void addSong(@PathParam(\"albumId\") String albumId,\n @PathParam(\"songName\") String songName) {\n return;\n }",
"public void addSong(Song song) {\n\t\t\n\t\tString title = song.getTitle();\n\t\tString artist = song.getArtist();\n\t\tString id = song.getTrackId();\n\t\tArrayList<String> tags = song.getTags();\n\t\t\n\t\tif(!this.titleMap.containsKey(title)) {\n\t\t\tthis.titleMap.put(title, new TreeSet<Song>(new TitleComparator()));\n\t\t}\n\t\t\n\t\tTreeSet<Song> titleTmp = this.titleMap.get(title);\n\t\ttitleTmp.add(song);\n\t\t\n\t\tif(!this.artistMap.containsKey(artist)) {\n\t\t\tthis.artistMap.put(artist, new TreeSet<Song>(new ArtistComparator()));\n\t\t}\n\t\t\n\t\tTreeSet<Song> artistTmp = this.artistMap.get(artist);\n\t\tartistTmp.add(song);\n\t\t\n\t\tfor(String tag: tags) {\n\t\t\tif(!this.tagMap.containsKey(tag)) {\n\t\t\t\tthis.tagMap.put(tag, new TreeSet<String>(new StringComparator()));\n\t\t\t}\n\t\t\t\n\t\t\tTreeSet<String> tagTmp = this.tagMap.get(tag);\n\t\t\ttagTmp.add(id);\n\t\t}\n\t\t\n\t\tif(!this.idMap.containsKey(id)) {\n\t\t\tthis.idMap.put(id, song);\n\t\t}\n\t\t//if(!this.artistList.contains(artist))\n\t\t\t//this.artistList.add(artist);\n\t}",
"public void addSong(SongEntry e)\n\t\t{\t\t\t\t\n\t\t\t\tdata.add(e);\n\t\t\t\tcount++;\n\t\t}",
"@Override\n\tpublic DbQueryStatus addSong(Map songParams) {\n\t\tif (songParams == null){\n\t\t\tdbQueryStatus.setMessage(\"parameters are missing, please double check the parameters\");\n\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_BAD_REQUEST);\n\t\t}\n\t\t// if there are some parameters missing\n\t\telse {\n\t\t\ttry {\n\t\t\t\t// create a song object\n\t\t\t\tString songName = (String) songParams.get(\"songName\");\n\t\t\t\tString songArtist = (String) songParams.get(\"songArtistFullName\");\n\t\t\t\tString songAlbum = (String) songParams.get(\"songAlbum\");\n\t\t\t\tSong songToAdd = new Song(songName, songArtist, songAlbum);\n\n\t\t\t\t// convert the song object to a document object for data base addition\n\t\t\t\tDocument songDoc = converter.toDocument(songToAdd);\n\t\t\t\t// interaction with database\n\t\t\t\tcollection.insertOne(songDoc);\n\n\t\t\t\t// encapsulation of log message\n\t\t\t\tdbQueryStatus\n\t\t\t\t\t\t.setMessage(\"Addition is complete, song got added to the data base successfully\");\n\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_OK);\n\t\t\t\tSystem.out.println(dbQueryStatus.getMessage());\n\n\t\t\t\t// update the Object ID to the song object\n\t\t\t\tDocument docAdded = (Document) collection.find(songDoc).iterator().next();\n\t\t\t\tsongToAdd.setId(docAdded.getObjectId(\"_id\"));\n\t\t\t\t// add the updated song object as the data\n\t\t\t\tdbQueryStatus.setData(songToAdd);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tdbQueryStatus.setMessage(\"Song addition failed\");\n\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_GENERIC);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dbQueryStatus.getMessage());\n\t\treturn dbQueryStatus;\n\t}",
"@Test\n public void addAlbumTest() throws InvalidResourceRequestException {\n loginAndSetupNewUser(username);\n\n // Add new album, and retrieve the returned id\n Response response = apiClient.addAlbum(albumName, description);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n long albumId = gson.fromJson(response.readEntity(String.class), Receipt.class).getReferenceId();\n\n // Check server has record of album\n Album album = resolver.getAlbum(albumId);\n assertEquals(albumName, album.getAlbumName());\n assertEquals(description, album.getDescription());\n }",
"public void addSong(String id, int album_id, String title, double length, int track) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ID, id);\n values.put(KEY_HOST, host);\n values.put(KEY_ALBUM_ID, album_id);\n values.put(KEY_TITLE, title);\n values.put(KEY_LENGTH, length);\n values.put(KEY_TRACK, track);\n\n long insertedId = db.insert(TABLE_SONG, null, values);\n db.close(); // Closing database connection\n }",
"@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }",
"public void addToPlaylist(Song song){\n playlist.add(song);\n playlistTime = playlistTime + song.getLength();\n }",
"public ArrayList addSong(Song newSong) {\n Library.add(newSong);\n return Library;\n }",
"public boolean AddSong(Song toAdd) {\n\t\t// Don't add if the song is already in the play list.\n\t\tif (songList.contains(toAdd))\n\t\t\treturn false;\n\n\t\tsongList.add(toAdd);\n\t\treturn true;\n\t}",
"public boolean addSongstoPlaylist(String songTitle, List<Song> songLinkedList){\n Song checkedSong = findSong(songTitle);\n if(checkedSong != null){\n songLinkedList.add(checkedSong);\n return true;\n }\n System.out.println(\"The song \" + songTitle + \" is not in the playlist\");\n return false;\n }",
"@Test\n\tpublic void addTrack_Test() throws Exception {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.playlist \n\t\t\t\t) {\n\t\t\tstart();\n\t\t\tFile file = new File(\"media/note.mp3\");\n\t\t\tgui.addTrack(\"note\",file);\t\n\t\t}\n\t}",
"public void addSong(SCSong song) throws IOException {\n\t\t//TABLE_RSS = getTableName();\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(SONG_KEY_ID, song.getId()); //song ID\n\t\tvalues.put(SONG_KEY_TITLE, song.getTitle()); // song title\n\t\tvalues.put(SONG_KEY_STREAM_URL, song.getStream().streamUrl); // song stream url\n\t\tvalues.put(SONG_KEY_ARTWORK_URL, song.getArtworkUrl()); // song artwork img\n\t\tvalues.put(SONG_KEY_ARTIST, song.getUser().getId()); // song ID OF ARTIST\n\t\tvalues.put(SONG_KEY_DURATION, song.getDuration());\n\t\tvalues.put(SONG_KEY_GERNE, song.getGenre()); // song gerne\n\t\tvalues.put(SONG_KEY_TAG, song.getTagList()); // song tag list\n\t\tSystem.out.println (\"DATABASE = \" + song.getId() );\n\t\t// Check if row already existed in database\n\t\tif (!isSongExists(db, song.getId())) {\n\t\t\t// site not existed, create a new row\n\t\t\tdb.insert(SONG_TABLE_NAME, null, values);\n\t\t\tdb.close();\n\t\t} else {\n\t\t\t// site already existed update the row\n\t\t\tupdateSong(song);\n\t\t\tdb.close();\n\t\t}\n\t\t\n\t\tArtistSCDatabaseTable artistSCDatabaseTable = ArtistSCDatabaseTable.getInstance(MusicPlayerMainActivity.getActivity());\n\t\tartistSCDatabaseTable.addArtist(song.getUser());\n\t}",
"public void testGetSongTitle()\r\n {\r\n assertTrue(songTitle.equals(song.\r\n getSongTitle()));\r\n }",
"public static void saveSongInNewPlaylist()\n {\n int playlistNumber = (PlaylistXmlFile.getNumberOfPlaylist()+1);\n Artist artist = new Artist (\"Unknown Artist\",1);\n Song song = new Song (JSoundsMainWindowViewController.songName,artist,1,0,findGender(songName));\n PlaylistXmlFile.savePlaylistSongsInDataBase(song,playlistNumber);\n }",
"public void addPlaylistSong(int playlist_id, String song_id) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_HOST, host);\n values.put(KEY_PLAYLIST_ID, playlist_id);\n values.put(KEY_SONG_ID, song_id);\n\n long insertedId = db.insert(TABLE_PLAYLIST_SONG, null, values);\n db.close(); // Closing database connection\n }",
"public void saveSong(Song s)\n\t{\n\t\tsavedSongs.addSong(s);\n\t}",
"public AccountEdgeApiResponseMessage addSongToLibrary(String songId, String sessionToken) {\n ResteasyWebTarget target =\n client.target(String.format(\"%s/account-edge/users/mylibrary/addsong/%s\",\n ClientConstants.getInstance().BASE_URL, songId));\n\n Response response =\n target.request().cookie(new NewCookie(\"sessionToken\", sessionToken))\n .put(Entity.entity(songId, MediaType.APPLICATION_JSON));\n\n if (response.getStatus() != 200) {\n throw new RuntimeException(String.format(\"Failed : HTTP error code : %s\",\n response.getStatus()));\n }\n return response.readEntity(AccountEdgeApiResponseMessage.class);\n }",
"@Test\n\tpublic void testAddBook() {\n\t\t//System.out.println(\"Adding book to bookstore...\");\n\t\tstore.addBook(b5);\n\t\tassertTrue(store.getBooks().contains(b5));\n\t\t//System.out.println(store);\n\t}",
"public boolean addSongstoPlaylist(int trackNumber, List<Song> songLinkedList){\n int index = trackNumber - 1;\n if(index >= 0 && index <= this.songAlbum.size()){\n songLinkedList.add(this.songAlbum.get(index));\n return true;\n }\n System.out.println(\"This playlist does not have a track \" + trackNumber);\n return false;\n }",
"public void addSongToPlayList(String playListTitle, String description, String songDirectory) {\n if (!playListPanels.containsKey(playListTitle)) {//if this playlist doesn't exist.\n createPlayList(playListTitle, description);//creating new one\n }\n try {//adding song to playlist\n MP3Info currentSong = new MP3Info(songDirectory);//creating mp3 info file\n AlbumPanel songAlbum = albumPanels.get(currentSong.getAlbum());//getting song's album\n for (SongPanel songPanel : songAlbum.getSongPanels()) {\n if (songPanel.getMp3Info().getTitle().equals(currentSong.getTitle())) {//if we found that song\n playListPanels.get(playListTitle).getPlayListSongs().add(songPanel);//adding to given playlist\n playListPanels.get(playListTitle).updateImage();//updating playlist image\n break;\n }\n }\n } catch (IOException | NoSuchFieldException e) {\n JOptionPane.showMessageDialog(null, \"Error reading mp3 file\", \"An Error Occurred\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public boolean addSongToPlayList(int trackNumber, Album album) {\n int index = trackNumber - 1;\n\n if (index >= 0 && index < album.getAlbum().size()) {\n this.playlist.add(album.getAlbum().get(index));\n return true;\n }\n \n System.out.println(\"This album does not have a track \" + trackNumber);\n return false;\n }",
"public void addSong(SongRecord song, int position) throws IllegalArgumentException, FullPlaylistException\n\t{\n\t\tif(numOfSongs >= MAX_SONGS)\n\t\t\tthrow new FullPlaylistException(\"This playlist is full.\");\n\t\telse if(position < 1 || position > (numOfSongs+1) || position > MAX_SONGS)\n\t\t\tthrow new IllegalArgumentException(\"Position must be 1 - \" + (numOfSongs+1));\n\t\telse\n\t\t{\n\t\t\tfor(int i = numOfSongs; i >= position; i--)\n\t\t\t{\n\t\t\t\tthis.song[i] = this.song[i-1];\n\t\t\t}\n\t\t\tthis.song[position-1] = song;\n\t\t\tnumOfSongs++;\n\t\t\tupdateTable();\n\t\t}\n\t}",
"public static void addSong(String binaryFile){\r\n \r\n //Input from user how many songs to add\r\n int numberOfSongs = Input.getInt(\"How many songs would you like to add? \");\r\n \r\n //Array of Songs with size of that number of songs\r\n Song[] songArray = new Song[numberOfSongs];\r\n \r\n //Process through array\r\n for (int i = 0; i < numberOfSongs; i++){\r\n songsEntered += 1; //Increase songsEntered as song is being entered\r\n String appendange = \" of Song \" + songsEntered + \"?\"; //Common appendange for all user prompts\r\n //Each element of the array is a new Song given the arguments from user prompts\r\n songArray[i] = new Song(Input.getString(\"What is the title\" + appendange), Input.getString(\"Who is the artist\" + appendange), Input.getString(\"What is the genre\" + appendange));\r\n }\r\n //Create a new SongBinaryFileProcessor because need to use instance methods\r\n SongBinaryFileProcessor songBinaryFileProcessor = new SongBinaryFileProcessor();\r\n \r\n //Write to the song given the binaryFile argument and the songArray formed from user prompting\r\n songBinaryFileProcessor.writeSong(binaryFile, songArray);\r\n \r\n //Display confirmation that song(s) added\r\n if (numberOfSongs == 1){\r\n System.out.println(\"Song added!\");\r\n }\r\n else{\r\n System.out.println(\"Songs added!\");\r\n }\r\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 }",
"@Test(expected = NullPointerException.class)\n public void testSelectSongNoSong()\n {\n MusicPlayer.getInstance().selectSong(\"foo\");\n }",
"@Test\n public void testAddCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String name = \"karate\";\n Rights rights = new Rights(false, true, false, true);\n library.addCategory(name, rights);\n \n assertTrue(library.getSong(\"1\").getRightsByCategory().containsKey(\"karate\"));\n assertTrue(library.getSong(\"2\").getRightsByCategory().containsKey(\"karate\"));\n\n }",
"public void testGetArtistName()\r\n {\r\n assertTrue(artistName.equals(song.\r\n getArtistName()));\r\n }",
"private void addSongButtonActionListener(JButton addSongButton) {\n addSongButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n String songName = JOptionPane.showInputDialog(\"Enter the song name: \");\n String artist = JOptionPane.showInputDialog(\"Enter the artist's name: \");\n Song song = new Song(songName, artist);\n queue.addSong(song);\n JOptionPane.showMessageDialog(null, song.description() + \" has been successfully added to queue!\");\n }\n });\n }",
"public void addMusic(Music music) {\n\t\tmusicdao.insertMusic(music);\r\n\t\t\r\n\t}",
"public int addSongToPlayList(){\n\t\t\n\t\tint pos =0;\n\t\t\n\t\tboolean out = false;\n\t\t\n\t\tfor(int i=0; (i<songList.length)&&(out==false);i++){\n\t\t\n\t\tif(songList[i] == null){\n\t\t\tout = true;\n\t\t\tpos = i;\n\t\t}\n\t\t}\n\t\treturn pos;\n\t}",
"public void addAlbum(int id, int artist_id, String name, String cover) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ID, id);\n values.put(KEY_HOST, host);\n values.put(KEY_ARTIST_ID, artist_id);\n values.put(KEY_NAME, name);\n values.put(KEY_COVER, cover);\n\n long insertedId = db.insert(TABLE_ALBUM, null, values);\n db.close(); // Closing database connection\n }",
"@Test\n public void testAddItem() {\n \n System.out.println(\"AddItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n assertEquals(instance.getItemCount(), 4, 0.0);*/\n \n /*----------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n assertTrue(instance.findProduct(\"Galletas\"));\n \n }",
"public void addAtOnce(Song mySong){\n boolean out = false; \n for(int i = 0; i<MAX_SONGS_PLAYLIST && !out; i++){\n if(playSongs[i] == null){\n playSongs[i] = mySong;\n out = true;\n }\n }\n \n }",
"public AddSong(String title) {\n id = title;\n initComponents();\n }",
"public void addPlaylist(Playlist playlist){\n this.playlists.put(playlist.getName(), playlist);\r\n playlist.getSongs().forEach((title, song) -> {\r\n this.home.addSong((Song) song);\r\n\r\n });\r\n }",
"public boolean addToPlayList(int trackNumber, LinkedList<Song> playList){\n\n Song checkedSong = this.songArrayList.findSong(trackNumber);\n if (checkedSong != null){\n playList.add(checkedSong);\n return true;\n }\n System.out.println(\"This album does not have a track \" +trackNumber);\n return false;\n }",
"@Test\n public void testIslocal() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n boolean result = library.islocal(songId);\n assertTrue(result);\n\n }",
"public void handleAddAlbumEvent(String title, String artists, String releaseDate,\n String nrOfSongs, String length, String genres){\n ArrayList<String> genre = new ArrayList<>();\n ArrayList<Artist> artist = new ArrayList<>();\n genre.add(genres);\n Artist a1 = new Artist(artists, \"British\");\n artist.add(a1);\n /////////////////////////////////////////////\n\n new Thread() {\n public void run(){\n try {\n ac.insertRecord(new Album(genre,title,artist,releaseDate,length,Integer.parseInt(nrOfSongs)));\n }\n catch (Exception e){\n javafx.application.Platform.runLater(\n new Runnable() {\n public void run() {\n Alert alert = new Alert(Alert.AlertType.INFORMATION, \"Wrong format. Example: ('title', 'name', 'yyyy-mm-dd', 10, 30, 'Rock' \");\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.showAndWait();\n }\n });\n }\n\n ArrayList<Album> albums = ac.getAllRecords();\n javafx.application.Platform.runLater(\n new Runnable() {\n public void run() {\n view.updateTextArea(albums);\n }\n });\n }\n }.start();\n }",
"public void addSong(String songName, String youtubeLink, String youtubeTitle, int viewCount, Date newestDate, Date oldestDate, int playCount, int id) throws IOException, SQLException {\n\t\tStatement s = derbyConn.createStatement();\n\t\tboolean add = true;\n\t\tsongName = songName.replace(\"'\", \"''\");\n\t\tyoutubeTitle = youtubeTitle.replace(\"'\", \"''\");\n\t\t\n\t\tResultSet results = s.executeQuery(\"select count(*) from \"+tableName + \" where SONG_NAME = '\" + songName + \"'\");\n\t\twhile(results.next()){\n\t\t\tif(Integer.parseInt(results.getString(1)) != 0){\n\t\t\t\tadd = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add song if it doesn't exist\n\t\tif(!songExists(songName) && add) {\n\t\t\tSystem.out.println(\"Adding: \"+youtubeTitle);\n\t\t\ts.execute(\"insert into \"+tableName+\" (ID, SONG_NAME, YOUTUBE_LINK, YOUTUBE_TITLE, VIEW_COUNT, NEWEST_DATE, OLDEST_DATE, PLAY_COUNT) values\"\n\t\t\t\t\t+ \" (\" + id + \", '\" +songName+\"', '\"+youtubeLink+\"', '\"+youtubeTitle+\"', \"+viewCount+\", '\"+sdf.format(newestDate)+\"', '\"+sdf.format(oldestDate)+\"', \"+playCount+\")\");\n\t\t// Else skip\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"ignored playlisttable add\");\n\t\t}\n\t\ts.close();\n\t}",
"public void addAlbum(Album album)\r\n {\r\n\talbumCollection.add(album);\r\n }",
"public void addMedia(String title) {\n\t\tScanner s = LibraryDriver.s;\n\t\tfor(Media m:LibrarySystem.getInstance().inventory) {\n\t\t\tif(m.title.equals(title)) {\n\t\t\t\tSystem.out.println(\"This item is already present within the system. Would you like to add another copy? (Y/N)\");\n\t\t\t\tString result = s.nextLine();\n\t\t\t\tif(result.toUpperCase().equals(\"Y\")) {\n\t\t\t\t\tm.copy();\n\t\t\t\t\tm.copyCountUp();\n\t\t\t\t\tSystem.out.println(\"Success! New copy added.\");\n\t\t\t\t\tm.returnMedia();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t} \n\t\t}\n\t\tSystem.out.println(\"Please input the following information for this piece of media:\");\n\t\tSystem.out.println(\"Media type:\");\n\t\tString mediaType = s.nextLine();\n\t\tSystem.out.print(\"Genre: \");\n\t\tString newGenre = s.next();\n\t\ts.nextLine();\n\t\tSystem.out.print(\"Description: \");\n\t\tString newDesc = s.next();\n\t\ts.nextLine();\n\t\tSystem.out.print(\"Year of Release: \");\n\t\tString newYear = s.next();\n\t\ts.nextLine();\n\t\tSystem.out.print(\"New Release (true/false): \");\n\t\tboolean newRelease = s.nextBoolean();\n\t\tif(mediaType.toUpperCase().equals(\"AUDIOBOOK\")) {\n\t\t\tSystem.out.print(\"Author: \");\n\t\t\tString newAuth = s.next();\n\t\t\ts.nextLine();\n\t\t\tSystem.out.print(\"Narrator: \");\n\t\t\tString newNarr = s.next();\n\t\t\tAudioBook temp = new AudioBook(title,newGenre,newDesc,newYear,newRelease,1,newAuth,newNarr);\n\t\t\tSystem.out.println(\"Success! New audiobook added.\");\n\t\t\tnotifyWishlists(title);\n\t\t\treturn;\n\t\t}\n\t\tif(mediaType.toUpperCase().equals(\"BOOK\")) {\n\t\t\tSystem.out.print(\"Author: \");\n\t\t\tString newAuth = s.next();\n\t\t\ts.nextLine();\n\t\t\tSystem.out.print(\"ISBN: \");\n\t\t\tString newISBN = s.next();\n\t\t\ts.nextLine();\n\t\t\tSystem.out.print(\"Publisher: \");\n\t\t\tString newPubl = s.next();\n\t\t\ts.nextLine();\n\t\t\tBook temp = new Book(title,newGenre,newDesc,newYear,newRelease,1,newAuth,newISBN,newPubl);\n\t\t\tSystem.out.println(\"Success! New book added.\");\n\t\t\tnotifyWishlists(title);\n\t\t\treturn;\n\t\t}\n\t\tif(mediaType.toUpperCase().equals(\"DVD\")) {\n\t\t\tSystem.out.print(\"Director: \");\n\t\t\tString newActors = s.next();\n\t\t\tDVD temp = new DVD(title,newGenre,newDesc,newYear,newRelease,1,newActors);\n\t\t\tSystem.out.println(\"Success! New DVD added.\");\n\t\t\tnotifyWishlists(title);\n\t\t\treturn;\n\t\t}\n\t\tif(mediaType.toUpperCase().equals(\"EBOOK\")) {\n\t\t\tSystem.out.print(\"Author: \");\n\t\t\tString newAuth = s.next();\n\t\t\ts.nextLine();\n\t\t\tEBook temp = new EBook(title,newGenre,newDesc,newYear,newRelease,1,newAuth);\n\t\t\tSystem.out.println(\"Success! New Ebook added.\");\n\t\t\tnotifyWishlists(title);\n\t\t\treturn;\n\t\t}\n\t\tif(mediaType.toUpperCase().equals(\"MAGAZINE\")) {\n\t\t\tSystem.out.print(\"Author: \");\n\t\t\tString newAuth = s.next();\n\t\t\ts.nextLine();\n\t\t\tSystem.out.print(\"Volume: \");\n\t\t\tint newVol = s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tSystem.out.print(\"Publisher: \");\n\t\t\tint newIssue = s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tMagazine temp = new Magazine(title,newGenre,newDesc,newYear,newRelease,1,newAuth, newVol, newIssue);\n\t\t\tSystem.out.println(\"Success! New magazine added.\");\n\t\t\tnotifyWishlists(title);\n\t\t\treturn;\n\t\t}\n\t}",
"public static boolean addMusicToPlaylist(String username, String playlist, String music, String clientData){\n String optional = null;\n //Open a database connection\n if (Connect.connect(clientData)){\n //Basic checks\n if (!checkExistenceAndOwner(username, clientData, playlist)){\n return false;\n }\n\n //Check if music exists\n if (!CheckExistence.musicExists(music)){\n System.out.println(clientData + \" | \" + username\n + \" | Music not found.\");\n return false;\n }\n\n try{\n //Add playlist_music table\n Statement statement = Connect.connection.createStatement();\n statement.executeUpdate(\"INSERT INTO playlist_music (playlist_nplaylist, music_nmusic) \" +\n \"VALUES ((SELECT nplaylist FROM playlist WHERE p_name=\\\"\" + playlist + \"\\\"),\" +\n \"(SELECT nmusic FROM music WHERE m_name=\\\"\" + music + \"\\\"));\");\n Connect.disconnect(clientData);\n return true;\n } catch (SQLException e) {\n if (e.getMessage() != null) optional = e.getMessage();\n if (Request.DEV_MODE) e.printStackTrace();\n System.out.println(clientData + \" | \" + username\n + \" | Failed to add music to playlist \" + (optional==null?\".\":\" | \" + optional));\n return false;\n }\n }\n return false;\n }",
"void startMusic(AudioTrack newSong);",
"@Test\n void addItem() {\n }",
"public void addAlbum(String albumTitle, ArrayList<MP3Info> albumMusicsInfo) {\n if (!albumPanels.containsKey(albumTitle)) {//if album is a new album\n AlbumPanel albumPanel = createAlbumPanel(albumMusicsInfo);\n albumPanels.put(albumTitle, albumPanel);\n allSongPanels.addAll(albumPanel.getSongPanels());//adding to all song panels,help to show them when user click songs button.\n\n showHome();//showing home after created new album to show it's added.\n } else//if album added before we just add new songs\n albumPanels.get(albumTitle).addNewSongs(albumMusicsInfo, this);\n\n }",
"void addAfter(String title, Song song) {\n Song selectedSong = lookupTitle(title);\n if (selectedSong != null) {\n int index = songlist.indexOf(selectedSong);\n if (index != -1)\n songlist.add(index+1, song);\n else\n songlist.add(song);\n }\n else\n songlist.add(song);\n }",
"void addBefore(String title, Song song) {\n Song selectedSong = lookupTitle(title);\n if (selectedSong != null) {\n int index = songlist.indexOf(selectedSong);\n if (index != -1)\n songlist.add(index, song);\n else\n songlist.add(song);\n }\n else\n songlist.add(song);\n }",
"@Override\n public void addSong(Song song) throws DuplicateException {\n try {\n em.persist(song);\n } catch (Exception ex) {\n logger.log(Level.SEVERE, \"Cannot create a new song due to: {0}\", ex.getMessage());\n if (ex.getCause() instanceof ConstraintViolationException) {\n throw new DuplicateException();\n }\n throw ex;\n }\n }",
"@Test\n void addItem() {\n\n }",
"public static void nextSong()\n {\n MusicPlayerControl.nextSong();\n }",
"public static void main(String[] args) {\n\n\n\n\n Album album = new Album(\"Ramachandrachar\", \"Ninna Olumeinda\");\n album.addSong(\"ninna olumeinda\", 5.65);\n album.addSong(\"yaru olidarenu\", 4.43);\n album.addSong(\"udaya astamanavembo\", 3.20);\n album.addSong(\"poppu hogona\", 5.28);\n album.addSong(\"Anyarindali sukavaitu\", 6.71);\n album.addSong(\"barayya bakutara priya\", 4.84);\n albums.add(album);\n\n album = new Album(\"Vidyabhushan\", \"nammama sharade\");\n album.addSong(\"pillangoviya\", 7.85);\n album.addSong(\"nammama sharade\", 4.12);\n album.addSong(\"gubbiyalo\", 6.58);\n album.addSong(\"laali govinda laali\", 8.25);\n album.addSong(\"mudukara vrutti\", 4.56);\n albums.add(album);\n\n LinkedList<Song> playList = new LinkedList<Song>();\n albums.get(0).addToPlayList(\"ninna olumeinda\", playList);\n albums.get(0).addToPlayList(\"hange madalayya krishna\", playList);\n albums.get(0).addToPlayList(5, playList);\n albums.get(0).addToPlayList(2, playList);\n albums.get(1).addToPlayList(1, playList);\n albums.get(1).addToPlayList(4, playList);\n albums.get(1).addToPlayList(3, playList);\n albums.get(1).addToPlayList(7, playList); //does not exsit\n\n play(playList);\n }",
"@Test\n public void testToevoegen_Album() {\n System.out.println(\"toevoegen album\");\n Album album = new Album(\"Album\", 2020, nummers);\n instance.toevoegen(album);\n ArrayList<Nummer> expResult = nummers;\n ArrayList<Nummer> result = instance.getAlbumNummers();\n assertEquals(expResult, result);\n }",
"@Test\n public void testAddPlayer() {\n System.out.println(\"addPlayer\");\n Player player = new Player(\"New Player\");\n Team team = new Team();\n team.addPlayer(player);\n assertEquals(player, team.getPlayers().get(0));\n }",
"@Test\n public void testAdd(){\n DogHouse testDogHouseAdd = new DogHouse();\n Integer expected = 1;\n\n Dog newDog = new Dog (\"Scully\", new Date(), 1);\n testDogHouseAdd.add(newDog);\n\n Integer actual = testDogHouseAdd.getNumberOfDogs();\n\n Assert.assertEquals(expected, actual);\n }",
"@Test\n public void testaddPlayer() {\n session.addPlayer(new Player(\"127.0.0.1\", \"Lars\"));\n // Test if the size of the list now is 2.\n assertEquals(2, session.getPlayers().size());\n }",
"public void doCreateAlbum()\n/* */ {\n/* 52 */ AlbumDTO dto = new AlbumDTO();\n/* 53 */ dto.setName(\"Neues Album\");\n/* 54 */ dto = this.galleryManager.saveAlbum(dto);\n/* 55 */ this.albumList.add(dto);\n/* */ }",
"private void SaveAlbum() {\n }",
"Song(Ensemble pEnsemble, String pTitle) {\n\t\tthis.mEnsemble = pEnsemble;\n\t\tthis.mTitle = pTitle;\n\t\tmYearReleased = 0;\n\t}",
"@Override\r\n public void getNextSongAndPlaySuccess(SyncListenerSongInfo syncListenerSongInfo) {\n }",
"@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }",
"@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }",
"public void removeSong(Song song) {\n\n for(int ii = 0; ii < Library.size(); ii++) {\n if(Library.get(ii).equals(song)) {\n Library.remove(ii);\n }\n \n }\n }",
"@Test\n\tpublic void testAddRecipe(){\n\t\t\n\t\ttestingredient1.setName(\"Peanut Butter\");\n\t\ttestingredient2.setName(\"Jelly\");\n\t\ttestingredient3.setName(\"Bread\");\n\t\t\n\t\t\n\t\tingredients.add(testingredient1);\n\t\tingredients.add(testingredient2);\n\t\tingredients.add(testingredient3);\n\t\t\n\t\ttestRecipe.setName(\"PB and J\");\n\t\ttestRecipe.setDescription(\"A nice, tasty sandwich\");\n\t\ttestRecipe.setIngredients(ingredients);\n\t\t\n\t\ttest2.saveRecipe(testRecipe);\n\t\t//test2.deleteRecipe(testRecipe);\n\t}",
"public void testGetGenre()\r\n {\r\n assertTrue(genre.equals(song.getGenre()));\r\n }",
"@Test\n public void testDeletePlaylist(){\n Playlist playlist = new Playlist();\n playlist.setId(ID);\n playlist.setGenre(GENRE);\n playlist.setDescription(DESCRIPTION);\n ReturnValue ret = Solution.deletePlaylist(playlist);\n assertEquals(NOT_EXISTS, ret);\n ret = Solution.addPlaylist(playlist);\n assertEquals(OK, ret);\n Playlist retrieved = Solution.getPlaylist(ID);\n assertEquals(playlist, retrieved);\n ret = Solution.deletePlaylist(playlist);\n assertEquals(OK, ret);\n retrieved = Solution.getPlaylist(ID);\n assertEquals(Playlist.badPlaylist(), retrieved);\n }",
"public void addAlbum(String fileName) throws FileNotFoundException\n {\n String albumTitle = JOptionPane.showInputDialog(null, \"Enter an album name:\");\n albumTitle = albumTitle.replaceAll(\" \", \"_\");\n \n Collections.sort(catalog);\n int index = Collections.binarySearch(catalog, new Album(\"\",albumTitle,null), null);\n //this is to make sure we do not have duplicate albums\n if(index < 0) \n {\n String artistName = JOptionPane.showInputDialog(null, \"Enter the artist name:\");\n artistName = artistName.replaceAll(\" \", \"_\");\n \n FileOutputStream fos = new FileOutputStream(new File(fileName),true);\n PrintWriter pw = new PrintWriter(fos);\n \n String[] buttons = {\"I understand.\", \"I do not understand.\"};\n int selection = JOptionPane.showOptionDialog(null, \"You will now \"\n + \"enter the songs that belong on the album.\\nEnter ONE \"\n + \"song at a time. When finished adding songs, just \"\n + \"press cancel.\", \"Instructions.\", JOptionPane.YES_OPTION,\n JOptionPane.WARNING_MESSAGE, null, buttons, buttons[0]);\n \n if(selection == 0) //user understands the instructions\n {\n pw.print(artistName + \" \" + albumTitle);\n ArrayList<Track> albumsTracks = new ArrayList<>();\n\n String song = JOptionPane.showInputDialog(null, \"Submit song #1:\");\n for(int i=2; song != null; i++)\n {\n song = song.replaceAll(\" \", \"_\");\n pw.print(\" \" + song);\n albumsTracks.add(new Track(song));\n song = JOptionPane.showInputDialog(null, \"Submit song #\"+i+\":\");\n }\n pw.println();\n pw.close();\n JOptionPane.showMessageDialog(null,\n \"Album has successfully been written to '\" + fileName +\"'!\");\n \n Album newAlbum = new Album(artistName, albumTitle, albumsTracks);\n catalog.add(newAlbum); //here we put our new album in the \n Collections.sort(catalog); //general catalog and sort it by albums.\n }\n else //the user didn't understand the above instructions.\n //so the artist and album that the user entered is not printed.\n //since promptMenu() is recursive, we go back to the menu.\n JOptionPane.showMessageDialog(null, \"Going back to the menu now...\");\n }\n else //duplicate album found!\n System.out.println(\"Album '\" + albumTitle + \"' already exists in the catalog!\");\n }",
"void add(MockAPI mockAPI);",
"@Test\n public void addExerciseTest() {\n\n actual.addExercise(\"new exercise\");\n\n Assert.assertEquals(Arrays.asList(EXPECTED_EXERCISES), actual.getExercises());\n }",
"private void addSongToDataBase(int position){\n ContentValues values = getSongData(position);\n Uri uri = mainActivity.getContentResolver().insert(\n FavoriteSongProvider.CONTENT_URI, values);\n Toast.makeText(mainActivity.getBaseContext(),\n uri.toString(), Toast.LENGTH_LONG).show();\n }",
"@Test\n public void addPublisherTest() {\n Mockito.when(this.repo.save(testPublisher1)).thenReturn(testPublisher1);\n Publisher resultFromService = this.publisherService.addOne(testPublisher1);\n assertTrue(resultFromService.getWebsite().equals(\"www.whatthewhat.com\"));\n }",
"public Songs() {\n }",
"@Test\n public void addAndRemovePlaylist() throws Exception\n {\n TabLayout tabs = (TabLayout) mActivityRule.getActivity().findViewById(R.id.tab_layout);\n int tabsCount = tabs.getTabCount();\n\n //Open menu and click on add new playlist\n addPlaylist();\n assertEquals(tabsCount + 1, tabs.getTabCount());\n assertEquals(tabsCount, tabs.getSelectedTabPosition());\n\n onView(withText(mActivityRule.getActivity().getString(R.string.main_playlist_name))).perform(click());\n\n addPlaylist();\n assertEquals(tabsCount + 2, tabs.getTabCount());\n assertEquals(tabsCount + 1, tabs.getSelectedTabPosition());\n //Remove the just added playlist\n removePlaylist();\n removePlaylist();\n assertEquals(tabsCount, tabs.getTabCount());\n }",
"@Test\n public void eTestCreatePlaylist() {\n playlistId = given()\n .header(\"X-Authorization\", token)\n .param(\"name\", \"Test Playlist\")\n .post(\"/playlists\")\n .then()\n .statusCode(201)\n .extract()\n .path(\"id\").toString();\n }",
"public void addMusic(String musicname)\r\n\t{\r\n\t\tmyMusics.add(musicname);\r\n\t}",
"public void setUp() {\n burr = new Song(\"Hannibal Burress\", \"rap\", 2018, \"Morpheus Rap\");\n }",
"public MusicCollection(String name,Song... songs)\n {\n this.songs = new ArrayList<Song>();\n for(Song tempSong : songs) {\n if ( !this.songs.contains(tempSong) )\n this.songs.add(tempSong);\n else\n System.out.println(\"this file is already in this collection.\");\n }\n player = new MusicPlayer();\n this.name = name;\n }",
"@Test\n public void testAddProduct() {\n }",
"@Test\n\tpublic void testAdd(){\n\t\t\n\t\tFraction testFrac1 = new Fraction();\n\t\t\n\t\tassertTrue(\"Didn't add correctly\",testFrac1.add(new Fraction(25,15)).toString().equals(new Fraction(40,15).toString()));\n\t}",
"private void createAlbum(String data) {\n long id = db.insertAlbumData(data);\n\n // get the newly inserted note from db\n AlbumData n = db.getAlbumData(id);\n\n if (n != null) {\n // adding new note to array list at 0 position\n dataList.add(0, n);\n\n // refreshing the list\n albumAdapter.notifyDataSetChanged();\n\n }\n }",
"@Test\n public void testAddGetDVD() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n Assert.assertEquals(1, dvd2.getID());\n \n \n Assert.assertEquals(\"The Lion King\", lib.getById(1).getTitle());\n }",
"@Test void addIngredientZero()\n {\n }",
"public static boolean addSongSource(SongsDto song) {\n\t\tSongsDao dao = new SongsDao();\n\n\t\treturn dao.addSongSourceAndImage(song);\n\t}"
]
| [
"0.8297624",
"0.8000273",
"0.7720689",
"0.751378",
"0.73989826",
"0.7374109",
"0.7356319",
"0.7254714",
"0.72235966",
"0.72146803",
"0.7119925",
"0.7072788",
"0.70563036",
"0.7028091",
"0.7027161",
"0.69766194",
"0.6969006",
"0.68257165",
"0.67736036",
"0.677328",
"0.6722286",
"0.66934156",
"0.66844815",
"0.66089994",
"0.6553953",
"0.65488845",
"0.6547298",
"0.6538554",
"0.6527292",
"0.64913076",
"0.6377125",
"0.63721025",
"0.6306584",
"0.6298724",
"0.6259307",
"0.616602",
"0.61507505",
"0.61498904",
"0.613864",
"0.60970324",
"0.60861135",
"0.60722613",
"0.6035119",
"0.6024943",
"0.6020513",
"0.59527373",
"0.59350055",
"0.5921026",
"0.5850484",
"0.58481413",
"0.58423173",
"0.58397084",
"0.58313876",
"0.58301115",
"0.58195895",
"0.58082664",
"0.5798852",
"0.57967764",
"0.5783597",
"0.57805437",
"0.5780254",
"0.5748438",
"0.57320946",
"0.57226783",
"0.5721847",
"0.57055795",
"0.5692317",
"0.56775653",
"0.5673492",
"0.56601185",
"0.56570476",
"0.56546736",
"0.56538904",
"0.5640486",
"0.5615077",
"0.56095356",
"0.56064147",
"0.5596942",
"0.5572108",
"0.5548131",
"0.55452406",
"0.55405796",
"0.5533387",
"0.5532676",
"0.5531811",
"0.55308926",
"0.55290216",
"0.55257726",
"0.5516028",
"0.55145234",
"0.5508321",
"0.5507269",
"0.5487161",
"0.54748356",
"0.5468013",
"0.5467701",
"0.5467157",
"0.5466466",
"0.5464505",
"0.54639375"
]
| 0.8106335 | 1 |
Test of addCategory method, of class SongLibrary. | @Test
public void testAddCategory() {
HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();
rightsByCat1.put("family", new Rights(true,true,false,false));
rightsByCat1.put("friends", new Rights(true,true,true,false));
HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();
rightsByCat2.put("judo", new Rights(true,true,true,true));
rightsByCat2.put("yoga", new Rights(false,false,false,false));
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), rightsByCat1);
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), rightsByCat2);
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
songs.add(song2);
SongLibrary library = new SongLibrary(songs);
String name = "karate";
Rights rights = new Rights(false, true, false, true);
library.addCategory(name, rights);
assertTrue(library.getSong("1").getRightsByCategory().containsKey("karate"));
assertTrue(library.getSong("2").getRightsByCategory().containsKey("karate"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testAddCategory() {\n\t\tcategory = new Category();\n\t\tcategory.setName(CATEGORY_NAME);\n\t\tcategory.setDescription(\"A wonderful addition to your home. 80 inches\");\n\t\tcategory.setImageURL(\"CAT_1.png\");\n\n\t\tassertEquals(\"Successfully added a category to the database table\", true, categoryDAO.add(category));\n\t}",
"void addCategory(Category category);",
"@Test\n public void addCategory_DatabaseUpdates(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"addCategory - Correct Category Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"addCategory - Set Category ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void getCategory_CorrectInformation(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"getCategory - Correct Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"getCategory - Correct ID\", returned, retrieved.getKeyID());\n }",
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}",
"@Test\n public void categoryTest() {\n // TODO: test category\n }",
"@Test\n public void typeCategoriesTest() {\n final Category cardio = Category.CARDIO;\n final Category core = Category.CORE;\n final Category fullBody = Category.FULL_BODY;\n final Type endurance = Type.ENDURANCE;\n\n final List<Category> myCategories = new ArrayList<>();\n\n myCategories.add(cardio);\n myCategories.add(core);\n assertEquals(\"Categories of Endurance Type\", myCategories, endurance.getCategories());\n\n myCategories.add(fullBody);\n assertNotEquals(\"Not all the Categories are of Endurance Type\", myCategories, endurance.getCategories());\n\n }",
"@Test\n public void getCategory_ReturnsCategory(){\n int returned = testDatabase.addCategory(category);\n assertNotEquals(\"getCategory - Return Non-Null Category\",null, testDatabase.getCategory(returned));\n }",
"@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}",
"@Test\n public void addToCategory() throws Exception {\n withProductAndUnconnectedCategory(client(), (final Product product, final Category category) -> {\n assertThat(product.getMasterData().getStaged().getCategories()).isEmpty();\n\n final String orderHint = \"0.123\";\n final Product productWithCategory = client()\n .executeBlocking(ProductUpdateCommand.of(product, AddToCategory.of(category, orderHint)));\n\n final Reference<Category> categoryReference = productWithCategory.getMasterData().getStaged().getCategories().stream().findAny().get();\n assertThat(categoryReference.referencesSameResource(category)).isTrue();\n assertThat(productWithCategory.getMasterData().getStaged().getCategoryOrderHints().get(category.getId())).isEqualTo(orderHint);\n\n final Product productWithoutCategory = client()\n .executeBlocking(ProductUpdateCommand.of(productWithCategory, RemoveFromCategory.of(category)));\n\n assertThat(productWithoutCategory.getMasterData().getStaged().getCategories()).isEmpty();\n });\n }",
"@Test\n\tpublic void testAddQuestionToCategory() {\n\t\t// Invalid user id\n\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\ttry {\n\t\t\tquestionLogic.addQuestionToCategory( tdp.question1_location1.getId() , tdp.category1_location1.getId(), LOCATION1_ID);\n\t\t\tAssert.fail(\"Should throw SecurityException\");\n\t\t} catch (SecurityException se) {\n\t\t\tAssert.assertNotNull(se);\n\t\t} \n\t\t\n\t\t// Valid user id\n\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\ttry {\n\t\t\tquestionLogic.addQuestionToCategory(tdp.question1_location1.getId() , tdp.category1_location1.getId(), LOCATION1_ID);\n\t\t} catch (Exception se) {\n\t\t\tAssert.fail(\"Should not throw Exception\");\n\t\t}\n\t\tAssert.assertTrue(tdp.question1_location1.getCategory().getId().equals(tdp.category1_location1.getId()));\n\t}",
"@Before\n public void getTestCategory() {\n if (sessionId == null) {\n getTestSession();\n }\n\n if (testCategoryId == null) {\n testCategoryId = Util.createTestCategory(TEST_CATEGORY_NAME, sessionId);\n }\n }",
"Category addNewCategory(Category category);",
"@Test\n public void testCategoryAccessControl() {\n // set permissions\n PermissionData data = new PermissionData(true, false, false, true);\n pms.configureCategoryPermissions(testUser, data);\n\n // test access control\n assertTrue(accessControlService.canViewCategories(), \"Test user should be able to view categories!\");\n assertTrue(accessControlService.canAddCategory(), \"Test user should be able to create categories!\");\n assertFalse(accessControlService.canEditCategory(category), \"Test user should not be able to edit category!\");\n assertFalse(accessControlService.canRemoveCategory(category), \"Test user should not be able to remove category!\");\n }",
"@Test\n public void testRemoveCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n library.removeCategory(\"family\");\n assertFalse(library.getSong(\"1\").getRightsByCategory().containsKey(\"family\"));\n\n }",
"void add(ProductCategory category);",
"@Test\n public void addRecipeCategory_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n RecipeCategory retrieved = new RecipeCategory();\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getKeyID() == returnedCategory){\n retrieved = allCategories.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct RecipeID\", returnedRecipe, retrieved.getRecipeID());\n assertEquals(\"addRecipeDirection - Correct CategoryID\", categoryID, retrieved.getCategoryID());\n }",
"@Test\n public void addCategory_ReturnsID(){\n int returned = testDatabase.addCategory(category);\n assertNotEquals(\"addCategory - Returns True\", -1, returned);\n }",
"@Test\r\n\tpublic void catTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tString tempSet[] = item.getCats();\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) { // check if categories are empty\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotSame(tempSet[i], \"\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute the retrieval of the list of categories: SQLException\");\r\n\t\t}\r\n\t\t\r\n\t}",
"@Test\n\tpublic void addProductToCartFromCategoryDrop() {\n\t}",
"@Test\r\n public void testCategory() {\n Category createdCategory1 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot.contains(createdCategory1.getId()));\r\n\r\n // create a new category\r\n Category createdCategory2 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot2 = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot2.contains(createdCategory1.getId()));\r\n Assert.assertTrue(newRoot2.contains(createdCategory2.getId()));\r\n\r\n Category actualCat2 = getBuilder(\"/category/\" + createdCategory2.getId()).get(Category.class);\r\n\r\n Dimension saved1 = createDimension();\r\n Category catHasDim = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved1.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(catHasDim.hasDimension(saved1.getId()));\r\n\r\n Dimension saved2 = createDimension();\r\n Category cat3 = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved2.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(cat3.hasDimension(saved1.getId()));\r\n Assert.assertTrue(cat3.hasDimension(saved2.getId()));\r\n\r\n // remove dim1\r\n getBuilder(\"/dimension/remove/\" + saved1.getId()).post(\" \");\r\n\r\n try {\r\n getBuilder(\"/dimension/\" + saved1.getId()).get(String.class);\r\n Assert.assertTrue(false);\r\n } catch (UniformInterfaceException e) {\r\n Assert.assertEquals(ServiceError.NotFound.getErrorCode(), e.getResponse().getStatus());\r\n }\r\n\r\n Category cat4 = getBuilder(\"/category/\" + createdCategory1.getId()).get(Category.class);\r\n Assert.assertFalse(cat4.hasDimension(saved1.getId()));\r\n }",
"@Test\n public void test() {\n categoryService.addCategory(new Category(null, \"c\", 5423));\n\n //categoryService.removeCategory(1001);\n\n }",
"@Test\n public void testAddSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n SongLibrary library = new SongLibrary(songs);\n \n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n library.addSong(song2);\n \n assertTrue(library.islocal(song2.getSongId()));\n assertTrue(library.islocal(song1.getSongId()));\n\n }",
"public void newCategory() {\n btNewCategory().push();\n }",
"public void addNewCategory(Category category) throws CostManagerException;",
"@Test\n\tpublic void testCreateCategory() throws Exception {\n\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.createCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\n\t\t\tmockMvc.perform(post(\"/category/v1/_create\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryCreateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryCreateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}",
"@Test\n void insertSuccess() {\n GenericDao gameDao = new GenericDao(Game.class);\n\n Game game = (Game)gameDao.getById(1);\n\n RunCategory newCategory = new RunCategory(\"Ending E\", \"endinge\", \"<p>Reach the final ending</p>\");\n game.addCategory(newCategory);\n\n int id = dao.insert(newCategory);\n assertNotEquals(0,id);\n RunCategory insertedCategory = (RunCategory) dao.getById(id);\n\n\n assertEquals(newCategory, insertedCategory);\n }",
"@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }",
"@Test\n public void deleteCategory_ReturnsTrue(){\n int returned = testDatabase.addCategory(category);\n assertEquals(\"deleteCategory - Returns True\", true, testDatabase.deleteCategory(returned));\n }",
"@Override\r\n\tpublic void addCategory() {\n\t\tCategory cat=new Category();\r\n\t\tcat.setNameCategory(\"Computing Tools\");\r\n\t\tem.persist(cat);\r\n\t\t\r\n\t}",
"public static void addCategory(Context context, String category) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getWritableDatabase();\r\n\r\n // Don't allow adding if there's already a non-deleted category with that name\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0 AND \" + CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category},\r\n null,\r\n null,\r\n null\r\n );\r\n\r\n if(cursor.getCount() > 0) {\r\n cursor.close();\r\n throw new IllegalArgumentException(\"Category with name already exists\");\r\n }\r\n cursor.close();\r\n\r\n // Check if there's a deleted category that can be re-enabled\r\n ContentValues updateValues = new ContentValues();\r\n updateValues.put(CategoryTable.COLUMN_NAME_IS_DELETED, 0);\r\n\r\n int count = db.update(\r\n DbContract.CategoryTable.TABLE_NAME,\r\n updateValues,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category}\r\n );\r\n if(count > 0) return;\r\n\r\n // Otherwise add it as normal\r\n ContentValues insertValues = new ContentValues();\r\n insertValues.put(CategoryTable.COLUMN_NAME_CATEGORY_NAME, category);\r\n db.insert(CategoryTable.TABLE_NAME, null, insertValues);\r\n db.close();\r\n }",
"@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }",
"protected boolean addCategory(int conId, Category cat) {\n\t\tContest cs = getContest(conId);\n\t\tif(cs == null) {\n\t\t\treturn false;\n\t\t}\n\t\tcs.addCategory(cat);\n\t\treturn true;\n\t}",
"@Test\n public void testDefaultCategorizationUsingServiceAPI() throws Exception {\n EventServiceAdmin eventServiceAdmin = Framework.getService(EventServiceAdmin.class);\n eventServiceAdmin.setListenerEnabledFlag(\n \"documentCategorizationSyncListener\", false);\n \n // let us create some documents\n makeSomeDocuments();\n f2 = session.getDocument(f2.getRef());\n file1 = session.getDocument(file1.getRef());\n file2 = session.getDocument(file2.getRef());\n note1 = session.getDocument(note1.getRef());\n\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:coverage\"));\n assertEquals(null, file2.getPropertyValue(\"dc:language\"));\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // run the engine again, this time all the documents should be processed\n List<DocumentModel> updatedDocuments = service.updateCategories(Arrays.asList(\n file1, file2, note1, f2));\n assertEquals(3, updatedDocuments.size());\n \n assertEquals(\"en\", file1.getPropertyValue(\"dc:language\"));\n assertEquals(\"asia/Viet_Nam\", file1.getPropertyValue(\"dc:coverage\"));\n \n assertEquals(\"fr\", file2.getPropertyValue(\"dc:language\"));\n assertEquals(\"europe/France\", file2.getPropertyValue(\"dc:coverage\"));\n \n // TODO: handle the string content of Note document too\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // folderish documents are ignored by the categorizers\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n }",
"@Test\n public void testGetCategoryDescription() {\n System.out.println(\"getCategoryDescription\");\n Category instance = new Category();\n instance.setCategoryDescription(\"kuvaus testi kategorialle\");\n String expResult = \"kuvaus testi kategorialle\";\n String result = instance.getCategoryDescription();\n assertEquals(expResult, result);\n }",
"@Override\n\tpublic boolean addCategory(String catName) {\n\t\tTransaction tx=sessionFactory.getCurrentSession().beginTransaction();\n\t\tboolean found =categoryhome.isFound(catName);\n\t\tif(found==true)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\tCategory cat =new Category();\n\t\tcat.setName(catName);\n\t\tsessionFactory.getCurrentSession().save(cat);\n\t\ttx.commit();\n\t\t\treturn true;\n\t\t}\n\t}",
"Boolean insertCategory(DvdCategory category) throws DvdStoreException;",
"@Test\n public void addRecipeCategory_ReturnsID(){\n int returned = testDatabase.addRecipeCategory(recipeCategory);\n assertNotEquals(\"addRecipeCategory - Returns True\", -1, returned);\n }",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"@Test\n public void categoryFitsTypeTest() {\n final Category cardio = Category.CARDIO;\n final Type endurance = Type.ENDURANCE;\n final Type strength = Type.STRENGTH;\n\n assertEquals(\"Cardio category of Endurance Type\", cardio.getType(), endurance);\n assertNotEquals(\"Cardio category is not of Strength Type\", cardio.getType(), strength);\n }",
"@Test\r\n\tpublic void testGetCategoryString() {\r\n\t\tManagedIncident incident = new ManagedIncident(\"jsmith\", Category.NETWORK, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Network\", incident.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident1 = new ManagedIncident(\"jsmith\", Category.DATABASE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Database\", incident1.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident2 = new ManagedIncident(\"jsmith\", Category.INQUIRY, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Inquiry\", incident2.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident3 = new ManagedIncident(\"jsmith\", Category.HARDWARE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Hardware\", incident3.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident4 = new ManagedIncident(\"jsmith\", Category.SOFTWARE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Software\", incident4.getCategoryString());\r\n\t\t\r\n\t}",
"public boolean addToCategory (String category, PublicKey key) {\n Logger.write(\"VERBOSE\", \"DB\", \"addToCategory(\" + category + \", ...)\");\n \n PublicKey[] members = getCategoryMembers(category);\n if (Arrays.asList(members).contains(key)) {\n return false;\n }\n \n try {\n execute(DBStrings.addToCategory.replace(\"__catID__\", category)\n .replace(\"__key__\", Crypto.encodeKey(key)));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n return false;\n }\n \n return true;\n }",
"boolean add(DishCategory dishCategory );",
"void updateCategory(String category){}",
"public boolean addCategory(Category c){\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(DBEntryContract.CategoryEntry.COLUMN_NAME_TITLE, c.title);\n\t\t// Insert the new row, returning the primary key value of the new row\n\t\tlong newRowId;\n\t\tnewRowId = db.insert(\n\t\t\t\t\tDBEntryContract.CategoryEntry.TABLE_NAME,\n\t\t\t\t\tnull,\n\t\t\t\t\tvalues);\n\t\t\n\t\tif (newRowId != -1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"private void createCategory() {\n Uri uri = TimeSeriesData.TimeSeries.CONTENT_URI;\n Intent i = new Intent(Intent.ACTION_INSERT, uri);\n startActivityForResult(i, ARC_CATEGORY_CREATE);\n }",
"@Test\n\tpublic void testGetCategoryService() {\n\t\tassertSame(categoryService, this.importGuidHelper.getCategoryService());\n\t}",
"public int addCategory(Category cat) {\n\t\treturn 0;\n\t}",
"@Test\n\tpublic void getSubCategoryTest() {\n\t\tList<Map<String, String>> list = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"subcategory\", \"Skype\");\n\t\tlist.add(map);\n\t\twhen(TicketDao.getSubCategory(Mockito.anyString())).thenReturn(list);\n\t\tassertEquals(list, Service.getSubCategory(Mockito.anyString()));\n\t}",
"@Test\n public void getAllRecipeCategories_RecipeInfo(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returned);\n RecipeCategory retrieved = allCategories.get(allCategories.size()-1);\n //Retrieved should now contain all the same information as testRecipe\n assertEquals(\"getAllRecipeCategories - Correct Recipe ID\", returned, retrieved.getRecipeID());\n assertEquals(\"getAllRecipeCategories - Correct Category ID\", categoryID, retrieved.getCategoryID());\n }",
"@Override\n\tpublic Category addCategory(Category cat) {\n\t\treturn dao.addCategory(cat);\n\t}",
"public void setCategory(String newCategory) {\n category = newCategory;\n }",
"public void setCategory(String category);",
"@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}",
"@Test\n public void getAllRecipeCategories_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returned);\n assertNotEquals(\"getAllRecipeCategories - Non-empty List Returned\", 0, allCategories.size());\n }",
"void createCodeCategory(CodeCategory codeCategory)\n throws DAOException;",
"void updateCategory(Category category);",
"void updateCategory(Category category);",
"@Test\n public void testSetCategoryDescription() {\n System.out.println(\"setCategoryDescription\");\n String CategoryDescription = \"testDescription\";\n Category instance = new Category();\n instance.setCategoryDescription(CategoryDescription);\n assertEquals(CategoryDescription, instance.getCategoryDescription());\n }",
"public WebDriver add_category(String category_name)\n {\n driver.findElement(By.xpath(\"//*[@id=\\\"go_add_category\\\"]\")).click();\n\n driver.findElement(By.xpath(\"//*[@id=\\\"name\\\"]\")).sendKeys(category_name);\n\n driver.findElement(By.xpath(\"//*[@id=\\\"submit\\\"]\")).click();\n\n return driver;\n }",
"@Test\n public void deleteRecipeCategory_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeCategory - Returns True\",true, testDatabase.deleteRecipeCategory(returned));\n }",
"@Test\n public void testGetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n ArrayList<Song> expResult = songs;\n ArrayList<Song> result = library.getlibrary();\n assertEquals(expResult, result);\n\n }",
"public Categorie addCategorie(Categorie c);",
"public void addCat(Cat catToAdd)\r\n {\r\n if(catToAdd != null){\r\n catCollection.add(catToAdd);\r\n }\r\n }",
"@Override\r\n\tpublic boolean add(Se_cat se_cat) {\n\t\t\t\treturn se_catdao.add(se_cat);\r\n\t}",
"protected boolean addTeamCategory(int conId, TeamCategory tc) {\n\t\tContest cs = getContest(conId);\n\t\tif(cs == null) {\n\t\t\treturn false;\n\t\t}\n\t\tcs.addTeamCategory(tc);\n\t\treturn true;\n\t}",
"public void setCategory(String category){\n this.category = category;\n }",
"@Test\n\tpublic void getCategoryTest() {\n\t\tList<Map<String, String>> list = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"category\", \"Placement\");\n\t\tlist.add(map);\n\t\twhen(TicketDao.getCategory()).thenReturn(list);\n\t\tString category = \"<option value='\" + \"Placement\" + \"'>\" + \"Placement\" + \"</option>\";\n\t\tassertEquals(category, Service.getCategory());\n\t}",
"public static void addCategoryType(String description) {\n\t\tConnection conn = null;\n PreparedStatement ps = null;\n try {\n \t// Get a connection to the specified JDBC URL.\n \t\tconn = JDBCConnection.getConnection();\n // Create a Statement object for sending SQL statements to the database.\n \t\t// Statement: The object used for executing a static SQL statement and returning the results it produces.\n \t\tps = conn.prepareStatement(\"INSERT INTO observation_categories ( description ) VALUES ( ? )\");\n \t\tps.setString( 1, description );\n \t\tps.execute();\n \t} catch(SQLException e) {\n \te.printStackTrace();\n } finally {\n\t\t\tJDBCConnection.closeConnection(conn, ps, null);\n\t\t}\n }",
"public boolean addSongstoAlbums(String songTitle, double songDuration){\n\n if(findSong(songTitle) == null){\n songAlbum.add(new Song(songTitle, songDuration));\n return true;\n }\n System.out.println(\"Song already exist\");\n return false;\n }",
"@Test\n public void testSave() throws Exception {\n ProductCategory productCategory = categoryServiceImpl.findOne(1);\n productCategory.setCategoryName(\"Lego\");\n ProductCategory category = categoryServiceImpl.save(productCategory);\n System.out.println(\"category:\" + category);\n }",
"@Test\n public void getAllRecipeCategories_ReturnsNull(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipeCategory(returned);\n assertEquals(\"getAllRecipeCategories - Empty List Returned\", null, testDatabase.getAllRecipeCategories(returned));\n }",
"@Test\n public void testGetCategoryName() {\n System.out.println(\"getCategoryName\");\n Category instance = new Category();\n instance.setCategoryName(\"testiKategoria\");\n String expResult = \"testiKategoria\";\n String result = instance.getCategoryName();\n assertEquals(expResult, result);\n }",
"@Test\n public void ShouldFindbyCategory() {\n Recipe curry = new Recipe();\n curry.setCategory(\"curry\");\n Recipe curryOne = new Recipe();\n curryOne.setCategory(\"curry\");\n Recipe breakfast = new Recipe();\n breakfast.setCategory(\"breakfast\");\n recipesRepository.save(curry);\n recipesRepository.save(curryOne);\n recipesRepository.save(breakfast);\n\n // When I check for curries\n List<Recipe> curries = recipesRepository.findByCategory(\"curry\");\n\n // Then only curries are returned\n assertThat(curries).containsExactly(curry, curryOne);\n }",
"public int addCategory(String catName, int sessionID) {\r\n\t\tfor (int i=0;i<sessions.size();i++) {\r\n\t\t\tSession s = sessions.get(i);\r\n\t\t\tif (s.getID() == sessionID && s.getUser() instanceof Administrator) {\r\n\t\t\t\tAdministrator ad = (Administrator)(s.getUser());\r\n\t\t\t\treturn ad.addCategory(catName);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public boolean addCategory(Category newCat) {\n\t\tfor(Category cat : categoriesList) {\n\t\t\tif(cat.getName().equals(newCat.getName())) return false;\n\t\t}\n\t\tcategoriesList.add(newCat);\n\t\t//this.notifyDataSetChanged();\n\t\treturn true;\n\t}",
"public void setCategory(String category) {\r\n this.category = category;\r\n }",
"public void setCategory(String category)\r\n {\r\n m_category = category;\r\n }",
"@Test\n public void addTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n Integer expected = 1;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }",
"@Override\n public CommandResult execute() {\n if (exceedLengthLimit()) {\n return new CommandResult(MESSAGE_CATEGORY_EXCEED_LIMIT);\n }\n try {\n Module parentModule = DirectoryTraverser.getModuleDirectory(moduleCode);\n Category toAdd = new Category(parentModule, categoryName, categoryPriority);\n parentModule.getCategories().add(toAdd);\n StorageManager.setIsSave();\n return new CommandResult(messageAddCategorySuccess(categoryName));\n } catch (ModuleManager.ModuleNotFoundException e) {\n return new CommandResult(MESSAGE_MODULE_NOT_FOUND);\n } catch (CategoryManager.DuplicateCategoryException e) {\n return new CommandResult(MESSAGE_DUPLICATE_CATEGORY);\n } catch (IncorrectDirectoryLevelException e) {\n return new CommandResult(MESSAGE_INCORRECT_DIRECTORY_LEVEL);\n }\n }",
"public void addCategoryToContract(Contract contract, String category) {\n contract_dao.addCategoryToContract(contract, category);\n }",
"public void setCategory(Category cat) {\n this.category = cat;\n }",
"@Test\n\tpublic void testGetSubCategoryL1() {\n\t\tString subCategoryL1 = rmitAnalyticsModel.getSubCategoryL1();\n\t\tAssert.assertNotNull(subCategoryL1);\n\t\tAssert.assertEquals(\"content\", subCategoryL1);\n\t}",
"public boolean insertCategory(String category, int id){\r\n int numRowsInserted;\r\n String insertCategory = \"INSERT INTO Categories(category, productID)\" +\r\n \"VALUES(?,?)\";\r\n\r\n try {\r\n PreparedStatement categoryStatement = conn.prepareStatement(insertCategory);\r\n categoryStatement.setString(1, category);\r\n categoryStatement.setInt(2, id);\r\n numRowsInserted = categoryStatement.executeUpdate();\r\n\r\n }catch (SQLException e){\r\n return false;\r\n }\r\n\r\n return numRowsInserted == 1;\r\n }",
"@Test\n\tpublic void testSearchCategory() throws Exception {\n\n\t\tCategorySearchResponse categoryResponse = new CategorySearchResponse();\n\t\tList<CategorySearch> categories = new ArrayList<>();\n\t\tCategorySearch category = new CategorySearch();\n\t\tcategory.setTenantId(\"default\");\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.getCategoryMaster(any(RequestInfo.class), any(String.class), any(Integer[].class),\n\t\t\t\t\tany(String.class), any(String.class), any(String.class), any(String.class), any(String.class), any(Integer.class),\n\t\t\t\t\tany(String.class), any(String.class), any(Integer.class), any(Integer.class), any(Integer.class))).thenReturn(categoryResponse);\n\n\t\t\tmockMvc.perform(post(\"/category/v1/_search\").param(\"tenantId\", \"default\").param(\"type\", \"SUBCATEGORY\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON).content(getFileContents(\"categorySearchRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categorySearchResponse.json\")));\n\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}",
"boolean hasCategory();",
"@Test\n public void testAddSubCategory() throws Exception {\n Method\n method =\n SageTvPublisher.class\n .getDeclaredMethod(\"addSubCategory\", Category.class, PropertiesFile.class,\n PropertiesFile.class);\n method.setAccessible(true);\n PropertiesFile linksFile = new PropertiesFile();\n PropertiesFile labelsFile = new PropertiesFile();\n SubCategory subCategory = new SubCategory(\"sourceId\", \"subcatId\", \"subcatTitle\", \"subCatDescription\", \"serviceUrl\", \"iconUrl\", \"parentId\");\n SubCategory subCategory2 = new SubCategory(\"sourceId\", \"subcatId2\", \"subcatTitle2\", \"subCatDescription2\", \"serviceUrl2\", \"\", \"parentId\");\n\n method.invoke(sageTvPublisher, subCategory, linksFile, labelsFile);\n\n method.invoke(sageTvPublisher, subCategory2, linksFile, labelsFile);\n\n TreeMap<Object,Object> linkProps = new TreeMap<Object,Object>(new LinksPropertyLayout().getComparator(linksFile));\n linkProps.putAll(linksFile);\n\n TreeMap<Object,Object> labelProps = new TreeMap<Object,Object>(new LabelsPropertyLayout().getComparator(labelsFile));\n labelProps.putAll(labelsFile);\n\n assertEquals(\"Links Property count\", 6, linkProps.size());\n assertEquals(\"Labels count\", 10, labelProps.size());\n\n Iterator<Map.Entry<Object, Object>> itr = linkProps.entrySet().iterator();\n Map.Entry<Object, Object> entry;\n entry = itr.next();\n assertEquals(\"Property name\", \"xFeedPodcastCustom/subcatId\", entry.getKey());\n assertEquals(\"Property value\", \"xPodcastparentId;xURLNone\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"subcatId/IsCategory\", entry.getKey());\n assertEquals(\"Property value\", \"true\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"subcatId/CategoryName\", entry.getKey());\n assertEquals(\"Property value\", \"xPodcastsubcatId\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"xFeedPodcastCustom/subcatId2\", entry.getKey());\n assertEquals(\"Property value\", \"xPodcastparentId;xURLNone\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"subcatId2/IsCategory\", entry.getKey());\n assertEquals(\"Property value\", \"true\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"subcatId2/CategoryName\", entry.getKey());\n assertEquals(\"Property value\", \"xPodcastsubcatId2\", entry.getValue());\n\n itr = labelProps.entrySet().iterator();\n entry = itr.next();\n assertEquals(\"Property name\", \"Source/xPodcastsubcatId/LongName\", entry.getKey());\n assertEquals(\"Property value\", \"subCatDescription\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Source/xPodcastsubcatId/ShortName\", entry.getKey());\n assertEquals(\"Property value\", \"subcatTitle\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Source/xPodcastsubcatId/ThumbURL\", entry.getKey());\n assertEquals(\"Property value\", \"iconUrl\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Source/xPodcastsubcatId2/LongName\", entry.getKey());\n assertEquals(\"Property value\", \"subCatDescription2\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Source/xPodcastsubcatId2/ShortName\", entry.getKey());\n assertEquals(\"Property value\", \"subcatTitle2\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Category/subcatId/LongName\", entry.getKey());\n assertEquals(\"Property value\", \"subCatDescription\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Category/subcatId/ShortName\", entry.getKey());\n assertEquals(\"Property value\", \"subcatTitle\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Category/subcatId/ThumbURL\", entry.getKey());\n assertEquals(\"Property value\", \"iconUrl\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Category/subcatId2/LongName\", entry.getKey());\n assertEquals(\"Property value\", \"subCatDescription2\", entry.getValue());\n entry = itr.next();\n assertEquals(\"Property name\", \"Category/subcatId2/ShortName\", entry.getKey());\n assertEquals(\"Property value\", \"subcatTitle2\", entry.getValue());\n }",
"public int AddCategory(Inventory inventory, String description) throws ExistingCatException{\r\n\t\tif (description != null && description.length() != 0){\r\n\t\t\tfor (Category c: inventory.category_list)\r\n\t\t\t\tif (c.description.equals(description)){\r\n\t//\t\t\t\tSystem.out.println(\"existed\");\r\n\t\t\t\t\tthrow new ExistingCatException();\r\n\t\t\t\t}\r\n\t\t\tCategory c = new Category(description,inventory);\r\n\t\t\tinventory.category_list.add(c);\r\n\t\t\treturn c.code;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"@Test\n public void testGetCategoriesAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getCategoriesAction(\"{sort}\", -1, -1, \"{type}\", -1);\n List<Integer> expectedResults = Arrays.asList(200);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseCategory\", response.getContent());\n }\n \n }",
"@Test\n public void deleteRecipeCategory_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n testDatabase.deleteRecipeCategory(returnedCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n boolean deleted = true;\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getCategoryID() == returnedCategory){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeCategory - Deletes From Database\", true, deleted);\n }",
"@Before\n\tpublic void mockData (){\n\t\tcategoryRequest.setCategoryName(\"Yoga\");\n\t\t\n\t}",
"@Test\n\tpublic void testAddKeyword01() {\n\t\tKeywordSet result = new KeywordSet()\n\t\t\t.withKeyword(new Keyword().withContent(\"keyword1\"))\n\t\t\t.withKeyword(new Keyword().withContent(\"keywordTwo\"), \n\t\t\t\t\tnew Keyword().withContent(\"keywordIII\"));\n\t\tassertThat(((String)result.getKeyword().get(0).getContent().get(0)), is(\"keyword1\"));\n\t\tassertThat(((String)result.getKeyword().get(1).getContent().get(0)), is(\"keywordTwo\"));\n\t\tassertThat(((String)result.getKeyword().get(2).getContent().get(0)), is(\"keywordIII\"));\n\t}",
"public void addCategory(ProductCatagory pCatagory)\n\t\t\tthrows BusinessException;",
"int insert(ItemCategory record);",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void addCategory(Category c) {\n\t\tcategoryDao.save(c);\n\t}"
]
| [
"0.75415826",
"0.72309744",
"0.7001131",
"0.68364555",
"0.68169665",
"0.6758218",
"0.6718675",
"0.66798",
"0.66250366",
"0.65633",
"0.65471023",
"0.65072393",
"0.6505745",
"0.6453366",
"0.6443752",
"0.6437752",
"0.64231896",
"0.63986605",
"0.6366913",
"0.63422257",
"0.63189584",
"0.6317931",
"0.6210222",
"0.6202395",
"0.61459196",
"0.61156094",
"0.6081945",
"0.6069972",
"0.6065819",
"0.60426724",
"0.60403866",
"0.6029731",
"0.59969693",
"0.59963274",
"0.5967373",
"0.5953653",
"0.59487",
"0.59439254",
"0.59349465",
"0.5931139",
"0.59107673",
"0.5902858",
"0.5864614",
"0.5862175",
"0.58244705",
"0.5823103",
"0.58121115",
"0.58104664",
"0.5808267",
"0.5801619",
"0.5783514",
"0.57829773",
"0.5777466",
"0.57702136",
"0.57584834",
"0.5741287",
"0.5732347",
"0.5732347",
"0.57210904",
"0.57100284",
"0.57077485",
"0.5665723",
"0.56636906",
"0.56633073",
"0.5659234",
"0.5651748",
"0.56488377",
"0.5644392",
"0.5641977",
"0.5641171",
"0.5629481",
"0.5612903",
"0.56122",
"0.5603992",
"0.5601911",
"0.55886465",
"0.5565157",
"0.556231",
"0.55593836",
"0.5554495",
"0.5549662",
"0.5547646",
"0.5530212",
"0.55288446",
"0.5524391",
"0.5522859",
"0.5519439",
"0.55141425",
"0.5511974",
"0.55104226",
"0.5508506",
"0.5507451",
"0.5505467",
"0.5500761",
"0.5500399",
"0.5500399",
"0.5500399",
"0.5500399",
"0.5500399",
"0.5490353"
]
| 0.753448 | 1 |
Test of removeCategory method, of class SongLibrary. | @Test
public void testRemoveCategory() {
HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();
rightsByCat1.put("family", new Rights(true,true,false,false));
rightsByCat1.put("friends", new Rights(true,true,true,false));
HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();
rightsByCat2.put("judo", new Rights(true,true,true,true));
rightsByCat2.put("yoga", new Rights(false,false,false,false));
Song song1 = new Song("1", "titre1", "artiste1", "album1", "1", new LinkedList<String>(), rightsByCat1);
Song song2 = new Song("2", "titre2", "artiste2", "album2", "2", new LinkedList<String>(), rightsByCat2);
ArrayList<Song> songs = new ArrayList<>();
songs.add(song1);
songs.add(song2);
SongLibrary library = new SongLibrary(songs);
library.removeCategory("family");
assertFalse(library.getSong("1").getRightsByCategory().containsKey("family"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removeCategory(Category category);",
"@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }",
"@Test\n public void test() {\n categoryService.addCategory(new Category(null, \"c\", 5423));\n\n //categoryService.removeCategory(1001);\n\n }",
"void deleteCategory(Category category);",
"@Test\n\tpublic void testCategoryRemoved() throws Exception {\n\t\t// Removing a category triggers the disposal of the editor due to the data type being\n\t\t// deleted.\n\t\t//\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tremoveCategory(enummDt);\n\n\t\tclose(waitForInfoDialog());\n\t}",
"@Test\n public void testRemoveSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"1\";\n \n library.removeSong(songId);\n \n assertFalse(library.islocal(\"1\"));\n assertTrue(library.islocal(\"2\"));\n \n\n }",
"@Test\n public void deleteRecipeCategory_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n testDatabase.deleteRecipeCategory(returnedCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n boolean deleted = true;\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getCategoryID() == returnedCategory){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeCategory - Deletes From Database\", true, deleted);\n }",
"@Test\n public void removeByCatTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n catHouse.remove(tom);\n Integer expected = 0;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }",
"void deleteCategoryByName(String categoryName);",
"@Test\n public void deleteCategory_ReturnsTrue(){\n int returned = testDatabase.addCategory(category);\n assertEquals(\"deleteCategory - Returns True\", true, testDatabase.deleteCategory(returned));\n }",
"void deleteCategory(long id);",
"private void removeAlbumFromCollection() {\n //\n }",
"@Test\n public void deleteRecipeCategory_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeCategory - Returns True\",true, testDatabase.deleteRecipeCategory(returned));\n }",
"void delete(Category category);",
"void deleteCategory(Integer id);",
"@Test\n public void testAddCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String name = \"karate\";\n Rights rights = new Rights(false, true, false, true);\n library.addCategory(name, rights);\n \n assertTrue(library.getSong(\"1\").getRightsByCategory().containsKey(\"karate\"));\n assertTrue(library.getSong(\"2\").getRightsByCategory().containsKey(\"karate\"));\n\n }",
"void deleteCategoryById(int categoryId);",
"@Test\n public void categoryTest() {\n // TODO: test category\n }",
"Boolean deleteCategory(Integer category_Id) throws DvdStoreException;",
"@Test\n public void removeSongsFromPlaylist() {\n onView(withId(R.id.playlistNav)).perform(click());\n onView(withId(R.id.playlist_recycler_view))\n .perform(RecyclerViewActions.actionOnItem(\n hasDescendant(withText(\"Playlist 1\")), click()));\n onView(withId(R.id.playlist_songs_recycler_view))\n .perform(RecyclerViewActions.actionOnItem(\n hasDescendant(withText(\"All that\")), longClick()));\n onView(withText(\"Remove from Playlist\")).perform(click());\n\n\n // Verify that it was removed.\n onView(withId(R.id.playlist_songs_recycler_view))\n .check(matches(not(hasDescendant(withText(\"All that\")))));\n }",
"public void deleteCategorie(Categorie c);",
"void processDeleteCategoryEvent(AchieveSettings settings, String category);",
"@Test\r\n public void testCategory() {\n Category createdCategory1 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot.contains(createdCategory1.getId()));\r\n\r\n // create a new category\r\n Category createdCategory2 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot2 = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot2.contains(createdCategory1.getId()));\r\n Assert.assertTrue(newRoot2.contains(createdCategory2.getId()));\r\n\r\n Category actualCat2 = getBuilder(\"/category/\" + createdCategory2.getId()).get(Category.class);\r\n\r\n Dimension saved1 = createDimension();\r\n Category catHasDim = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved1.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(catHasDim.hasDimension(saved1.getId()));\r\n\r\n Dimension saved2 = createDimension();\r\n Category cat3 = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved2.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(cat3.hasDimension(saved1.getId()));\r\n Assert.assertTrue(cat3.hasDimension(saved2.getId()));\r\n\r\n // remove dim1\r\n getBuilder(\"/dimension/remove/\" + saved1.getId()).post(\" \");\r\n\r\n try {\r\n getBuilder(\"/dimension/\" + saved1.getId()).get(String.class);\r\n Assert.assertTrue(false);\r\n } catch (UniformInterfaceException e) {\r\n Assert.assertEquals(ServiceError.NotFound.getErrorCode(), e.getResponse().getStatus());\r\n }\r\n\r\n Category cat4 = getBuilder(\"/category/\" + createdCategory1.getId()).get(Category.class);\r\n Assert.assertFalse(cat4.hasDimension(saved1.getId()));\r\n }",
"public void deleteCategory(Long id) throws BusinessException;",
"public boolean removeFromCategory (String category, PublicKey key) {\n Logger.write(\"VERBOSE\", \"DB\", \"removeFromCategory(\" + category + \", ...)\");\n try {\n execute(DBStrings.removeFromCategory.replace(\"__catID__\", category)\n .replace(\"__key__\", Crypto.encodeKey(key)));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n return false;\n }\n \n return true;\n }",
"@Test\n public void testDeletePlaylist(){\n Playlist playlist = new Playlist();\n playlist.setId(ID);\n playlist.setGenre(GENRE);\n playlist.setDescription(DESCRIPTION);\n ReturnValue ret = Solution.deletePlaylist(playlist);\n assertEquals(NOT_EXISTS, ret);\n ret = Solution.addPlaylist(playlist);\n assertEquals(OK, ret);\n Playlist retrieved = Solution.getPlaylist(ID);\n assertEquals(playlist, retrieved);\n ret = Solution.deletePlaylist(playlist);\n assertEquals(OK, ret);\n retrieved = Solution.getPlaylist(ID);\n assertEquals(Playlist.badPlaylist(), retrieved);\n }",
"@Test\n public void removeByIdTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n catHouse.remove(1);\n Integer expected = 0;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tdeleteCategory(myCategory);\n\t\t\t\t}",
"@Test\n\tpublic void testAddCategory() {\n\t\tcategory = new Category();\n\t\tcategory.setName(CATEGORY_NAME);\n\t\tcategory.setDescription(\"A wonderful addition to your home. 80 inches\");\n\t\tcategory.setImageURL(\"CAT_1.png\");\n\n\t\tassertEquals(\"Successfully added a category to the database table\", true, categoryDAO.add(category));\n\t}",
"@Test\n public void getCategory_ReturnsCategory(){\n int returned = testDatabase.addCategory(category);\n assertNotEquals(\"getCategory - Return Non-Null Category\",null, testDatabase.getCategory(returned));\n }",
"int deleteByExample(CategoryExample example);",
"@Override\n public boolean deleteCategory(Category oldCategory)\n {\n return deleteCategory(oldCategory.getCategoryID());\n }",
"@Before\n public void getTestCategory() {\n if (sessionId == null) {\n getTestSession();\n }\n\n if (testCategoryId == null) {\n testCategoryId = Util.createTestCategory(TEST_CATEGORY_NAME, sessionId);\n }\n }",
"@Test\n public void testCategoryAccessControl() {\n // set permissions\n PermissionData data = new PermissionData(true, false, false, true);\n pms.configureCategoryPermissions(testUser, data);\n\n // test access control\n assertTrue(accessControlService.canViewCategories(), \"Test user should be able to view categories!\");\n assertTrue(accessControlService.canAddCategory(), \"Test user should be able to create categories!\");\n assertFalse(accessControlService.canEditCategory(category), \"Test user should not be able to edit category!\");\n assertFalse(accessControlService.canRemoveCategory(category), \"Test user should not be able to remove category!\");\n }",
"public abstract void removeUnit(LanguageUnit languageUnit);",
"@Test\n public void typeCategoriesTest() {\n final Category cardio = Category.CARDIO;\n final Category core = Category.CORE;\n final Category fullBody = Category.FULL_BODY;\n final Type endurance = Type.ENDURANCE;\n\n final List<Category> myCategories = new ArrayList<>();\n\n myCategories.add(cardio);\n myCategories.add(core);\n assertEquals(\"Categories of Endurance Type\", myCategories, endurance.getCategories());\n\n myCategories.add(fullBody);\n assertNotEquals(\"Not all the Categories are of Endurance Type\", myCategories, endurance.getCategories());\n\n }",
"@Test\r\n\tpublic void catTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tString tempSet[] = item.getCats();\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) { // check if categories are empty\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotSame(tempSet[i], \"\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute the retrieval of the list of categories: SQLException\");\r\n\t\t}\r\n\t\t\r\n\t}",
"@Test\n public void addToCategory() throws Exception {\n withProductAndUnconnectedCategory(client(), (final Product product, final Category category) -> {\n assertThat(product.getMasterData().getStaged().getCategories()).isEmpty();\n\n final String orderHint = \"0.123\";\n final Product productWithCategory = client()\n .executeBlocking(ProductUpdateCommand.of(product, AddToCategory.of(category, orderHint)));\n\n final Reference<Category> categoryReference = productWithCategory.getMasterData().getStaged().getCategories().stream().findAny().get();\n assertThat(categoryReference.referencesSameResource(category)).isTrue();\n assertThat(productWithCategory.getMasterData().getStaged().getCategoryOrderHints().get(category.getId())).isEqualTo(orderHint);\n\n final Product productWithoutCategory = client()\n .executeBlocking(ProductUpdateCommand.of(productWithCategory, RemoveFromCategory.of(category)));\n\n assertThat(productWithoutCategory.getMasterData().getStaged().getCategories()).isEmpty();\n });\n }",
"@Test\n\tpublic void withInvalidCategory() {\n\t\tboolean delete = false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"christina\", \"rose\");\n\t\t} catch (ServiceException e) {\n\n\t\t\te.printStackTrace();\n\t\t\tassertFalse(delete);\n\t\t}\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Disallowed - Category\", description = \"Validating Disallowed category\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-236:EVQAAND-229\" })\n\tpublic void verifydisallowedCategory() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"Verifying Disallowed Category MOBANDEVER-236:EVQAAND-229\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickNews();\n\t\t\tcommon.scrollUntilTextExists(\"News/Public Radio\");\n\t\t\tgetPageFactory().getEvehome().clickSubCatNews();\n\t\t\tgetPageFactory().getEvehome().clickNewsChannel1();\n\t\t\tgetPageFactory().getEvehome().validateNPLScreen();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"@Test\n public void deleteCategory_ReturnsFalse(){\n assertEquals(\"deleteCategory - Returns False\", false, testDatabase.deleteCategory(Integer.MAX_VALUE));\n }",
"public void removeSong(Song song) {\n\n for(int ii = 0; ii < Library.size(); ii++) {\n if(Library.get(ii).equals(song)) {\n Library.remove(ii);\n }\n \n }\n }",
"@Test\n public void getCategory_CorrectInformation(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"getCategory - Correct Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"getCategory - Correct ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void getAllRecipeCategories_ReturnsNull(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipeCategory(returned);\n assertEquals(\"getAllRecipeCategories - Empty List Returned\", null, testDatabase.getAllRecipeCategories(returned));\n }",
"protected boolean deleteCategory(int conId, int catId) {\n\t\tContest cs = getContest(conId);\n\t\tif(cs == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!cs.hasCategory(catId)) {\n\t\t\treturn false;\n\t\t}\n\t\tcs.removeCategory(catId);\n\t\treturn true;\n\t}",
"@Test\n\tpublic void addProductToCartFromCategoryDrop() {\n\t}",
"@Test\n void removeItem() {\n }",
"@Test\r\n public void testRemover() throws Exception {\r\n tx.begin();\r\n Categoria categoria = new Categoria(\"Teste remover categoria\");\r\n dao.persiste(categoria);\r\n tx.commit();\r\n em.refresh(categoria);\r\n tx.begin();\r\n dao.remover(categoria);\r\n tx.commit();\r\n assertFalse(\"O objeto ainda persiste\", em.contains(categoria));\r\n }",
"public void removeCat(int position)\r\n {\r\n int numberOfCats = catCollection.size();\r\n // check for valid index position\r\n if ((position >= 0) && (position < numberOfCats )) {\r\n catCollection.remove(position);\r\n }\r\n else {\r\n System.out.println(\"Not a valid index position!\");\r\n }\r\n }",
"@Test\n public void deletarProductCategoryTest() throws ApiException {\n Integer productCategoryCode = null;\n api.deletarProductCategory(productCategoryCode);\n\n // TODO: test validations\n }",
"public void testRemove() {\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n tree.insert(\"bagel\");\r\n\r\n tree.remove(\"apple\");\r\n tree.remove(\"bagel\");\r\n\r\n tree.insert(\"ab\");\r\n tree.remove(\"ab\");\r\n\r\n try {\r\n tree.remove(\"apple\");\r\n }\r\n catch (ItemNotFoundException e) {\r\n assertNotNull(e);\r\n }\r\n }",
"@Test\n void removeItem() {\n\n }",
"@Override\n\tpublic void deleteCategory(HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\n\t}",
"protected boolean deleteTeamCategory(int conId, int tcId) {\n\t\tContest cs = getContest(conId);\n\t\tif(cs == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!cs.hasTeamCategory(tcId)) {\n\t\t\treturn false;\n\t\t}\n\t\tcs.removeTeamCategory(tcId);\n\t\treturn true;\n\t}",
"Boolean removeCategoryfromDvd(Integer category_Id, Integer dvdId) \n throws DvdStoreException;",
"public void deleteCategory(Category category) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n category.setApproved(false);\n dbb.overwriteCategory(category);\n dbb.commit();\n dbb.closeConnection();\n }",
"@Test\n\tpublic void testGetSubCategoryL3() {\n\t\tString subCategoryL3 = rmitAnalyticsModel.getSubCategoryL3();\n\t\tAssert.assertNotNull(subCategoryL3);\n\t\tAssert.assertTrue(subCategoryL3.isEmpty());\n\t}",
"private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(categoryToDelete);\n testDatabase();\n }",
"@Test\n public void addCategory_DatabaseUpdates(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"addCategory - Correct Category Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"addCategory - Set Category ID\", returned, retrieved.getKeyID());\n }",
"public void deletePortletCategory(PortletCategory category);",
"void deleteCodeCategory(UUID id)\n throws DAOException;",
"@Test\n public void removeMovie_test() {\n theater.getMovies().remove(\"Jumanji\");\n int expected = 3;\n int actual = theater.getMovies().size();\n Assert.assertEquals(expected,actual);\n }",
"public static void removeNewCategory(String categoryname) {\r\n\t\tint categoryID=0;\r\n\r\n\t\t/* fetch the category ID for the given caategoryName*/\r\n\t\tsqlQuery = \"SELECT categoryID FROM flipkart_category WHERE categoryName=?;\";\r\n\r\n\t\ttry{\r\n\t\t\tconn=DbConnection.getConnection();\r\n\t\t\tps=conn.prepareStatement(sqlQuery);\r\n\t\t\tps.setString(1, categoryname);\r\n\t\t\trs=ps.executeQuery();\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tcategoryID = rs.getInt(1);\r\n\t\t\t}\r\n\r\n\t\t\t/* deleting from category table */\r\n\t\t\tsqlQuery = \"DELETE FROM flipkart_category WHERE categoryID=?\";\r\n\r\n\t\t\ttry{\r\n\t\t\t\tconn=DbConnection.getConnection();\r\n\t\t\t\tps=conn.prepareStatement(sqlQuery);\r\n\t\t\t\tps.setInt(1, categoryID);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t/* deleting from path table */\r\n\t\t\t\tsqlQuery = \"DELETE FROM flipkart_path WHERE categoryID=?\";\r\n\t\t\t\t\r\n\t\t\t\ttry{\r\n\t\t\t\t\tconn=DbConnection.getConnection();\r\n\t\t\t\t\tps=conn.prepareStatement(sqlQuery);\r\n\t\t\t\t\tps.setInt(1, categoryID);\r\n\t\t\t\t\tps.executeUpdate();\t\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e){\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void delete(Category entity) {\n\t\t\n\t}",
"@Test\n public void testDefaultCategorizationUsingServiceAPI() throws Exception {\n EventServiceAdmin eventServiceAdmin = Framework.getService(EventServiceAdmin.class);\n eventServiceAdmin.setListenerEnabledFlag(\n \"documentCategorizationSyncListener\", false);\n \n // let us create some documents\n makeSomeDocuments();\n f2 = session.getDocument(f2.getRef());\n file1 = session.getDocument(file1.getRef());\n file2 = session.getDocument(file2.getRef());\n note1 = session.getDocument(note1.getRef());\n\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:coverage\"));\n assertEquals(null, file2.getPropertyValue(\"dc:language\"));\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // run the engine again, this time all the documents should be processed\n List<DocumentModel> updatedDocuments = service.updateCategories(Arrays.asList(\n file1, file2, note1, f2));\n assertEquals(3, updatedDocuments.size());\n \n assertEquals(\"en\", file1.getPropertyValue(\"dc:language\"));\n assertEquals(\"asia/Viet_Nam\", file1.getPropertyValue(\"dc:coverage\"));\n \n assertEquals(\"fr\", file2.getPropertyValue(\"dc:language\"));\n assertEquals(\"europe/France\", file2.getPropertyValue(\"dc:coverage\"));\n \n // TODO: handle the string content of Note document too\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // folderish documents are ignored by the categorizers\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n }",
"@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}",
"public void removeCvcategory(Cvcategory cvcategory);",
"public void testRemove() {\n TaskSeriesCollection c = new TaskSeriesCollection();\n TaskSeries s1 = new TaskSeries(\"S1\");\n c.add(s1);\n c.remove(0);\n c.add(s1);\n boolean pass = false;\n try {\n c.remove(-1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n pass = false;\n try {\n c.remove(1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n }",
"@Override\n\tpublic void delete(Category entity) {\n\n\t}",
"boolean hasRemoveForumIdFromCategory();",
"@Test\n public void testRemovePositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n\n Assert.assertTrue(itemDao.delete(item.getName()));\n Assert.assertNull(itemDao.read(item.getName()));\n }",
"@Test\n public void testRemoveSection() {\n System.out.println(\"removeSection\");\n int position = 0;\n \n if (instance.getNumberOfSections() > 0) \n instance.removeSection(position);\n else {\n instance.addSection(new Section(1, null, null, null, position));\n instance.removeSection(0);\n }\n int result = instance.getNumberOfSections();\n assertTrue (\"Was not removed\", result == 0);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }",
"void deleteCategoryProducts(long id);",
"@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}",
"@Test\n public void deleteRecipeCategory_ReturnsFalse(){\n assertEquals(\"deleteRecipeCategory - Returns False\",false, testDatabase.deleteRecipeCategory(Integer.MAX_VALUE));\n }",
"@Test\n public void testRemoveACopy() {\n }",
"public void removeCategory(String type) {\n\t\tif (type.equals(\"Sauces\")) {\n\t\t\tthis.removeIngredient(\"Ketchup\");\n\t\t\tthis.removeIngredient(\"Mustard\");\n\t\t\tthis.removeIngredient(\"Mayonnaise\");\n\t\t\tthis.removeIngredient(\"Baron-Sauce\");\n\t\t} else if (type.equals(\"Cheese\")) {\n\t\t\tthis.removeIngredient(\"Cheddar\");\n\t\t\tthis.removeIngredient(\"Mozzarella\");\n\t\t\tthis.removeIngredient(\"Pepperjack\");\n\t\t} else if (type.equals(\"Veggies\")) {\n\t\t\tthis.removeIngredient(\"Lettuce\");\n\t\t\tthis.removeIngredient(\"Tomato\");\n\t\t\tthis.removeIngredient(\"Onions\");\n\t\t\tthis.removeIngredient(\"Pickle\");\n\t\t\tthis.removeIngredient(\"Mushrooms\");\n\t\t}\n\t}",
"@Test\n\tpublic void testGetSubCategoryL6() {\n\t\tString subCategoryL6 = rmitAnalyticsModel.getSubCategoryL6();\n\t\tAssert.assertNotNull(subCategoryL6);\n\t\tAssert.assertTrue(subCategoryL6.isEmpty());\n\t}",
"void updateCategory(String category){}",
"@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}",
"@Test\r\n public void testDeleteRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.deleteRecipe(0));\r\n assertNull(coffeeMaker.deleteRecipe(0)); // Test already delete recipe\r\n }",
"void updateCategory(Category category);",
"void updateCategory(Category category);",
"@Test\n public void testRemoveProduct() {\n }",
"@Test\n public void test57() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"wX*\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot1 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n combinedDomainCategoryPlot0.remove(combinedDomainCategoryPlot1);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null, true);\n AxisChangeEvent axisChangeEvent0 = new AxisChangeEvent((Axis) extendedCategoryAxis0);\n combinedDomainCategoryPlot0.axisChanged(axisChangeEvent0);\n combinedDomainCategoryPlot0.setRenderer(84, (CategoryItemRenderer) null, true);\n AxisSpace axisSpace0 = combinedDomainCategoryPlot0.getFixedDomainAxisSpace();\n boolean boolean0 = combinedDomainCategoryPlot0.getDrawSharedDomainAxis();\n }",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"@Test\n public void test36() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n CategoryTextAnnotation categoryTextAnnotation0 = new CategoryTextAnnotation(\"\", (Comparable) \"\", (-1680.444156425021));\n categoryTextAnnotation0.setCategory(\"\");\n boolean boolean0 = combinedDomainCategoryPlot0.removeAnnotation(categoryTextAnnotation0);\n categoryTextAnnotation0.setRotationAngle((-614.082251));\n CategoryItemRenderer categoryItemRenderer0 = combinedDomainCategoryPlot0.getRenderer(0);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null);\n int int0 = combinedDomainCategoryPlot0.getRangeAxisCount();\n }",
"@Override\n\tpublic boolean deleteCategory(String catName) {\n\t\tTransaction tx=sessionFactory.getCurrentSession().beginTransaction();\n\t\tboolean found =categoryhome.isFound(catName);\n\t\tif(found==true)\n\t\t{\n\t\t\tCategory cat=categoryhome.getByName(catName);\n\t\t\tsessionFactory.getCurrentSession().delete(cat);\n\t\t\ttx.commit();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\t\n\t\t}\n\t\n\t}",
"@Test\n\tpublic void testRemoveQuestion() {\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.removeQuestion(tdp.question1_location1.getId(), LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} catch (AttachmentException e) {\n\t\t\tAssert.fail(\"Should throw SecurityException\");\n\t\t}\n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.removeQuestion(tdp.question1_location1.getId(), LOCATION1_ID);\n\t\t\tAssert.assertFalse(questionLogic.existsQuestion(tdp.question1_location1.getId()));\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t} catch (AttachmentException e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t\t\n\t\tAssert.assertNull(questionLogic.getQuestionById(tdp.question1_location1.getId()));\n\t}",
"@Test\n public void addRecipeCategory_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n RecipeCategory retrieved = new RecipeCategory();\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getKeyID() == returnedCategory){\n retrieved = allCategories.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct RecipeID\", returnedRecipe, retrieved.getRecipeID());\n assertEquals(\"addRecipeDirection - Correct CategoryID\", categoryID, retrieved.getCategoryID());\n }",
"@Test\n\tpublic void testGetSubCategoryL1() {\n\t\tString subCategoryL1 = rmitAnalyticsModel.getSubCategoryL1();\n\t\tAssert.assertNotNull(subCategoryL1);\n\t\tAssert.assertEquals(\"content\", subCategoryL1);\n\t}",
"public String deleteCategory()\n {\n logger.info(\"**** In deleteCategory in Controller ****\");\n boolean deleteFlag = categoryService.deleteCategory(categoryId);\n if (deleteFlag)\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Constants.CATEGORY_DELETION_SUCCESS, Constants.CATEGORY_DELETION_SUCCESS);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n\n return searchCategory();\n }",
"@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}",
"@Test\n public void testRemove(){\n DogHouse testDogHouseRem = new DogHouse();\n Integer expected = 0;\n\n Dog newDog = new Dog(\"Thor\", new Date(), 23);\n testDogHouseRem.add(newDog);\n\n testDogHouseRem.remove(newDog);\n Integer actual = testDogHouseRem.getNumberOfDogs();\n\n Assert.assertEquals(expected, actual);\n }",
"@FXML\n private void deleteCategory()\n {\n CategoryFxModel selectedCategory = categoryTable.getSelectionModel().getSelectedItem();\n if(selectedCategory == null)\n {\n DialogsUtils.categoryNotSelectedDialog();\n }\n else\n {\n Optional<ButtonType> result = DialogsUtils.deleteCategoryConfirmationDialog();\n deleteCategoryWhenOkPressed(selectedCategory, result);\n }\n }",
"@Override\n\tpublic void deleteCateogry(int id) {\n\t\tcategoryRepository.deleteById(id);\n\t\t\n\t}",
"public void removePlaylistTabData(SQLiteDatabase database,long categoriesId) {\n try {\n database.enableWriteAheadLogging();\n database.execSQL(\"DELETE FROM \" + PLAYLIST_DATA_TABLE + \" WHERE \" + KEY_CATEGORIES_ID + \" = \" + categoriesId);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"void addCategory(Category category);",
"void deleteTrackerListCategory(final Integer id);",
"@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}"
]
| [
"0.7091058",
"0.68884283",
"0.6812946",
"0.68081594",
"0.67963827",
"0.66529876",
"0.6623845",
"0.662384",
"0.6605379",
"0.65121496",
"0.648185",
"0.63555974",
"0.6326503",
"0.6310931",
"0.62813675",
"0.6273837",
"0.6208637",
"0.61131746",
"0.6098811",
"0.6083783",
"0.5995846",
"0.59523827",
"0.5945998",
"0.5890202",
"0.5868331",
"0.5852612",
"0.58345556",
"0.5813556",
"0.5809646",
"0.58028644",
"0.5794311",
"0.57593906",
"0.57567626",
"0.5741406",
"0.57220364",
"0.5704676",
"0.57009375",
"0.56990856",
"0.5695178",
"0.5692178",
"0.568858",
"0.5683014",
"0.5682858",
"0.56735015",
"0.5661861",
"0.5625594",
"0.56179565",
"0.5616997",
"0.56095237",
"0.560568",
"0.55903244",
"0.5569022",
"0.5568629",
"0.5560825",
"0.5558927",
"0.55475706",
"0.5541641",
"0.5529942",
"0.5528404",
"0.551854",
"0.55029845",
"0.550085",
"0.5500675",
"0.5490908",
"0.5482441",
"0.54823864",
"0.54684556",
"0.5466463",
"0.5459108",
"0.5452275",
"0.54389393",
"0.5423995",
"0.54208106",
"0.5419507",
"0.5415864",
"0.54040015",
"0.5399181",
"0.5381628",
"0.5379801",
"0.5375042",
"0.5369984",
"0.53667295",
"0.53667295",
"0.5361329",
"0.53574765",
"0.53484845",
"0.53462917",
"0.5343672",
"0.5342519",
"0.5342301",
"0.53417325",
"0.534005",
"0.5334597",
"0.5330904",
"0.53296685",
"0.53220075",
"0.53158987",
"0.5315322",
"0.5311939",
"0.53118056"
]
| 0.80132097 | 0 |
we do this before appending to ensure we can resetAndTruncate() safely if appending fails | public AbstractRowIndexEntry append(UnfilteredRowIterator partition)
{
DecoratedKey key = partition.partitionKey();
maybeReopenEarly(key);
return writer.append(partition);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void truncate()\n {\n clear(true);\n }",
"public abstract void truncate();",
"void appendFlushed() throws IOException {\n synchronized (flushed) {\n if (flushed.length() > 0) {\n final String s = flushed.toString();\n flushed.setLength(0);\n Platform.runLater(() -> {\n textArea.appendText(s);\n int textLength = textArea.getText().length();\n if (textLength > MAX_TEXT_LENGTH) {\n textArea.setText(textArea.getText(textLength - MAX_TEXT_LENGTH / 2, textLength));\n }\n });\n }\n }\n }",
"public void resetAndTruncate()\n {\n rowIndexFile.resetAndTruncate(riMark);\n partitionIndexFile.resetAndTruncate(piMark);\n }",
"public void truncateFinal() {\n trimHead();\n }",
"protected void subAppend(LoggingEvent event)\r\n\t{\r\n\t\tlong currentTime = System.currentTimeMillis();\r\n\t\t// check time for date roll over\r\n\t\tif (currentTime >= nextCheck)\r\n\t\t{\r\n\t\t\tnow.setTime(currentTime);\r\n\t\t\tnextCheck = rc.getNextCheckMillis(now);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tdatePatternRollOver();\r\n\t\t\t} catch (IOException ioe)\r\n\t\t\t{\r\n\t\t\t\tLogLog.error(\"datePatternRollOver() failed.\", ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsuper.subAppend(event);\r\n\t\tlong size = ((CountingQuietWriter) qw).getCount();\r\n\t\t// check whether size has increased beyond the specified size or not\r\n\t\tif ((fileName != null) && size >= this.getMaximumFileSize() && size >= nextRollover)\r\n\t\t{\r\n\t\t\tsizeRollover();\r\n\t\t}\r\n\t}",
"private static void flushInternalBuffer() {\n\n //Strongly set the last byte to \"0A\"(new line)\n if (mPos < LOG_BUFFER_SIZE_MAX) {\n buffer[LOG_BUFFER_SIZE_MAX - 1] = 10;\n }\n\n long t1, t2;\n\n //Save buffer to SD card.\n t1 = System.currentTimeMillis();\n writeToSDCard();\n //calculate write file cost\n t2 = System.currentTimeMillis();\n Log.i(LOG_TAG, \"internalLog():Cost of write file to SD card is \" + (t2 - t1) + \" ms!\");\n\n //flush buffer.\n Arrays.fill(buffer, (byte) 0);\n mPos = 0;\n }",
"public void charactersFlush() {\r\n if (this.m_textPendingStart >= 0) {\r\n int size = this.m_chars.size() - this.m_textPendingStart;\r\n boolean z = false;\r\n if (getShouldStripWhitespace()) {\r\n z = this.m_chars.isWhitespace(this.m_textPendingStart, size);\r\n }\r\n if (z) {\r\n this.m_chars.setLength(this.m_textPendingStart);\r\n } else if (size > 0) {\r\n this.m_previous = addNode(this.m_coalescedTextType, this.m_expandedNameTable.getExpandedTypeID(3), this.m_parents.peek(), this.m_previous, this.m_data.size(), false);\r\n this.m_data.addElement(this.m_textPendingStart);\r\n this.m_data.addElement(size);\r\n }\r\n this.m_textPendingStart = -1;\r\n this.m_coalescedTextType = 3;\r\n this.m_textType = 3;\r\n }\r\n }",
"public void truncate() {\n if (this.size > this.limit) {\n removeFirst();\n }\n }",
"private void flushImpl() {\r\n String s = null;\r\n\r\n // grab data from the buffer\r\n synchronized (this) {\r\n if (buffer.length() > 0) {\r\n s = buffer.toString();\r\n buffer.setLength(0);\r\n }\r\n }\r\n\r\n // don't do anything if buffer was empty\r\n if (s != null) {\r\n try {\r\n boolean scroll = false;\r\n Document d = textViewer.getDocument();\r\n int docLen = d.getLength();\r\n if (docLen > 0) {\r\n scroll = (textViewer.getCaretPosition() >= (docLen-1));\r\n }\r\n\r\n // Insert new text:\r\n d.insertString(d.getLength(), s, attributes);\r\n\r\n // Is number of lines limited?\r\n if (isSizeLimited() && docLen > getMaxSize()) {\r\n Element root = d.getDefaultRootElement();\r\n int i = root.getElementIndex(docLen - getMaxSize());\r\n if (i >= 0) {\r\n Element e = root.getElement(i);\r\n int offset = e.getEndOffset();\r\n d.remove(0,Math.min(offset,docLen));\r\n }\r\n }\r\n\r\n // Scroll view to the end only if cursor was at the end:\r\n if (scroll) {\r\n textViewer.setCaretPosition(d.getLength());\r\n }\r\n\r\n // Update summary view:\r\n if (summaryView != null && d.getLength() > 0) {\r\n Element root = d.getDefaultRootElement();\r\n int n = root.getElementCount();\r\n if (n > 0) {\r\n Element last = root.getElement(n-1);\r\n int start = last.getStartOffset();\r\n int end = last.getEndOffset();\r\n if ((end-start) <= 1 && n > 1) {\r\n last = root.getElement(n-2);\r\n start = last.getStartOffset();\r\n end = last.getEndOffset();\r\n }\r\n\r\n AttributeSet a = last.getAttributes();\r\n Object fg = a.getAttribute(StyleConstants.Foreground);\r\n Object bg = a.getAttribute(StyleConstants.Background);\r\n if (!(fg instanceof Color)) {\r\n fg = LookFactory.getCodeColorSet().foregroundColor;\r\n }\r\n if (!(bg instanceof Color)) {\r\n bg = LookFactory.getCodeColorSet().backgroundColor;\r\n }\r\n summaryView.setForeground((Color)fg);\r\n summaryView.setBackground((Color)bg);\r\n\r\n String text = d.getText(start,end-start);\r\n if (text.length() > 0) {\r\n summaryView.setText(text);\r\n } else {\r\n summaryView.clear();\r\n }\r\n }\r\n }\r\n\r\n // Write the file:\r\n if (fileWriter != null) {\r\n char lastChar = lastFileChar;\r\n int len = s.length();\r\n for (int i=0; i<len; i++) {\r\n char c = s.charAt(i);\r\n if (c == '\\n') {\r\n if (lastFileChar == '\\r') {\r\n fileWriter.write(c);\r\n } else {\r\n // Use platform-specific end of line seq\r\n fileWriter.println();\r\n }\r\n } else {\r\n fileWriter.write(c);\r\n }\r\n lastChar = c;\r\n }\r\n\r\n lastFileChar = lastChar;\r\n fileWriter.flush();\r\n }\r\n\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }",
"public void testAppend() {\n test1.append(new Buffer(3, rec));\n test1.append(new Buffer(3, rec));\n test1.append(new Buffer(3, rec));\n test1.append(new Buffer(3, rec));\n test1.append(new Buffer(3, rec));\n test1.append(new Buffer(3, rec));\n assertEquals(6, test1.length());\n }",
"private void appendStrBufToLongStrBuf() {\n for (int i = 0; i < strBufLen; i++) {\n appendLongStrBuf(strBuf[i]);\n }\n }",
"private synchronized static void internalLog(StringBuilder msg) {\n\n //add time header\n String timeStamp = simpleDateFormat.format(new Date());\n msg.insert(0, timeStamp);\n byte[] contentArray = msg.toString().getBytes();\n int length = contentArray.length;\n int srcPos = 0;\n\n if (mPos == LOG_BUFFER_SIZE_MAX) {\n //Flush internal buffer\n flushInternalBuffer();\n }\n\n if (length > buffer.length) {\n //Strongly flush the current buffer no matter whether it is full\n flushInternalBuffer();\n\n //Flush all msg string to sd card\n while (length > buffer.length) {\n\n System.arraycopy(contentArray, srcPos, buffer, mPos, buffer.length);\n\n flushInternalBuffer();\n\n length -= buffer.length;\n srcPos += buffer.length;\n\n }\n } else if (length == buffer.length) {\n flushInternalBuffer();\n\n //Copy contents to buffer\n System.arraycopy(contentArray, 0, buffer, mPos, length);\n flushInternalBuffer();\n length = 0;\n }\n\n if (length < buffer.length && length > 0) {\n if ((mPos + length) > buffer.length) {\n flushInternalBuffer();\n\n //Copy contents to buffer\n System.arraycopy(contentArray, srcPos, buffer, mPos, length);\n mPos += length;\n\n } else if ((mPos + length) == buffer.length) {\n //Add content to buffer\n System.arraycopy(contentArray, srcPos, buffer, mPos, length);\n mPos += length;\n\n flushInternalBuffer();\n\n } else {\n //Add content to buffer\n System.arraycopy(contentArray, srcPos, buffer, mPos, length);\n mPos += length;\n\n }\n\n }\n\n }",
"public void truncate() {\n\t\ttry {\n\t\t\t_reopenToken = _trackingIndexWriter.deleteAll();\n\t\t\tlog.warn(\"lucene index truncated\");\n\t\t} catch(IOException ioEx) {\n\t\t\tlog.error(\"Error truncating lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t \t\t \t ioEx);\t\t\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\t_indexWriter.commit(); \n\t\t\t} catch (IOException ioEx) {\n\t\t\t\tlog.error(\"Error truncating lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t ioEx);\n\t\t\t}\n\t\t}\n\t}",
"void flushBefore(long pos) throws IOException;",
"@Override\n public void flush() throws IOException\n {\n for(;;) {\n int index = indexOneOf(builder, '\\r', '\\n');\n if(index == -1) {\n break;\n }\n // ignore false returned by offer when queue is full\n queue.offer(builder.substring(0, index));\n\n if(builder.charAt(index) == '\\r') {\n ++index;\n }\n if(builder.charAt(index) != '\\n') {\n throw new IllegalStateException();\n }\n ++index;\n builder.delete(0, index);\n }\n }",
"private void append(byte[] array, int off, int len) throws IOException {\n if(buffer == null) {\n buffer = allocator.allocate(limit);\n }\n buffer.append(array, off, len);\n }",
"public void appendLogFile(String str)\n{\n if(fileWriter != null)\n {\n try { \n \n fileWriter.append(str); \n \n } catch (Exception e) { \n \n System.out.println(\"Error in CsvFileWriter !!!\"); \n e.printStackTrace(); \n \n } finally { \n \n try {\n \n fileWriter.flush(); \n //fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n } \n }\n}",
"void appendTo(Appendable buff) throws IOException;",
"protected void subAppend(E event) {\n if (!isStarted()) {\n return;\n }\n try {\n // this step avoids LBCLASSIC-139\n if (event instanceof DeferredProcessingAware) {\n ((DeferredProcessingAware)event).prepareForDeferredProcessing();\n }\n // the synchronization prevents the OutputStream from being closed while we\n // are writing. It also prevents multiple threads from entering the same\n // converter. Converters assume that they are in a synchronized block.\n // lock.lock();\n\n byte[] byteArray = this.encoder.encode(event);\n writeBytes(byteArray);\n\n } catch (IOException ioe) {\n // as soon as an exception occurs, move to non-started state\n // and add a single ErrorStatus to the SM.\n this.started = false;\n addStatus(new ErrorStatus(\"IO failure in appender\", this, ioe));\n }\n }",
"private void clearStrBuf() {\n strBufLen = 0;\n }",
"private void append(String text) {\n // Reset counter if starts with a newline. only from formats above, not in natural text\n if (text.startsWith(\"\\n\")) {\n mWidth = 0;\n }\n\n // Don't accumulate long runs of empty spaces\n if (text.equals(\" \") && (mAccum.length() == 0 || StringUtil.in(\n mAccum.substring(mAccum.length() - 1), \" \", \"\\n\"))) {\n return;\n }\n\n // Won't fit, needs to wrap\n if (text.length() + mWidth > mMaxWidth) {\n String[] words = text.split(\"\\\\s+\");\n\n for (int i = 0; i < words.length; i++) {\n String word = words[i];\n boolean last = i == words.length - 1;\n\n // Insert a space if not the last word\n if (!last) {\n word = word + \" \";\n }\n\n // Wrap and reset counter\n if (word.length() + mWidth > mMaxWidth) {\n mAccum.append(\"\\n\").append(word);\n mWidth = word.length();\n } else {\n mAccum.append(word);\n mWidth += word.length();\n }\n }\n } else {\n // Fits as is, without need to wrap text\n mAccum.append(text);\n mWidth += text.length();\n }\n }",
"public void flush() throws IOException { \r\n\t \r\n\t \r\n\t synchronized(this) { \r\n\t super.flush(); \r\n\t record = this.toString(); \r\n\t super.reset(); \r\n\t \r\n\t if (record.length() == 0 || record.equals(lineSeparator)) { \r\n\t // avoid empty records \r\n\t return; \r\n\t } \r\n\t if (!PlatformUI.getWorkbench().getDisplay().isDisposed()){\r\n\t\t PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {\r\n\t\t \tpublic void run() {\r\n\t\t\t\t\t\t\tif ((console != null) && (!console.isDisposed()) && doLog){\r\n\t\t\t\t\t\t\t\tconsole.append(record);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t }\r\n\t } \r\n\t }",
"@Override\r\n public synchronized void flush() throws IOException {\r\n\t\tif ( count != 0 ) {\r\n\t\t writeBuffer(buf, 0, count );\r\n\t\t count = 0;\r\n\t\t}\r\n\t}",
"@Test\n public void testMultipleAppendsDuringCatchupTailing() throws Exception {\n Configuration conf = new Configuration();\n // Set a length edits tailing period, and explicit rolling, so we can\n // control the ingest of edits by the standby for this test.\n conf.set(DFS_HA_TAILEDITS_PERIOD_KEY, \"5000\");\n conf.setInt(DFS_HA_LOGROLL_PERIOD_KEY, (-1));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).nnTopology(MiniDFSNNTopology.simpleHATopology()).numDataNodes(3).build();\n FileSystem fs = null;\n try {\n cluster.transitionToActive(0);\n fs = HATestUtil.configureFailoverFs(cluster, conf);\n Path fileToAppend = new Path(\"/FileToAppend\");\n Path fileToTruncate = new Path(\"/FileToTruncate\");\n final byte[] data = new byte[1 << 16];\n ThreadLocalRandom.current().nextBytes(data);\n final int[] appendPos = AppendTestUtil.randomFilePartition(data.length, TestHAAppend.COUNT);\n final int[] truncatePos = AppendTestUtil.randomFilePartition(data.length, 1);\n // Create file, write some data, and hflush so that the first\n // block is in the edit log prior to roll.\n FSDataOutputStream out = TestHAAppend.createAndHflush(fs, fileToAppend, data, appendPos[0]);\n FSDataOutputStream out4Truncate = TestHAAppend.createAndHflush(fs, fileToTruncate, data, data.length);\n // Let the StandbyNode catch the creation of the file.\n cluster.getNameNode(0).getRpcServer().rollEditLog();\n cluster.getNameNode(1).getNamesystem().getEditLogTailer().doTailEdits();\n out.close();\n out4Truncate.close();\n // Append and re-close a few time, so that many block entries are queued.\n for (int i = 0; i < (TestHAAppend.COUNT); i++) {\n int end = (i < ((TestHAAppend.COUNT) - 1)) ? appendPos[(i + 1)] : data.length;\n out = fs.append(fileToAppend);\n out.write(data, appendPos[i], (end - (appendPos[i])));\n out.close();\n }\n boolean isTruncateReady = fs.truncate(fileToTruncate, truncatePos[0]);\n // Ensure that blocks have been reported to the SBN ahead of the edits\n // arriving.\n cluster.triggerBlockReports();\n // Failover the current standby to active.\n cluster.shutdownNameNode(0);\n cluster.transitionToActive(1);\n // Check the FSCK doesn't detect any bad blocks on the SBN.\n int rc = ToolRunner.run(new org.apache.hadoop.hdfs.tools.DFSck(cluster.getConfiguration(1)), new String[]{ \"/\", \"-files\", \"-blocks\" });\n Assert.assertEquals(0, rc);\n Assert.assertEquals(\"CorruptBlocks should be empty.\", 0, cluster.getNameNode(1).getNamesystem().getCorruptReplicaBlocks());\n AppendTestUtil.checkFullFile(fs, fileToAppend, data.length, data, fileToAppend.toString());\n if (!isTruncateReady) {\n TestFileTruncate.checkBlockRecovery(fileToTruncate, cluster.getFileSystem(1), 300, 200);\n }\n AppendTestUtil.checkFullFile(fs, fileToTruncate, truncatePos[0], data, fileToTruncate.toString());\n } finally {\n if (null != cluster) {\n cluster.shutdown();\n }\n if (null != fs) {\n fs.close();\n }\n }\n }",
"@Override\n public synchronized void append(LoggingEvent event) {\n while (logQueue.size() > size) {\n logQueue.remove();\n }\n if (closed) {\n LogLog.warn(\"This appender is already closed, cannot append event.\");\n return;\n }\n \n String loggerName = getLoggerName(event);\n\n LogEntry logEntry = new LogEntry(System.currentTimeMillis(), event.getLevel().toString(), loggerName, event.getMessage().toString());\n logQueue.add(logEntry);\n }",
"public void flush() {\n\t\tif ( !printing_status() ) {\n\t\t\tint sz = _platform_io.size_text( _current_word.toString() );\n\t\t\tif ( _last_column + sz >= _wrap_column ) {\n\t\t\t\tinc_line();\n\t\t\t}\n\n\t\t\t_last_column += sz;\n\t\t\t_platform_io.print_text( _current_word.toString() );\n\t\t\t_current_word.setLength( 0 );\n\t\t} else {\n\t\t\t_status_line.append( _current_word.toString() );\n\t\t\t_current_word.setLength( 0 );\n\t\t}\n\t}",
"protected void deferFlush()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n m_lNextFlush = Long.MAX_VALUE;\n }",
"protected void truncate() {\n doQuery(\"TRUNCATE TABLE feedentryqueue\");\n }",
"private void appendChars(boolean trimTrailing) {\n\n\t\tStringBuffer sb;\n\n\t\tStackEntry entry = this.stack.isEmpty() ? null : this.stack.getLast();\n\n\t\tif (entry != null && entry.pre) {\n\n\t\t\tsb = this.pendingChars;\n\n\t\t} else {\n\n\t\t\t// collapse the space in the pending characters\n\t\t\tsb = new StringBuffer(this.pendingChars.length());\n\t\t\tboolean ws = false; // true if we're in a run of whitespace\n\t\t\tfor (int i = 0; i < this.pendingChars.length(); i++) {\n\t\t\t\tchar c = this.pendingChars.charAt(i);\n\t\t\t\tif (Character.isWhitespace(c)) {\n\t\t\t\t\tws = true;\n\t\t\t\t} else {\n\t\t\t\t\tif (ws) {\n\t\t\t\t\t\tsb.append(' ');\n\t\t\t\t\t\tws = false;\n\t\t\t\t\t}\n\t\t\t\t\tsb.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ws) {\n\t\t\t\tsb.append(' ');\n\t\t\t}\n\t\t\t// trim leading and trailing space, if necessary\n\t\t\tif (this.trimLeading && sb.length() > 0 && sb.charAt(0) == ' ') {\n\t\t\t\tsb.deleteCharAt(0);\n\t\t\t}\n\t\t\tif (trimTrailing && sb.length() > 0\n\t\t\t\t\t&& sb.charAt(sb.length() - 1) == ' ') {\n\t\t\t\tsb.setLength(sb.length() - 1);\n\t\t\t}\n\t\t}\n\n\t\tthis.normalizeNewlines(sb);\n\n\t\tthis.content.insertString(this.content.getLength(), sb.toString());\n\n\t\tthis.pendingChars.setLength(0);\n\t\tthis.trimLeading = false;\n\t}",
"@Override\r\n\tprotected void doLast() {\n\t\t\r\n\t}",
"private void clearFullTree()\r\n {\r\n fullXmlTree = new StringBuilder();\r\n }",
"private void createLeftOver() {\n/* 332 */ int lineLengthBytes = this.currentLastBytePos + 1;\n/* 333 */ if (lineLengthBytes > 0) {\n/* */ \n/* 335 */ this.leftOver = new byte[lineLengthBytes];\n/* 336 */ System.arraycopy(this.data, 0, this.leftOver, 0, lineLengthBytes);\n/* */ } else {\n/* 338 */ this.leftOver = null;\n/* */ } \n/* 340 */ this.currentLastBytePos = -1;\n/* */ }",
"public void refreshAppend() throws IOException, InterruptedException {\n appendAndRefreshAppendLock.lock();\n if (shutdown.get()) {\n LOG.warning(\"Cannot refresh on a already shutdown writer.\");\n appendAndRefreshAppendLock.unlock();\n return;\n }\n // There could be a moment, stub is not yet initialized.\n if (clientStream != null) {\n LOG.info(\"Closing the stream \" + streamName);\n clientStream.closeSend();\n }\n messagesBatch.resetAttachSchema();\n bidiStreamingCallable = stub.appendRowsCallable();\n clientStream = bidiStreamingCallable.splitCall(responseObserver);\n try {\n while (!clientStream.isSendReady()) {\n Thread.sleep(10);\n }\n } catch (InterruptedException expected) {\n }\n Thread.sleep(this.retrySettings.getInitialRetryDelay().toMillis());\n // Can only unlock here since need to sleep the full 7 seconds before stream can allow appends.\n appendAndRefreshAppendLock.unlock();\n LOG.info(\"Write Stream \" + streamName + \" connection established\");\n }",
"private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}",
"void testAppend(Tester t) {\n t.checkExpect(ints1.length(), 1);\n t.checkExpect(ints2.length(), 2);\n t.checkExpect(ints3.length(), 2);\n\n ints1.append(ints2);\n\n t.checkExpect(ints1.length(), 3);\n\n ints2.append(ints3);\n\n t.checkExpect(ints1.length(), 5);\n ints2.append(ints4);\n\n t.checkExpect(ints2.length(), 6);\n\n ints4.append(ints4);\n\n // will be infinite\n // t.checkExpect(ints4.length(), -1);\n }",
"protected void grow() {\n }",
"void truncateFile() throws Exception {\n\n long fileSize = outChannel.position(0).size();\n\n long step = fileSize / N;\n\n try {\n\n for (int i = 0; i <= N + 1; ++i) {\n\n outChannel.truncate(fileSize - step * i);\n\n }\n\n } catch (IllegalArgumentException iae) {\n\n // System.out.println(\"IAE\");\n\n // this is just in case to check nothing but exception happens \n // in case of negative size\n }\n\n }",
"private void flush() {\n try {\n output.write(digits);\n } catch (IOException e) {\n throw new RuntimeException(e.toString());\n }\n digits = 0;\n numDigits = 0;\n }",
"public static void endWrite()\r\n\t{\r\n\t\r\n\t}",
"private void appendLongStrBuf(char[] arr) {\n for (int i = 0; i < arr.length; i++) {\n appendLongStrBuf(arr[i]);\n }\n }",
"void flushExistingText( final PdfOutfile outfile )\r\n {\r\n outfile.addColumnsContentToDocument();\r\n }",
"public void flush() throws IOException {\n\t\tif ((buffer.length - cursor) > 50000) {\n\t\t\tSystem.out.println(\"WASTED: \" + (buffer.length - cursor));\n\t\t}\n\t}",
"private void flushChars() throws SAXException, IOException {\n if (cstart != -1) {\n if (pos > cstart) {\n int currCol = col;\n int currLine = line;\n col = colPrev;\n line = linePrev;\n try {\n tokenHandler.characters(buf, cstart, pos - cstart);\n } finally {\n col = currCol;\n line = currLine;\n }\n }\n }\n cstart = -1;\n }",
"private void append(String sAppend) throws Exception {\n\n\tString sFilename = null;\n\tFileWriter fw = null;\n\n\ttry {\n\t // Define the filename.\n\t sFilename = getMeasurementsFilename();\n\n\t // Append.\n\t fw = new FileWriter(sFilename, true);\n\t fw.write(sAppend);\n\t fw.close();\n\n\t} catch (Exception e) {\n\n\t // try writing to the /tmp file system.\n\t FileWriter fw2 = null;\n\t try {\n\t\tsFilename = \"/tmp/cqServiceUsage\";\n\t\tfw2 = new FileWriter(sFilename, true);\n\t\tfw2.write(sAppend);\n\t\tfw2.close();\n\t } catch (Exception e2) {\n\t\tthrow (e2);\n\t } finally {\n\t\tfw2 = null;\n\t }\n\t} finally {\n\t fw = null;\n\t}\n }",
"public void flush() throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n // the newline character should not be necessary. The PrintWriter\r\n // should autmatically put the newline, but it doesn't seem to work\r\n textArea.append(getBuffer().toString());\r\n if(System.getProperty(\"java.version\").startsWith(\"1.1\")){\r\n textArea.append(\"\\n\");\r\n }\r\n textArea.setCaretPosition(textArea.getDocument().getLength());\r\n buffer = new StringBuffer();\r\n }",
"public synchronized void flush() throws IOException {\n\t\tcheckNotClosed();\n\t\ttrimToSize();\n\t\tjournalWriter.flush();\n\t}",
"private void appendStrBuf(char c) {\n if (strBufLen == strBuf.length) {\n char[] newBuf = new char[strBuf.length + BUFFER_GROW_BY];\n System.arraycopy(strBuf, 0, newBuf, 0, strBuf.length);\n strBuf = newBuf;\n }\n strBuf[strBufLen++] = c;\n }",
"private void appendLongStrBuf(char c) {\n if (longStrBufLen == longStrBuf.length) {\n char[] newBuf = new char[longStrBuf.length + BUFFER_GROW_BY];\n System.arraycopy(longStrBuf, 0, newBuf, 0, longStrBuf.length);\n longStrBuf = newBuf;\n }\n longStrBuf[longStrBufLen++] = c;\n }",
"void flushDigits() {\n allDigits += preDigits;\n //System.out.append(predigits);\n preDigits.setLength(0);\n }",
"public AbstractRowIndexEntry tryAppend(UnfilteredRowIterator partition)\n {\n writer.mark();\n try\n {\n return append(partition);\n }\n catch (Throwable t)\n {\n writer.resetAndTruncate();\n throw t;\n }\n }",
"@Override\n public void setUp() {\n super.setUp();\n buffer.setLength(0);\n }",
"private static void clearAndResizeSbIfNeeded(StringBuilder sb0) {\n final int limit = 512;\n final int reducedSize = 64;\n\n if (sb0.capacity() > limit) {\n sb0.setLength(reducedSize);\n }\n\n sb0.delete(0, sb0.length());\n }",
"@Override\n public void flushBuffer() throws IOException {\n\n }",
"protected void append(LoggingEvent event) {\n if(sh != null) {\n sh.send(layout.format(event));\n if(layout.ignoresThrowable()) {\n String[] s = event.getThrowableStrRep();\n if (s != null) {\n StringBuilder buf = new StringBuilder();\n for(int i = 0; i < s.length; i++) {\n buf.append(s[i]);\n buf.append(EOL);\n }\n sh.send(buf.toString());\n }\n }\n }\n }",
"private void wrapText() {\r\n if (atEnd()) {\r\n setPosition(0);\r\n updateMatcher();\r\n }\r\n }",
"@Override\n\tpublic void flushBuffer() throws IOException {\n\t}",
"void endLine() {\n\t\tif (loaded != null && loaded.length() > 0) {\n\t\t\tlineContainer.set(loaded.toString());\n\t\t}\n\t\tloaded = new StringBuilder();\n\t}",
"private void clearLongStrBuf() {\n longStrBufLen = 0;\n longStrBufPending = '\\u0000';\n }",
"public int getAppendCount();",
"public void append(IoBuffer buffer) {\n data.offerLast(buffer);\n updateBufferList();\n }",
"void pushBack() throws IOException {\n iis.seek(iis.getStreamPosition()-bufAvail);\n bufAvail = 0;\n bufPtr = 0;\n }",
"public void flush(){\n\t\ttry{\n\t\t\tse.write(buffer, 0, bufferPos);\n\t\t\tbufferPos = 0;\n\t\t\tse.flush();\n\t\t}catch(IOException ioex){\n\t\t\tfailures = true;\n\t\t}\n\t}",
"private void append (String str)\n {\n\tsynchronized (myToBeAppended)\n\t{\n\t myToBeAppended.append (str);\n\t myToBeAppended.notifyAll ();\n\t}\n }",
"@Override\r\n\tpublic void flush() {\n\t\t\r\n\t}",
"public void tailUp () {\r\n\t\ttail_mode = false;\r\n\t\tsuper.tailUp();\r\n\t}",
"private void append(byte[] bts) {\n checkFile();\n try {\n outputStream.write(bts);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"void append(CharSequence s) throws IOException;",
"@Override\n public void clearLastResponse() {\n super.clearLastResponse();\n mFileLinesHaveStarted = false;\n }",
"private void unsetLast() { this._last = false; }",
"private void releaseChar() {\r\n \t\tif (index < documentContent.length())\r\n \t\t\tindex++;\r\n \t}",
"public void flush() throws SolrServerException, IOException {\n if (adds > 0) {\n Map<Integer, Map<String, SolrInputDocument>> maps = writeBuffers.asMap();\n for (Map.Entry<Integer, Map<String, SolrInputDocument>> entry : maps.entrySet()) {\n if (entry.getValue().size() > 0) {\n delegateWriter.add(entry.getKey(), ImmutableMap.copyOf(entry.getValue()));\n }\n }\n docOutputCounter.increment(adds);\n docBatchCounter.increment(1L);\n adds = 0;\n writeBuffers.invalidateAll();\n }\n }",
"private boolean checkNoDataAfterEnd(long pos) {\n if (!bytes.inside(pos, 4L))\n return true;\n if (pos <= bytes.writeLimit() - 4) {\n final int value = bytes.bytesStore().readVolatileInt(pos);\n if (value != 0) {\n String text;\n long pos0 = bytes.readPosition();\n try {\n bytes.readPosition(pos);\n text = bytes.toDebugString();\n } finally {\n bytes.readPosition(pos0);\n }\n throw new IllegalStateException(\"Data was written after the end of the message, zero out data before rewinding \" + text);\n }\n }\n return true;\n }",
"@Override\r\n public void flush ()\r\n {\r\n }",
"private void setLast() { this._last = true; }",
"public void expandFile()\n throws IOException\n {\n file.seek(FILE_SIZE);\n for (int i = 0; i < BLOCK_SIZE; i++)\n {\n file.write(0);\n }\n FILE_SIZE += BLOCK_SIZE;\n }",
"@Override\r\n public boolean appendEnd(final Appendable out , final Object... OtherData) {\r\n return false;\r\n }",
"public void startLog()\n\t{\n\t\tint lastRow = m_records.size() - 1;\n\t\tif(lastRow >= 0)\n\t\t{\n\t\t\tm_records.clear();\n\t\t\tfireTableRowsDeleted(0, lastRow);\n\t\t}\n\t}",
"private void cleanUpBufferedInput() {\n if (elementRanges.size() >= 2) {\n Map.Entry<Integer, Integer> firstElementRange = elementRanges.pollFirst();\n int startIndex = firstElementRange.getKey() - bytesCleaned.get();\n int endIndex = firstElementRange.getValue() - bytesCleaned.get();\n\n while (elementRanges.size() >= 2) {\n endIndex = elementRanges.pollFirst().getValue();\n }\n\n byte[] oldInput = flatInput();\n byte[] newInput = new byte[oldInput.length - (endIndex - startIndex)];\n\n System.arraycopy(oldInput, 0, newInput, 0, startIndex);\n System.arraycopy(oldInput, endIndex, newInput, startIndex, oldInput.length - endIndex);\n\n xmlChunkedInput.clear();\n xmlChunkedInput.add(newInput);\n bytesCleaned.addAndGet(endIndex - startIndex);\n }\n }",
"private void grow() {\n final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN);\n if (new_size == size) {\n throw new AssertionError(\"Can't grow \" + this + \" larger than \" + size);\n }\n values = Arrays.copyOf(values, new_size);\n qualifiers = Arrays.copyOf(qualifiers, new_size);\n }",
"void oldconsume() {\n\t\tfor (;;) {\n\t\t\tif (printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tprintnewline = oldinfo.other[printoldline];\n\t\t\tif (printnewline < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse showmove();\n\t\t}\n\t}",
"public void flushCurrentLine()\n {\n line = null;\n }",
"protected void resetTextBuffer() {\n this.textBuffer = new StringBuffer();\n }",
"private static void append(String text) {\n // Print the same text to STDOUT\n System.out.println(text);\n\n try {\n outputFileBuffer.write(text+\"\\n\");\n outputFileBuffer.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override protected void finalize() throws Throwable {\r\n\t\tsuper.finalize();\r\n\t\tif (flusher != null) {\r\n\t\t\tflusher.stop();\r\n\t\t}\r\n\t\tflush();\r\n\t}",
"@Override\n protected int update(byte[] array, int off, int count) throws IOException {\n int mark = (int)limit;\n \n if(count >= limit) {\n append(array, off, mark);\n finished = true;\n limit = 0;\n return count - mark;\n } \n if(count > 0) {\n append(array, off, count);\n limit -= count; \n }\n return 0;\n }",
"@Override\n public PicoFile truncate(long size) throws IOException {\n if (_open)\n _backing.setLength(size + _head.offset);\n _hashvalid = false;\n _resetDigest();\n return this;\n }",
"public void truncate(long len)\n\t{\n\t\tthrow new UnsupportedOperationException();\n\t}",
"private void flushBuffer(Runnable paramRunnable) {\n/* 149 */ int i = this.buf.position();\n/* 150 */ if (i > 0 || paramRunnable != null)\n/* */ {\n/* 152 */ flushBuffer(this.buf.getAddress(), i, paramRunnable);\n/* */ }\n/* */ \n/* 155 */ this.buf.clear();\n/* */ \n/* 157 */ this.refSet.clear();\n/* */ }",
"void flush(byte[] b, int off, int len) {\n if (len > 0) {\n synchronized (flushed) {\n flushed.append(new String(b, off, len));\n }\n }\n }",
"private synchronized void flush() {\r\n\t\tif (!buffer.isEmpty()) {\r\n\t\t\tfor (final LoggingRecord record : buffer) {\r\n\t\t\t\thandler.handle(record);\r\n\t\t\t}\r\n\t\t\tbuffer.clear();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\r\n\tpublic void flush() {\n\t}",
"public synchronized void truncateFile(long siz) throws IOException {\n\t\tLock l = df.getReadLock();\n\t\tl.lock();\n\t\ttry {\n\t\t\tif (SDFSLogger.isDebug())\n\t\t\t\tSDFSLogger.getLog().debug(\"Truncating File\");\n\t\t\tif (siz < df.getMetaFile().length()) {\n\t\t\t\tdf.truncate(siz);\n\t\t\t\t/*\n\t\t\t\t * WritableCacheBuffer writeBuffer = df.getWriteBuffer(siz); int\n\t\t\t\t * endPos = (int) (siz - writeBuffer.getFilePosition());\n\t\t\t\t * DedupChunk nextDk = df.getHash(writeBuffer.getEndPosition() +\n\t\t\t\t * 1, false); while (nextDk != null) {\n\t\t\t\t * SDFSLogger.getLog().debug(\"Removing chunk at position \" +\n\t\t\t\t * nextDk.getFilePosition());\n\t\t\t\t * df.removeHash(nextDk.getFilePosition()); nextDk =\n\t\t\t\t * df.getHash(nextDk.getFilePosition() + nextDk.getLength() + 1,\n\t\t\t\t * true); } writeBuffer.truncate(endPos); //\n\t\t\t\t * df.writeCache(writeBuffer,true);\n\t\t\t\t */\n\n\t\t\t}\n\t\t\tdf.getMetaFile().setLastModified(System.currentTimeMillis());\n\t\t\tdf.getMetaFile().setLength(siz, true);\n\t\t} finally {\n\t\t\tl.unlock();\n\t\t}\n\t}",
"public void feedAndCut() throws IOException {\n feed();\n cut();\n writer.flush();\n }",
"public void truncate() {\n final long firstPage = getPageAddress(0);\n final long pageSize = getMapPageSize();\n Vect.memset(firstPage, pageSize, 0);\n for (int i = 1, n = pages.size(); i < n; i++) {\n release(i, pages.getQuick(i));\n pages.setQuick(i, 0);\n }\n jumpTo(0);\n long fileSize = ff.length(fd);\n if (fileSize > pageSize) {\n if (ff.truncate(fd, pageSize)) {\n return;\n }\n\n // we could not truncate the file; we have to clear it via memory mapping\n long mem = ff.mmap(fd, fileSize, 0, Files.MAP_RW);\n Vect.memset(mem + pageSize, fileSize - pageSize, 0);\n ff.munmap(mem, fileSize);\n LOG.debug().$(\"could not truncate, zeroed [fd=\").$(fd).$(']').$();\n }\n }",
"@Override\n public VLongArrayListWritable finishPartial() {\n return null;\n }",
"private void updateErrorText()\n {\n mErrorText.clear();\n mErrorText.clearSpans();\n final int length = mTextInputLayout.getText().length();\n if(length >= 0){\n mErrorText.append(String.valueOf(length));\n mErrorText.append(\" / \");\n mErrorText.append(String.valueOf(mMaxLen));\n mErrorText.setSpan(mAlignmentSpan, 0, mErrorText.length(),\n Spanned.SPAN_INCLUSIVE_EXCLUSIVE);\n if(hasValidLength()){\n mErrorText.setSpan(mNormalTextAppearance, 0, mErrorText.length(),\n Spanned.SPAN_INCLUSIVE_EXCLUSIVE);\n }\n }\n mCharacterLimit.setText(mErrorText);\n }"
]
| [
"0.6466578",
"0.6300259",
"0.62536913",
"0.62531775",
"0.6189889",
"0.60035944",
"0.5951594",
"0.59052205",
"0.5746187",
"0.5743273",
"0.556616",
"0.55376583",
"0.55360705",
"0.5519365",
"0.5494341",
"0.5484297",
"0.54163116",
"0.5405447",
"0.53840476",
"0.53768075",
"0.53483367",
"0.5346503",
"0.52978635",
"0.5255585",
"0.52368015",
"0.52305335",
"0.52238643",
"0.52024037",
"0.51928526",
"0.51868665",
"0.51846355",
"0.51653546",
"0.51590586",
"0.5152641",
"0.51505876",
"0.5128944",
"0.5128739",
"0.5128671",
"0.5118538",
"0.5111161",
"0.51076543",
"0.5102968",
"0.509507",
"0.50848794",
"0.5078307",
"0.50697356",
"0.5061661",
"0.5049196",
"0.5046667",
"0.50402844",
"0.5025142",
"0.50131017",
"0.5005891",
"0.50014603",
"0.49957633",
"0.4995396",
"0.49935907",
"0.49912757",
"0.4978493",
"0.4977075",
"0.497266",
"0.4971549",
"0.49706203",
"0.49664515",
"0.49657965",
"0.49648368",
"0.4950944",
"0.49488544",
"0.49439293",
"0.4938744",
"0.49371418",
"0.49365634",
"0.493533",
"0.49350476",
"0.49310717",
"0.49274743",
"0.49084064",
"0.4905317",
"0.49042502",
"0.4902476",
"0.49003553",
"0.48986903",
"0.4891547",
"0.4889692",
"0.48766416",
"0.4876607",
"0.48694342",
"0.4865365",
"0.48644748",
"0.48552042",
"0.4842525",
"0.48403585",
"0.48403585",
"0.48403585",
"0.48403585",
"0.48401344",
"0.4839781",
"0.48302317",
"0.48296735",
"0.48235694",
"0.4820286"
]
| 0.0 | -1 |
attempts to append the row, if fails resets the writer position | public AbstractRowIndexEntry tryAppend(UnfilteredRowIterator partition)
{
writer.mark();
try
{
return append(partition);
}
catch (Throwable t)
{
writer.resetAndTruncate();
throw t;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int addRow(RowData row_data) throws IOException;",
"public abstract void write(int rowCount) throws IOException;",
"public void addRow () {\n CSVRow row = CSVRow.createEmptyLine(nbOfColumns, this);\n addRow(row);\n }",
"public AbstractRowIndexEntry append(UnfilteredRowIterator partition)\n {\n DecoratedKey key = partition.partitionKey();\n maybeReopenEarly(key);\n return writer.append(partition);\n }",
"public abstract void append(int data, int row, int column);",
"public void appendLogFile(String str)\n{\n if(fileWriter != null)\n {\n try { \n \n fileWriter.append(str); \n \n } catch (Exception e) { \n \n System.out.println(\"Error in CsvFileWriter !!!\"); \n e.printStackTrace(); \n \n } finally { \n \n try {\n \n fileWriter.flush(); \n //fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n } \n }\n}",
"@Override\n\t\t\tpublic void rowProcessed(Object[] row, ParsingContext context) {\n\t\t\t\tbar.update((int) context.currentRecord(),nrRows);\n\t\t\t\tif (context.currentRecord()==1) {\n\t\t\t\t\twriter.writeRow(context.headers());\n\t\t\t\t}\n\t\t\t\tif (!row.toString().isEmpty()) {\t\t\t\t\t\n\t\t\t\t\twriter.writeRow(row);\n\t\t\t\t}\n\t\t\t}",
"private int AddExcelRow(Row excelRow)\n {\n DataFormatter dataFormatter = new DataFormatter();\n int i=1;\n\n\n try {\n if (insertStatement == null)\n insertStatement =conn.prepareStatement(insertSQL);\n for(int idx =0;idx < fieldLength.size();idx++)\n {\n String cellValue =dataFormatter.formatCellValue(excelRow.getCell(idx)).trim();\n if (idx != 10) {\n\n if (ArrayUtils.contains( decimalIndex, idx ))\n {\n if (!cellValue.isEmpty()) {\n cellValue = cellValue.replaceAll(patt,\"\");\n if (cellValue.equals(\"\"))\n insertStatement.setObject(i, null, Types.DECIMAL);\n else\n insertStatement.setDouble(i, Double.parseDouble(cellValue));\n }\n else\n insertStatement.setObject(i, null, Types.DECIMAL);\n }\n else\n {\n if (!cellValue.isEmpty())\n insertStatement.setString(i, cellValue.substring(0, cellValue.length() > Integer.parseInt(fieldLength.get(idx + 1).toString()) ? Integer.parseInt(fieldLength.get(idx + 1).toString()) : cellValue.length()));\n else\n insertStatement.setObject(i, null, Types.NVARCHAR);\n }\n\n\n i = i + 1;\n }\n\n\n }\n insertStatement.setString(i, \"N\");\n i=i+1;\n insertStatement.setString(i, \"M\"+ fileId);\n insertStatement.addBatch();\n return 0;\n }\n catch (NumberFormatException numEx){\n logger.error(\"Error\",numEx);\n return -1;\n }\n catch (SQLException ex)\n {\n logger.error(\"Error\",ex);\n return -1;\n }\n finally {\n excelRow = null;\n }\n }",
"private void endRow() throws TableFormatException {\n if ( readCol == 0 ) {\n return;\n }\n int nrow = rows.size();\n if ( nrow == 1 ) {\n ncol = ((List) rows.get( 0 )).size();\n }\n else if ( readCol != ncol ) {\n throw new TableFormatException( \n \"Column number mismatch in row \" + ( nrow - 1 ) +\n \" (\" + readCol + \" != \" + ncol + \")\" );\n }\n readCol = 0;\n }",
"public void moveToCurrentRow() throws SQLException {\n\n try {\n debugCodeCall(\"moveToCurrentRow\");\n checkClosed();\n insertRow = null;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"@Override\n\tpublic void addRow() {\n\t\tif(this.numCols == 0){\n\t\t\tthis.numCols++;\n\t\t}\n\t\tthis.numRows++;\n\t}",
"@Override\n public void endRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"</rows>\");\n }",
"public void moveToInsertRow() throws SQLException {\n\n try {\n debugCodeCall(\"moveToInsertRow\");\n checkClosed();\n insertRow = new Value[columnCount];\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public void addRow(ResultSetRow row) throws SQLException {\n/* 231 */ notSupported();\n/* */ }",
"public void addNewRow(Vector row) throws IllegalStateException{\r\n if(flagAddStatusRow){\r\n row.add(numberOfcolumns, new Integer(IS_INSERTED)); //Set status for row is add new\r\n }else{\r\n row.setElementAt(new Integer(IS_NO_CHANGE), numberOfcolumns);\r\n }\r\n data.add(row);\r\n }",
"protected void addNewRow(Object[] row) {\n for (int i = 0; i < aggregators.length; i++) {\n if (null != row[i]) {\n this.isNotNullValue[i] = true;\n aggregators[i].agg(row[i]);\n }\n }\n prvKey = (byte[]) row[this.keyIndex];\n calculateMaxMinUnique();\n }",
"@Override\n public void rowWrittenEvent(IRowMeta rowMeta, Object[] row)\n throws HopTransformException { Set the log level back to the original value.\n //\n transformCopy.getLogChannel().setLogLevel(baseLogLevel);\n }",
"private AppendRowsTask appendRow(\n final int sequence,\n final List<String> row) {\n final ApplicationSettings settings = ApplicationSettings.getInstance(Sms2GSheetService.this);\n String accountName = settings.getAccountName();\n if ((accountName == null) || (accountName.isEmpty())) {\n return null;\n }\n\n // Initialize credentials and service object.\n GoogleAccountCredential credential = GoogleAccountCredential.usingOAuth2(Sms2GSheetService.this, Arrays.asList(Helper.SCOPES))\n .setBackOff(new ExponentialBackOff());\n\n credential.setSelectedAccountName(accountName);\n\n return new AppendRowsTask(credential, new GoogleSheetsAppendResponseReceiver() {\n @Override\n public AppendValuesResponse append_rows(Sheets sheets) throws IOException {\n String range;\n range = Helper.SHEET_RANGE;\n ValueRange values = new ValueRange();\n values.setMajorDimension(\"ROWS\");\n List<List<Object>> vls;\n vls = new ArrayList<>();\n ArrayList<Object> ro = new ArrayList<>();\n if (row != null) {\n for (String rr : row) {\n ro.add(rr);\n }\n }\n vls.add(ro);\n values.setValues(vls);\n Sheets.Spreadsheets.Values.Append r = sheets.spreadsheets().values().append(\n settings.getSpreadsheetId(), range, values);\n r.setValueInputOption(\"RAW\");\n AppendValuesResponse response = r.execute();\n Log.i(TAG, response.toString());\n return response;\n }\n\n @Override\n public void onStart() {\n }\n\n @Override\n public void onStop() {\n }\n\n @Override\n public void onAppend(AppendValuesResponse response) {\n if (response == null) {\n Helper.showNotificationError(Sms2GSheetService.this, getString(R.string.err_no_response));\n Log.e(TAG, getString(R.string.err_no_response));\n } else {\n Log.i(TAG, getString(R.string.msg_response) + response.toString());\n }\n if (mSMSRows != null) {\n if (!mSMSRows.containsKey(sequence)) {\n Log.e(TAG, \"Invalid sequence\");\n } else {\n mSMSRows.remove(sequence);\n }\n }\n }\n\n @Override\n public void onCancel(Exception error) {\n if (error instanceof GooglePlayServicesAvailabilityIOException) {\n Helper.showNotificationError(Sms2GSheetService.this, getString(R.string.err_no_playservices));\n Log.e(TAG, getString(R.string.err_no_playservices));\n } else if (error instanceof UserRecoverableAuthIOException) {\n Helper.showNotificationError(Sms2GSheetService.this, getString(R.string.err_no_credentials));\n Log.e(TAG, getString(R.string.err_no_credentials));\n } else {\n Helper.showNotificationError(Sms2GSheetService.this, getString(R.string.err_message) + error.getMessage());\n Log.e(TAG, getString(R.string.err_message) + error.getMessage());\n }\n }\n });\n }",
"public final void writeRow(RowSetterIfc rowSetter) {\n Row row = (Row) rowSetter;\n myLoadArray[myRowCount] = row.getElements();\n myRowCount++;\n if (myRowCount == (myMaxRowsInBatch)) {\n loadArray(myLoadArray);\n myRowCount = 0;\n }\n }",
"public void refreshAppend() throws IOException, InterruptedException {\n appendAndRefreshAppendLock.lock();\n if (shutdown.get()) {\n LOG.warning(\"Cannot refresh on a already shutdown writer.\");\n appendAndRefreshAppendLock.unlock();\n return;\n }\n // There could be a moment, stub is not yet initialized.\n if (clientStream != null) {\n LOG.info(\"Closing the stream \" + streamName);\n clientStream.closeSend();\n }\n messagesBatch.resetAttachSchema();\n bidiStreamingCallable = stub.appendRowsCallable();\n clientStream = bidiStreamingCallable.splitCall(responseObserver);\n try {\n while (!clientStream.isSendReady()) {\n Thread.sleep(10);\n }\n } catch (InterruptedException expected) {\n }\n Thread.sleep(this.retrySettings.getInitialRetryDelay().toMillis());\n // Can only unlock here since need to sleep the full 7 seconds before stream can allow appends.\n appendAndRefreshAppendLock.unlock();\n LOG.info(\"Write Stream \" + streamName + \" connection established\");\n }",
"@Override\n protected boolean continueOnWriteError() {\n return true;\n }",
"private boolean appendData(final MuensterwetterDataset dataset) {\n\t\tfinal String fileName = getFileName(dataset.getTime());\n\t\tfinal File outputFile = new File(fileName);\n\n\t\t// 1.2 check if file exists -> if not => create new file\n\t\tif (!outputFile.exists()) {\n\t\t\ttry {\n\t\t\t\toutputFile.createNewFile();\n\t\t\t\twriteCSVHeader(outputFile);\n\t\t\t} catch (final IOException e) {\n\t\t\t\tLOG.error(\"CSV output file '{}' could not be created. Aborting storing of parsed values: {}. Error Message: {} (enable debug level to see exception).\",\n\t\t\t\t\t\toutputFile.getAbsolutePath(),\n\t\t\t\t\t\tdataset,\n\t\t\t\t\t\te.getMessage());\n\t\t\t\tLOG.debug(\"Exception thrown!\", e);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 2 append new line\n\t\ttry (final BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile,true))){\n\t\t\tbw.newLine();\n\t\t\tbw.write(dataset.toCSVString());\n\t\t\tbw.flush();\n\t\t}\n\t\tcatch (final IOException e) {\n\t\t\tLOG.error(\"Could not append new line '{}' to CSV file '{}' in folder '{}'. Enable log level debug to see more details.\",\n\t\t\t\t\tdataset.toCSVString(),\n\t\t\t\t\toutputFile.getName(),\n\t\t\t\t\toutputFile.getAbsolutePath());\n\t\t\tLOG.debug(\"Exception thrown!\",e);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"void addRowsLock();",
"public int addRow() {\n\t\t// Create a new row with nothing in it\n\t\tList row = new ArrayList();\n\t\treturn(addRow(row));\n\t}",
"public void absMoveToLastRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n for (int i = index; i < lastIndex; ++i) {\n va[i] = va[i + 1];\n }\n va[lastIndex] = vTemp;\n\n setRows(va);\n }",
"public int append(IDataTableRecord record)\n\t{\n\t return add(recordCount(),record);\n\t}",
"private void moveCursorToRow(int row) {\n\t\ttry {\n\t\t\tint count = 0;\n\t\t\twhile (row != count && rs.next()) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException se) {\n\t\t\tthrow getExceptionTranslator().translate(\"Attempted to move ResultSet to last committed row\", getSql(), se);\n\t\t}\n\t}",
"private void addCell( String value ) {\n if ( readCol++ == 0 ) {\n rows.add( new ArrayList( ncol ) );\n }\n ((List) rows.get( rows.size() - 1 )).add( value );\n }",
"public void addRow(ResultRow row) {\r\n rows.add(row);\r\n }",
"void removeRow(int row_index) throws IOException;",
"public void commitRow(byte[] row, long startId, long commitId,\n boolean isDelete) throws IOException;",
"protected void changeCSV(CSVDocument doc, int row, int col) {\n doc.moveRowUp(row);\n }",
"public void moveToCurrentRow() throws SQLException\n {\n m_rs.moveToCurrentRow();\n }",
"public void rollbackRow(byte[] row, long startId) throws IOException;",
"public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }",
"public int addRow(List row) {\n\t\tdata.add(row);\n\t\tfireTableRowsInserted(data.size()-1, data.size()-1);\n\t\treturn(data.size() -1);\n\t}",
"public void moveToInsertRow() throws SQLException\n {\n m_rs.moveToInsertRow();\n }",
"void rowInserted(Sheet s, int sheetIndex, int row)\r\n/* 197: */ {\r\n/* 198:361 */ this.parser.rowInserted(sheetIndex, row, s == getSheet());\r\n/* 199:362 */ this.formulaBytes = this.parser.getBytes();\r\n/* 200: */ }",
"public void commitRow(byte[] row, long startId, long commitId,\n boolean isDelete, Integer lockId) throws IOException;",
"public synchronized void append(K key, V val) throws IOException {\n\n\t\t\tlong pos = data.sync();\n\t\t\t// Only write an index if we've changed positions. In a block compressed\n\t\t\t// file, this means we write an entry at the start of each block\n\t\t\t// position.set(pos); // point to current eof\n\t\t\tindex.append(new Pair<K, Long>(key, keySchema, pos, Schema\n\t\t\t\t\t.create(Type.LONG)));\n\n\t\t\tdata.append(new Pair<K, V>(key, keySchema, val, valueSchema)); // append\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\t\t\t// key/value\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\t\t\t// to data\n\t\t\tsize++;\n\t\t}",
"public final void nextRow() {\n this.line++;\n }",
"public void appendRecord(IndexRecord record, SHPEnvelope mbr)\n throws IOException \n {\n offset = raf.length();\n raf.seek(offset);\n raf.write(record.writeIndexRecord());\n offset = offset + INDEX_RECORD_LENGTH;\n //actualize mbr\n if (fileMBR.west > mbr.west) {\n fileMBR.west = mbr.west;\n }\n if (fileMBR.east < mbr.east) {\n fileMBR.east = mbr.east;\n }\n if (fileMBR.south > mbr.south) {\n fileMBR.south = mbr.south;\n }\n if (fileMBR.north < mbr.north) {\n fileMBR.north = mbr.north;\n }\n raf.seek(36);\n raf.write(fileMBR.writeLESHPEnvelope());\n\n //actualize file length\n filelength = (int) offset / 2;\n }",
"public Sql append(Reader reader) throws IOException {\n\n formatted = false;\n \n char[] array = new char[1024];\n \n int length = reader.read(array);\n while (length > 0) {\n appendBuffer.append(array, 0, length);\n length = reader.read(array);\n }\n \n return this;\n }",
"public void addRow(Row r) {\n\t\tcontainingRows.add(r);\n\t}",
"public void writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session) {\n if (this.isReadOnly()) {\n return;\n }\n record.put(this.getField(), null);\n }",
"@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }",
"public void addRow(String data){//adds a new row of data to the table\n\t\t\t\tif(row_count<100){//checks to see if there is space left in the current datum for an additional rows\n\t\t\t\t\tif(row_count<50){//halvs the data for more efficiant row insertion\n\t\t\t\t\t\tif(row_count<10){//checks to see if it is in the first inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[0]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<20){//checks to see if it is in the second inner datum\n\t\t\t\t\t\t\tf(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[1]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<30){//checks to see if it is in the third inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[2]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<40){//checks to see if it is in the fourth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[3]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the fifth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[4]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\t\n\t\t\t\t\t\tif(row_count<60){//checks to see if it is in the sixth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[5]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<70){//checks to see if it is in the seventh inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[6]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<80){//checks to see if it is in the eighth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[7]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<90){//checks to see if it is in the ninth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[8]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the tenth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[9]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{//acctivated when there is no room left in the current outer datum}\n\t\t\t\t\tif(next==null){//checks to see if there is a next outer datum\n\t\t\t\t\t\tnext=new OuterDatum();\t\n\t\t\t\t\t}\n\t\t\t\t\tnext.addRow(data);\n\t\t\t\t}\n\t\t\t}",
"public void add(String[] row) {\r\n\t\tthis.df.add(row);\r\n\t}",
"public void afterLast() throws SQLException {\n\n try {\n debugCodeCall(\"afterLast\");\n checkClosed();\n while (nextRow()) {\n // nothing\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"@Override\n public void write(JSONEvent event) {\n if ((table.getNumOfRows() % GlobalConfig.MAX_TABLE_ROW_COUNT_CHECK) == 0) {\n if (table.memSize() >= GlobalConfig.MAX_TABLE_SIZE_IN_BYTES) {\n TableConverter tableConverter = new TableConverter(table, node);\n tableConverter.start();\n\n // Create a new Append only table and start inserting the events\n table = node.createTable(this.tableName, JSONEvent.class);\n }\n }\n table.insert(event);\n }",
"public void addRow(Row row) {\r\n\t\trows.add(row);\r\n\t}",
"public void absIncrementRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n va[index] = va[index + 1];\n va[index + 1] = vTemp;\n\n setRows(va);\n }",
"private void addRow(WritableSheet sheet, int rowNumber,\n AssessmentFilling assessment) throws IOException, WriteException {\n WritableCellFormat doublevalCellFormat = buildDoublevalCellFormat();\n WritableCellFormat dataCellFormat = buildDataCellFormat();\n WritableCellFormat textCellFormat = buildTextCellFormat();\n Number numberCell = null;\n Label labelCell = null;\n int columnNumber = 0;\n sheet.addCell(new Label(columnNumber, rowNumber,\n assessment.getIdentifier(), dataCellFormat));\n columnNumber++;\n sheet.addCell(new Label(columnNumber, rowNumber,\n assessment.getFirstName(), dataCellFormat));\n columnNumber++;\n sheet.addCell(new Label(columnNumber, rowNumber,\n assessment.getLastName(), dataCellFormat));\n columnNumber++;\n List<QuestionFilling> orderedQuestions = new LinkedList<QuestionFilling>(assessment.getQuestions());\n Collections.sort(orderedQuestions, new QuestionFillingOriginalComparator());\n for (QuestionFilling question : orderedQuestions) {\n double mark = question.getMarkedWeight() != null ? question.getMarkedWeight().\n doubleValue() : 0.0;\n if (question instanceof ClosedQuestionFilling) {\n numberCell = new Number(columnNumber, rowNumber, mark,\n doublevalCellFormat);\n sheet.addCell(numberCell);\n columnNumber++;\n } else if (question instanceof OpenQuestionFilling) {\n labelCell = new Label(columnNumber, rowNumber,\n ((OpenQuestionFilling) question).getAnswer(),\n textCellFormat);\n sheet.addCell(labelCell);\n columnNumber++;\n numberCell = new Number(columnNumber, rowNumber, mark,\n doublevalCellFormat);\n sheet.addCell(numberCell);\n columnNumber++;\n }\n }\n sheet.addCell(new Formula(columnNumber, rowNumber,\n \"SUM(\" + CellReferenceHelper.getCellReference(3,\n rowNumber) + \":\" + CellReferenceHelper.getCellReference(\n columnNumber - 1, rowNumber) + \")\",\n doublevalCellFormat));\n columnNumber++;\n }",
"public void flush() {\n writer.flush();\n }",
"private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }",
"protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }",
"@Override\n\tpublic int insert(Cell record) {\n\t\treturn 0;\n\t}",
"private static void write(BufferedWriter fileWriter,int startLine, int endLine) throws IOException {\n try(BufferedReader fileReader = new BufferedReader\n (new FileReader(\"C:\\\\Users\\\\radha\\\\Documents\\\\Research\\\\ml-25m\\\\ml-25m\\\\ratings.csv\"))){\n String line = null;\n int lineNo = 0;\n while ((line = fileReader.readLine()) != null) {\n lineNo++;\n if(lineNo < startLine){\n continue;\n }\n fileWriter.write(line);\n fileWriter.write(\"\\n\");\n if(lineNo > endLine){\n break;\n }\n\n }\n }\n\n\n }",
"@Test\n public void testWriteRowCells() {\n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet();\n XSSFRow row = sheet.createRow(0);\n List<Object> cellContents = new ArrayList<Object>();\n cellContents.add(new String(\"abc\"));\n cellContents.add(new Long(\"1\")); \n MaterialRequestHelper.writeRowCells(cellContents, row);\n assertEquals(row.getPhysicalNumberOfCells(), 2);\n assertEquals(row.getCell(0).getCellType(),XSSFCell.CELL_TYPE_STRING);\n assertEquals(row.getCell(1).getCellType(),XSSFCell.CELL_TYPE_NUMERIC);\n assertEquals(row.getCell(0).getStringCellValue(),\"abc\");\n assertEquals(row.getCell(1).getNumericCellValue(),1,0); \n }",
"void flushBefore(long pos) throws IOException;",
"public static void endRow(int newIndex) {\n\t\tif (!running) return;\n\t\t\n\t\t// Store if not empty\n\t\tif (!state.currentRow.isEmpty() && !state.isNextRowInvalid) {\n\t\t\tstate.currentLevelStore.add(state.currentRow);\n\t\t\tlinkComparisons(); // Link the last comparisons to each other\n\t\t}\n\n\t\tstate.isNextRowInvalid = false;\n\t\t\n\t\t// The new row copies data from the previous row up to the new index - 1\n\t\tstate.currentRow = new ComparisonRow(state.currentRow, newIndex - 1);\n\t\t\n\t\t// Update RangeVariable Index\n\t\tstate.currentRVIndex = newIndex;\n\t\t\n\t\t// Update state's subindex\n\t\tif (newIndex == 0) { // If RV index is 0, subIndex should be as well\n\t\t\tstate.subIndex = 0;\n\t\t\tstate.subIndices.clear();\n\t\t\tstate.subIndices.put(0, 0);\n\t\t} else { // Otherwise get the highest subIndex of the last RV index\n\t\t\tstate.subIndex = state.getLastSubIndex();\n\t\t}\n\t}",
"public void closeCsvFile()\n{\n try {\n \n fileWriter.flush(); \n fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n}",
"public void moveUpRow(int row)throws IndexOutOfBoundsException{\r\n if (row >= 1){\r\n CoverFooterItemType tmp_element = (CoverFooterItemType)data.get(row);\r\n data.set(row, data.get((row-1)));\r\n data.set((row-1), tmp_element);\r\n fireTableRowsUpdated(row-1, row);\r\n }\r\n }",
"public final void flushRows() {\n if (myRowCount > 0) {\n Object[][] array = new Object[myRowCount][];\n for (int i = 0; i < array.length; i++) {\n array[i] = myLoadArray[i];\n }\n Object[][] temp = myLoadArray;\n // this changes myLoadArray to array for loading\n loadArray(array);\n // now change it back for future loading\n myLoadArray = temp;\n myRowCount = 0;\n // now clear the array\n for (int i = 0; i < myMaxRowsInBatch; i++) {\n myLoadArray[i] = null;\n }\n }\n }",
"public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public abstract void appendReportEntryValues(ReportRow entry);",
"private void ensureWrite() throws IOException {\n if (!reading) return;\n resetForWrite();\n }",
"private StringBuffer appendColumnString(StringBuffer newLine, int columnIndex, Object plaintext) {\n if (columnIndex != 0){\n newLine.append(\";\");\n }\n newLine.append(plaintext.toString());\n return newLine;\n }",
"public void addRow(String rowName);",
"public void setRow(int newRow) {\n this.row = newRow;\n }",
"public void addRow (ArrayList<Object> l, int index)\n\t{\n\t\tm_data.rows.add(index, l);\n\t\tm_data.rowsMeta.add(index, null);\n\t}",
"public void addRow (int index)\n\t{\n\t\tm_data.rows.add(index, new ArrayList<Object>());\n\t\tm_data.rowsMeta.add(index, null);\n\t}",
"private void addNumber(WritableSheet sheet, int column, int row, Double amt)\n\t\t\t\tthrows WriteException, RowsExceededException {\n\t\t\tNumber headingNumberFormat;\n\t\t\theadingNumberFormat = new Number(column, row, amt, numberFormat);\n\t\t\tsheet.addCell(headingNumberFormat);\n\t\t}",
"public void addRow(int[] row) {\n board[counter] = row;\n counter += 1;\n if (counter == 9) {\n startingBoard = copyBoard();\n }\n }",
"public synchronized void finishWriting() {\n readerNumber++; // readerNumber = -1 + 1 = 0; \n// readerNumber must be 0 at this point \n this.notifyAll(); // notify possible waiting writers or waiting readers \n }",
"public void rollLog() throws IOException {\n this.snapLog.rollLog();\n resetTxnCount();\n }",
"private void addLineToCSV(String str) throws IOException\r\n {\r\n csvOutput.write(str.getBytes());\r\n csvOutput.write('\\n');\r\n }",
"@Kroll.method\n\tpublic void appendRow(Object rows, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tfinal List<TableViewRowProxy> rowList = new ArrayList<>();\n\n\t\tif (rows instanceof Object[]) {\n\n\t\t\t// Handle array of rows.\n\t\t\tfor (Object rowObj : (Object[]) rows) {\n\t\t\t\tfinal TableViewRowProxy row = processRow(rowObj);\n\n\t\t\t\tif (row != null) {\n\t\t\t\t\trowList.add(row);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfinal TableViewRowProxy row = processRow(rows);\n\n\t\t\t// Handle single row.\n\t\t\tif (row != null) {\n\t\t\t\trowList.add(row);\n\t\t\t}\n\t\t}\n\t\tif (rowList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent updating rows during iteration.\n\t\tshouldUpdate = false;\n\n\t\t// Append rows to last section.\n\t\tfor (TableViewRowProxy row : rowList) {\n\n\t\t\t// Create section if one does not exist.\n\t\t\t// Or create new section if `headerTitle` is specified.\n\t\t\tif (this.sections.size() == 0\n\t\t\t\t|| row.hasPropertyAndNotNull(TiC.PROPERTY_HEADER)\n\t\t\t\t|| row.hasPropertyAndNotNull(TiC.PROPERTY_HEADER_TITLE)\n\t\t\t) {\n\t\t\t\tfinal TableViewSectionProxy section = new TableViewSectionProxy();\n\n\t\t\t\t// Set `headerTitle` of section from row.\n\t\t\t\tsection.setProperty(TiC.PROPERTY_HEADER_TITLE,\n\t\t\t\t\trow.getProperties().optString(TiC.PROPERTY_HEADER_TITLE,\n\t\t\t\t\t\trow.getProperties().getString(TiC.PROPERTY_HEADER)));\n\n\t\t\t\tsection.setParent(this);\n\t\t\t\tthis.sections.add(section);\n\t\t\t}\n\n\t\t\t// Obtain last section.\n\t\t\tfinal TableViewSectionProxy section = this.sections.get(this.sections.size() - 1);\n\n\t\t\t// Override footer of section.\n\t\t\tsection.setProperty(TiC.PROPERTY_FOOTER_TITLE,\n\t\t\t\trow.getProperties().optString(TiC.PROPERTY_FOOTER_TITLE,\n\t\t\t\t\trow.getProperties().getString(TiC.PROPERTY_FOOTER)));\n\n\t\t\t// Add row to section.\n\t\t\tsection.add(row);\n\t\t}\n\n\t\t// Allow updating rows after iteration.\n\t\tshouldUpdate = true;\n\t\tupdate();\n\t}",
"public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}",
"private void handleMultipleDocumentRows(DocumentSearchResult.Builder existingRow, DocumentSearchResult.Builder newRow) {\n for (DocumentAttribute.AbstractBuilder<?> newDocumentAttribute : newRow.getDocumentAttributes()) {\n existingRow.getDocumentAttributes().add(newDocumentAttribute);\n }\n }",
"public static void writeFile(String file, String rowData) throws Exception {\n\n Boolean bFound = false;\n\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String getLine = \"\";\n\n // verify if row entry exists\n while ( (getLine = reader.readLine()) != null){\n if (getLine.contains(rowData)){\n bFound = true;\n break;\n }\n }\n reader.close();\n\n if (bFound != true){\n BufferedWriter writer = new BufferedWriter(new FileWriter(file, true));\n\n writer.append(rowData);\n writer.newLine();\n writer.close();\n }\n }",
"public Builder addRow(\n int index, io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row value) {\n if (rowBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureRowIsMutable();\n row_.add(index, value);\n onChanged();\n } else {\n rowBuilder_.addMessage(index, value);\n }\n return this;\n }",
"public void write()\n {\n getCsvParser().parse(getReader());\n }",
"public void insertRow() throws SQLException {\n\n try {\n debugCodeCall(\"insertRow\");\n checkClosed();\n if (insertRow == null) { throw Message.getSQLException(ErrorCode.NOT_ON_UPDATABLE_ROW); }\n getUpdatableRow().insertRow(insertRow);\n insertRow = null;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public void commit() throws IOException {\n\t\t\tif (hasErrors) {\n\t\t\t\tcompleteEdit(this, false);\n\t\t\t\tremove(entry.key); // the previous entry is stale\n\t\t\t} else {\n\t\t\t\tcompleteEdit(this, true);\n\t\t\t}\n\t\t}",
"private void insert(ByteBuffer rowKey,\n Clustering<?> clustering,\n Cell<?> cell,\n LivenessInfo info,\n WriteContext ctx)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n cell));\n Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info);\n PartitionUpdate upd = partitionUpdate(valueKey, row);\n indexCfs.getWriteHandler().write(upd, ctx, false);\n logger.debug(\"Inserted entry into index for value {}\", valueKey);\n }",
"@Override\n protected void fixFile(final BufferedReader reader, final BufferedWriter writer) throws Exception {\n // init\n int lineCounter = 1;\n boolean lastLineWasEmpty = false;\n\n String line;\n while ((line = reader.readLine()) != null) {\n final String fixedLine = fixLine(line);\n\n if (fixedLine != null && !\"\".equals(fixedLine.trim())) {\n if (lastLineWasEmpty && lineIsNumberAboveZero(fixedLine)) {\n writer.newLine();\n lineCounter++;\n writer.write(\"\" + lineCounter);\n } else {\n lastLineWasEmpty = false;\n writer.write(fixedLine);\n }\n writer.newLine();\n } else {\n lastLineWasEmpty = true;\n }\n }\n }",
"@Override\n public int rowNumber() throws IOException {\n return recordNumber;\n }",
"public void writeRow(Object[] colValues) throws IOException;",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"@Override\n public void rollOver() {\n if (qw != null) {\n LogLog.debug(\"rolling over count=\" + ((CountingQuietWriter) qw).getCount());\n }\n LogLog.debug(\"maxBackupIndex=\" + maxBackupIndex);\n\n if (maxBackupIndex > 0) {\n deleteOldest();\n moveNext();\n\n final File newestBackupFile = new File(buildBackupFileName(fileName, 1));\n closeFile();\n\n final File basicFile = new File(fileName);\n LogLog.debug(\"Renaming file \" + basicFile + \" to \" + newestBackupFile);\n basicFile.renameTo(newestBackupFile);\n }\n\n try {\n this.setFile(fileName, false, bufferedIO, bufferSize);\n } catch (IOException e) {\n LogLog.error(\"setFile(\" + fileName + \", false) call failed.\", e);\n }\n }",
"private void append(byte[] bts) {\n checkFile();\n try {\n outputStream.write(bts);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void addRowToPreparedStatement(Table table, Row row,\n\t\t\tPreparedStatement pstmt) throws SQLException, IOException {\n\t\tint index = 0;\n\t\t//\n\t\t// Set a parameter for each cell. For some types we have to\n\t\t// do an explicit NULL check here.\n\t\t//\n\t\tfor (Column column : table.getColumns()) {\n\t\t\tindex++;\n\t\t\tDataType type = column.getType();\n\t\t\tString columnName = column.getName();\n\t\t\tswitch (type) {\n\t\t\t\tcase BINARY :\n\t\t\t\t\tif (row.getInt(columnName) == null) {\n\t\t\t\t\t\tpstmt.setNull(index, Types.INTEGER);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpstmt.setInt(index, row.getInt(columnName));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BOOLEAN :\n\t\t\t\t\tpstmt.setBoolean(index, row.getBoolean(columnName));\n\t\t\t\t\tbreak;\n\t\t\t\tcase BYTE :\n\t\t\t\t\tpstmt.setByte(index, row.getByte(columnName));\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOUBLE :\n\t\t\t\t\tif (row.getDouble(columnName) == null) {\n\t\t\t\t\t\tpstmt.setNull(index, Types.DOUBLE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpstmt.setDouble(index, row.getDouble(columnName));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase FLOAT :\n\t\t\t\t\tpstmt.setFloat(index, row.getFloat(columnName));\n\t\t\t\t\tbreak;\n\t\t\t\tcase INT :\n\n\t\t\t\t\tif (row.getShort(columnName) == null) {\n\t\t\t\t\t\tpstmt.setNull(index, Types.INTEGER);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpstmt.setShort(index, row.getShort(columnName));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LONG :\n\t\t\t\t\tif (row.getInt(columnName) == null) {\n\t\t\t\t\t\tpstmt.setNull(index, Types.BIGINT);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpstmt.setLong(index, row.getInt(columnName));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase MONEY :\n\t\t\t\t\tpstmt.setBigDecimal(index, row.getBigDecimal(columnName));\n\t\t\t\t\tbreak;\n\t\t\t\tcase NUMERIC :\n\t\t\t\t\tpstmt.setFloat(index, row.getFloat(columnName));\n\t\t\t\t\tbreak;\n\t\t\t\tcase OLE :\n\t\t\t\t\tpstmt.setBytes(index, row.getBytes(columnName));\n\t\t\t\t\tbreak;\n\t\t\t\tcase SHORT_DATE_TIME :\n\t\t\t\t\tif (row.getDate(columnName) == null) {\n\t\t\t\t\t\tpstmt.setNull(index, Types.DATE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpstmt.setDate(index,\n\t\t\t\t\t\t\t\tnew java.sql.Date(row.getDate(columnName)\n\t\t\t\t\t\t\t\t\t\t.getTime()));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tpstmt.setString(index, row.getString(columnName));\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\t\t// Add the statement to the batch\n\t\t//\n\t\tpstmt.addBatch();\n\t}",
"private void addRow() {\n\t\t\n\t\tArrayList<Invader> lastRow = enemyArray.get(enemyArray.size() - 1);\n\t\tArrayList<Invader> newRow = new ArrayList<Invader>();\n\t\t\t\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tnewRow.add(new Invader(\n\t\t\t\t\tlastRow.get(i).getX(),\n\t\t\t\t\tlastRow.get(i).getY() + 40,\n\t\t\t\t\tPLAYER_WIDTH,\n\t\t\t\t\tPLAYER_WIDTH,\n\t\t\t\t\t2));\n\t\t}\n\t\t\n\t\tenemyArray.add(newRow);\n\t}",
"private void ensureRowCached(int rowIndex) {\n if(!isRowCached(rowIndex)) {\n //HAVE TO FETCH DATA FROM THE REMOTE STORE\n \n //SET THE toIndex AND fromIndex VARIABLES\n \n //TEST IF THE USER IS DESCENDING THE TABLE\n if (rowIndex >= lastRequiredFetchRowIndex) {\n fromIndex = rowIndex;\n toIndex = rowIndex+chunkSize;\n\t\n\t\t\t\ttry {\n if(toIndex > tableDescription.getRowCount()) {\n toIndex = tableDescription.getRowCount();\n }\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tex.printStackTrace();\t\n\t\t\t\t}\n }\n \n //USER IS ASCENDING THE TABLE\n else {\n fromIndex = rowIndex-chunkSize;\n if(fromIndex < 0) {\n fromIndex = 0;\n }\n toIndex = rowIndex+1;\n }\n \n Object[][] rows = null;\n //RETRIEVE THE DATA\n try {\n rows = tableDataSource.retrieveRows(fromIndex, toIndex);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Problem occurred retrieving table data \\n\");\n }\n \n //ADD THE DATA TO THE CACHE\n for(int i = 0; i < rows.length; i++) {\n //SET THE VALUE IN THE DATA ARRAY\n data[writePositionIndex] = rows[i];\n \n //CREATE AN INDEX TO THE NEW CACHED DATA\n tableIndex = fromIndex+i;\n rowIndexLookup[writePositionIndex] = tableIndex;\n \n //CLOCK UP writePositionIndex AND REZERO IF NECESSARY\n if(writePositionIndex == (maximumCacheSize-1)) {\n writePositionIndex = 0;\n }\n else {\n writePositionIndex++;\n }\n lastRequiredFetchRowIndex = rowIndex;\n }\n }\n }",
"public boolean appendRecord(String record) {\r\n\t\tboolean isAppended = false;\r\n\t\tif (!record.isEmpty()) {\r\n\t\t\tfileRecords.add(record);\r\n\t\t\tisAppended = true;\r\n\t\t}\r\n\t\treturn isAppended;\r\n\t}",
"public void rollbackRow(byte[] row, long startId, Integer lockId)\n throws IOException;",
"void newRow(List<C> row) throws Exception;",
"private void startWrite()\n\t\tthrows IOException\n\t{\n\t\tif(! lists[level] && ! nextKey)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif(hasData[level]) writer.write(',');\n\n\t\thasData[level] = true;\n\n\t\tif(beautify && level > 0)\n\t\t{\n\t\t\twriter.write('\\n');\n\n\t\t\tfor(int i=0; i<level; i++)\n\t\t\t{\n\t\t\t\twriter.write('\\t');\n\t\t\t}\n\t\t}\n\t}",
"public void flush(boolean rollToNext)\n throws CommitFailure, TxnBatchFailure, TxnFailure, InterruptedException {\n // if there are no records do not call flush\n if (totalRecords <= 0) {\n return;\n }\n try {\n synchronized (txnBatchLock) {\n commitTxn();\n nextTxn(rollToNext);\n totalRecords = 0;\n lastUsed = System.currentTimeMillis();\n }\n } catch (StreamingException e) {\n throw new TxnFailure(txnBatch, e);\n }\n }"
]
| [
"0.63634276",
"0.6114051",
"0.58704245",
"0.5811566",
"0.5809154",
"0.57879436",
"0.5705593",
"0.55853134",
"0.5582655",
"0.5565844",
"0.5533335",
"0.5526625",
"0.5521955",
"0.5499361",
"0.5455776",
"0.5449951",
"0.5446076",
"0.54184943",
"0.5362833",
"0.5346679",
"0.53403866",
"0.5329067",
"0.5279354",
"0.5277627",
"0.5255761",
"0.52450955",
"0.5223363",
"0.5188217",
"0.5162722",
"0.5154338",
"0.5153867",
"0.5131411",
"0.50819284",
"0.5073534",
"0.50722855",
"0.50687724",
"0.5064794",
"0.50631064",
"0.5055478",
"0.50364053",
"0.5036088",
"0.49995223",
"0.49962103",
"0.4992386",
"0.4979679",
"0.4974924",
"0.4964447",
"0.49629343",
"0.49627072",
"0.49608493",
"0.4952227",
"0.49511302",
"0.49400428",
"0.49346104",
"0.493281",
"0.49288747",
"0.49010736",
"0.489812",
"0.4897713",
"0.48953947",
"0.48793912",
"0.4878985",
"0.48744398",
"0.48698628",
"0.48477873",
"0.48337516",
"0.48320085",
"0.48290858",
"0.48235986",
"0.48235455",
"0.48209184",
"0.4819959",
"0.48047608",
"0.47949138",
"0.4791919",
"0.4788908",
"0.47785318",
"0.47763497",
"0.47750202",
"0.47690505",
"0.4755179",
"0.47428548",
"0.47392908",
"0.47338852",
"0.47252792",
"0.47155982",
"0.47094944",
"0.47085145",
"0.4703338",
"0.46954766",
"0.46869457",
"0.4685387",
"0.46699134",
"0.46688136",
"0.46574837",
"0.46503794",
"0.46466547",
"0.46463585",
"0.4640548",
"0.46276516"
]
| 0.6272787 | 1 |
Replace the readers we are rewriting with cloneWithNewStart, reclaiming any page cache that is no longer needed, and transferring any key cache entries over to the new reader, expiring them from the old. if reset is true, we are instead restoring the starts of the readers from before the rewriting began note that we replace an existing sstable with a new instance of the same sstable, the replacement sstable .equals() the old one, BUT, it is a new instance, so, for example, since we releaseReference() on the old one, the old instance will have reference count == 0 and if we were to start a new compaction with that old instance, we would get exceptions. | private void moveStarts(DecoratedKey lowerbound)
{
if (transaction.isOffline() || preemptiveOpenInterval == Long.MAX_VALUE)
return;
for (SSTableReader sstable : transaction.originals())
{
// we call getCurrentReplacement() to support multiple rewriters operating over the same source readers at once.
// note: only one such writer should be written to at any moment
final SSTableReader latest = transaction.current(sstable);
// skip any sstables that we know to already be shadowed
if (latest.getFirst().compareTo(lowerbound) > 0)
continue;
if (lowerbound.compareTo(latest.getLast()) >= 0)
{
if (!transaction.isObsolete(latest))
transaction.obsolete(latest);
continue;
}
if (!transaction.isObsolete(latest))
{
DecoratedKey newStart = latest.firstKeyBeyond(lowerbound);
assert newStart != null;
SSTableReader replacement = latest.cloneWithNewStart(newStart);
transaction.update(replacement, true);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void reset() throws IOException {\n\td.numObjectsCached = 0;\n\td.reset();\n }",
"protected void reInitialize() {\n resetCurrent();\n incrementIterCount();\n setFirst(true);\n recoverRunningVersion();\n }",
"public synchronized void reset() {\n java.util.Arrays.fill(buffer, (byte) 0);\n writeHead = 0;\n cumulativeWritten = 0;\n synchronized (allReaders) {\n for (Reader reader : allReaders) {\n reader.reset();\n }\n }\n }",
"private void resetMarked() {\n if(!data.isEmpty()) {\n data.getFirst().reset();\n }\n for(IoBuffer buf : resetCache) {\n buf.reset();\n data.addFirst(buf);\n }\n resetCache.clear();\n }",
"private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRestart() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\t\tassertEquals(1, foo1.getValue());\n\n\t\tFoo foo2 = reader.read();\n\t\tassertEquals(2, foo2.getValue());\n\n\t\tgetAsItemStream(reader).update(executionContext);\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tFoo fooAfterRestart = reader.read();\n\t\tassertEquals(3, fooAfterRestart.getValue());\n\t}",
"public void rewind() {\n readAllocationNode = firstAllocationNode;\n }",
"@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}",
"private void reset() throws ParallelException {\r\n\t\tif (_k==2) _g.makeNNbors(true); // force reset (from cache)\r\n\t\t// else _g.makeNbors(true); // don't force reset (from cache): no need\r\n _nodesq = new TreeSet(_origNodesq);\r\n }",
"public void reset() {\n clearAllocationNodes(firstAllocationNode);\n firstAllocationNode.reset(/* startPosition= */ 0, allocationLength);\n readAllocationNode = firstAllocationNode;\n writeAllocationNode = firstAllocationNode;\n totalBytesWritten = 0;\n allocator.trim();\n }",
"public synchronized void reset()\n\t{\n\t\tthis.snapshots.clear();\n\t\tthis.selfPositions.clear();\n\t}",
"@ManagedOperation(description = \"Reset and reloads the file store\")\n public synchronized void reset() throws IOException {\n synchronized (cache) {\n // trunk and clear, before we reload the store\n trunkStore();\n cache.clear();\n loadStore();\n }\n }",
"public void reset() {\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n CacheData<K, V> pair = getCacheData(i);\r\n if (pair != null) {\r\n pair.reset();\r\n }\r\n }\r\n }",
"private void resetCurrentMemoryIndex() throws Exception {\n // by using the globalParameters, the memory index can startup counters etc.\n // we set the documentCount to ensure all documents are given a unique number.\n tupleFlowParameters.getJSON().set(\"documentNumberOffset\", this.globalDocumentCount);\n currentMemoryIndex = new MemoryIndex(tupleFlowParameters);\n }",
"private void rewind() {\n currentPos = markPos;\n }",
"public void reallocateBuckets() { }",
"public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }",
"public void reset() {\n\t\tfor (Entry<TileCoordinate, DijkstraNode> entry: this.cache.entrySet()) {\n\t\t\tentry.getValue().reset();\n\t\t}\n\t}",
"@Override\n public void reset() {\n globalIndex = new AtomicLong(0);\n lastIssuedMap = new ConcurrentHashMap<>();\n }",
"@Override\r\n protected final void reset ()\r\n {\r\n super.reset();\r\n\r\n headLocation = null;\r\n tailLocation = null;\r\n startTime = null;\r\n }",
"public OpRewriter reset() {\n result = OpSequence.create();\n return this;\n }",
"public synchronized void recreateIndex()\n throws InterruptedException, CancellationException, ExecutionException, IOException, IndexServiceException {\n // Clear index first\n clear();\n recreateService(IndexRecreateObject.Service.Groups);\n recreateService(IndexRecreateObject.Service.Acl);\n recreateService(IndexRecreateObject.Service.Themes);\n recreateService(IndexRecreateObject.Service.Series);\n recreateService(IndexRecreateObject.Service.Scheduler);\n recreateService(IndexRecreateObject.Service.Workflow);\n recreateService(IndexRecreateObject.Service.AssetManager);\n recreateService(IndexRecreateObject.Service.Comments);\n }",
"void resetCache();",
"protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }",
"public final void rewind() {\n branch = 0;\n }",
"public void reset() {\n firstUpdate = true;\n }",
"public void reset () {\n\t\topen();\n\t\ttry {\n\t\t\tcontainer.setLength(0);\n\t\t\treservedBitMap.setLength(0);\n\t\t\tupdatedBitMap.setLength(0);\n\t\t\tfreeList.setLength(0);\n\t\t\tsize = 0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}",
"public synchronized void reset() throws IOException {\n\t\t\tdata.seek(firstPosition);\n\t\t}",
"void prepareRelocate(Identity id, long newNodeId) throws IOException;",
"void resetCacheCounters();",
"@Override\n\tpublic void reset(int index) {\n\t\tif (sorted) {\n\t\t\tsortedReader.reset(index);\n\t\t}\n\t}",
"@Override\n public void reset() throws IOException {\n setPosition(startPosition);\n }",
"private void rescan(long retries) {\n // The RESCAN node will be deleted almost immediately by the\n // SplitLogManager as soon as it is created because it is being\n // created in the DONE state. This behavior prevents a buildup\n // of RESCAN nodes. But there is also a chance that a SplitLogWorker\n // might miss the watch-trigger that creation of RESCAN node provides.\n // Since the TimeoutMonitor will keep resubmitting UNASSIGNED tasks\n // therefore this behavior is safe.\n SplitLogTask slt = new SplitLogTask.Done(this.details.getServerName(), getRecoveryMode());\n this.watcher\n .getRecoverableZooKeeper()\n .getZooKeeper()\n .create(ZKSplitLog.getRescanNode(watcher), slt.toByteArray(), Ids.OPEN_ACL_UNSAFE,\n CreateMode.EPHEMERAL_SEQUENTIAL, new CreateRescanAsyncCallback(), Long.valueOf(retries));\n }",
"private void rehash() {\n if (rehashing) {\n int newCapacity = 2 * capacity + 1;\n if (newCapacity > MAXIMUM_CAPACITY) {\n return;\n }\n\n objectCounter += 2;\n MapElement[] newMap = new MapElement[newCapacity]; \n \n MapElement me = null;\n MapElement t = null;\n MapElement next = null;\n int newIndex = 0;\n \n for (int index = 0; index < capacity; index++) {\n me = map[index];\n while (me != null) {\n next = me.getNext();\n newIndex = me.getKey() % newCapacity;\n if (newIndex < 0) {\n newIndex = -newIndex;\n }\n if (newMap[newIndex] == null) {\n // No element yet for this new index\n newMap[newIndex] = me;\n me.setNext(null);\n } else {\n // Hook the element into the beginning of the chain\n t = newMap[newIndex];\n newMap[newIndex] = me;\n me.setNext(t);\n }\n me = next;\n }\n }\n \n map = newMap;\n capacity = newCapacity;\n // Max. number of elements before a rehash occurs\n maxLoad = (int) (loadFactor * capacity + 0.5f);\n\n newMap = null;\n }\n }",
"public void setRecreateIndexes(java.lang.Long value);",
"public void reset() {\n\t\ttry {\n\t\ttr.reset();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception when reset the table reader\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void setChunkAsReclaimed(){\n this.setState(State.RECLAIMED);\n this.remNetworkCopy(Server.getInstance().getId());\n }",
"public void resetMap() {\n for (int x = 0; x < cells; x++) {\n for (int y = 0; y < cells; y++) {\n Node current = map[x][y];\n if (current.getType() == 4 || current.getType() == 5)\n map[x][y] = new Node(3, x, y);\n }\n }\n\n if (startx > -1 && starty > -1) { //RESET THE START AND FINISH\n map[startx][starty] = new Node(0, startx, starty);\n map[startx][starty].setJumps(0);\n }\n\n if (finishx > -1 && finishy > -1)\n map[finishx][finishy] = new Node(1, finishx, finishy);\n\n reset(); //RESET SOME VARIABLES\n }",
"public void reset() {\n this.index = this.startIndex;\n }",
"private void resetIterator() {\n\t\titerator = head;\n\t}",
"public void reallocateBuckets() {\n lockAllAndThen(() -> {\n final ItemNode<K,V>[] newBuckets = makeBuckets(2 * buckets.length);\n for (int hash=0; hash<buckets.length; hash++) {\n ItemNode<K,V> node = buckets[hash];\n while (node != null) {\n final int newHash = getHash(node.k) % newBuckets.length;\n ItemNode<K,V> next = node.next;\n node.next = newBuckets[newHash];\n newBuckets[newHash] = node;\n node = next;\n }\n }\n buckets = newBuckets;\n });\n }",
"public void reset() {\n while (getNumTotal() > 0) {\n this.removeNuclei();\n }\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n }",
"public void resizeStartUnchanged(int newcapacity){\n Object []lin=new Object[newcapacity];\n int k=start;\n for(int i=0;i<size;i++){\n lin[i]=cir[k];\n k=(k+1)%cir.length;\n }\n cir=new Object[newcapacity];\n for(int i=0;i<size;i++){\n cir[k]=lin[i];\n k=(k+1)%cir.length;\n }\n }",
"public synchronized void reset() {\r\n \ttry {\r\n \t\trecreate();\r\n \t} catch (CoreException e) {\r\n \t\tResourcesPlugin.getPlugin().getLog().log(e.getStatus());\r\n \t}\r\n }",
"public void resizeStartUnchanged(int newCapacity) {\r\n Object[] temp = new Object[newCapacity];\r\n int k = start;\r\n int p = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[p] = cir[k];\r\n p = (p + 1) % temp.length;\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n }",
"public void restart() {\n\t\td1 = 6;\n\t\td2 = 6;\n\t\tthis.rolled = false;\n\t}",
"private Reindex() {}",
"private Reindex() {}",
"public synchronized void reset() {\n }",
"public void recycle() {\r\n // Recycle our parent\r\n super.recycle();\r\n // Recycle the stream\r\n this.localstream.recycle();\r\n // Tell the parent that a stream is already in use.\r\n this.setStream(localstream);\r\n }",
"public void recycle();",
"public void resetModification()\n {\n _modifiedSinceSave = false;\n }",
"@Override\n\tpublic void reset() {\n\t\tfor(int i=0; i<mRemainedCounters; i++){\n\t\t\tfinal ICounter counter = this.mCounters.getFirst();\n\t\t\tcounter.reset();\n\t\t\tthis.mCounters.removeFirst();\n\t\t\tthis.mCounters.addLast(counter);\n\t\t}\n\t\tthis.mRemainedCounters = this.mCounters.size();\n\t}",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRollbackOnFirstChunkAndRestart() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\n\t\tFoo foo2 = reader.read();\n\t\tassertTrue(!foo2.equals(foo1));\n\n\t\tFoo foo3 = reader.read();\n\t\tassertTrue(!foo2.equals(foo3));\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tassertEquals(foo1, reader.read());\n\t\tassertEquals(foo2, reader.read());\n\t}",
"public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}",
"@Override\n @Secured(SecurityRoles.ADMINISTRATOR)\n public void reindex() {\n revisionDao.deleteAll();\n // OK, launches a new indexation\n indexFromLatest();\n }",
"@Override\n\tpublic void rewind() {\n\t\t\n\t}",
"protected void reset() {\n\t\t}",
"public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtEOF = false;\n\t}",
"public void restart(byte[] firstRow) throws IOException {\n Scan newScan = new Scan(scan);\n newScan.setStartRow(firstRow);\n this.scanner = this.htable.getScanner(newScan);\n }",
"void rebuildIfNecessary();",
"public void restart() {\n ReadOnlyAssignmentList currentState = assignmentListStateList.get(currentStatePointer);\n assignmentListStateList.clear();\n assignmentListStateList.add(currentState);\n currentStatePointer = 0;\n }",
"@Override\n\tpublic void rebuild() throws IOException\n\t{\n\n\t}",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRestartOnSecondPage() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\t\tassertEquals(1, foo1.getValue());\n\t\tFoo foo2 = reader.read();\n\t\tassertEquals(2, foo2.getValue());\n\t\tFoo foo3 = reader.read();\n\t\tassertEquals(3, foo3.getValue());\n\t\tFoo foo4 = reader.read();\n\t\tassertEquals(4, foo4.getValue());\n\n\t\tgetAsItemStream(reader).update(executionContext);\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tFoo foo5 = reader.read();\n\t\tassertEquals(5, foo5.getValue());\n\n\t\tassertNull(reader.read());\n\t}",
"void resetData(ReadOnlyEntryBook newData);",
"public void reset()\n {\n this.timeToCook = 0;\n this.startTime = 0;\n }",
"public void reset() {\n //mLoader.reset();\n start();\n }",
"public void recycle()\n\t{\n\t\tparams = null;\n\t\tconfigured = false;\n\t\tattributes = null;\n\t\tmyConfig = null;\n\t\tpreviousRequest = null;\n\t\tmyModel = null;\n\t\tvalidationErrors = new HashMap();\n\t\theaders = null;\n\t\tsource = null;\n\t\tlocale = null;\n\n\t\tif (log.isDebugEnabled())\n\t\t{\n\t\t\tlog.debug(\"Request \" + toString() + \" recycled\");\n\t\t}\n\t}",
"public void reset ()\n {\n final String METHOD_NAME = \"reset()\";\n this.logDebug(METHOD_NAME + \" 1/2: Started\");\n super.reset();\n this.lid = null;\n this.refId = Id.UNDEFINED;\n this.fromDocType = DocType.UNDEFINED;\n this.logDebug(METHOD_NAME + \" 2/2: Done\");\n }",
"@Override\n protected SearcherAndTaxonomy refreshIfNeeded(SearcherAndTaxonomy ref) throws IOException {\n final IndexReader r = ref.searcher.getIndexReader();\n final IndexReader newReader = DirectoryReader.openIfChanged((DirectoryReader) r);\n if (newReader == null) {\n return null;\n } else {\n DirectoryTaxonomyReader tr;\n try {\n tr = TaxonomyReader.openIfChanged(ref.taxonomyReader);\n } catch (Throwable t1) {\n try {\n IOUtils.close(newReader);\n } catch (Throwable t2) {\n t2.addSuppressed(t2);\n }\n throw t1;\n }\n if (tr == null) {\n ref.taxonomyReader.incRef();\n tr = ref.taxonomyReader;\n } else if (taxoWriter != null && taxoWriter.getTaxonomyEpoch() != taxoEpoch) {\n IOUtils.close(newReader, tr);\n throw new IllegalStateException(\n \"DirectoryTaxonomyWriter.replaceTaxonomy was called, which is not allowed when using SearcherTaxonomyManager\");\n }\n\n return new SearcherAndTaxonomy(\n SearcherManager.getSearcher(searcherFactory, newReader, r), tr);\n }\n }",
"public synchronized void reset()\n {\n printDebug(\"reset() start\");\n\n if (open) {\n \tif(started) {\n \t\tline.stop();\n \t}\n \tif(!reset) {\n \t\tline.flush();\n \t} \t\n \ttotalWritten = 0;\n \t// TODO: totalWritten might be updated after this in write method.\n started = false;\n timeTracker.reset();\n notifyAll();\n }\n reset = true;\n printDebug(\"reset() end\");\n }",
"public void rewind() throws DbException, TransactionAbortedException {\n child1.rewind();\n child2.rewind();\n this.leftMap.clear();\n this.rightMap.clear();\n }",
"boolean reset(final long nextLogIndex);",
"public void reset() {\r\n bop.reset();\r\n gzipOp = null;\r\n }",
"private void reinit() {\n init();\n }",
"@Override\n public void reset() {\n isDone = false;\n if (content.markSupported()) {\n try {\n content.reset();\n } catch (IOException ioe) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Unable to reset the input stream: {}\", ioe.getMessage());\n }\n }\n\n content.mark(0);\n }\n super.reset();\n }",
"public void rewind() throws IOException {\n if (closed) {\n throw new IOException(\"Stream is already closed\");\n }\n\n if (storeOutputStream != null) {\n storeOutputStream.close();\n storeOutputStream = null;\n }\n\n // Close the byte input stream or file input stream\n if (inputStream != originalInputStream) {\n inputStream.close();\n }\n\n bufferHighWaterMark = Math.max(bufferPointer, bufferHighWaterMark);\n bufferPointer = bufferHighWaterMark;\n\n if (bufferHighWaterMark > 0) {\n // If we have a buffer, then we'll read from it\n if (byteBuffer != null) {\n readingFromBuffer = true;\n inputStream = new UnsynchronizedByteArrayInputStream(byteBuffer, 0, bufferHighWaterMark);\n } else {\n // No buffer, which means we've switched to a file\n inputStream = new BufferedInputStream(new FileInputStream(storeFile));\n }\n } else {\n inputStream = originalInputStream;\n }\n }",
"protected void rehash() {\n int oldCapacity = table.length;\n Entry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n Entry newMap[] = new Entry[newCapacity];\n\n threshold = (int) (newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity; i-- > 0; ) {\n for (Entry old = oldMap[i]; old != null; ) {\n Entry e = old;\n old = old.next;\n\n int index = (e.key & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }",
"public void testRestart() throws Exception {\n \t\tsource.open(executionContext);\n \t\tsource.read();\n \t\tsource.update(executionContext);\n \t\tSystem.out.println(executionContext);\n\t\tassertEquals(1, executionContext.getLong(ClassUtils.getShortName(StaxEventItemReader.class) + \".piece.count\"));\n \t\tList expectedAfterRestart = (List) source.read();\n \n \t\tsource = createNewInputSouce();\n \t\tsource.open(executionContext);\n \t\tList afterRestart = (List) source.read();\n \t\tassertEquals(expectedAfterRestart.size(), afterRestart.size());\n \t}",
"public synchronized void reallocateBuckets() {\n final ItemNode<K,V>[] newBuckets = makeBuckets(2 * buckets.length);\n for (int hash=0; hash<buckets.length; hash++) {\n ItemNode<K,V> node = buckets[hash];\n while (node != null) {\n final int newHash = getHash(node.k) % newBuckets.length;\n ItemNode<K,V> next = node.next;\n node.next = newBuckets[newHash];\n newBuckets[newHash] = node;\n node = next;\n }\n }\n buckets = newBuckets;\n }",
"private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }",
"public final void yyreset(java.io.Reader reader) {\r\n\t\t// 's' has been updated.\r\n\t\tzzBuffer = s.array;\r\n\t\t/*\r\n\t\t * We replaced the line below with the two below it because zzRefill\r\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\r\n\t\t * \"full\" the first time through, since it points to the segment's\r\n\t\t * array). So, we assign zzEndRead here.\r\n\t\t */\r\n\t\t//zzStartRead = zzEndRead = s.offset;\r\n\t\tzzStartRead = s.offset;\r\n\t\tzzEndRead = zzStartRead + s.count - 1;\r\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\r\n\t\tzzLexicalState = YYINITIAL;\r\n\t\tzzReader = reader;\r\n\t\tzzAtEOF = false;\r\n\t}",
"public void resetAndTruncate()\n {\n rowIndexFile.resetAndTruncate(riMark);\n partitionIndexFile.resetAndTruncate(piMark);\n }",
"@Override\n\tpublic void reloadNewObjects() throws IOException\n\t{\n\n\t}",
"public void reallocateBuckets(final ItemNode<K,V>[] oldBuckets) {\n lockAllAndThen(() -> { \n final ItemNode<K,V>[] bs = buckets;\n if (oldBuckets == bs) {\n // System.out.printf(\"Reallocating from %d buckets%n\", bs.length);\n final ItemNode<K,V>[] newBuckets = makeBuckets(2 * bs.length);\n for (int hash=0; hash<bs.length; hash++) {\n ItemNode<K,V> node = bs[hash];\n while (node != null) {\n final int newHash = getHash(node.k) % newBuckets.length;\n newBuckets[newHash] \n = new ItemNode<K,V>(node.k, node.v, newBuckets[newHash]);\n node = node.next;\n }\n }\n buckets = newBuckets; // Visibility: buckets field is volatile\n } \n });\n }",
"public void reset()\n {\n reset(this.map, this.heuristic, this.neighborSelector);\n }",
"void resetData(ReadOnlyTaskManager newData);",
"public void reuse() {\n method = null;\n uriPath = null;\n versionRange = 0;\n uriFragmentRange = queryStringRange = 0;\n contentOffset = 0;\n contentLength = 0;\n\n if (buffer != null) {\n buffer.clear();\n }\n for (int i = 0; i < nFields; i++) {\n keys[i] = null;\n }\n nFields = 0;\n }",
"public void restart()\n\t{\n\t\tstop();\n\t\treset();\n\t\tstart();\n\t}",
"private void reset() {\n if (this.dead) return;\n /*this.state = {\n activeFragmentedOperation: null,\n lastFragment: false,\n masked: false,\n opcode: 0,\n fragmentedOperation: false\n };*/\n this.state = new State(-1, false, false, 0, false);\n this.fragmentedBufferPool.reset(true);\n this.unfragmentedBufferPool.reset(true);\n this.expectOffset = 0;\n this.expectBuffer = null;\n this.expectHandler = null;\n this.overflow = new LinkedList<ByteBuffer>();///[];\n this.currentMessage = new LinkedList<Object>();///[];\n}",
"public void clear(){\r\n\t\tbeginMarker.next = endMarker;\r\n\t\tendMarker.prev = beginMarker;\r\n\t\tnumAdded=0;\r\n\t\tsize=0;\r\n \tmodCount++;\r\n\t}",
"private void reset() {\n }",
"public void reset() {\r\n\r\n\t\tmySpreadsheet = new SpreadSheet();\r\n\t\tmySpreadsheet.reset();\r\n\t}",
"public void reset(Reader input) {\n this.buffer.dispose();\n this.buffer = new ReaderBuffer(input);\n this.previousToken = null;\n this.lastMatch.clear();\n }",
"public void resetCache() {\n logger.info(\"resetCache(): refilling clinical attribute cache\");\n\n Date dateOfCurrentCacheRefresh = new Date();\n ArrayList<ClinicalAttributeMetadata> latestClinicalAttributeMetadata = null;\n // latestOverrides is a map of study-id to list of overridden ClinicalAttributeMetadata objects\n Map<String, ArrayList<ClinicalAttributeMetadata>> latestOverrides = null;\n\n // attempt to refresh ehcache stores seperately and store success status\n boolean failedClinicalAttributeMetadataCacheRefresh = false;\n boolean failedOverridesCacheRefresh = false;\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull clinical attributes from repository. Error message returned: \" + e.getMessage());\n failedClinicalAttributeMetadataCacheRefresh = true;\n }\n\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataOverridesInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull overrides from repository. Error message returned: \" + e.getMessage());\n failedOverridesCacheRefresh = true;\n }\n\n // regardless of whether ehcache was updated with new data - use that data to populate modeled object caches\n // ensures app starts up (between tomcat restarts) if TopBraid is down\n logger.info(\"Loading modeled object cache from EHCache\");\n try {\n // this will throw an exception if we cannot connect to TopBraid AND cache is corrupt\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCache();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCache();\n } catch (Exception e) {\n try {\n // this will throw an exception if backup is unavailable\n logger.error(\"Unable to load modeled object cache from default EHCache... attempting to read from backup\");\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCacheBackup();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCacheBackup();\n if (latestClinicalAttributeMetadata == null || latestOverrides == null) {\n throw new FailedCacheRefreshException(\"No data found in specified backup cache location...\", new Exception());\n }\n } catch (Exception e2) {\n logger.error(\"Unable to load modeled object cache from backup EHCache...\");\n throw new FailedCacheRefreshException(\"Unable to load data from all backup caches...\", new Exception());\n }\n }\n\n // backup cache at this point (maybe backup after each successful update above?)\n if (!failedClinicalAttributeMetadataCacheRefresh && !failedOverridesCacheRefresh) {\n logger.info(\"resetCache(): cache update succeeded, backing up cache...\");\n try {\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataPersistentCache(latestClinicalAttributeMetadata);\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataOverridesPersistentCache(latestOverrides);\n logger.info(\"resetCache(): succesfully backed up cache\");\n } catch (Exception e) {\n logger.error(\"resetCache(): failed to backup cache: \" + e.getMessage());\n }\n }\n\n HashMap<String, ClinicalAttributeMetadata> latestClinicalAttributeMetadataCache = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : latestClinicalAttributeMetadata) {\n latestClinicalAttributeMetadataCache.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n\n // latestOverridesCache is a map of study-id to map of clinical attribute name to overridden ClinicalAttributeMetadata object\n HashMap<String, Map<String,ClinicalAttributeMetadata>> latestOverridesCache = new HashMap<String, Map<String, ClinicalAttributeMetadata>>();\n for (Map.Entry<String, ArrayList<ClinicalAttributeMetadata>> entry : latestOverrides.entrySet()) {\n HashMap<String, ClinicalAttributeMetadata> clinicalAttributesMetadataMapping = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : entry.getValue()) {\n fillOverrideAttributeWithDefaultValues(clinicalAttributeMetadata, latestClinicalAttributeMetadataCache.get(clinicalAttributeMetadata.getColumnHeader()));\n clinicalAttributesMetadataMapping.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n latestOverridesCache.put(entry.getKey(), clinicalAttributesMetadataMapping);\n }\n\n clinicalAttributeCache = latestClinicalAttributeMetadataCache;\n logger.info(\"resetCache(): refilled cache with \" + latestClinicalAttributeMetadata.size() + \" clinical attributes\");\n overridesCache = latestOverridesCache;\n logger.info(\"resetCache(): refilled overrides cache with \" + latestOverrides.size() + \" overrides\");\n\n if (failedClinicalAttributeMetadataCacheRefresh || failedOverridesCacheRefresh) {\n logger.info(\"Unable to update cache with latest data from TopBraid... falling back on EHCache store.\");\n throw new FailedCacheRefreshException(\"Failed to refresh cache\", new Exception());\n } else {\n dateOfLastCacheRefresh = dateOfCurrentCacheRefresh;\n logger.info(\"resetCache(): cache last refreshed on: \" + dateOfLastCacheRefresh.toString());\n }\n }",
"@Override\n\tpublic void reset() { // ? will it ever be reset before sorting?\n\t\tif(TR == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tTR.reset();\n\t\t} catch(Exception e) {\n\t\t\tSystem.err.println(\"Exception occurred for resetting the TupleReader on: \" + tempsubdir);\n\t\t\tSystem.err.println(e.toString());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtBOL = true;\n\t\tzzAtEOF = false;\n\t}",
"public void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void reset() {\n initEntries();\n }",
"@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}"
]
| [
"0.5813585",
"0.57791084",
"0.5759979",
"0.5542434",
"0.5521533",
"0.55023485",
"0.54581654",
"0.5448816",
"0.5415978",
"0.53482634",
"0.53389513",
"0.53336626",
"0.53291756",
"0.5304669",
"0.5283336",
"0.5264579",
"0.5215991",
"0.5131456",
"0.51209277",
"0.51169556",
"0.5115205",
"0.5091188",
"0.50751406",
"0.50695527",
"0.5069187",
"0.50666994",
"0.50604665",
"0.50476223",
"0.5030061",
"0.50088793",
"0.50037056",
"0.49882033",
"0.49731874",
"0.49676692",
"0.49431026",
"0.4921929",
"0.4919526",
"0.49121168",
"0.4912002",
"0.49111462",
"0.48961753",
"0.48713604",
"0.4867891",
"0.48658082",
"0.48576713",
"0.4852419",
"0.48485804",
"0.48485804",
"0.48440462",
"0.48430243",
"0.48397058",
"0.48378962",
"0.4837525",
"0.4837083",
"0.48220417",
"0.48176375",
"0.48174286",
"0.48164764",
"0.48131198",
"0.48060647",
"0.48028216",
"0.48005044",
"0.47998706",
"0.47979313",
"0.47972304",
"0.479571",
"0.47954515",
"0.47946608",
"0.4793832",
"0.47829238",
"0.47807604",
"0.4780657",
"0.47774103",
"0.47708982",
"0.47665182",
"0.47659862",
"0.4759102",
"0.47557163",
"0.47541735",
"0.4753281",
"0.4750846",
"0.47508094",
"0.47447214",
"0.47428355",
"0.47408822",
"0.47378153",
"0.4736394",
"0.47338936",
"0.47268906",
"0.47207397",
"0.47197253",
"0.47167444",
"0.4713098",
"0.4711171",
"0.47101012",
"0.47087282",
"0.47076252",
"0.47075498",
"0.4706755",
"0.47060418"
]
| 0.49898717 | 31 |
Finishes the new file(s) Creates final files, adds the new files to the Tracker (via replaceReader). We add them to the tracker to be able to get rid of the tmpfiles It is up to the caller to do the compacted sstables replacement gymnastics (ie, call TrackermarkCompactedSSTablesReplaced(..)) | public List<SSTableReader> finish()
{
super.finish();
return finished();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateFiles() {\n\t}",
"public void testUploadFinalFix() throws Exception {\r\n FileDataSource dataSource = new FileDataSource(\"test_files/stress.jar\");\r\n DataHandler dataHandler = new DataHandler(dataSource);\r\n\r\n Date startTime = new Date();\r\n for (int i = 0; i < 10; ++i) {\r\n services.uploadFinalFix(StressTestHelper.PROJECT_ID, StressTestHelper.USER_ID, \"finalfix.jar\", dataHandler);\r\n }\r\n\r\n Date endTime = new Date();\r\n\r\n System.out.println(\"Executing uploadFinalFix for 10 times takes \"\r\n + (endTime.getTime() - startTime.getTime()) + \" milliseconds\");\r\n\r\n // check the upload\r\n Upload upload = uploadManager.getCreatedUpload();\r\n assertEquals(\"Wrong type\", \"Final Fix\", upload.getUploadType().getName());\r\n assertEquals(\"Wrong status\", \"Active\", upload.getUploadStatus().getName());\r\n assertEquals(\"Wrong project id\", StressTestHelper.PROJECT_ID, upload.getProject());\r\n assertTrue(\"Wrong file name\", upload.getParameter().startsWith(\"submission\"));\r\n assertTrue(\"Wrong file name\", upload.getParameter().endsWith(\"jar\"));\r\n assertEquals(\"Wrong user id\", String.valueOf(StressTestHelper.USER_ID), uploadManager.getCreatedUploadUserId());\r\n\r\n // verify screening\r\n assertEquals(\"Screening should not be initiate\", -1, screeningManager.getSubmissionId());\r\n\r\n // verify previous submissions\r\n Upload updatedUpload = uploadManager.getUpdatedUpload();\r\n assertEquals(\"Previous upload should be deleted\", updatedUpload.getUploadStatus().getName(), \"Deleted\");\r\n\r\n\r\n File uploadedDir = new File(\"test_files/upload/\");\r\n File uploaded = uploadedDir.listFiles()[0];\r\n assertEquals(\"Failed to upload submission\", new File(\"test_files/stress.jar\").length(), uploaded.length());\r\n }",
"public void waitForNewFiles() throws IOException {\n \n WatchService watcher = FileSystems.getDefault().newWatchService();\n Path dir = Paths.get(DATA_DIRECTORY);\n \n dir.register(watcher, ENTRY_CREATE);\n \n for (; ; ) {\n \n // wait for key to be signaled\n WatchKey key;\n try {\n key = watcher.take();\n } catch (InterruptedException x) {\n return;\n }\n \n for (WatchEvent<?> event : key.pollEvents()) {\n WatchEvent.Kind<?> kind = event.kind();\n \n \n if (kind == OVERFLOW) {\n continue;\n }\n \n \n WatchEvent<Path> ev = (WatchEvent<Path>) event;\n Path filename = ev.context();\n \n /* Verify that the new file is a text file.*/\n try {\n \n Path child = dir.resolve(filename);\n if (!Files.probeContentType(child).equals(\"text/plain\")) {\n System.err.format(\"New file '%s'\" +\n \" is not a plain text file.%n\", filename);\n continue;\n }\n \n \n } catch (IOException x) {\n System.err.println(x);\n continue;\n }\n \n \n /* Verify file name */\n if (!filename.toString().startsWith(\"posture_\") || !filename.toString().endsWith(\".txt\")) {\n continue;\n }\n \n \n try {\n processNewFile(DATA_DIRECTORY + filename.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }\n \n /* reset the key*/\n boolean valid = key.reset();\n if (!valid) {\n break;\n }\n }\n }",
"private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }",
"public void onFinish() {\n \t\tmdrFile.write();\n \n \t\t// Close everything\n \t\tfor (Closeable file : toClose)\n \t\t\tUtils.closeFile(file);\n \t}",
"void flush() {\r\n synchronized (sync) {\r\n updatedFiles.clear();\r\n }\r\n }",
"public void close() throws IOException {\n for (var dos : dataStreams) {\n if (dos != null) {\n dos.close();\n }\n }\n\n for (var dos : indexStreams) {\n if (dos != null) {\n dos.close();\n }\n }\n\n // Stats\n log.info(\"Number of keys: {}\", keyCount);\n log.info(\"Number of values: {}\", valueCount);\n\n var bloomFilter = config.getBoolean(Configuration.BLOOM_FILTER_ENABLED) ?\n new BloomFilter(keyCount, config.getDouble(Configuration.BLOOM_FILTER_ERROR_FACTOR, 0.01)) :\n null;\n\n\n // Prepare files to merge\n List<File> filesToMerge = new ArrayList<>();\n try {\n // Build index file\n for (int i = 0; i < indexFiles.length; i++) {\n if (indexFiles[i] != null) {\n filesToMerge.add(buildIndex(i, bloomFilter));\n }\n }\n\n //Write metadata file\n File metadataFile = new File(tempFolder, \"metadata.dat\");\n metadataFile.deleteOnExit();\n try (var metadataOutputStream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(metadataFile)))) {\n writeMetadata(metadataOutputStream, bloomFilter);\n }\n\n filesToMerge.add(0, metadataFile);\n\n // Stats collisions\n log.info(\"Number of collisions: {}\", collisions);\n\n // Add data files\n for (File dataFile : dataFiles) {\n if (dataFile != null) {\n filesToMerge.add(dataFile);\n }\n }\n\n // Merge and write to output\n checkFreeDiskSpace(filesToMerge);\n mergeFiles(filesToMerge, outputStream);\n } finally {\n outputStream.close();\n cleanup(filesToMerge);\n }\n }",
"private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}",
"private void finalizeFileSystemFile() throws IOException {\n Path finalConfigPath = getFinalConfigPath(tempConfigPath);\n fileSystem.rename(tempConfigPath, finalConfigPath);\n LOG.info(\"finalize temp configuration file successfully, finalConfigPath=\"\n + finalConfigPath);\n }",
"private void checkOutFiles(HashMap<String, Blob> allFiles,\n HashMap<String, Blob> curFile)\n throws IOException {\n for (String fileName: allFiles.keySet()) {\n File fileInCWD = new File(Main.CWD, fileName);\n String content = allFiles.get(fileName).getContent();\n checkUntracked(fileName, curFile);\n if (!fileInCWD.exists()) {\n fileInCWD.createNewFile();\n }\n Utils.writeContents(fileInCWD, content);\n }\n for (String fileName: curFile.keySet()) {\n Blob ourBlob = allFiles.get(fileName);\n if (ourBlob == null) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n fileInCWD.delete();\n }\n }\n }\n }",
"private void deleteTempFiles() {\n\t\tfor (int i = 0; i < prevPrevTotalBuckets; i++) {\n\t\t\ttry {\n\t\t\t\tString filename = DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode + \"_\"\n\t\t\t\t\t\t+ (passNumber - 1) + \"_\" + i;\n\t\t\t\tFile file = new File(filename);\n\t\t\t\tfile.delete();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void postRun() {\n if (manageFileSystem && fs != null) {\n try {\n fs.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close AlluxioFileSystem: %s\", e.getMessage()));\n }\n }\n // only to close the FileOutputStream when manageRecordFile=true\n if (manageRecordFile && recordOutput != null) {\n try {\n recordOutput.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close File %s: %s\", recordFileName, e.getMessage()));\n }\n }\n }",
"@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }",
"public void updateFile() {\n try {\n FileWriter fw = new FileWriter(path);\n for (Task t : taskList.getTasks()) {\n fw.write(t.toTxt());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"File cannot be found\");\n }\n }",
"@Override\n protected void done() {\n super.done();\n if (!this.isCancelled()) {\n openMergeModifiedFile(); \n }\n }",
"public void newFile() {\r\n \t\tcurFile = null;\r\n \t}",
"private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void annotateAndUploadTSVFiles(String sessionID, int updateID, int projectID, int referenceID, int[] annotationIDs, CustomField[] customFields, File[] tsvFiles, File workingDir) throws Exception {\n\n LOG.info(\"Annotating TSV files, working directory is \" + workingDir.getAbsolutePath());\n\n ProjectManager.getInstance().setCustomVariantFields(sessionID, projectID, referenceID, updateID, customFields);\n\n //TODO: shouldn't these (tablename and tablenamesub) functions consider the customfields?\n String tableName = ProjectManager.getInstance().createVariantTable(\n sessionID,\n projectID,\n referenceID,\n updateID,\n annotationIDs,\n true);\n\n String tableNameSubset = ProjectManager.getInstance().createVariantTable(\n sessionID,\n projectID,\n referenceID,\n updateID,\n annotationIDs,\n false,\n true);\n\n boolean needsToUnlock = acquireLock(sessionID);\n\n try {\n //get annotation information\n Annotation[] annotations = getAnnotationsFromIDs(annotationIDs, sessionID);\n\n File[] splitTSVFiles = splitFilesByDNAAndFileID(tsvFiles, createSubdir(workingDir, \"split\"));\n File[] annotatedTSVFiles = annotateTSVFiles(sessionID, splitTSVFiles, annotations, customFields, createSubdir(workingDir, \"annotate\"));\n uploadTSVFiles(sessionID, annotatedTSVFiles, tableName, tableNameSubset, createSubdir(workingDir, \"subset\"));\n registerTable(sessionID, projectID, referenceID, updateID, tableName, tableNameSubset, annotationIDs);\n dropTablesPriorToUpdateID(sessionID, projectID, referenceID, updateID);\n setAnnotationStatus(sessionID, updateID, AnnotationLog.Status.PENDING);\n\n } catch (Exception e) {\n AnnotationLogManager.getInstance().setAnnotationLogStatus(sessionID, updateID, AnnotationLog.Status.ERROR);\n throw e;\n } finally {\n releaseLock(sessionID, needsToUnlock);\n }\n }",
"public void deleteTemporaryFiles() {\n if (!shouldReap()) {\n return;\n }\n\n for (File file : temporaryFiles) {\n try {\n FileHandler.delete(file);\n } catch (UncheckedIOException ignore) {\n // ignore; an interrupt will already have been logged.\n }\n }\n }",
"private static void taskContentsFileTransfer() {\n // Transfer text file to temporary file\n try {\n String taskContentsFilePath, taskContents;\n BufferedReader taskContentsLocation = new BufferedReader(new FileReader(FILE_PATH_CONTENT));\n taskContentsFilePath = taskContentsLocation.readLine();\n\n if (taskContentsFilePath != null) {\n BufferedReader taskContentsReader = new BufferedReader(new FileReader(taskContentsFilePath));\n\n taskContents = taskContentsReader.readLine();\n while (taskContents != null) {\n fileContent.add(taskContents);\n taskContents = taskContentsReader.readLine();\n }\n taskContentsReader.close();\n // Clear file\n PrintWriter pw = new PrintWriter(taskContentsFilePath);\n pw.close();\n }\n taskContentsLocation.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void save() {\r\n File distDataFile = new File(path);\r\n\r\n //String basePath = path;\r\n String endOfPath = path.substring(path.lastIndexOf(\"/\"));\r\n\r\n File rootDataFile;\r\n if (!path.contains(\"artists\")) {\r\n rootDataFile = new File(BASEDIR + \"/resources/data\" + endOfPath);\r\n } else {\r\n rootDataFile = new File(BASEDIR + \"/resources/data/artists\" + endOfPath);\r\n }\r\n\r\n File distTempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n File rootTempFile;\r\n if (!path.contains(\"artists\")) {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/myTempFile.txt\");\r\n } else {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/artists/myTempFile.txt\");\r\n }\r\n \r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(distTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n distDataFile.delete();\r\n distTempFile.renameTo(distDataFile);\r\n\r\n BufferedWriter bw2 = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(rootTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw2.write(line);\r\n bw2.newLine();\r\n }\r\n\r\n bw2.close();\r\n rootDataFile.delete();\r\n rootTempFile.renameTo(rootDataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOExceptoin in save1 : FileData\");\r\n }\r\n }",
"public DBMaker deleteFilesAfterClose(){\n this.deleteFilesAfterCloseFlag = true;\n return this;\n }",
"protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}",
"void closeFiles() {\n try {\n inputFile.close();\n debugFile.close();\n reportFile.close();\n workFile.close();\n stnFile.close();\n } catch(Exception e) {}\n }",
"protected void createBasicData(File tmpFile)\r\n\t{\t\t \r\n\t\tfileNumber++;\r\n\t\tScanner sc2 = null;\r\n\t try {\r\n\t sc2 = new Scanner(tmpFile);\r\n\t } catch (FileNotFoundException e) {\r\n\t e.printStackTrace(); \r\n\t }\r\n\t while (sc2.hasNextLine()) {\r\n\t Scanner s2 = new Scanner(sc2.nextLine());\r\n\t while (s2.hasNext()) {\r\n\t String tmpWord = s2.next();\r\n\t tmpWord = tmpWord.replaceAll(\"\\\\W\", \"\"); //replace all special characters with \"\"\r\n\t tmpWord = tmpWord.replaceAll(\"\\\\d\", \"\"); //replace all digits with \"\"\r\n\t tmpWord = tmpWord.toLowerCase();\r\n\t if(!(tmpWord.equals(\"\")))\r\n\t {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t//Inserting into location_order table\r\n\t\t\t\t\t\t String query = \"insert ignore into location_order (word, docID, file_name, visible)\" + \" values (?, ?, ?, ?)\";\r\n\t\t\t\t\t // create the mysql insert preparedstatement\r\n\t\t\t\t\t PreparedStatement preparedStmt = con.prepareStatement(query);\r\n\t\t\t\t\t preparedStmt.setString (1,tmpWord);\r\n\t\t\t\t\t preparedStmt.setInt (2, fileNumber);\t\r\n\t\t\t\t\t preparedStmt.setString (3,tmpFile.getName());\r\n\t\t\t\t\t preparedStmt.setInt (4, 1);\t\r\n\t\t\t\t\t // execute the preparedstatement\r\n\t\t\t\t\t preparedStmt.executeUpdate();\r\n\t\t\t\t\t con.commit();\r\n\t\t\t\t\t \r\n\t\t\t\t\t //Inserting into soundex table\r\n\t\t\t\t\t query = \"insert ignore into tmp_soundex (word, soundex, docID, file_name, visible)\" + \" values (?, ?, ?, ?, ?)\";\r\n\t\t\t\t\t // insert preparedstatement\r\n\t\t\t\t\t preparedStmt = con.prepareStatement(query);\r\n\t\t\t\t\t preparedStmt.setString (1,tmpWord);\r\n\t\t\t\t\t preparedStmt.setString (2,sndx.encode(tmpWord));\r\n\t\t\t\t\t preparedStmt.setInt (3, fileNumber);\t\r\n\t\t\t\t\t preparedStmt.setString (4,tmpFile.getName());\r\n\t\t\t\t\t preparedStmt.setInt (5, 1);\t\r\n\t\t\t\t\t // execute the preparedstatement\r\n\t\t\t\t\t preparedStmt.executeUpdate();\r\n\t\t\t\t\t con.commit();\r\n\t\t\t\t\t \r\n\t\t\t\t\t preparedStmt.close();\r\n\t\t\t\t\t System.out.println(\"Inserted the word: \"+tmpWord+\" | DocID is: \"+fileNumber +\"|\" +\" Name:: \"+tmpFile.getName());\r\n\t\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t} catch(NumberFormatException nfe){\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid data input!\", \"Error!\", 2);\r\n\t\t\t\t\t}\r\n\t }\r\n\t }\r\n\t s2.close();\r\n\t }\r\n\t sc2.close();\r\n\t}",
"protected void optimizeFile()\r\n {\r\n final ElapsedTimer timer = new ElapsedTimer();\r\n timesOptimized++;\r\n log.info(\"{0}: Beginning Optimization #{1}\", logCacheName, timesOptimized);\r\n\r\n // CREATE SNAPSHOT\r\n Collection<IndexedDiskElementDescriptor> defragList = null;\r\n\r\n storageLock.writeLock().lock();\r\n\r\n try\r\n {\r\n queueInput = true;\r\n // shut off recycle while we're optimizing,\r\n doRecycle = false;\r\n defragList = createPositionSortedDescriptorList();\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n // Defrag the file outside of the write lock. This allows a move to be made,\r\n // and yet have the element still accessible for reading or writing.\r\n long expectedNextPos = defragFile(defragList, 0);\r\n\r\n // ADD THE QUEUED ITEMS to the end and then truncate\r\n storageLock.writeLock().lock();\r\n\r\n try\r\n {\r\n try\r\n {\r\n if (!queuedPutList.isEmpty())\r\n {\r\n // pack them at the end\r\n expectedNextPos = defragFile(queuedPutList, expectedNextPos);\r\n }\r\n // TRUNCATE THE FILE\r\n dataFile.truncate(expectedNextPos);\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Error optimizing queued puts.\", logCacheName, e);\r\n }\r\n\r\n // RESTORE NORMAL OPERATION\r\n removeCount = 0;\r\n resetBytesFree();\r\n this.recycle.clear();\r\n queuedPutList.clear();\r\n queueInput = false;\r\n // turn recycle back on.\r\n doRecycle = true;\r\n isOptimizing = false;\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n log.info(\"{0}: Finished #{1}, Optimization took {2}\",\r\n logCacheName, timesOptimized, timer.getElapsedTimeString());\r\n }",
"private static void updateFiles(Gitlet currCommit) {\n HashMap<String, String> currHeadFiles = currCommit.tree.getHeadCommit()\n .getFileLoc();\n currCommit.tree.setMap(currHeadFiles);\n for (String fileName : currHeadFiles.keySet()) {\n FileManip temp = new FileManip(currHeadFiles.get(fileName));\n temp.copyFile(fileName);\n }\n\n }",
"private static void annotateAndUploadTSVFiles(String sessionID, int updateID, int projectID, int referenceID, File[] tsvFiles, File workingDir) throws Exception {\n int[] annotationIDs = AnnotationManager.getInstance().getAnnotationIDs(sessionID, projectID, referenceID);\n CustomField[] customFields = ProjectManager.getInstance().getCustomVariantFields(sessionID, projectID, referenceID, ProjectManager.getInstance().getNewestUpdateID(sessionID, projectID, referenceID, false));\n annotateAndUploadTSVFiles(sessionID, updateID, projectID, referenceID, annotationIDs, customFields, tsvFiles, workingDir);\n }",
"public static FileNode newTmpFile(FileNode parent) {\n FileNode file;\n\n while (true) {\n file = parent.join(\"_tmp_\" + tmpNo);\n try {\n file.mkfile();\n file.getWorld().onShutdown().deleteAtExit(file);\n return file;\n } catch (MkfileException e) {\n // continue\n tmpNo++;\n }\n }\n }",
"@After\n public void after() throws Exception\n {\n Files.walkFileTree(tempDir, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {\n Files.delete(file);\n return(FileVisitResult.CONTINUE);\n }\n @Override\n public FileVisitResult postVisitDirectory(final Path dir, final IOException exc) throws IOException {\n Files.delete(dir);\n return(FileVisitResult.CONTINUE);\n }\n });\n // Check that it has been cleared.\n if(tempDir.toFile().exists()) { throw new AssertionError(\"cleanup failed: \" + tempDir); }\n tempDir = null;\n }",
"public void add(File file) throws IOException {\n File realFile = new File(Main.CWD, file.getName());\n File rmStage = new File(REMOVAL, file.getName());\n if (rmStage.exists()) {\n rmStage.delete();\n }\n if (realFile.exists()) {\n if (curAndCWDIdentical(file, realFile)) {\n File stagingFile = new File(INDEX, file.getName());\n if (stagingFile.exists()) {\n stagingFile.delete();\n }\n } else {\n File resultingFile = new File(INDEX, file.getName());\n if (!resultingFile.exists()) {\n resultingFile.createNewFile();\n }\n String content = Utils.readContentsAsString(realFile);\n Utils.writeContents(resultingFile, content);\n }\n }\n }",
"public DiskBackedProjectFilePartSet() {\r\n // make two files to use\r\n fileA = TempFileUtil.createTemporaryFile();\r\n fileB = TempFileUtil.createTemporaryFile();\r\n }",
"public int fileSaver(MultipartFile[] files) throws IOException {\n\n MultipartFile[] checkedFiles = fileHandler.checkedFiles(files);\n\n int counter = 0;\n\n if (checkedFiles.length > 0) {\n String folder = checkedFiles[0].getOriginalFilename()\n .substring(0, checkedFiles[0].getOriginalFilename()\n .lastIndexOf('/'));\n\n String newFolderName = uploadUtil.createFolderName(folder);\n\n // rethrows IOException for initFolder\n initFolder(newFolderName);\n\n for (MultipartFile m : checkedFiles) {\n\n String filename = StringUtils.cleanPath(m.getOriginalFilename()\n .substring(m.getOriginalFilename().lastIndexOf('/') + 1));\n\n try {\n Files.copy(m.getInputStream(), Paths.get(uploadFolder + \"/\" + newFolderName)\n .resolve(filename));\n counter++;\n } catch (IOException e) {\n return counter;\n }\n }\n\n return counter;\n\n } else {\n return counter;\n }\n\n }",
"protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}",
"public void finishedDirectIndexBuild()\n\t{\n\t\tif(logger.isInfoEnabled()){\n\t\t\tlogger.info(\"flushing utf block lexicon to disk after the direct index completed\");\n\t\t}\n\t\t//only write a temporary lexicon if there are any items in it\n\t\tif (TempLex.getNumberOfNodes() > 0)\n\t\t\twriteTemporaryLexicon();\n\n\t\t//merges the temporary lexicons\n\t\tif (tempLexFiles.size() > 0)\n\t\t{\n\t\t\ttry{\n\t\t\t\tmerge(tempLexFiles);\n\t\n\t\t\t\t//creates the offsets file\n\t\t\t\tfinal String lexiconFilename = \n\t\t\t\t\tindexPath + ApplicationSetup.FILE_SEPARATOR + \n\t\t\t\t\tindexPrefix + ApplicationSetup.LEXICONSUFFIX;\n\t\t\t\tLexiconInputStream lis = getLexInputStream(lexiconFilename);\n\t\t\t\tcreateLexiconIndex(\n\t\t\t\t\tlis,\n\t\t\t\t\tlis.numberOfEntries(),\n\t\t\t\t\t/* after inverted index is built, the lexicon will be transformed into a\n\t\t\t\t\t * normal lexicon, without block frequency */\n\t\t\t\t\tUTFLexicon.lexiconEntryLength\n\t\t\t\t\t); \n\t\t\t\tTermCount = lis.numberOfEntries();\n\t\t\t\tif (index != null)\n\t\t\t\t{\n\t\t\t\t\tindex.addIndexStructure(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexicon\");\n\t\t\t\t\tindex.addIndexStructureInputStream(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexiconInputStream\");\n\t\t\t\t\tindex.setIndexProperty(\"num.Terms\", \"\"+lis.numberOfEntries());\n\t\t\t\t\tindex.setIndexProperty(\"num.Pointers\", \"\"+lis.getNumberOfPointersRead());\n\t\t\t\t}\n\t\t\t} catch(IOException ioe){\n\t\t\t\tlogger.error(\"Indexing failed to write a lexicon index file to disk\", ioe);\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t\tlogger.warn(\"No temporary lexicons to merge, skipping\");\n\t\t\n\t}",
"@Override\n\t\tpublic void close(final TaskAttemptContext ctx) throws IOException,\n\t\t\t\tInterruptedException {\n\n\t\t\ttry {\n\n\t\t\t\tif (docs.size() > 0) {\n\t\t\t\t\tserver.add(docs);\n\t\t\t\t\tdocs.clear();\n\t\t\t\t}\n\n\t\t\t\tserver.commit();\n\t\t\t} catch (SolrServerException e) {\n\t\t\t\tRuntimeException exc = new RuntimeException(e.toString(), e);\n\t\t\t\texc.setStackTrace(e.getStackTrace());\n\t\t\t\tthrow exc;\n\t\t\t} finally {\n\t\t\t\tserver.close();\n\t\t\t\texec.shutdownNow();\n\t\t\t}\n\n\t\t}",
"@Override\n public synchronized void putContent(Consumer<OutputStream> outputStreamSupplier) throws IOException {\n // Delete a possibly prior written newContentFile\n Files.deleteIfExists(newContentFile);\n try (OutputStream out = newOutputStreamToNewTmpContent(true)) {\n outputStreamSupplier.accept(out);\n }\n FileUtils.moveAtomic(newContentTmpFile, newContentFile);\n }",
"public void testDisposeSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n filePersistence.dispose();\r\n try {\r\n filePersistence.appendBytes(fileCreationId, new byte[10]);\r\n fail(\"all open output stream should closed\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"static void writeToFiles() throws IOException {\n\n writeToFilePriceHistory();\n writeToFileEmployees();\n writeToFileInventory();\n writeToSaleItems();\n writeToOrder();\n writeToFileInventory();\n writeToRevenueLog();\n }",
"public void commitChanges(){\r\n try{\r\n //Record the state of unfinished set in unfinished.dat\r\n unfinishedFileOutputStream = new FileOutputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetOutputStream = new ObjectOutputStream(unfinishedFileOutputStream);\r\n unfinishedSetOutputStream.writeObject(unfinished);\r\n unfinishedSetOutputStream.close();\r\n unfinishedFileOutputStream.close();\r\n\r\n //Record the state of finished list in finished.dat\r\n finishedFileOutputStream = new FileOutputStream(FINISHED_FILE_PATH);\r\n finishedListOutputStream = new ObjectOutputStream(finishedFileOutputStream);\r\n finishedListOutputStream.writeObject(finished);\r\n finishedListOutputStream.close();\r\n finishedFileOutputStream.close();\r\n\r\n //Record the state of activities list in activities.dat\r\n activitiesFileOutputStream = new FileOutputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListOutputStream = new ObjectOutputStream(activitiesFileOutputStream);\r\n activitiesListOutputStream.writeObject(activities);\r\n activitiesListOutputStream.close();\r\n activitiesFileOutputStream.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Stress in commiting changes: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"protected void preprocess() {\n log.info(\"Processing files. Max size is {} bytes\", max);\n\n int idx = 0;\n boolean closed = false;\n\n Bag current = new Bag();\n PayloadManifest currentManifest = new PayloadManifest();\n\n for (PayloadFile file : b.getFiles().values()) {\n closed = false;\n current.addFile(file);\n currentManifest.addPayloadFile(file);\n\n if (current.getSize() >= max) {\n finishProcessing(current, currentManifest, idx++);\n\n closed = true;\n current = new Bag();\n currentManifest = new PayloadManifest();\n }\n }\n\n // Close out the final bag\n if (!closed) {\n finishProcessing(current, currentManifest, idx);\n }\n }",
"@SuppressWarnings(\"unchecked\")\t\n\tvoid merge() throws IOException\n\t{\n\t\tdouble startup = Util.curtime();\n\t\t_logMail.pf(\"Starting merge operation for dataset %s\\n\", _segDataQ.getDataSet());\n\t\tString dropcutoff = TimeUtil.nDaysBefore(_dayCode, 60);\n\t\t\n\t\tBufferedWriter pwrite = _segDataQ.getPathMan().getGimpWriter(_dayCode);\n\t\t\n\t\tint writecount = 0;\n\t\t\n\t\twhile(_segDataQ.hasNext())\n\t\t{\n\t\t\tSegmentPack bupnext = _segDataQ.nextPack();\n\t\t\t\n\t\t\twhile(!_sortFileMap.isEmpty() && _sortFileMap.firstKey().compareTo(bupnext.wtpid) < 0)\n\t\t\t{\n\t\t\t\t// This is a new WTP id that is not in the Master file, and was found for the first time today\n\t\t\t\tMap.Entry<String, List<String>> ent = _sortFileMap.pollFirstEntry();\n\t\t\t\t\n\t\t\t\tSegmentPack bupnew = _segDataQ.buildEmpty(ent.getKey());\n\t\t\t\tbupnew.integrateNewData(ent.getValue(), _dayCode);\n\t\t\t\twritecount += bupnew.write(pwrite, dropcutoff);\n\t\t\t\t_newUsers++;\n\t\t\t\t_newTotal++;\n\t\t\t}\n\t\t\t\n\t\t\tif(!_sortFileMap.isEmpty() && _sortFileMap.firstKey().equals(bupnext.wtpid))\n\t\t\t{\n\t\t\t\t// Here there is data in both the Master file and the day's slurped data\n\t\t\t\tMap.Entry<String, List<String>> ent = _sortFileMap.pollFirstEntry();\n\t\t\t\tbupnext.integrateNewData(ent.getValue(), _dayCode);\n\t\t\t\t_updateUsers++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t_noUpdateUsers++;\t\n\t\t\t}\n\t\t\t\n\t\t\t_newTotal++;\n\t\t\twritecount += bupnext.write(pwrite, dropcutoff);\n\t\t\t\n\t\t\tif((_segDataQ.getPollUserCount() % 10000) == 0)\n\t\t\t{\n\t\t\t\tUtil.pf(\".\");\n\t\t\t\t//double userpersec = bqueue.polledUsers /((Util.curtime()-startup)/1000);\n\t\t\t\t//Util.pf(\"Finished with %d users, %.03f users per second\\n\",\n\t\t\t\t//\tbqueue.polledUsers, userpersec);\n\t\t\t}\n\t\t}\n\t\t\n\t\tUtil.pf(\"\\n\");\n\t\t\n\t\twhile(!_sortFileMap.isEmpty())\n\t\t{\n\t\t\t// Write out remaining data.\n\t\t\tMap.Entry<String, List<String>> ent = _sortFileMap.pollFirstEntry();\n\t\t\t\n\t\t\tSegmentPack bupnew = _segDataQ.buildEmpty(ent.getKey());\n\t\t\tbupnew.integrateNewData(ent.getValue(), _dayCode);\t\t\t\n\t\t\t\t\t\n\t\t\t// TODO: this doesn't inform us about whether or not a user actually has any data associated with him\n\t\t\twritecount += bupnew.write(pwrite, dropcutoff);\t\n\t\t\t_newTotal++;\t\t\t\t\n\t\t}\n\t\t\n\t\tpwrite.close();\n\t\t\n\t\t// TODO: put these stats back in\n\t\t_logMail.pf(\"Finished merge, stats: \\n\\t%d updated users\\n\\t%d non-updated\\n\\t%d prev total\\n\\t%d new total\\n\",\n\t\t\t_updateUsers, _noUpdateUsers, _segDataQ.polledUsers, _newTotal);\n\t\t\n\t\t_logMail.pf(\"Master file size: \\n%d lines before\\n%d lines after\\n\", _segDataQ.linesRead, writecount);\n\t\t\n\t}",
"@Override\n public void prepare() {\n //Caching as file resource.\n File file = this.getResource().file;\n logger.info(\"Preparing {} streams for file: {}\", this.getTransferType(), file.getName());\n\n if (this.getTransferType() == ResourceTransferType.OUTBOUND) {\n //Sending\n try {\n buffer = new byte[BUFFER_SIZE];\n sent = 0;\n inputChannel = new FileInputStream(file).getChannel();\n inputBuffer = inputChannel.map(FileChannel.MapMode.READ_ONLY, 0, inputChannel.size());\n } catch (FileNotFoundException e) { //File doesn't exist.\n //Calling a transfer error.\n callError(e);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n //Receiving\n //Checking if file already exists.\n written = 0;\n saved = 0;\n if (getResource().isLocal()) {\n getResource().calcNetworkId();\n if (getResource().getNetworkID().equals(getTunnel().getDestination())) {\n //The file is already stored locally.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), -2));\n this.close();\n return;\n }\n }\n\n //Creating or replacing the file.\n buffer = new byte[BUFFER_SIZE * 16];\n if (file.exists()) {\n file.delete();\n }\n try { //Creating new file.\n file.createNewFile();\n outputStream = new FileOutputStream(file);\n } catch (IOException e) {\n //Calling a transfer error.\n callError(e);\n return;\n }\n\n //Requesting the first chunk.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), 0));\n }\n }",
"private void PrepareAll(TweetPreprocessor tweetPreprocessor, String Datasetpath) throws IOException\n\t{\n\t\tCSVParser parser = new CSVParser(new FileReader(Datasetpath),CSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tExecutorService threadpool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());\n\t\tfinal ConcurrentHashMap<String, String> txtHashMap = new ConcurrentHashMap<>();\n\t\tfinal ConcurrentHashMap<String, String> featHashMap = new ConcurrentHashMap<>();\n\t\tfinal ConcurrentHashMap<String, String> compHashMap = new ConcurrentHashMap<>();\n\t\tfinal ConcurrentHashMap<String, String> lexHashMap = new ConcurrentHashMap<>();\n\n\t\tint count = 0;\n\t\tfor (CSVRecord record : parser.getRecords())\n\t\t{\n\t\t\tSystem.out.println(\"Adding Task = \" + count);\n\t\t\tint finalCount = count;\n\n\t\t\tif (count == 17000)\n\t\t\t\tbreak;\n\t\t\tthreadpool.execute(() ->\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Current Executing task : \" + finalCount);\n\t\t\t\tInstance tweet = new Instance(record.get(\"event\"),record.get(\"target\"),null,null);\n\t\t\t\tInstance[] preparedinstances = tweetPreprocessor.startProc(tweet);\n\n\t\t\t\ttxtHashMap.put(preparedinstances[0].getData().toString(), record.get(\"target\"));\n\t\t\t\tfeatHashMap.put(preparedinstances[1].getData().toString(), record.get(\"target\"));\n\t\t\t\tcompHashMap.put(preparedinstances[2].getData().toString(), record.get(\"target\"));\n\t\t\t\tlexHashMap.put(preparedinstances[3].getData().toString(), record.get(\"target\"));\n\t\t\t});\n\t\t\tcount++;\n\t\t}\n\t\t//Initiates an orderly shutdown in which previously submitted tasks are executed,\n //but no new tasks will be accepted\n\t\tthreadpool.shutdown();\n\n\t\twhile (!threadpool.isTerminated());\n\t\tSystem.out.println(\"ThreadPool is shutdown ..\");\n\n\t\ttry (BufferedWriter writer1 = new BufferedWriter(new FileWriter(Dataset + \"data_text.csv\"));\n\t\t\t BufferedWriter writer2 = new BufferedWriter(new FileWriter(Dataset + \"data_feature.csv\"));\n\t\t\t BufferedWriter writer3 = new BufferedWriter(new FileWriter(Dataset + \"data_complex.csv\"));\n\t\t\t BufferedWriter writer4 = new BufferedWriter(new FileWriter(Dataset + \"data_lexicon.csv\")))\n\t\t{\n\t\t\tfor (String tweet : txtHashMap.keySet())\n\t\t\t\twriter1.write(txtHashMap.get(tweet) + \",\" + tweet + \"\\n\");\n\t\t\tfor (String tweet : compHashMap.keySet())\n\t\t\t\twriter3.write(compHashMap.get(tweet) + \",\" + tweet + \"\\n\");\n\t\t\tfor (String tweet : lexHashMap.keySet())\n\t\t\t\twriter4.write(lexHashMap.get(tweet) + \",\" + tweet + \"\\n\");\n\t\t\tfor (String tweet : featHashMap.keySet())\n\t\t\t\twriter2.write(featHashMap.get(tweet) + \",\" + tweet + \"\\n\");\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {\n try {\n try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {\n for (Path path : files)\n Files.delete(path);\n }\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\"Failed to cleanup checkpoint directory from temporary files: \" + cpDir, e);\n }\n }",
"@Test(enabled=false)\n\tpublic void testRepeatedPutAndDeleteOfFileBug28() throws Exception {\n\t\tString testFileName = \"testRepeatedPutAndDeleteOfFileBug28andThisNameIsRealllllllllllllllllyLong.txt\";\n\t\n\t\tint nbrIterations = 10;\n\t\n\t\tFile localFile = new File(LOCAL_BINARY_FILE);\n\t\t\n\t\tfor (int i = 0; i < nbrIterations; i++) {\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tif (client.doesExist(\"\")) {\n\t\t\t\tclient.delete(\"\");\n\t\t\t}\n\t\t\tclient.mkdirs(\"\");\n\t\t\tclient.put(localFile.getAbsolutePath(), testFileName);\n\t\t\tclient.put(LOCAL_DIR, \"\");\n\t\t\tSystem.out.println(\"Iteration[\" + i + \"]: \" + (System.currentTimeMillis() - startTime));\n\t\t}\n\t}",
"private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }",
"private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}",
"private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}",
"private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}",
"@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }",
"public void finish() {\n if (rnaFile != null) {\n try {\n FileWriter writer = new FileWriter(rnaFile);\n writer.write(rna.toString());\n writer.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n System.exit(0);\n }",
"public void save(String newFilePath) {\r\n File deletedFile = new File(path);\r\n deletedFile.delete();\r\n path = newFilePath;\r\n File dataFile = new File(path);\r\n File tempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(tempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n dataFile.delete();\r\n tempFile.renameTo(dataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOException in save2 : FileData\");\r\n }\r\n }",
"@Test\n public void testRemoveCorruptedPendingCleanAction() throws IOException {\n HoodieCLI.conf = hadoopConf();\n\n Configuration conf = HoodieCLI.conf;\n\n HoodieTableMetaClient metaClient = HoodieCLI.getTableMetaClient();\n\n // Create four requested files\n for (int i = 100; i < 104; i++) {\n String timestamp = String.valueOf(i);\n // Write corrupted requested Clean File\n HoodieTestCommitMetadataGenerator.createEmptyCleanRequestedFile(tablePath, timestamp, conf);\n }\n\n // reload meta client\n metaClient = HoodieTableMetaClient.reload(metaClient);\n // first, there are four instants\n assertEquals(4, metaClient.getActiveTimeline().filterInflightsAndRequested().getInstants().count());\n\n CommandResult cr = shell().executeCommand(\"repair corrupted clean files\");\n assertTrue(cr.isSuccess());\n\n // reload meta client\n metaClient = HoodieTableMetaClient.reload(metaClient);\n assertEquals(0, metaClient.getActiveTimeline().filterInflightsAndRequested().getInstants().count());\n }",
"private void expungeAllHistoricFiles()\r\n {\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files\");\r\n\r\n java.io.File fileList = new java.io.File(\"./\");\r\n String rootName = getString(\"WatchListTableModule.edit.historic_details_basic_name\");\r\n String[] list = fileList.list(new MyFilter(rootName));\r\n for (int i = 0; i < list.length; i++)\r\n {\r\n StockMarketUtils.expungeListsFile(list[i]);\r\n }\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files - complete\");\r\n\r\n }",
"public void closeFile()\n {\n ArrayList<String> jobs = new ArrayList<String>();\n ArrayList<String> jobRecruiters = new ArrayList<String>();\n ArrayList<String> jobSeekers = new ArrayList<String>();\n ArrayList<String> notifications = new ArrayList<String>();\n for (Job job : jobList)\n {\n String jobinfo = job.getJobRecruiterUsername() + \"///\" + job.getTitle() + \"///\" + job.getDescription() + \"/// \" + job.getSalary();\n jobinfo = jobinfo + \"///\" + job.getLocation() + \"///\";\n for (String cate: job.getCategory())\n {\n jobinfo = jobinfo + cate + \",\";\n }\n jobinfo = jobinfo.substring(0,jobinfo.length()-1) + \"///\";\n for (String seek : job.getJobSeekerUsername())\n {\n jobinfo = jobinfo + seek + \",\";\n }\n jobinfo = jobinfo.substring(0,jobinfo.length()-1);\n jobs.add(jobinfo);\n }\n writeFile(\"Job.txt\", jobs);\n for (JobRecruiter recruiter : jobRecruiterList)\n {\n String recinfo = recruiter.getName() + \",\" + recruiter.getUserName() + \",\" + recruiter.getRole() + \",\" + recruiter.getGender() + \",\";\n recinfo = recinfo + recruiter.getEmail() + \",\" + recruiter.getPassword() + \",\" + recruiter.getCompanyName() + \",\" + recruiter.getLocation();\n jobRecruiters.add(recinfo);\n }\n writeFile(\"JobRecruiter.txt\", jobRecruiters);\n for (JobSeeker seeker : jobSeekerList)\n {\n String seekinfo = seeker.getName() + \",\" + seeker.getUserName() + \",\" + seeker.getRole() + \",\" + seeker.getGender() + \",\";\n seekinfo = seekinfo + seeker.getEmail() + \",\" + seeker.getPassword() + \",\";\n for(String skill : seeker.getSkillsets())\n {\n seekinfo = seekinfo + skill + \",\";\n }\n seekinfo = seekinfo.substring(0,seekinfo.length()-1);\n String notinfo = seeker.getUserName() + \"///\";\n for (String noti : seeker.getNotification())\n {\n notinfo = notinfo + noti + \",\";\n }\n notinfo = notinfo.substring(0,notinfo.length()-1);\n jobSeekers.add(seekinfo);\n notifications.add(notinfo);\n }\n writeFile(\"JobSeeker.txt\", jobSeekers);\n writeFile(\"Notification.txt\", notifications);\n }",
"public static void settleTsFilesAndMods(Map<String, TsFileResource> resourcesToBeSettled) {\n int successCount = 0;\n Map<String, List<TsFileResource>> newTsFileResources = new HashMap<>();\n SettleLog.createSettleLog();\n for (Map.Entry<String, TsFileResource> entry : resourcesToBeSettled.entrySet()) {\n TsFileResource resourceToBeSettled = entry.getValue();\n List<TsFileResource> settledTsFileResources = new ArrayList<>();\n try {\n TsFileAndModSettleTool tsFileAndModSettleTool = TsFileAndModSettleTool.getInstance();\n logger.info(\"Start settling for tsFile : {}\", resourceToBeSettled.getTsFilePath());\n if (tsFileAndModSettleTool.isSettledFileGenerated(resourceToBeSettled)) {\n settledTsFileResources = tsFileAndModSettleTool.findSettledFile(resourceToBeSettled);\n newTsFileResources.put(resourceToBeSettled.getTsFile().getName(), settledTsFileResources);\n } else {\n // Write Settle Log, Status 1\n SettleLog.writeSettleLog(\n resourceToBeSettled.getTsFilePath()\n + SettleLog.COMMA_SEPERATOR\n + SettleCheckStatus.BEGIN_SETTLE_FILE);\n tsFileAndModSettleTool.settleOneTsFileAndMod(resourceToBeSettled, settledTsFileResources);\n // Write Settle Log, Status 2\n SettleLog.writeSettleLog(\n resourceToBeSettled.getTsFilePath()\n + SettleLog.COMMA_SEPERATOR\n + SettleCheckStatus.AFTER_SETTLE_FILE);\n newTsFileResources.put(resourceToBeSettled.getTsFile().getName(), settledTsFileResources);\n }\n\n moveNewTsFile(resourceToBeSettled, settledTsFileResources);\n // Write Settle Log, Status 3\n SettleLog.writeSettleLog(\n resourceToBeSettled.getTsFilePath()\n + SettleLog.COMMA_SEPERATOR\n + SettleCheckStatus.SETTLE_SUCCESS);\n logger.info(\n \"Finish settling successfully for tsFile : {}\", resourceToBeSettled.getTsFilePath());\n successCount++;\n } catch (Exception e) {\n logger.info(\n \"Meet error while settling the tsFile : {}\", resourceToBeSettled.getTsFilePath());\n e.printStackTrace();\n }\n }\n if (resourcesToBeSettled.size() == successCount) {\n SettleLog.closeLogWriter();\n logger.info(\"Finish settling all tsfiles Successfully!\");\n } else {\n logger.info(\n \"Finish Settling, {} tsfiles meet errors.\", (resourcesToBeSettled.size() - successCount));\n }\n }",
"public void endFlatFile() {\n }",
"private synchronized void saveInternal() {\n if (relatedDocumentsCounter == 0) {\r\n return;\r\n }\r\n\r\n final TrigramIndexJsonModel model = new TrigramIndexJsonModel( relatedDocuments, indexGeneration, trigram );\r\n final TrigramDocumentCountJsonModel count = new TrigramDocumentCountJsonModel( trigram, globalRelatedDocumentsCounter );\r\n\r\n indexGeneration++;\r\n relatedDocuments = new TreeSet<>();\r\n relatedDocumentsCounter = 0;\r\n\r\n // put that save action and all unnecessary path calculations into a thread pool, \r\n // no need that other word can't be indexed, because of someone's save action... \r\n\r\n Runnable runnable = new Runnable() {\r\n @Override\r\n public void run() {\r\n Path trigramsPath = TrigramSubPathCalculator.getPathForTrigram( trigramsBasePath, trigram,\r\n \".\" + model.getIndexGeneration() + TRIGRAM_REFERENCE_SUFFIX );\r\n createTargetDirectoryIfNotExist( trigramsPath.getParent() );\r\n\r\n // write content of one part of the index\r\n try (BufferedWriter writer = Files.newBufferedWriter( trigramsPath, StandardCharsets.UTF_8 )) {\r\n Gson gson = new Gson();\r\n writer.write( gson.toJson( model ) );\r\n }\r\n catch (IOException e) {\r\n System.out.println( String.format( \"saving file: '%s' caused this error...\", trigramsPath ) );\r\n e.printStackTrace();\r\n }\r\n\r\n // write+overwrite the global documents counter as well\r\n Path trigramCountPath = TrigramSubPathCalculator.getPathForTrigram( trigramsBasePath, trigram, TRIGRAM_COUNT_SUFFIX );\r\n\r\n try (BufferedWriter writer = Files.newBufferedWriter( trigramCountPath, StandardCharsets.UTF_8 )) {\r\n Gson gson = new Gson();\r\n writer.write( gson.toJson( count ) );\r\n }\r\n catch (IOException e) {\r\n System.out.println( String.format( \"saving file: '%s' caused this error...\", trigramCountPath ) );\r\n e.printStackTrace();\r\n }\r\n\r\n }\r\n };\r\n\r\n // TODO: put into task thread-pool (deque) for really saving indexing time.\r\n runnable.run();\r\n }",
"@Override\r\n\t\t\tpublic Boolean call() throws Exception {\n\t\t\t\tS3FileHandle updated = fileHandleDao.createFile(fh);\r\n\t\t\t\ttoDelete.add(updated.getId());\r\n\t\t\t\treturn true;\r\n\t\t\t}",
"private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}",
"void updateFile() throws IOException;",
"public static void main(String[] args) throws Exception {\n\n final Date start = new Date();\n final File sourceDirectory =\n new File(\"/home/alexeyev/hp/workspace/new_gizmodo/corpus3/\");\n final FileWriter destinationFile =\n new FileWriter(\"/home/alexeyev/hp/workspace/new_gizmodo/dan3.txt\");\n\n // all texts\n final BlockingQueue<File> queue = FilesCollector.getAllFiles(sourceDirectory);\n // all NEs\n final BlockingQueue<Pair<NamedEntity, String>> entities =\n new LinkedBlockingDeque<Pair<NamedEntity, String>>();\n\n log.info(\"Files obtained.\");\n\n final int NUMBER_OF_THREADS = 3;\n final ExecutorService pool = Executors.newFixedThreadPool(NUMBER_OF_THREADS);\n\n List<Future<?>> futures = new LinkedList<>();\n\n for (int i = 0; i < NUMBER_OF_THREADS; i++) {\n futures.add(pool.submit(new ExtractorHorse(queue, entities, tickLog, log)));\n }\n\n int size = 0;\n final ArrayList<Pair<NamedEntity, String>> buffer = new ArrayList<Pair<NamedEntity, String>>();\n while (!ready(futures)) {\n if (entities.size() > 5000) {\n log.info(TimeUnit.MILLISECONDS.toSeconds(new Date().getTime() - start.getTime()) + \" secs\");\n size += entities.drainTo(buffer);\n for (final Pair<NamedEntity, String> pair : buffer) {\n destinationFile.write(pair.second() + \"\\t\" + pair.first().getWords() + \"\\n\");\n }\n log.info(\"Flushed entities: \" + size);\n buffer.clear();\n }\n }\n\n size += entities.drainTo(buffer);\n for (final Pair<NamedEntity, String> pair : buffer) {\n destinationFile.write(pair.second() + \"\\t\" + pair.first().getWords() + \"\\n\");\n }\n\n log.info(\"Flushed entities: \" + size);\n buffer.clear();\n\n destinationFile.close();\n log.info(\"Done.\");\n pool.shutdown();\n }",
"private void updateFile() {\n\t\tPrintWriter outfile;\n\t\ttry {\n\t\t\toutfile = new PrintWriter(new BufferedWriter(new FileWriter(\"stats.txt\")));\n\t\t\toutfile.println(\"15\"); // this is the number\n\t\t\tfor (Integer i : storeInfo) {\n\t\t\t\toutfile.println(i); // we overwrite the existing files\n\t\t\t}\n\t\t\tfor (String s : charBought) {\n\t\t\t\toutfile.println(s); // overwrite the character\n\t\t\t}\n\t\t\tfor (String s : miscBought) {\n\t\t\t\toutfile.println(s);\n\t\t\t}\n\t\t\toutfile.close();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}",
"public void complete() throws JournalException {\n try {\n // NOTE: The extending class should be able to handle the case of\n // a failure before we can write this complete marker, logging a\n // file version is probably the sanest way of doing so (if the version\n // of the file we were modifying has changed from the journal entry\n // we must've completed the op, but not written to the log).\n log.write(COMPLETE_TOKEN + \"\\n\");\n } catch (IOException e) {\n throw new JournalException(\"Failed to write completion to journal.\");\n }\n\n // garbage collect\n if (pendingOps.isEmpty()) {\n // we want to empty the file, but keep it around\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to garbage collect log file.\");\n }\n }\n }",
"public void afterCleaner() throws NumberFormatException, IOException{\n \t\t\t fileCleaner(\"ini.time\" );\n \t\t\t fileCleaner(\"failed.num\" );\n// \t\t\t fileCleaner(\"test.num\" );\n \t\t\t fileCleaner(\"add.num\" );\n// \t\t\t fileCleaner(\"prev.num\" );\n \t\t\t fileCleaner(\"server.info\");\n \t\t\t fileCleaner(\"email.opt\" );\n \t\t\t fileCleaner(\"email.all\" );\n \t\t\t fileCleaner(\"email.cont\" );\n \t\t\t fileCleaner(\"email.subj\" );\n \t\t\t fileCleaner(\"add.show\" );\n \t\t\t fileCleaner(\"screen-shots.zip\");\n \t\t\t fileCleaner(\"screen-shots.renameToZip\");\n \t\t}",
"public void run() {\n\t\t\t\t\t\tFile tempFile;\n\t\t\t\t\t\tif (tempFileStack.size() >= numberOfFiles)\n\t\t\t\t\t\t\ttempFile = (File) tempFileStack.remove(0); // pop\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ttempFile = File.createTempFile(\n\t\t\t\t\t\t\t\t\t\t\"FM_\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ ((model.toString() == null) ? \"unnamed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: model.toString()),\n\t\t\t\t\t\t\t\t\t\tfreemind.main.FreeMindCommon.FREEMIND_FILE_EXTENSION,\n\t\t\t\t\t\t\t\t\t\tpathToStore);\n\t\t\t\t\t\t\t\tif (filesShouldBeDeletedAfterShutdown)\n\t\t\t\t\t\t\t\t\ttempFile.deleteOnExit();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\t\tfreemind.main.Resources.getInstance()\n\t\t\t\t\t\t\t\t\t\t.logException(e);\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\ttry {\n\t\t\t\t\t\t\tmodel.saveInternal(tempFile, true /* =internal call */);\n\t\t\t\t\t\t\tmodel.getFrame()\n\t\t\t\t\t\t\t\t\t.out(Resources\n\t\t\t\t\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t\t\t\t\t.format(\"automatically_save_message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew Object[] { tempFile\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString() }));\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\tfreemind.main.Resources.getInstance().logException(\n\t\t\t\t\t\t\t\t\te);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttempFileStack.add(tempFile); // add at the back.\n\t\t\t\t\t}",
"public void syncLogsServers() {\n initExecService();\n try {\n log.info(\"Number of logs founded: \" + Files.list(Paths.get(saveLocation)).count());\n\n /**\n * Find the files in the directory. For each file found with the .log extension\n * start to read it and submit it to the thread pool of the executor\n */\n Files.list(Paths.get(saveLocation))\n .filter(Files::isRegularFile)\n .filter(file -> FilenameUtils.getExtension(file.getFileName().toString()).equals(LOG_EXTENSION))\n .forEach(file -> executorService.submit(()-> readFile(file, Charset.forName(\"UTF-8\"))));\n\n log.info(\"Proceed to terminate all thread\");\n\n shutdownAndAwaitTermination(executorService,\n 150,\n TimeUnit.MINUTES);\n\n executorService = null;\n } catch (Exception ex) {\n log.error(ex.getMessage(), ex);\n try {\n executorService.shutdownNow();\n shutdownAndAwaitTermination(executorService, 5, TimeUnit.MINUTES);\n executorService = null;\n } catch (Exception e2) {\n log.error(e2.getMessage(), e2);\n }\n }\n }",
"private void endEntry() {\n\t\tif (lastImageFile!=null) {\r\n\t\t\tSystem.out.println(\"Dealing with image file: \" + lastImageLumpName);\r\n\t\t\t//Add an entry for it\r\n\t\t\ttry {\r\n\t\t\t\tZipEntry dir = new ZipEntry(\"ohrrpgce/games/\" + newRPGName + \"/\" + lastImageLumpName);\r\n\t\t\t\t//System.out.println(\"Entry opened: \" + dir.getName());\r\n\t\t\t\ttempJar.putNextEntry(dir);\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.out.println(\"Error adding entry for image file: \" + lastImageLumpName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Copy it.\r\n\t\t\ttry {\r\n\t\t\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(lastImageFile));\r\n\t\t\t\tbyte[] lin = new byte[1024];\r\n\t\t\t\tint len = 0;\r\n\t\t\t\tfor(;;) {\r\n\t\t\t\t\tlen = in.read(lin);\r\n\t\t\t\t\tif (len <= 0)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttempJar.write(lin, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.out.println(\"Error copying raw image data: \" + ex.toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlastImageFile.delete();\r\n\t\t\tlastImageFile=null;\r\n\t\t} \r\n\t\t\r\n\t\t//Close the entry\r\n\t\ttry {\r\n\t\t\t//System.out.println(\" + Entry closed\");\r\n\t\t\ttempJar.closeEntry();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(\"Error closing jar entry: \" + ex.toString());\r\n\t\t}\r\n\t}",
"public File writeBackFileToDvn(RConnection c, String targetFilename,\n String tmpFilePrefix, String tmpFileExt, int fileSize){\n File tmprsltfl = null;\n \n String resultFilePrefix = tmpFilePrefix + PID + \".\";\n \n String rfsffx = \".\" + tmpFileExt;\n RFileInputStream ris = null;\n OutputStream outbr = null;\n try {\n tmprsltfl = File.createTempFile(resultFilePrefix, rfsffx);\n \n //outbr = new FileOutputStream(tmprsltfl);\n outbr = new BufferedOutputStream(new FileOutputStream(tmprsltfl));\n //File tmp = new File(targetFilename);\n //long tmpsize = tmp.length();\n // open the input stream\n ris = c.openFile(targetFilename);\n \n if (fileSize < 1024*1024*500){\n int bfsize = fileSize +1;\n byte[] obuf = new byte[bfsize];\n ris.read(obuf);\n //while ((obufsize =)) != -1) {\n outbr.write(obuf, 0, bfsize);\n //}\n }\n ris.close();\n outbr.close();\n return tmprsltfl;\n } catch (FileNotFoundException fe){\n fe.printStackTrace();\n dbgLog.fine(\"FileNotFound exception occurred\");\n return tmprsltfl;\n } catch (IOException ie){\n ie.printStackTrace();\n dbgLog.fine(\"IO exception occurred\");\n } finally {\n if (ris != null){\n try {\n ris.close();\n } catch (IOException e){\n \n }\n }\n \n if (outbr != null){\n try {\n outbr.close();\n } catch (IOException e){\n \n }\n }\n \n }\n return tmprsltfl;\n }",
"@Override\r\n\tpublic void finishProcess() {\r\n\t\tfor (String soaFolder : this.SOA_Folders) {\r\n\t\t\tString strConfig = soaFolder;\r\n\t\t\tFile f = new File(strConfig + \"/exit\");\r\n\t\t\ttry {\r\n\t\t\t\tf.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"@Test\n public void doImport_reimportsCsvIfFileIsUpdated() throws IOException, InterruptedException {\n ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n assertThat(dbFile.exists(), is(true));\n\n SQLiteDatabase db = SQLiteDatabase.openDatabase(dbFile.getAbsolutePath(), null, SQLiteDatabase.OPEN_READWRITE);\n assertThat(db.rawQuery(SELECT_ALL_DATA_QUERY, null).getCount(), is(3));\n\n String originalHash = FileUtils.getMd5Hash(csvFile);\n String metadataTableHash = ExternalSQLiteOpenHelper.getLastMd5Hash(db, EXTERNAL_METADATA_TABLE_NAME, csvFile);\n assertThat(metadataTableHash, is(originalHash));\n\n try (Writer out = new BufferedWriter(new FileWriter(csvFile, true))) {\n out.write(\"\\ncherimoya,Cherimoya\");\n }\n\n String newHash = FileUtils.getMd5Hash(csvFile);\n assertThat(newHash, is(not(originalHash)));\n\n // Reimport\n externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n\n db = SQLiteDatabase.openDatabase(dbFile.getAbsolutePath(), null, SQLiteDatabase.OPEN_READONLY);\n assertThat(db.rawQuery(SELECT_ALL_DATA_QUERY, null).getCount(), is(4));\n\n // Check the metadata table import timestamp\n metadataTableHash = ExternalSQLiteOpenHelper.getLastMd5Hash(db, EXTERNAL_METADATA_TABLE_NAME, csvFile);\n assertThat(metadataTableHash, is(newHash));\n }",
"@Override\n public void cleanup(Context context) throws IOException {\n System.out.println(\"Features vector length: \" + numOfFeatures);\n bufferedWriter.close();\n File numOfFeaturesFile = new File(\"resource/numOfFeatures.txt\");\n bufferedWriter = new BufferedWriter(new FileWriter(numOfFeaturesFile));\n bufferedWriter.write(numOfFeatures + \"\\n\");\n bufferedWriter.close();\n if (local) {\n Files.copy(new File(\"resource/paths.txt\").toPath(), new File(\"resource/pathsListCopy.txt\").toPath(), REPLACE_EXISTING);\n } else {\n AmazonS3 s3 = new AmazonS3Client();\n Region usEast1 = Region.getRegion(Regions.US_EAST_1);\n s3.setRegion(usEast1);\n try {\n System.out.print(\"Uploading the dependency paths file to S3... \");\n s3.putObject(new PutObjectRequest(BUCKET_NAME, \"resource/paths.txt\", pathsFile));\n System.out.println(\"Done.\");\n System.out.print(\"Uploading num of features file to S3... \");\n s3.putObject(new PutObjectRequest(BUCKET_NAME, \"resource/numOfFeatures.txt\", numOfFeaturesFile));\n System.out.println(\"Done.\");\n } catch (AmazonServiceException ase) {\n System.out.println(\"Caught an AmazonServiceException, which means your request made it \"\n + \"to Amazon S3, but was rejected with an error response for some reason.\");\n System.out.println(\"Error Message: \" + ase.getMessage());\n System.out.println(\"HTTP Status Code: \" + ase.getStatusCode());\n System.out.println(\"AWS Error Code: \" + ase.getErrorCode());\n System.out.println(\"Error Type: \" + ase.getErrorType());\n System.out.println(\"Request ID: \" + ase.getRequestId());\n } catch (AmazonClientException ace) {\n System.out.println(\"Caught an AmazonClientException, which means the client encountered \"\n + \"a serious internal problem while trying to communicate with S3, \"\n + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ace.getMessage());\n }\n }\n }",
"private void createSupportFiles(@NonNull final CommandLineRunner launcher,\n @NonNull final Map<String, String> env)\n throws IOException, InterruptedException, LoggedErrorException {\n File rawFolder = new File(mResOutputDir, SdkConstants.FD_RES_RAW);\n\n SourceSearcher searcher = new SourceSearcher(\n Collections.singletonList(rawFolder), EXT_BC);\n FileGatherer fileGatherer = new FileGatherer();\n searcher.search(fileGatherer);\n\n WaitableExecutor<Void> mExecutor = new WaitableExecutor<Void>();\n\n for (final File bcFile : fileGatherer.getFiles()) {\n String name = bcFile.getName();\n final String objName = name.replaceAll(\"\\\\.bc\", \".o\");\n final String soName = \"librs.\" + name.replaceAll(\"\\\\.bc\", \".so\");\n\n for (final Abi abi : ABIS) {\n if (mAbiFilters != null && !mAbiFilters.contains(abi.mDevice)) {\n continue;\n }\n\n // make sure the dest folders exist\n final File objAbiFolder = new File(mObjOutputDir, abi.mDevice);\n if (!objAbiFolder.isDirectory() && !objAbiFolder.mkdirs()) {\n throw new IOException(\"Unable to create dir \" + objAbiFolder.getAbsolutePath());\n }\n\n final File libAbiFolder = new File(mLibOutputDir, abi.mDevice);\n if (!libAbiFolder.isDirectory() && !libAbiFolder.mkdirs()) {\n throw new IOException(\"Unable to create dir \" + libAbiFolder.getAbsolutePath());\n }\n\n mExecutor.execute(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n File objFile = createSupportObjFile(bcFile, abi, objName, objAbiFolder,\n launcher, env);\n createSupportLibFile(objFile, abi, soName, libAbiFolder, launcher, env);\n return null;\n }\n });\n }\n }\n\n mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/);\n }",
"void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }",
"@AfterClass\r\n\tpublic static void cleanupBoogiePrinterFiles() {\r\n\r\n\t\tfinal File root = getRootFolder(ROOT_FOLDER);\r\n\r\n\t\tCollection<File> files = TestUtil.getFiles(root, new String[] { \".bpl\" });\r\n\t\tfiles = TestUtil.filterFiles(files, TEMPORARY_BOOGIE_FILENAME_PATTERN);\r\n\r\n\t\tif (files.isEmpty()) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\tString.format(\"No cleanup of %s necessary, no files matching the pattern %s have been found\",\r\n\t\t\t\t\t\t\tROOT_FOLDER, TEMPORARY_BOOGIE_FILENAME_PATTERN));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(String.format(\"Begin cleanup of %s\", ROOT_FOLDER));\r\n\t\tfor (final File f : files) {\r\n\t\t\ttry {\r\n\t\t\t\tif (f.delete()) {\r\n\t\t\t\t\tSystem.out.println(String.format(\"Sucessfully deleted %s\", f.getAbsolutePath()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(String.format(\"Deleteing %s failed\", f.getAbsolutePath()));\r\n\t\t\t\t}\r\n\t\t\t} catch (final SecurityException e) {\r\n\t\t\t\tSystem.err.println(String.format(\"Exception while deleting file %s\", f));\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void loadNextSplitCurrentDir() throws IOException {\n\t\tCollection<File> files = fsIterator.getFiles();\n\t\n\t\tif (files == null || files.size() == 0)\n\t\t\treturn;\n\t\t\n\t\tIterator<File> it = files.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tFile file = it.next();\n\t\t\tRandomAccessFile raf = openedRAFs.get(file.getAbsolutePath());\n\t\t\tif (raf == null) {\n\t\t\t\ttry {\n\t\t\t\t\traf = new RandomAccessFile(file, \"r\");\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t// TODO: show warning that the file cannot be read\n\t\t\t\t\tit.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tRandomAccessFile old = \n\t\t\t\t\t\topenedRAFs.put(file.getAbsolutePath(), raf);\n\t\t\t\tif (old != null)\n\t\t\t\t\told.close();\n\t\t\t}\n\t\t\t\n\t\t\tlong begin = splitter.splitBegin(raf);\n\t\t\tif (begin == -1) {\n\t\t\t\traf.close();\n\t\t\t\tit.remove();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\traf.seek(begin);\n\t\t\t\n\t\t\tlong end = splitter.splitEnd(raf, blocksize);\n\t\t\t\n\t\t\tif (begin == end) {\n\t\t\t\traf.close();\n\t\t\t\tit.remove();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\traf.seek(end);\n\t\t\t\n\t\t\tcurrentRAF = new RandomAccessFile(file, \"r\");\n\t\t\tcurrentRAF.seek(begin);\n\t\t\tcurrentLength = end - begin;\n\t\t\t\n\t\t\tlogger.debug(String.format(\"Generated Split. %s %d %d\",\n\t\t\t\t\tfile.getAbsolutePath(), begin, end));\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}",
"@Override\n public void close() throws IOException {\n flushCurrentIndexBlock();\n\n // logger.info(\"Performing final merge\");\n // try {\n //Bin finalMergeBin = geometricParts.getAllShards();\n //doMerge(finalMergeBin, getNextIndexShardFolder(finalMergeBin.size + 1));\n // check point is updated by the merge op.\n\n // } catch (IOException ex) {\n // Logger.getLogger(GeometricRetrieval.class.getName()).log(Level.SEVERE, null, ex);\n //}\n\n }",
"@SuppressWarnings(\"unchecked\")\n @Override\n public void finalise() {\n if(indexFieldConfiguration != null){\n FieldMapper mapper = FieldMappingUtils.createDefaultFieldMapper(indexFieldConfiguration);\n try {\n CacheUtils.storeBaseMappingsConfiguration(solrYard, mapper);\n } catch (YardException e) {\n log.error(\"Unable to store FieldMapperConfiguration to the Store!\",e);\n }\n }\n log.info(\" ... optimize SolrCore\");\n try {\n solrYard.optimize();\n } catch (YardException e) {\n log.error(\"Unable to optimize SolrIndex after indexing! IndexArchive will not be optimized ...\",e);\n }\n //build the FST models\n if(fstConfigs != null){\n //(1) FST config initialisation\n log.info(\" ... init FST configuration(s)\");\n IndexSchema schema = core.getLatestSchema();\n File fstDir = new File(new File(core.getDataDir()),\"fst\");\n if(!fstDir.isDirectory()){\n try {\n FileUtils.forceMkdir(fstDir);\n } catch (IOException e) {\n throw new IllegalStateException(\"Unable to create Directory \"\n + fstDir.getAbsolutePath() + \"for storing the FST models \"\n + \"of SolrCore \"+core.getName());\n }\n }\n RefCounted<SolrIndexSearcher> searcherRef = core.getSearcher();\n try {\n for(FstConfig fstConfig : fstConfigs){\n fstConfig.setFstDirectory(fstDir); //set the FST directory\n log.info(\"> FST config {}\", fstConfig);\n fstConfig.buildConfig(schema, searcherRef.get().getAtomicReader());\n for(CorpusCreationInfo corpus : fstConfig.getCorpusCreationInfos()){\n log.info(\" - {}\",corpus);\n }\n }\n } finally {\n searcherRef.decref();\n }\n\n List<Future<?>> fstCreationTasks = new ArrayList<Future<?>>();\n ExecutorService es = Executors.newFixedThreadPool(fstThreads);\n log.info(\" ... build FST models \");\n for(FstConfig config : fstConfigs){\n for(final CorpusCreationInfo corpus : config.getCorpusCreationInfos()){\n fstCreationTasks.add(es.submit(new CorpusCreationTask(core, corpus)));\n }\n }\n //now wait for the completion of the tasks\n Iterator<Future<?>> taskIt = fstCreationTasks.iterator();\n while(taskIt.hasNext()){\n Future<?> task = taskIt.next();\n try {\n task.get(); //wait until ready\n taskIt.remove();\n } catch (ExecutionException e) {\n log.error(\"Exception while building FST models for SolrCore \"\n + core.getName(),e);\n } catch (InterruptedException e) {\n log.error(\"Interupped while building FST models for SolrCore \"\n + core.getName(),e);\n Thread.currentThread().interrupt();\n \n }\n }\n if(!fstCreationTasks.isEmpty()){\n log.warn(\"Unable to build {} FST models for SolrCore {}\",\n fstCreationTasks.size(), core.getName());\n } else {\n log.info(\"All FST modles for SolrCore {} build successfully!\",\n core.getName());\n }\n } //no FST modles to build\n \n //all Solr specific stuff is now ready\n log.info(\" ... close SolrCore\");\n solrYard.close();\n \n //if a indexing config is present we need to create the distribution files\n if(indexingConfig != null){\n \t//first check if the distribution folder needs to be created and is valid\n \tFile distFolder = indexingConfig.getDistributionFolder();\n \tif(!distFolder.exists()){\n \t\tif(!distFolder.mkdirs()){\n \t\t\tthrow new IllegalStateException(\"Unable to create distribution folder \" +\n \t\t\t\t\tdistFolder.getAbsolutePath());\n \t\t}\n \t} else if(!distFolder.isDirectory()){\n \t\tthrow new IllegalStateException(\"Distribution folder\" + distFolder.getAbsolutePath()\n \t\t\t\t+ \"is not a Directory!\");\n \t}\n //zip the index and copy it over to distribution\n log.info(\" ... build Solr index archive\");\n if(solrArchive != null){\n try {\n writeSolrIndexArchive(indexingConfig);\n }catch (IOException e) {\n log.error(\"Error while creating Solr Archive \"+solrArchive.getAbsolutePath()+\n \"! The archive will not be created!\",e);\n log.error(\"As a Workaround you can manually create the Solr Archive \" +\n \"by creating a ZIP archive with the contents of the Folder \" +\n solrIndexLocation+\"!\");\n }\n }\n if(solrArchiveRef != null){\n try {\n writeSolrIndexReference(indexingConfig);\n } catch (IOException e) {\n log.error(\"Error while creating Solr Archive Reference \"+\n solrArchiveRef.getAbsolutePath()+\n \"! The file will not be created!\",e);\n }\n }\n //finally create the Osgi Configuration\n try {\n OsgiConfigurationUtil.writeSiteConfiguration(indexingConfig);\n } catch (IOException e) {\n log.error(\"Unable to write OSGI configuration file for the referenced site\",e);\n }\n try {\n OsgiConfigurationUtil.writeCacheConfiguration(indexingConfig);\n } catch (IOException e) {\n log.error(\"Unable to write OSGI configuration file for the Cache\",e);\n }\n //create the SolrYard configuration\n try {\n writeSolrYardConfiguration(indexingConfig);\n } catch (IOException e) {\n log.error(\"Unable to write OSGI configuration file for the SolrYard\",e);\n }\n //create the bundle\n OsgiConfigurationUtil.createBundle(indexingConfig);\n }\n }",
"void cleanUp() throws IOException;",
"public abstract void addFileToWrite(AsynchronousFileWriter.FileData fileData, CompilerMessageLogger logger);",
"private void backup() throws IOException {\n long startTime = System.currentTimeMillis();\n\n this.backupTempDirPath = Files.createTempDirectory(BACKUP_TEMP_DIR_PREFIX).toString();\n Map<UUID, String> streamIdToTableNameMap = getStreamIdToTableNameMap();\n for (UUID streamId : streamsToBackUp) {\n // temporary backup file's name format: uuid.namespace$tableName\n Path filePath = Paths.get(backupTempDirPath)\n .resolve(streamId + \".\" + streamIdToTableNameMap.get(streamId));\n backupTable(filePath, streamId);\n }\n long elapsedTime = System.currentTimeMillis() - startTime;\n\n log.info(\"successfully backed up {} tables to {} directory, elapsed time {}ms\",\n streamsToBackUp.size(), backupTempDirPath, elapsedTime);\n }",
"private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }",
"public void dispose() {\n Collection<File> values = compareFiles.values();\n for (File file : values) {\n file.delete();\n }\n\n compareFiles.clear();\n }",
"@Override\n\tpublic void postExecution() throws CommandListenerException {\n\t\tString extraContents = \"0xbeef\";\n\t\tByteArrayInputStream inputStream = new ByteArrayInputStream(extraContents.getBytes());\n\t\tSourcesFile sources = fedoraProjectRoot.getSourcesFile();\n\t\tfor (String filename: sources.getAllSources()) {\n\t\t\tIFile sourceFile;\n\t\t\t\tsourceFile = (IFile)fedoraProjectRoot.getContainer().findMember(new Path(filename));\n\t\t\tif (sourceFile != null) {\n\t\t\t\ttry {\n\t\t\t\t\tsourceFile.appendContents(inputStream, IResource.FORCE, new NullProgressMonitor());\n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tfedoraProjectRoot.getContainer().refreshLocal(IResource.DEPTH_ONE, null);\n\t\t} catch (CoreException e) {\n\t\t\t// ignore\n\t\t}\n\n\t}",
"protected void transform()\n\t{\n\t\tFileSummary summary = getFileSummary();\n\t\tFileCloser.close(summary.getFile());\n\n\t\tsuper.transform();\n\t}",
"public static RestorableTsFileIOWriter getWriterForAppendingDataOnCompletedTsFile(File file)\n throws IOException {\n long position = file.length();\n\n try (TsFileSequenceReader reader = new TsFileSequenceReader(file.getAbsolutePath(), false)) {\n // this tsfile is complete\n if (reader.isComplete()) {\n reader.loadMetadataSize();\n position = reader.getFileMetadataPos();\n }\n }\n\n if (position != file.length()) {\n // if the file is complete, we will remove all file metadatas\n try (FileChannel channel =\n FileChannel.open(Paths.get(file.getAbsolutePath()), StandardOpenOption.WRITE)) {\n channel.truncate(position - 1); // remove the last marker.\n }\n }\n return new RestorableTsFileIOWriter(file);\n }",
"@Override\n protected Void doInBackground(Void... params) {\n File file = new File(getApplicationContext().getFilesDir(), FILENAME);\n\n PrintWriter writer = null;\n try {\n writer = new PrintWriter(file);\n for (int i = 1; i <= 10; i++) {\n writer.println(i);\n Thread.sleep(250);\n publishProgress(i * 10);\n }\n }\n catch (FileNotFoundException | InterruptedException ex) {\n Log.e(LOG_TAG, \"createFile:\" + ex.toString());\n }\n finally {\n if (writer != null) {\n writer.close();\n }\n }\n return null;\n }",
"private void blockCompressAndIndex(String in, String bgzfOut, boolean deleteOnExit) throws IOException {\n\t\t\n\t\t// System.err.print(\"Compressing: \" + in + \" to file: \" + bgzfOut + \"... \");\n\t\t\n\t\tFile inFile= new File(in);\n\t\tFile outFile= new File(bgzfOut);\n\t\t\n\t\tLineIterator lin= IOUtils.openURIForLineIterator(inFile.getAbsolutePath());\n\n\t\tBlockCompressedOutputStream writer = new BlockCompressedOutputStream(outFile);\n\t\tlong filePosition= writer.getFilePointer();\n\t\t\n\t\tTabixIndexCreator indexCreator=new TabixIndexCreator(TabixFormat.BED);\n\t\tBedLineCodec bedCodec= new BedLineCodec();\n\t\twhile(lin.hasNext()){\n\t\t\tString line = lin.next();\n\t\t\tBedLine bed = bedCodec.decode(line);\n\t\t\tif(bed==null) continue;\n\t\t\twriter.write(line.getBytes());\n\t\t\twriter.write('\\n');\n\t\t\tindexCreator.addFeature(bed, filePosition);\n\t\t\tfilePosition = writer.getFilePointer();\n\t\t}\n\t\twriter.flush();\n\t\t\n\t\t// System.err.print(\"Indexing... \");\n\t\t\n\t\tFile tbi= new File(bgzfOut + TabixUtils.STANDARD_INDEX_EXTENSION);\n\t\tif(tbi.exists() && tbi.isFile()){\n\t\t\twriter.close();\n\t\t\tthrow new RuntimeException(\"Index file exists: \" + tbi);\n\t\t}\n\t\tIndex index = indexCreator.finalizeIndex(writer.getFilePointer());\n\t\tindex.writeBasedOnFeatureFile(outFile);\n\t\twriter.close();\n\n\t\t// System.err.println(\"Done\");\n\t\t\n\t\tif(deleteOnExit){\n\t\t\toutFile.deleteOnExit();\n\t\t\tFile idx= new File(outFile.getAbsolutePath() + TabixUtils.STANDARD_INDEX_EXTENSION);\n\t\t\tidx.deleteOnExit();\n\t\t}\n\t}",
"private void execute0()\n {\n if (logger.isDebugEnabled())\n {\n debugLogCompactingMessage(taskId);\n }\n\n long lastCheckObsoletion = startNanos;\n double compressionRatio = scanners.getCompressionRatio();\n if (compressionRatio == MetadataCollector.NO_COMPRESSION_RATIO)\n compressionRatio = 1.0;\n\n long lastBytesScanned = 0;\n\n if (!controller.cfs.getCompactionStrategyContainer().isActive())\n throw new CompactionInterruptedException(op.getProgress());\n\n estimatedKeys = writer.estimatedKeys();\n while (compactionIterator.hasNext())\n {\n if (op.isStopRequested())\n throw new CompactionInterruptedException(op.getProgress());\n\n UnfilteredRowIterator partition = compactionIterator.next();\n if (writer.append(partition))\n totalKeysWritten++;\n\n long bytesScanned = scanners.getTotalBytesScanned();\n\n // Rate limit the scanners, and account for compression\n if (compactionRateLimiterAcquire(limiter, bytesScanned, lastBytesScanned, compressionRatio))\n lastBytesScanned = bytesScanned;\n\n long now = System.nanoTime();\n if (now - lastCheckObsoletion > TimeUnit.MINUTES.toNanos(1L))\n {\n controller.maybeRefreshOverlaps();\n lastCheckObsoletion = now;\n }\n }\n\n // point of no return\n newSStables = writer.finish();\n\n\n completed = true;\n }",
"private void addFilesToZip(List<File> files,String outputPath) throws IOException \r\n\t{\r\n\t\t// create a zip output stream\r\n\t\tString zipFileName = outputPath + File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\tOutputStreamWithLength chunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\t\tdouble totalBytesRead = 0L;\r\n\t\tint count = 10; \r\n\t\tfor(File file:files)\r\n\t\t{\r\n\t\t\t// reset the file index\r\n\t\t\tfileIndex = 0;\r\n\t\t\tString zipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\r\n\t\t\tif(file.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tZipEntry entry =new ZipEntry(zipEntryPath+\"/\");\r\n\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\t// add the current file to the zip\r\n\t\t\tZipEntry entry =new ZipEntry(zipEntryPath);\r\n\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\tbyte[] buffer = new byte[1024]; \t \r\n\r\n\t\t\tFileInputStream inputFileStream = new FileInputStream(file);\r\n\t\t\tint len; \r\n\t\t\twhile ((len = inputFileStream.read(buffer)) > 0) \r\n\t\t\t{ \r\n\t\t\t\tif((chunkedFile.getCurrentWriteLength() + len ) > maxSplitSize){\r\n\t\t\t\t\t// close current zip output stream\r\n\t\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\t\tzipOutputStream.finish();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset the write length\r\n\t\t\t\t\tchunkedFile.setCurrentWriteLength(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// create new zip output stream\r\n\t\t\t\t\tzipIndex += 1;\r\n\t\t\t\t\tzipFileName = outputPath+ File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\t\t\t\tchunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\t\t\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\r\n\t\t\t\t\t// add the current file to write remaining bytes\r\n\t\t\t\t\tzipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t\t\tentry = new ZipEntry(zipEntryPath);\r\n\t\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Show progress\r\n\t\t\t\ttotalBytesRead += len;\r\n\t\t\t\tdouble progress = totalBytesRead / totalBytes;\r\n\t\t\t\tif (progress*100 > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\ttotalBytesRead = 0L;\r\n\t\t\t\t\tcount += 10;\r\n\t\t\t\t\tSystem.out.println(\"Finished \" + count +\"%\");\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\tinputFileStream.close();\r\n\t\t}\r\n\r\n\t\tzipOutputStream.closeEntry();\r\n\t\tzipOutputStream.finish();\r\n\t}",
"private static void uploadTSVFiles(String sessionID, File[] annotatedTSVFiles, String tableName, String tableNameSub, File workingDir) throws SQLException, IOException, SessionExpiredException {\n for (File f : annotatedTSVFiles) {\n LOG.info(\"Uploading \" + f.getAbsolutePath() + \"...\");\n VariantManagerUtils.uploadTSVFileToVariantTable(sessionID, f, tableName);\n }\n\n //create sub table dump from the complete table\n LOG.info(\"Dumping variants to file for sub table\");\n File subDump = new File(workingDir, tableName + \"sub.tsv\");\n VariantManagerUtils.variantTableToTSVFile(sessionID, tableName, subDump, null, true, VariantManagerUtils.determineStepForSubset(VariantManager.getInstance().getNumFilteredVariantsHelper(sessionID, tableName, new Condition[][]{})));\n\n //upload to sub table\n LOG.info(\"Loading into subset table: \" + tableNameSub);\n VariantManagerUtils.uploadTSVFileToVariantTable(sessionID, subDump, tableNameSub);\n }",
"public void writeHolders() {\n File tmp = new File(store_dir + \"/\" + repository_dir, repository_name + \".tmp\");\n File bak = new File(store_dir + \"/\" + repository_dir, repository_name + \".bak\");\n File orig = new File(store_dir + \"/\" + repository_dir, repository_name);\n try {\n this.writer = new BufferedWriter(new FileWriter(tmp));\n } catch (Exception ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Unable to open temp rep for write\");\n }\n try {\n serializer.writeResources(holders, writer);\n } catch (Exception ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Unable to write repository\");\n }\n if (!orig.renameTo(bak)) {\n System.out.println(\"unable to rename \" + orig + \" to \" + bak);\n } else {\n if (!tmp.renameTo(orig)) {\n bak.renameTo(orig);\n System.out.println(\"unable to rename \" + tmp + \" to \" + orig);\n } else {\n }\n }\n }",
"private void processReportFiles()\r\n {\r\n writeToLogFile(\" \");\r\n int fileCount = 0, successCount = 0;\r\n accountCount = 0;\r\n failedAccountCount = 0;\r\n boolean first = true;\r\n try\r\n {\r\n // Process report files directory\r\n File directory = new File(dropDir);\r\n File[] fileArray = directory.listFiles();\r\n for (int i = 0; i < fileArray.length; i++)\r\n {\r\n // process the file and move to processed directory if successful\r\n File reportFile = fileArray[i];\r\n String pathname = reportFile.getAbsolutePath();\r\n String filename = reportFile.getName();\r\n if (processedReportFile(reportFile))\r\n {\r\n File rfMove = new File(procDir+BACKSLASH+filename);\r\n if (!reportFile.renameTo(rfMove))\r\n writeToLogFile(\"failed to move processed report file: \"+pathname);\r\n successCount++;\r\n }\r\n fileCount++;\r\n }\r\n writeToLogFile(\" \");\r\n // summarise report files processed in log file\r\n if (fileCount==0)\r\n {\r\n writeToLogFile(\"No report files in drop directory\");\r\n System.out.println(\"No report files in drop directory\");\r\n }\r\n else\r\n {\r\n if (!((accountCount==0)&&(failedAccountCount==0)))\r\n {\r\n writeToLogFile(\"No account FTP requests : \"+accountCount);\r\n if (failedAccountCount>0)\r\n writeToLogFile(\"No failed account FTP requests : \"+failedAccountCount);\r\n }\r\n writeToLogFile(\" \");\r\n String finalMessage = successCount + \" report file\";\r\n if (successCount>1)\r\n finalMessage = finalMessage + \"s\";\r\n finalMessage = finalMessage + \" out of \" + fileCount + \" successfully processed\";\r\n System.out.println(finalMessage);\r\n writeToLogFile(finalMessage);\r\n }\r\n writeToLogFile(\" \");\r\n\r\n }\r\n catch(Exception ex)\r\n {\r\n writeToLogFile(\"Error in processReportFiles : \" + ex.getMessage());\r\n }\r\n }",
"public void createPatient() throws IOException\n {\n addPatientToList();\n \n //creates the patient's empty folders and files\n File userFolder = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB); \n File patientEvaluation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm\");\n File patientProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressNotes\"); \n \n try\n \t{\n \tuserFolder.mkdir();\n patientEvaluation.mkdir();\n patientProgressReports.mkdir();\n \t//result = true;\n \t} \n \tcatch(SecurityException se)\n \t{\n \t//handle it\n \t} \n \t\n File listOfProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressReports.txt\");\n FileWriter writer = new FileWriter(listOfProgressReports, true);\t \n BufferedWriter bufferedreader = new BufferedWriter(writer);\n writer.append(\"\");\n bufferedreader.close();\n writer.close();\n \n \n /*if(result) \n \t{ \n \t\tSystem.out.println(\"DIR created\"); \n \t}*/\n \n //creates the patient's empty evaluation form files\n File signedStatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signed.txt\");\n FileWriter w = new FileWriter(signedStatus, true);\t \n BufferedWriter b = new BufferedWriter(w);\n w.append(\"false\");\n b.close();\n w.close();\n \n File firstName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/first.txt\");\n FileWriter writ = new FileWriter(firstName, true);\t \n BufferedWriter bw = new BufferedWriter(writ);\n writ.append(currentPatientFirstName);\n bw.close();\n writ.close();\n \n File lastName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/last.txt\");\n FileWriter writ1 = new FileWriter(lastName, true);\t \n BufferedWriter bw1 = new BufferedWriter(writ1);\n writ1.append(currentPatientLastName);\n bw1.close();\n writ1.close();\n \n File age = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/age.txt\");\n FileWriter writ2 = new FileWriter(age, true);\t \n BufferedWriter bw2 = new BufferedWriter(writ2);\n writ2.append(\"\");\n bw2.close();\n writ2.close();\n \n File dob = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/dateofbirth.txt\");\n FileWriter writ3 = new FileWriter(dob, true);\t \n BufferedWriter bw3 = new BufferedWriter(writ3);\n writ3.append(\"\");\n bw3.close();\n writ3.close();\n \n File maritalstatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/maritalstatus.txt\");\n FileWriter writ4 = new FileWriter(maritalstatus, true);\t \n BufferedWriter bw4 = new BufferedWriter(writ4);\n writ4.append(\"\");\n bw4.close();\n writ4.close();\n \n File ethnicity = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity.txt\");\n FileWriter writ5 = new FileWriter(ethnicity, true);\t \n BufferedWriter bw5 = new BufferedWriter(writ5);\n writ5.append(\"\");\n bw5.close();\n writ5.close();\n\n File ethnicityother = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity-other.txt\");\n FileWriter writt = new FileWriter(ethnicityother, true);\t \n BufferedWriter bww = new BufferedWriter(writt);\n writt.append(\"\");\n bww.close();\n writt.close();\n \n File sex = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sex.txt\");\n FileWriter writ6 = new FileWriter(sex, true);\t \n BufferedWriter bw6 = new BufferedWriter(writ6);\n writ6.append(\"\");\n bw6.close();\n writ6.close();\n \n File referredBy = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby.txt\");\n FileWriter writ7 = new FileWriter(referredBy, true);\t \n BufferedWriter bw7 = new BufferedWriter(writ7);\n writ7.append(\"\");\n bw7.close();\n writ7.close();\n \n File referredByTherapist = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-therapist.txt\");\n FileWriter writ8 = new FileWriter(referredByTherapist, true);\t \n BufferedWriter bw8 = new BufferedWriter(writ8);\n writ8.append(\"\");\n bw8.close();\n writ8.close();\n \n File referredByOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-other.txt\");\n FileWriter writ9 = new FileWriter(referredByOther, true);\t \n BufferedWriter bw9 = new BufferedWriter(writ9);\n writ9.append(\"\");\n bw9.close();\n writ9.close();\n \n //dr. prince\n File reasonForReferral = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reasonforreferral.txt\");\n FileWriter writ10 = new FileWriter(reasonForReferral, true);\t \n BufferedWriter bw10 = new BufferedWriter(writ10);\n writ10.append(\"\");\n bw10.close();\n writ10.close();\n \n File sourceOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation.txt\");\n FileWriter writ11 = new FileWriter(sourceOfInformation, true);\t \n BufferedWriter bw11 = new BufferedWriter(writ11);\n writ11.append(\"\");\n bw11.close();\n writ11.close();\n \n File sourceOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation-other.txt\");\n FileWriter writ12 = new FileWriter(sourceOfInformationOther, true);\t \n BufferedWriter bw12 = new BufferedWriter(writ12);\n writ12.append(\"\");\n bw12.close();\n writ12.close();\n \n File reliabilityOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation.txt\");\n FileWriter writ13 = new FileWriter(reliabilityOfInformation, true);\t \n BufferedWriter bw13 = new BufferedWriter(writ13);\n writ13.append(\"\");\n bw13.close();\n writ13.close();\n \n File reliabilityOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation-other.txt\");\n FileWriter writ14 = new FileWriter(reliabilityOfInformationOther, true);\t \n BufferedWriter bw14 = new BufferedWriter(writ14);\n writ14.append(\"\");\n bw14.close();\n writ14.close();\n \n File historyOfPresentIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/historyofpresentillness.txt\");\n FileWriter writ15 = new FileWriter(historyOfPresentIllness, true);\t \n BufferedWriter bw15 = new BufferedWriter(writ15);\n writ15.append(\"\");\n bw15.close();\n writ15.close();\n \n File signsSymptoms = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signsandsymptoms.txt\");\n FileWriter writ16 = new FileWriter(signsSymptoms, true);\t \n BufferedWriter bw16 = new BufferedWriter(writ16);\n writ16.append(\"\");\n bw16.close();\n writ16.close();\n \n File currentMedications = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/currentmedications.txt\");\n FileWriter writ17 = new FileWriter(currentMedications, true);\t \n BufferedWriter bw17 = new BufferedWriter(writ17);\n writ17.append(\"\");\n bw17.close();\n writ17.close();\n \n File pastHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryof.txt\");\n FileWriter writ18 = new FileWriter(pastHistoryOf, true);\t \n BufferedWriter bw18 = new BufferedWriter(writ18);\n writ18.append(\"\");\n bw18.close();\n writ18.close();\n \n File pastHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryoftext.txt\");\n FileWriter writ19 = new FileWriter(pastHistoryOfText, true);\t \n BufferedWriter bw19 = new BufferedWriter(writ19);\n writ19.append(\"\");\n bw19.close();\n writ19.close();\n \n File medicationTrialsTable = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialstable.txt\");\n FileWriter writ20 = new FileWriter(medicationTrialsTable, true);\t \n BufferedWriter bw20 = new BufferedWriter(writ20);\n writ20.append(\"\");\n bw20.close();\n writ20.close();\n \n File medicationTrialsComments = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialscomments.txt\");\n FileWriter writ21 = new FileWriter(medicationTrialsComments, true);\t \n BufferedWriter bw21 = new BufferedWriter(writ21);\n writ21.append(\"\");\n bw21.close();\n writ21.close();\n \n File substanceUseHistory = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/substanceusehistory.txt\");\n FileWriter writ22 = new FileWriter(substanceUseHistory, true);\t \n BufferedWriter bw22 = new BufferedWriter(writ22);\n writ22.append(\"\");\n bw22.close();\n writ22.close();\n \n File deniesHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryof.txt\");\n FileWriter writ23 = new FileWriter(deniesHistoryOf, true);\t \n BufferedWriter bw23 = new BufferedWriter(writ23);\n writ23.append(\"\");\n bw23.close();\n writ23.close();\n \n File deniesHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryoftext.txt\");\n FileWriter writ24 = new FileWriter(deniesHistoryOfText, true);\t \n BufferedWriter bw24 = new BufferedWriter(writ24);\n writ24.append(\"\");\n bw24.close();\n writ24.close();\n \n File socialHistoryText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorytext.txt\");\n FileWriter writ25 = new FileWriter(socialHistoryText, true);\t \n BufferedWriter bw25 = new BufferedWriter(writ25);\n writ25.append(\"\");\n bw25.close();\n writ25.close();\n \n File socialHistoryParents = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistoryparents.txt\");\n FileWriter writ26 = new FileWriter(socialHistoryParents, true);\t \n BufferedWriter bw26 = new BufferedWriter(writ26);\n writ26.append(\"\");\n bw26.close();\n writ26.close();\n \n File socialHistorySiblings = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorysiblings.txt\");\n FileWriter writ27 = new FileWriter(socialHistorySiblings, true);\t \n BufferedWriter bw27 = new BufferedWriter(writ27);\n writ27.append(\"\");\n bw27.close();\n writ27.close();\n \n File socialHistoryChildren = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorychildren.txt\");\n FileWriter writ28 = new FileWriter(socialHistoryChildren, true);\t \n BufferedWriter bw28 = new BufferedWriter(writ28);\n writ28.append(\"\");\n bw28.close();\n writ28.close();\n \n File familyHistoryOfMentalIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/familyhistoryofmentalillness.txt\");\n FileWriter writ29 = new FileWriter(familyHistoryOfMentalIllness, true);\t \n BufferedWriter bw29 = new BufferedWriter(writ29);\n writ29.append(\"\");\n bw29.close();\n writ29.close();\n \n }",
"public void delete() {\r\n Log.d(LOG_TAG, \"delete()\");\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.delete()) {\r\n Log.d(LOG_TAG, \"Deleted file \" + chunk.getAbsolutePath());\r\n }\r\n }\r\n new File(mBaseFileName + \".zip\").delete();\r\n }",
"public void tesCloseFileSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String writeString = \"Hello World\";\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n filePersistence.appendBytes(fileCreationId, writeString.getBytes());\r\n filePersistence.closeFile(fileCreationId);\r\n try {\r\n filePersistence.appendBytes(fileCreationId, writeString.getBytes());\r\n fail(\"there shouldn't exist output stream with id \" + fileCreationId);\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n }",
"private void createSourceFiles(ArrayList<TagNode> tags) {\n\t\tfor (Iterator<TagNode> iter = tags.iterator(); iter.hasNext();) {\n\t\t\tif (monitor.isCanceled()) { // return if cancel is requested\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tASTEngine engine = new ASTEngine(this, mode, pattern);\n\t\t\tengine.createSourceFile(iter.next(), status);\n\t\t\tmonitor.worked(1);\n\t\t}\n\t}",
"public void editDetailLogFiles(){\r\n\t\tString filter1 = \"_advanced_detail_analyzed\";\r\n\t\tString filter2 = \"_standard_detail_analyzed\";\r\n\t\t\r\n\t\t//begin with creation of new file\r\n\t\tJFileChooser fc = new JFileChooser();\r\n\t\tfc.setSize(2560, 1300);\r\n\t\t//set directory and \".log\" filter\r\n\t\tfc.setMultiSelectionEnabled(true);\r\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\r\n\t\tfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\t\r\n\t\tint status = fc.showDialog(this, Messages.getString(\"EditLogControlPanel.approveButton\"));\r\n\t\t\r\n\t\tif(status == JFileChooser.APPROVE_OPTION){\r\n\t\t\tFile[] tmpFiles = fc.getSelectedFiles();\r\n\t\t\t\r\n\t\t\tfor(File file:tmpFiles){\r\n\t\t\t\t//get log names\r\n\t\t\t\tArrayList<File> files = getFileList(file);\r\n\t\t\t\r\n\t\t\t\tfor(File f:files){\r\n\t\t\t\t\tif(f.getName().contains(filter1) || f.getName().contains(filter2)){\r\n\t\t\t\t FileWriter fstream;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif(!(new File(f.getParent() + \"/corrected/\")).exists()) (new File(f.getParent() + \"/corrected/\")).mkdir();\r\n\t\t\t\t\t\t\tfstream = new FileWriter(f.getParent() + \"/corrected/\" + f.getName(), false);\r\n\t\t\t\t\t\t\tBufferedWriter out = new BufferedWriter(fstream);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tint vehiclesTotal = 0;\r\n\t\t\t\t\t\t\tString[] data;\r\n\t\t\t\t\t\t\tfloat[] tmpData = new float[100];\r\n\t\t\t\t\t\t\tfloat[][] tmpData2 = new float[100][100];\r\n\t\t\t\t\t\t\tint counter = 0;\r\n\t\t\t\t\t\t\t//read file\r\n\t\t\t\t\t BufferedReader reader;\r\n\t\t\t\t\t \r\n\t\t\t\t\t //get maximal vehicles count and calculates values of line\r\n\t\t\t\t\t try{\r\n\t\t\t\t\t reader = new BufferedReader(new FileReader(f));\r\n\t\t\t\t\t String line = reader.readLine(); \r\n\t\t\t\t\t while(line != null){\t\r\n\t\t\t\t\t \tif(!line.substring(0, 1).equals(\"#\") && !line.equals(\"\")){\r\n\t\t\t\t\t \t\tdata = line.split(\" \");\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\tfor(int i = 1; i < data.length-1;i++){\r\n\t\t\t\t\t \t\t\ttmpData[counter] += Integer.parseInt(data[i]);\r\n\t\t\t\t\t \t\t\tvehiclesTotal += Integer.parseInt(data[i]);\r\n\t\t\t\t\t \t\t\ttmpData2[counter][i-1] = Integer.parseInt(data[i]);\r\n\t\t\t\t\t \t\t}\r\n\t\t\t\t\t \t\tcounter++;\r\n\t\t\t\t\t \t}\r\n\t\t\t\t\t \telse out.write(line + \"\\n\");\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t \tline = reader.readLine();\r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t \r\n\t\t\t\t\t float tmpSum = 0;\r\n\t\t\t\t\t\t\tfloat vehiclesTotal2 = 0;\r\n\t\t\t\t\t\t\tfor(int l = 0; l < counter;l++){\t\r\n\t\t\t\t\t\t\t\tout.write(\"\" + l);\r\n\t\t\t\t\t\t\t\tfor(int j = 0; j < counter-1; j++) out.write(\" \" + (int)tmpData2[l][j]);\r\n\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(l == 0){\r\n\t\t\t\t\t\t\t\t\tout.write(\" \" + (float)(tmpData[l]/vehiclesTotal) + \"\\n\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(l == 1){\r\n\t\t\t\t\t\t\t\t\ttmpSum = 0;\r\n\t\t\t\t\t\t\t\t\tfor(int i = l; i < counter; i++) tmpSum += tmpData[i];\r\n\t\t\t\t\t\t\t\t\tout.write(\" \" + (float)(tmpSum/vehiclesTotal) + \"\\n\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\ttmpSum = 0;\r\n\t\t\t\t\t\t\t\t\tfor(int i = l; i < counter; i++) tmpSum += tmpData[i];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tvehiclesTotal2 = vehiclesTotal;\r\n\t\t\t\t\t\t\t\t\tfor(int n = 0; n < (l-1);n++){\r\n\t\t\t\t\t\t\t\t\t\tfor(int o = 0; o < l;o++){\r\n\t\t\t\t\t\t\t\t\t\t\tvehiclesTotal2 -= tmpData2[o][n];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tout.write(\" \" + (float)(tmpSum/vehiclesTotal2) + \"\\n\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t out.close();\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void updateFile(CrowdinFile _file) {\n String fileN = _file.getFile().getName();\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Initializing: \" + fileN);\n // Making sure the file is a master file and not a translation\n if (_file.getClass().equals(CrowdinFile.class)) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Init dir\");\n initDir(_file.getCrowdinPath());\n try {\n if (_file.getFile().exists()) {\n \n //escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersBeforeSyncFromCodeToCrowdin\");\n \n if (!getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Add file: \" + _file.getCrowdinPath());\n String result = getHelper().addFile(_file);\n if (result.contains(\"success\")) {\n getLog().info(\"File \" + fileN + \" created succesfully.\");\n initTranslations(_file);\n } else {\n getLog().warn(\"Cannot create file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n }\n } else {\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"*** Update file: \" + _file.getCrowdinPath());\n }\n String result = getHelper().updateFile(_file);\n System.out.println(result);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" updated succesfully.\");\n else\n getLog().warn(\"Cannot update file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n \n //remove escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersAfterSyncFromCodeToCrowdin\");\n \n }\n } else {\n if (getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Delete file: \" + _file.getCrowdinPath());\n String result = getHelper().deleteFile(_file);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" deleted succesfully.\");\n else\n getLog().warn(\"Cannot delete file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n }\n }\n } catch (MojoExecutionException e) {\n getLog().error(\"Error while updating file '\" + _file.getFile().getPath() + \"'. Exception:\\n\" + e.getMessage());\n }\n }\n }"
]
| [
"0.5581605",
"0.5553667",
"0.5547657",
"0.5471218",
"0.53390425",
"0.5284583",
"0.5166222",
"0.5148181",
"0.5140314",
"0.51019967",
"0.510157",
"0.5067807",
"0.5040977",
"0.50075746",
"0.498112",
"0.49798316",
"0.49734336",
"0.4973064",
"0.4970294",
"0.4969673",
"0.49179134",
"0.49154866",
"0.49047998",
"0.49035004",
"0.48871428",
"0.48835856",
"0.48570156",
"0.48463678",
"0.4817418",
"0.4812032",
"0.47893596",
"0.4784868",
"0.47829056",
"0.4764197",
"0.47598907",
"0.47595412",
"0.47580355",
"0.4757724",
"0.4752874",
"0.47431275",
"0.47389793",
"0.47358257",
"0.47353566",
"0.47221804",
"0.47181487",
"0.47099417",
"0.47051498",
"0.46954113",
"0.46890503",
"0.46883667",
"0.46860605",
"0.46814722",
"0.46782488",
"0.46765268",
"0.46756977",
"0.46750355",
"0.46736902",
"0.46582273",
"0.4651226",
"0.46475685",
"0.4645884",
"0.4641747",
"0.4631344",
"0.4628416",
"0.46223086",
"0.46213925",
"0.4621161",
"0.4619899",
"0.4612383",
"0.460465",
"0.46014547",
"0.45803383",
"0.4579267",
"0.4575096",
"0.45726836",
"0.45631993",
"0.45628357",
"0.45555478",
"0.4551092",
"0.45386738",
"0.4535478",
"0.45342267",
"0.45318186",
"0.4530314",
"0.45276284",
"0.45263255",
"0.45254016",
"0.45213562",
"0.45171037",
"0.45106798",
"0.45086393",
"0.45065457",
"0.45062482",
"0.45009723",
"0.44966263",
"0.4495573",
"0.4493261",
"0.44864392",
"0.44842428",
"0.4480331",
"0.4478225"
]
| 0.0 | -1 |
returns, in list form, the | public List<SSTableReader> finished()
{
assert state() == State.COMMITTED || state() == State.READY_TO_COMMIT;
return preparedForCommit;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getTolist();",
"public List getList();",
"public List getList() {\n return Arrays.asList(toJavaArray()); \n }",
"protected Object[] getList() {\n return list;\n }",
"public List<Object> getList() {\n List<Object> returnList = new ArrayList<Object>();\n ListNode<String, Object> n = front;\n while(n != null) {\n returnList.add(n.value);\n n = n.next;\n }\n Collections.reverse(returnList);\n return returnList;\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 }",
"List getValues();",
"java.util.List<java.lang.String> getValuesList();",
"public List<New> list();",
"public JList obtenirList() {\r\n\t\treturn list;\r\n\t}",
"java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();",
"public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }",
"java.util.List<java.lang.String> getContentsList();",
"public ArrayList getList() {\n \t\treturn list;\n \t}",
"public java.util.List getList() {\n\t\treturn list;\n\t}",
"private List<String> buildList() {\n List<String> list = new ArrayList<>();\n list.add(\"Traveled Meters by Day\");\n list.add(\"Sensor Coverage\");\n list.add(\"No Movement Detection\");\n return list;\n }",
"java.util.List<online_info>\n getInfoList();",
"edu.usfca.cs.dfs.StorageMessages.List getList();",
"public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }",
"abstract List<T> getReuslt();",
"private StudentRecord[] getList() {\r\n\t\treturn this.list;\r\n\t}",
"java.util.List<Res.Msg>\n getMsgList();",
"public Object[] list() {\r\n ArrayList<Object> obj = new ArrayList<>();\r\n obj.add(row);\r\n obj.add(table);\r\n obj.add(variable);\r\n obj.add(name);\r\n obj.add(equEquipement);\r\n obj.add(equDesignation);\r\n obj.add(orgOrgane);\r\n obj.add(orgDesignation);\r\n obj.add(unite);\r\n obj.add(comment);\r\n obj.add(datemod);\r\n obj.add(state);\r\n\r\n return obj.toArray();\r\n }",
"List<T> obtenerAll();",
"java.util.List<KeyValuePair>\n getInfoList();",
"@Override\n public String toString() {\n return list.toString();\n }",
"java.util.List<protocol.Data.Friend.FriendItem> \n getFriendList();",
"java.util.List<stockFilePT102.StockDocument.Stock> getStockList();",
"public abstract List toNameValueList();",
"public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<NoteToken> i = NotesList.iterator(); i.hasNext();){\r\n returnList.add(i.next());\r\n }\r\n return returnList;\r\n }",
"public String[] list(){\n\t\t\n\t\tSet<String> t = contents.keySet();\n\t\tString s[] = t.toArray(new String[0]);\n\t\treturn s;\n\t}",
"public final List getList()\n {\n return this.list;\n }",
"java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();",
"public List<String> recordedDateList();",
"public String[] list() {\n\t\tSet<String> fileSet = fileList.keySet();\n\t\tString[] fileListArray = fileSet.toArray(new String[fileList.size()]);\n \treturn fileListArray;\n }",
"public List<Tag> getAsList() {\n return Collections.unmodifiableList(data);\n }",
"public DOCKSList getList() {\r\n return localList;\r\n }",
"java.util.List<People>\n getFriendListList();",
"protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }",
"java.util.List<String>\n getRowsList();",
"java.util.List<Rsp.Msg>\n getMsgList();",
"private static List forestIntoList() {\n List temp = new ArrayList<Integer>();\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n temp.add(forest[i][j]);\n }\n }\n return temp;\n }",
"@Override\n\tpublic ArrayList<Object> getList() {\n\t\tSession session = HibernateUtil.getSession();\n\t\tsession.beginTransaction();\n\t\tString hsql=\"from hibernate.pojo.GmSite as site where site.display='true'\";\n\t\tQuery query = session.createQuery(hsql);\n\t\tsession.getTransaction().commit();\n\t\tArrayList<Object> list = new ArrayList<Object>();\n\t\tlist = (ArrayList<Object>) query.list();\n\t\t\n\t\tsession.close();\n\t\treturn list;\n\t}",
"List<String> data();",
"@Override\n public String[] listAll() {\n return list();\n }",
"List<ParqueaderoEntidad> listar();",
"public List<StockItem> getStockList();",
"public List<T> values();",
"public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<Bars> i = BarsList.iterator(); i.hasNext();){\r\n returnList.addAll(i.next().getElts());\r\n }\r\n return returnList;\r\n }",
"java.util.List<java.lang.String> getFeaturesList();",
"public abstract List<T> getList();",
"public COSArray toList() \n {\n return array;\n }",
"public List<Product> list();",
"@SuppressWarnings(\"unchecked\")\n public <T> List<T> list() {\n return (List<T>) journal\n .retrieve(BarbelQueries.all(id), queryOptions(orderBy(ascending(BarbelQueries.EFFECTIVE_FROM))))\n .stream().map(d -> processingState.expose(context, (Bitemporal) d)).collect(Collectors.toList());\n }",
"private List getList(Attribute attr){\n\t\tList retList;\n\t\tif(attr instanceof DiscreteAttribute){\n\t\t\tthis.labels = ChartF.getAxeLabels(attr);\n\t\t\tretList = getDisList((DiscreteAttribute)attr);\n\t\t} else {\n\t\t\tthis.labels = attr.getName();\n\t\t\tretList = getContList((ContinuousAttribute)attr);\n\t\t}\n\t\treturn retList;\n\t}",
"public List<String> getElements() {\r\n List<String> result = new ArrayList<String>();\r\n if (order == null) {\r\n return result;\r\n }\r\n result.addAll(order.keySet());\r\n Collections.sort(result, new Comparator<String>(){\r\n @Override public int compare(String arg0, String arg1) {\r\n return order.get(arg0).compareTo(order.get(arg1));\r\n }\r\n });\r\n return result;\r\n }",
"List<ListObject> getSupplimentalCodeList();",
"public List getList() throws HibException;",
"private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}",
"com.google.protobuf.ProtocolStringList\n getListList();",
"java.util.List<com.rpg.framework.database.Protocol.Quest> \n getQuestList();",
"public List<Object> getValues();",
"List<GameCode> getGameCodeList();",
"public Object[] getList() {\n\t\treturn new Object[]{pitch, duration, velocity};\n\t}",
"public DList2 list(){\r\n return this.list;\r\n }",
"public List<String> getRunLogAsList();",
"public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }",
"java.util.List<message.Figure.FigureData.FigureLevelTable> \n getLevelTableListList();",
"public List<Item> getItemList();",
"public String getLists(String name){\n return \"\";\n }",
"public List<String> getList() {\n return Collections.unmodifiableList(_model.getList());\n }",
"public List getTrabajadores();",
"private List<T> getCompList(){\n\t\tList<T> l = new ArrayList<T>();\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tif(indices[i]==1){\n\t\t\t\tl.add(list.get(i));\n\t\t\t}\n\t\t}\n\t\treturn l;\n\t}",
"public Item[] getList() {\n\t\treturn list;\n\t}",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"protected abstract List<E> getList();",
"java.util.List<People>\n getUserList();",
"public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }",
"java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();",
"java.util.List<java.lang.Integer> getItemsList();",
"@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}",
"public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<Meters> i = MetersList.iterator(); i.hasNext();){\r\n returnList.addAll(i.next().getElts());\r\n }\r\n return returnList;\r\n }",
"public List<Rectangulo> getLista() {\n return (lista);\n }",
"String getValues() {\n String r = x + \" \";\n Lista iter = new Lista(this);\n while(iter.next != null) {\n iter = iter.next;\n r += iter.x + \" \";\n } \n return r;\n }",
"public List<String> toList() {\n ArrayList<String> selection = new ArrayList<String>(mSelection);\n selection.addAll(mProvisionalSelection);\n return selection;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getList() {\r\n\t\tgetEntityManager().flush();\r\n\t\treturn getEntityManager().createQuery(\r\n\t\t\t\t\"select OBJECT(o) from \" + getClassType().getSimpleName() + \" o order by o.id\")\r\n\t\t\t\t.getResultList();\r\n\t}",
"public List<GeneralItem> getList() {\n return stList;\n }",
"@Override\r\n\tpublic List<T> getResult() {\n\t\treturn null;\r\n\t}",
"List<T> readList();",
"private List<E> snapshot() {\n\t\tList<E> list = Lists.newArrayListWithExpectedSize(size());\n\t\tfor (Multiset.Entry<E> entry : entrySet()) {\n\t\t\tE element = entry.getElement();\n\t\t\tfor (int i = entry.getCount(); i > 0; i--) {\n\t\t\t\tlist.add(element);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"String getStringList();",
"java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList();",
"public FriendList[] getFriendsLists();",
"List<T> getResults();",
"public List<V> values()\r\n\t{\r\n\t\tList<V> values = new ArrayList<V>();\r\n\t\t\r\n\t\tfor(Entry element : data)\r\n\t\t{\r\n\t\t\tvalues.add(element.value);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn values;\r\n\t}",
"List<LookupResultItem> getResult() {\n int size = this.size();\n LookupResultItem[] res = new LookupResultItem[size];\n\n for (int i = size - 1; i >= 0; i--) { // iterate from top so results are ordered in descending order\n res[i] = this.pop();\n }\n\n return Arrays.asList(res);\n }",
"public List<SubItem> getListaItems() {\n\t\tfecha = new Date();\n\t\tcargarDatosLogeado();\n\t\tTimestamp fecha_ahora = new Timestamp(fecha.getTime());\n\t\tList<SubItem> a = managergest.findItems();\n\t\tList<SubItem> l1 = new ArrayList<SubItem>();\n\t\tfor (SubItem t : a) {\n\t\t\tif (t.getItemGanadorDni() == null && t.getItemEstado().equals(\"A\")\n\t\t\t\t\t&& t.getItemFechaSubastaFin().after((fecha_ahora)))\n\t\t\t\tl1.add(t);\n\t\t}\n\t\treturn l1;\n\t}"
]
| [
"0.7452146",
"0.72320503",
"0.69197404",
"0.680418",
"0.6773881",
"0.6760308",
"0.6742699",
"0.6724129",
"0.6710634",
"0.67088825",
"0.6662644",
"0.6628441",
"0.662652",
"0.6625295",
"0.66233855",
"0.6606498",
"0.6590855",
"0.6588706",
"0.6587276",
"0.6587178",
"0.65765053",
"0.6556164",
"0.654555",
"0.65388346",
"0.6532794",
"0.6529717",
"0.65139455",
"0.65129745",
"0.6496549",
"0.6489625",
"0.6482098",
"0.6479616",
"0.6463053",
"0.64523643",
"0.6441214",
"0.64400023",
"0.64395905",
"0.64381963",
"0.6425424",
"0.6416051",
"0.6414699",
"0.6399245",
"0.63962823",
"0.6395742",
"0.63943243",
"0.6374323",
"0.6365116",
"0.63641346",
"0.6363436",
"0.6358682",
"0.6356156",
"0.63539934",
"0.63499296",
"0.6349506",
"0.63492537",
"0.6345676",
"0.6341984",
"0.6339782",
"0.63378793",
"0.6335521",
"0.63323045",
"0.6330107",
"0.63256",
"0.6322585",
"0.6320507",
"0.6316436",
"0.6311357",
"0.63054216",
"0.63042694",
"0.6302334",
"0.63018775",
"0.6301374",
"0.6296359",
"0.6295926",
"0.6295046",
"0.6295046",
"0.6295046",
"0.6295046",
"0.6295046",
"0.6281697",
"0.6279136",
"0.6247485",
"0.624683",
"0.6246668",
"0.6242887",
"0.6237297",
"0.6231567",
"0.622996",
"0.6221339",
"0.6215951",
"0.62088376",
"0.62046117",
"0.61977994",
"0.6197033",
"0.6196623",
"0.6195375",
"0.61933655",
"0.6192439",
"0.6190425",
"0.6187244",
"0.61835694"
]
| 0.0 | -1 |
Union two disjoint sets. Assume root1 and root2 are distinct and represent set names. | public void union( int root1, int root2 )
{
s[ root2 ] = root1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void union(int root1, int root2) {\n // TODO: Implement the union-by-rank algorithm for disjoint set\n if (s[root1]>-1 || s[root2]>-1 ) throw new IllegalArgumentException(\"Impossible to union because one of the roots is already dependant\");\n if( s[root2] < s[root1]){ // root2 is deeper\n s[root1] = root2;// Make root2 new root\n } \n else{\n if(s[root1] == s[root2]) s[ root1 ]--; // Update height if same\n s[root2] = root1; // Make root1 new root\n }\n }",
"public T union( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If already were in same set, just return data from the root of that\n // set.\n if ( root1 == root2 )\n return root1.data;\n // If not already, then doing union reduces overall number of sets.\n numSets-- ;\n // We use root2 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this case,\n // or (b) the tree containing obj1 has lower rank.\n if ( ( root1.rank == root2.rank && Math.random() < 0.5 ) || root1.rank < root2.rank )\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root1.parent = root2;\n root2.size += root1.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root2.rank++ ;\n \n return root2.data;\n }\n else\n // We use root1 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this\n // case, or (b) the tree containing obj2 has lower rank.\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root2.parent = root1;\n root1.size += root2.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root1.rank++ ;\n \n return root1.data;\n }\n }",
"public void union(Node a, Node b) {\n Node set1 = find(a);\n Node set2 = find(b);\n\n if (set1 != set2) {\n // Limits the worst case runtime of a find to O(log N)\n if (set1.getSize() < set2.getSize()) {\n set2.setParent(set1);\n set1.setSize(set1.getSize() + set2.getSize());\n }\n else {\n set1.setParent(set2);\n set2.setSize(set1.getSize() + set2.getSize());\n }\n }\n }",
"public static <T> Set<T> union(Set<? extends T> s1, Set<? extends T> s2) {\n Set<T> result = new HashSet<>(s1);\n result.addAll(s2);\n return result;\n }",
"public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n result.add(e);\n }\n \n return result;\n }",
"public void union(String first, String second) {\n\t\t\n\t\tString firstRepresentative = find(first);\n\t\tString secondRepresentative = find(second);\n\t\t\n\t\tSet<String> firstSet = null;\n\t\tSet<String> secondSet = null;\n\t\t\n\t\t//look for the sets containing the first and second elements \n\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\tfirstSet = map.get(firstRepresentative);\n\t\t\t}\n\t\t\tif(map.containsKey(secondRepresentative)) {\n\t\t\t\tsecondSet = map.get(secondRepresentative);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(firstSet != null && secondSet != null) {\n\t\t\t\n\t\t\t//merge the two sets\n\t\t\tfirstSet.addAll(secondSet);\n\t\t\t\n\t\t\t//select a representative and delete the set already merged \n\t\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\t\tmap.put(firstRepresentative, firstSet);\n\t\t\t\t}\n\t\t\t\telse if(map.containsKey(secondRepresentative)) {\n\t\t\t\t\tmap.remove(secondRepresentative);\n\t\t\t\t\tdisjointSet.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}",
"public static Set<Doc> or(Set<Doc> set1, Set<Doc> set2) {\r\n \t\tif(set1 == null)\r\n \t\t\tset1 = new TreeSet<Doc>();\r\n \t\tif(set2 == null)\r\n \t\t\tset2 = new TreeSet<Doc>();\r\n \t\t\r\n \t\tTreeSet<Doc> result = new TreeSet<Doc>(set1);\r\n \t\tresult.addAll(set2);\r\n \t\treturn result;\r\n \t}",
"public static Set unionRaw(Set s1, Set s2) {\n\t\t// Warning : HashSet is a raw type. References to generic type HashSet<E> should\n\t\t// be parameterized\n\t\tSet result = new HashSet(s1);\n\t\t// Warning : Type safety: The method addAll(Collection) belongs to the raw type\n\t\t// Set. References to generic type Set<E> should be parameterized\n\t\tresult.addAll(s2);\n\t\treturn result;\n\t}",
"public SetSet setUnion(SetSet second){\n\t\tSetSet result = new SetSet(contents);\n\t\tfor(int i=0;i<second.size();i++){\n\t\t\tresult.add(second.get(i));\n\t\t}\n\t\treturn result;\n\t}",
"protected boolean union(int id1, int id2) \n\t{\n\t\t// Find the parents of both nodes.\n\t\tint root1 = find(id1);\n\t\tint root2 = find(id2);\n\t\t\n\t\t// No union needed.\n\t\tif (root1 == root2)\n\t\t{\n\t\t //Return that the two values were already in the same tree\n\t\t return false;\n\t\t}\n\t\t\n\t\t//Combine the trees with these two roots\n\t\tparents[root1] = root2;\n\t\t\n\t\t// We successfully did a union.\n\t\treturn true;\n\t}",
"public void unionOf(IntegerSet set1, IntegerSet set2) {\n get = new int[0];\n for (int i : set1.get)\n insertElement(i);\n for (int i : set2.get)\n insertElement(i);\n }",
"public static <T> Set<T> union(final Set<T> a, final Set<T> b) {\n return new Set<T>() {\n public boolean has(final T n) {\n return a.has(n) || b.has(n);\n }\n };\n }",
"@Test\r\n public void testUnion1() {\r\n int actual[] = set1.unionOfSets(set2);\r\n Assert.assertArrayEquals(new int[] { 1, 2, 3, 4, 5 }, actual);\r\n }",
"private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }",
"protected <Ty> HashSet<Ty> union(HashSet<Ty> setA, HashSet<Ty> setB) {\n HashSet<Ty> retSet = new HashSet<>();\n retSet.addAll(setA);\n retSet.addAll(setB);\n return retSet;\n }",
"public Set Union(Set secondSet) {\n\t\t\n\t\tArrayList<String> firstArray = noDuplicates(stringArray);\n\t\t// Taking out duplications out of our sets by calling the noDuplicates private function\n\t\tArrayList<String> secondArray = noDuplicates(secondSet.returnArray());\n\t\t\n\t\tArrayList<String> unionOfBoth = new ArrayList<String>();\n\t\t// New ArrayList to hold the final values\n\t\t\n\t\tfor (int i=0; i < 10; i++) {\n\t\t\tif (firstArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(firstArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (secondArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(secondArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSet unionReturn = new Set(unionOfBoth); // Initiate a Set object from out final ArrayList\n\t\t\n\t\treturn unionReturn; // Return the final Set Object\n\t}",
"public void union(int id1, int id2) {\n\t\tint root_v1 = find(id1); // Find the representative of the first items\n\t\tint root_v2 = find(id2);\t// Find the representative of the second item\n\n\t\tif (root_v1 != root_v2) {\t// If the 2 items are not equal\n\t\t\tG.addEdge(root_v1, root_v2);\t// Add an edge from root1 --> root2 (Union)\n\t\t}\n\t}",
"void union(int x,int y){\n int xRoot=find(x),yRoot=find(y);\n if(xRoot==yRoot)return;\n if(rank[xRoot]<rank[yRoot])\n parent[xRoot]=yRoot;\n else if(rank[xRoot]>rank[yRoot])\n parent[yRoot]=xRoot;\n else{\n parent[yRoot]=xRoot;\n rank[xRoot]=rank[xRoot]+1;\n }\n --totalSets;\n }",
"private static Collection<Node> union(Collection<Node> xs, Collection<Node> ys) {\n if (xs == null || xs.size() == 0) {\n return ys;\n }\n if (ys == null || ys.size() == 0) {\n return xs;\n }\n \n List<Node> result = new ArrayList<>(xs);\n for (Node y : ys) {\n if (!result.contains(y)) {\n result.add(y);\n }\n }\n return result;\n }",
"void union(int a, int b) {\n int aParent = find(a); // find parent of a\n int bParent = find(b); // find parent of b\n\n // here we are everytime setting the parent of a_set as b_set in union\n // set the parent of all a as parent of b\n childToParentMap.put(aParent, bParent);\n }",
"public void union(Vertex v1, Vertex v2) {\n\n // find the two vertices' path root\n Vertex r1 = find(v1);\n Vertex r2 = find(v2);\n\n // if the two roots are equal, just return\n if(r1.equals(r2)){\n return;\n } else if(r1.getSize()>r2.getSize()){\n // if the r1 path size is greater than r2\n // just change the vertex 2's root to vertex 1\n r2.setRoot(r1);\n // increment the size of r1 set\n r1.setSize(r2.getSize());\n } else {\n r1.setRoot(r2);\n r2.setSize(r1.getSize());\n }\n \n }",
"public BSTSet union(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] unionArray = new int[thisArray.length + sArray.length];\n int unionArrayIndex = 0;\n\n // add both arrays together\n for (int i = 0; i < thisArray.length; i++) {\n unionArray[unionArrayIndex++] = thisArray[i];\n }\n\n for (int i = 0; i < sArray.length; i++) {\n unionArray[unionArrayIndex++] = sArray[i];\n }\n\n return new BSTSet(unionArray);\n }",
"public static <T> OrdinalSet<T> unify(OrdinalSet<T> A, OrdinalSet<T> B) {\r\n if (A == null) {\r\n throw new IllegalArgumentException(\"A is null\");\r\n }\r\n if (B == null) {\r\n throw new IllegalArgumentException(\"B is null\");\r\n }\r\n if (Assertions.verifyAssertions) {\r\n if (A.size() != 0 && B.size() != 0) {\r\n Assertions._assert(A.mapping.equals(B.mapping));\r\n }\r\n }\r\n \r\n if (A.S != null && B.S == null) {\r\n return new OrdinalSet<T>(A.S, A.mapping);\r\n } else if (A.S == null && B.S != null) {\r\n return new OrdinalSet<T>(B.S, B.mapping);\r\n }\r\n \r\n IntSet union = A.S.union(B.S);\r\n return new OrdinalSet<T>(union, A.mapping);\r\n }",
"public void unionSet(NSSet<? extends E> otherSet) {\n\t\tthis.wrappedSet.addAll(otherSet.getWrappedSet());\n\t}",
"@Override\n\tpublic SetLinkedList<T> union(SetLinkedList<T> otherSet) {\n\t\tthrow new UnsupportedOperationException(\"Not implemented yet!\");\n\t}",
"public void union(T x, T y) {\n\t\tassert (_parents.containsKey(x));\n\t\tassert (_parents.containsKey(y));\n\n\t\tx = find(x);\n\t\ty = find(y);\n\n\t\tif (x == y) {\n\t\t\treturn;\n\t\t}\n\n\t\tint xRank = _ranks.get(x);\n\t\tint yRank = _ranks.get(y);\n\n\t\tif (xRank < yRank) {\n\t\t\t_parents.put(x, y);\n\t\t} else if (xRank > yRank) {\n\t\t\t_parents.put(y, x);\n\t\t} else {\n\t\t\t_parents.put(y, x);\n\t\t\t_ranks.put(x, xRank + 1);\n\t\t}\n\n\t\t_numSets--;\n\t}",
"public Set union(Set join){\n Set newSet = new Set();\n for(int element = 0; element < join.size(); element++){\n if (!elementOf(join.getSet()[element]))\n newSet.add(join.getSet()[element]);\n }\n for(int element = 0; element < set.length; element++){\n newSet.add(set[element]);\n }\n return newSet;\n }",
"@Test\r\n\t\tpublic void testUnion() {\n\t\t\ttestingSet = new IntegerSet(list1);\r\n\t\t\ttestingSet2= new IntegerSet(list2);\r\n\t\t\t// 3rd set =to the union of the two lists \r\n\t\t\ttestingSet3= new IntegerSet(union);\r\n\t\t\t// 4th set equal to the union of sets 1 and 2 \r\n\t\t\ttestingSet4= testingSet.union(testingSet, testingSet2);\r\n\t\t\t// sets 3 and 4 should be equal\r\n\t\t\t// assertEquals method is deprecated \r\n\t\t\tassertArrayEquals(testingSet3.toArray(),testingSet4.toArray());\r\n\t\t\t \r\n\t\t}",
"public ISet<E> union(ISet<E> otherSet) {\n\t\tif (otherSet == null)\n\t\t\tthrow new IllegalArgumentException(\"The given set is null.\");\n\t\tISet<E> result = this.difference(otherSet);\n\t\tresult.addAll(this.intersection(otherSet));\n\t\tresult.addAll(otherSet.difference(this));\n\t\treturn result;\n\t}",
"void Union(subset [] subsets, int x , int y ){ \n\t\tint xroot = find(subsets, x); \n\t int yroot = find(subsets, y); \n\t \n\t\tif (subsets[xroot].rank < subsets[yroot].rank) \n\t\t\tsubsets[xroot].parent = yroot; \n\t\telse if (subsets[yroot].rank < subsets[xroot].rank) \n\t\t\tsubsets[yroot].parent = xroot; \n\t\telse{ \n\t\t\tsubsets[xroot].parent = yroot; \n\t\t\tsubsets[yroot].rank++; \n\t\t} \n\t}",
"public static void union(String a, String b) {\r\n int root1 = find(a);\r\n int root2 = find(b);\r\n if (root1 == root2)return;\r\n if(size.get(root1) < size.get(root2)){size.set(root2, size.get(root2)+size.get(root1)); position.set(root1, root2);}\r\n else {size.set(root1, size.get(root1)+size.get(root2)); position.set(root2, root1);}\r\n }",
"public static FlavorSet union(FlavorSet a, FlavorSet b) {\n if (a.isEmpty()) {\n return b;\n } else if (b.isEmpty()) {\n return a;\n } else {\n return new FlavorSet(\n Stream.concat(a.flavors.stream(), b.flavors.stream())\n .collect(ImmutableSortedSet.toImmutableSortedSet(FLAVOR_ORDERING)));\n }\n }",
"public static MyLinkedList getUnion(MyLinkedList list1, MyLinkedList list2)\n {\n HashSet<Integer> set = new HashSet<>();\n\n Node temp = list1.getStart();\n while(temp != null)\n {\n set.add(temp.key);\n temp = temp.next;\n }\n\n temp = list2.getStart();\n while(temp != null)\n {\n set.add(temp.key);\n temp = temp.next;\n }\n\n MyLinkedList union = new MyLinkedList();\n for(int key : set)\n {\n union.addNode(new Node(key));\n }\n\n return union;\n }",
"public Set union(Set in_set) throws SetException {\n\t\tSet union = new Set(this);\n\t\tfor (Object element : in_set.list) {\n\t\t\tif (!member(element))\n\t\t\t\tunion.addItem(element);\n\t\t}\n\t\treturn union;\n\t}",
"private static Set symmetricSetDifference (Set<Integer> set1, Set<Integer> set2)\n {\n Set<Integer> skæringspunktet = new HashSet<Integer>(set1);\n\n // Holder på set2 også\n skæringspunktet.retainAll(set2);\n\n // Set1 fjerner alt fra Settet\n set1.removeAll(skæringspunktet);\n // Set1 fjerner alt fra Settet\n set2.removeAll(skæringspunktet);\n\n // Tilføjer alt fra set2 til set1\n set1.addAll(set2);\n\n // Returnerer set1\n return set1;\n }",
"@Test\n\tpublic void testAddAll() {\n\t Set<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t Set<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t setA.addAll(setB);\n\t Set<Integer> union = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9));\n\t assertEquals(setA, union);\n }",
"@Test\n\t public void test_Union_Set_Same() throws Exception{\n\t\t int[] setarray1= new int[]{1,2,3};\n\t\t int[] setarray2= new int[]{1,2,3};\n\t\t SET set = new SET(setarray1);\n\t\t int returnedArrOperation[] =set.Union(setarray1,setarray2); \n\t\t int []expectedArr = new int[] {1,2,3};\n\t\t Assert.assertArrayEquals( expectedArr, returnedArrOperation );\n\t }",
"public static Set<Doc> and(Set<Doc> set1, Set<Doc> set2) {\r\n \t\t\r\n \t\tif((set1 == null) || (set2 == null)) {\r\n\t\t\tSystem.err.println(\"Doc.and() returning null!\");\r\n \t\t\treturn new TreeSet<Doc>();\r\n \t\t}\r\n \t\t//set1.retainAll(set2);\r\n \t\t//return set1;\r\n \t\t\r\n \t\tTreeSet<Doc> result = new TreeSet<Doc>();\r\n \t\tIterator<Doc> op1 = set1.iterator();\r\n \t\tIterator<Doc> op2 = set2.iterator();\r\n \t\t\r\n \t\tDoc current1 = getNext(op1);\r\n \t\tDoc current2 = getNext(op2);\r\n \r\n \t\twhile(current1!=null && current2!=null) {\r\n \t\t\t//If is the same document\r\n \t\t\tif(current1.getID() == current2.getID()) {\r\n \t\t\t\tresult.add(current1);\r\n \t\t\t\tcurrent1 = getNext(op1);\r\n \t\t\t\tcurrent2 = getNext(op2);\r\n \t\t\t}\r\n \t\t\t//If op2 is ahead of op1\r\n \t\t\telse if(current1.getID() < current2.getID()) \r\n \t\t\t\tcurrent1 = getNext(op1);\r\n \t\t\t//If op1 is ahead of op2\r\n \t\t\telse\r\n \t\t\t\tcurrent2 = getNext(op2);\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}",
"public static double jaccardSet(Set s1, Set s2) {\n Set<String> union = new HashSet<>();\n union.addAll(s1);\n union.addAll(s2);\n Set<String> intersection = new HashSet<>(s1);\n intersection.retainAll(s2);\n if (union.size() <= 0) {\n return 0D;\n } else {\n return formatDouble((double) intersection.size() / union.size());\n }\n }",
"@Override\n public IntSet union(IntSet other) {\n return other;\n }",
"@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //create return SetInterface\n SetInterface<T> result = new LinkedSet();\n //add the items from the calling set to the result set\n Node n = first;\n while(n != null){\n result.addItem(n.value);\n n = n.next;\n }\n \n //convert rhs to an array so we know what we're dealing with\n T[] rhsArr = rhs.toArray();\n //add the items from rhsArr to result\n for(int i = 0; i < rhsArr.length; i++){\n result.addItem(rhsArr[i]);\n }\n \n return result;\n }",
"public static ImmutableGraph union( final ImmutableGraph g0, final ImmutableGraph g1 ) {\n\t\treturn g0 instanceof ArcLabelledImmutableGraph && g1 instanceof ArcLabelledImmutableGraph \n\t\t\t? union( (ArcLabelledImmutableGraph)g0, (ArcLabelledImmutableGraph)g1, (LabelMergeStrategy)null )\n\t\t\t\t\t: new UnionImmutableGraph( g0, g1 );\n\t}",
"@Test(expected = NullPointerException.class)\r\n\t\tpublic void testUnionWithNullInput() {\n\t\t\ttestingSet = new IntegerSet(null);\r\n\t\t\ttestingSet2= new IntegerSet(null); \r\n\t\t\t// union of 2 sets should result in null value \r\n\t\t\ttestingSet3= testingSet.union(testingSet, testingSet2);\r\n\t\t\t\r\n\t\t}",
"public static synchronized TreeMap union(TreeMap left, TreeMap right)\n\t throws IcofException {\n\n\tString funcName = new String(\"union(TreeMap, TreeMap)\");\n\n\tTreeMap union = new TreeMap(left);\n\n\ttry {\n\n\t union.putAll(right);\n\n\t} catch (Exception e) {\n\t IcofException ie = new IcofException(CLASS_NAME, funcName,\n\t\t IcofException.SEVERE, \"Error creating union of TreeMaps \",\n\t\t \"\");\n\t throw (ie);\n\t}\n\n\treturn union;\n }",
"private static Set<String> m23474a(Set<String> set, Set<String> set2) {\n if (set.isEmpty()) {\n return set2;\n }\n if (set2.isEmpty()) {\n return set;\n }\n HashSet hashSet = new HashSet(set.size() + set2.size());\n hashSet.addAll(set);\n hashSet.addAll(set2);\n return hashSet;\n }",
"public void union(E e1, E e2) {\n Node<E> n1 = findSet(theMap.get(e1));\n Node<E> n2 = findSet(theMap.get(e2));\n link(n1, n2);\n }",
"public static <T> void intersectionToSet1(HashSet<T> set1, HashSet<T> set2) {\n for (T element : set1) {\n if (!set2.contains(element)) {\n set1.remove(element);\n }\n }\n }",
"public SetSet setDifference(SetSet second){\n\t\tSetSet result = new SetSet();\n\t\tfor(int i=0;i<size();i++){\n\t\t\tif(second.contains(get(i))==-1){\n\t\t\t\tresult.add(get(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public void union(int rootOne, int rootTwo, Set<Integer> machines, Set<Integer> rootsLeadingToMachines) {\n\n\t\tif (rootOne == rootTwo) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (rank[rootOne] < rank[rootTwo]) {\n\t\t\tif (isMachine_or_hasRootLeadingToMachine(rootOne, machines, rootsLeadingToMachines)) {\n\t\t\t\trootsLeadingToMachines.add(rootTwo);\n\t\t\t\trootsLeadingToMachines.remove(rootOne);\n\t\t\t}\n\t\t\tparent[rootOne] = rootTwo;\n\t\t} else if (rank[rootOne] > rank[rootTwo]) {\n\t\t\tif (isMachine_or_hasRootLeadingToMachine(rootTwo, machines, rootsLeadingToMachines)) {\n\t\t\t\trootsLeadingToMachines.add(rootOne);\n\t\t\t\trootsLeadingToMachines.remove(rootTwo);\n\t\t\t}\n\t\t\tparent[rootTwo] = rootOne;\n\t\t} else {\n\t\t\tif (isMachine_or_hasRootLeadingToMachine(rootTwo, machines, rootsLeadingToMachines)) {\n\t\t\t\trootsLeadingToMachines.add(rootOne);\n\t\t\t\trootsLeadingToMachines.remove(rootTwo);\n\t\t\t}\n\t\t\tparent[rootTwo] = rootOne;\n\t\t\trank[rootOne] = rank[rootOne] + 1;\n\t\t}\n\t}",
"static void AddCollections()\n\t{\n\t\tSet<String> oSet1 = null;\n\t\tSet<String> oSet2 = null;\n\t\ttry {\n\t\t\toSet1 = new TreeSet<String>();\n\t\t\toSet1.add(\"Apple\");\n\t\t\toSet1.add(\"Boy\");\n\t\t\toSet1.add(\"Cat\");\n\t\t\tSystem.out.println(oSet1);\n\t\t\t\n\t\t\toSet2 = new TreeSet<String>();\n\t\t\toSet2.add(\"Dog\");\n\t\t\toSet2.add(\"Arrow\");\n\t\t\toSet2.add(\"Frog\");\n\t\t\tSystem.out.println(oSet2);\n\t\t\t\n\t\t\toSet1.addAll(oSet2);\n\t\t\tSystem.out.println(oSet1);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet1 = null;\n\t\t\toSet2 = null;\n\t\t}\n\t}",
"public ZYSet<ElementType> difference(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(!otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }",
"public HashSet<T> removeDups(Node root, HashSet set) {\n if(root == null) {\n return set;\n }\n if(root.getLeftChildNode() != null) {\n removeDups(root.getLeftChildNode(), set);\n }\n if(set.contains(root.getData())){\n set.add(root.getData());\n }\n if(root.getRightChildNode() != null) {\n removeDups(root.getRightChildNode(), set);\n }\n return set;\n }",
"public void union(final int valOne, final int valTwo, final boolean isRoots) {\n int i = findRoot(valOne);\n int j = findRoot(valTwo);\n id[i] = j;\n }",
"@SafeVarargs\n public static <T> Set<T> union(Set<T>... sets) {\n if (sets == null) return set();\n Set<T> result = set();\n for (Set<T> s : sets) {\n if (s != null) result.addAll(s);\n }\n return result;\n }",
"void union(int x, int y) {\n\n // **** set the modes in the parents array ****\n if (parents[x] == 0)\n parents[x] = x;\n\n if (parents[y] == 0)\n parents[y] = y;\n\n // **** update the representative element of each set ****\n if (parents[x] != 0 || parents[y] != 0) {\n\n // **** get the low and high from these nodes ****\n int high = Math.max(parents[x], parents[y]);\n int low = Math.min(parents[x], parents[y]);\n\n // ???? ????\n System.out.println(\"union <<< high: \" + high + \" low: \" + low);\n\n // **** update to point to the proper representative ****\n for (int i = 0; i < parents.length; i++) {\n if (parents[i] == high)\n parents[i] = low;\n }\n }\n }",
"@Test\n public void testUnion2IdenticalDataSets() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.get3TupleDataSet(env);\n DataSet<Tuple3<Integer, Long, String>> unionDs =\n ds.union(CollectionDataSets.get3TupleDataSet(env));\n\n List<Tuple3<Integer, Long, String>> result = unionDs.collect();\n\n String expected = FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING;\n\n compareResultAsTuples(result, expected);\n }",
"public static Set<Doc> not(Set<Doc> set1,Set<Doc> corpus) {\r\n \t\tif(set1 == null)\r\n \t\t\tset1 = new TreeSet<Doc>();\r\n \t\tTreeSet<Doc> result = new TreeSet<Doc>(corpus);\r\n \t\tresult.removeAll(set1);\r\n \t\treturn result;\r\n \t}",
"void unionTreeCoreset(int k,int n_1,int n_2,int d, Point[] setA,Point[] setB, Point[] centres, MTRandom clustererRandom) {\n\t\t//printf(\"Computing coreset...\\n\");\n\t\t//total number of points\n\t\tint n = n_1+n_2;\n\n\t\t//choose the first centre (each point has the same probability of being choosen)\n\t\t\n\t\t//stores, how many centres have been choosen yet\n\t\tint choosenPoints = 0; \n\t\t\n\t\t//only choose from the n-i points not already choosen\n\t\tint j = clustererRandom.nextInt(n-choosenPoints); \n\n\t\t//copy the choosen point\n\t\tif(j < n_1){\n\t\t\t//copyPointWithoutInit(&setA[j],¢res[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setA[j].clone();\n\t\t} else {\n\t\t\tj = j - n_1;\n\t\t\t//copyPointWithoutInit(&setB[j],¢res[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setB[j].clone();\n\t\t}\n\t\ttreeNode root = new treeNode(setA,setB,n_1,n_2, centres[choosenPoints],choosenPoints); //??\n\t\tchoosenPoints = 1;\n\t\t\n\t\t//choose the remaining points\n\t\twhile(choosenPoints < k){\n\t\t\tif(root.cost > 0.0){\n\t\t\t\ttreeNode leaf = selectNode(root, clustererRandom);\n\t\t\t\tPoint centre = chooseCentre(leaf, clustererRandom);\n\t\t\t\tsplit(leaf,centre,choosenPoints);\n\t\t\t\t//copyPointWithoutInit(centre,¢res[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = centre;\n\t\t\t} else {\n\t\t\t\t//create a dummy point\n\t\t\t\t//copyPointWithoutInit(root.centre,¢res[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = root.centre;\n\t\t\t\tint l;\n\t\t\t\tfor(l=0;l<root.centre.dimension;l++){\n\t\t\t\t\tcentres[choosenPoints].coordinates[l] = -1 * 1000000;\n\t\t\t\t}\n\t\t\t\tcentres[choosenPoints].id = -1;\n\t\t\t\tcentres[choosenPoints].weight = 0.0;\n\t\t\t\tcentres[choosenPoints].squareSum = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\tchoosenPoints++;\n\t\t}\n\n\t\t//free the tree\n\t\tfreeTree(root);\n\n\t\t//recalculate clustering features\n\t\tint i;\n\t\tfor(i=0;i<n;i++){\n\t\t\t\t\n\t\t\tif(i < n_1) {\n\t\t\t\t\n\t\t\t\tint index = setA[i].centreIndex;\n\t\t\t\tif(centres[index].id != setA[i].id){\n\t\t\t\t\tcentres[index].weight += setA[i].weight;\n\t\t\t\t\tcentres[index].squareSum += setA[i].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setA[i].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setA[i].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tint index = setB[i-n_1].centreIndex;\n\t\t\t\tif(centres[index].id != setB[i-n_1].id){\n\t\t\t\t\tcentres[index].weight += setB[i-n_1].weight;\n\t\t\t\t\tcentres[index].squareSum += setB[i-n_1].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setB[i-n_1].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setB[i-n_1].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void union(int [] parent, int x, int y)\n\t\t{\n\t\t\tint x_set_parent = find(parent, x);\n\t\t\tint y_set_parent = find(parent, y);\n\t\t\tparent[y_set_parent] = x_set_parent;\n\t\t}",
"public boolean inSameSet( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If here, then have non-null root for each input; check if same Node.\n return root1 == root2;\n }",
"public static void main(String[] args) {\r\n\t\tHashSet h1=new HashSet();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\th1.add(3);\r\n\t\th1.add(7); //Homogeous \r\n\t\th1.add(9);//hetrogeous\r\n\t\th1.add(10);\r\n\t\t\r\n\t\tTreeSet t1=new TreeSet(h1);\r\n\t\tt1.add(100);\r\n\t\tSystem.out.println(t1);\r\n\t}",
"private static HashSet<Annotation> setDifference(HashSet<Annotation> setA,\r\n\t\t\tHashSet<Annotation> setB) {\r\n\r\n\t\tHashSet<Annotation> tmp = new HashSet<Annotation>(setA);\r\n\t\ttmp.removeAll(setB);\r\n\t\treturn tmp;\r\n\t}",
"public void queryTaskUnionSet1() {\r\n\t\t// task 1\r\n\t\tTask task1 = new Task();\r\n\t\ttask1.setName(\"DEFECTS\");\r\n\t\ttask1.setDisplayName(\"Defects\");\r\n\t\ttask1.setDescription(\"User story to address product defects\");\r\n\t\ttask1 = (Task) aggregateService.create(task1, new Settings());\t\r\n\r\n\t\t// task 2\r\n\t\tTask task2 = new Task();\r\n\t\ttask2.setName(\"FIX_DEFECTS\");\r\n\t\ttask2.setDisplayName(\"Fix defects\");\r\n\t\ttask2.setDescription(\"Task to track the defect fixing effort\");\r\n\t\ttask2 = (Task) aggregateService.create(task2, new Settings());\r\n\r\n\t\t// task 3\r\n\t\tTask task3 = new Task();\r\n\t\ttask3.setName(\"PRIORITIZE_DEFECTS\");\r\n\t\ttask3.setDisplayName(\"Prioritize defects\");\r\n\t\ttask3.setDescription(\"Based upon the effort required for the defects prioritize them\");\r\n\t\ttask3 = (Task) aggregateService.create(task3, new Settings());\r\n\r\n\t\ttask1 = (Task) aggregateService.read(task1, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setParam(\"name1\", \"FIX_DEFECTS\");\r\n\t\tsettings.setParam(\"name2\", \"PRIORITIZE_DEFECTS\");\r\n\t\tsettings.setView(aggregateService.getView(\"TASKUNIONSET\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(new Task(), settings);\r\n\r\n\t\tassert(toList.size() == 2);\r\n\r\n\t\tObject obj1 = toList.get(0);\r\n\t\tObject obj2 = toList.get(1);\r\n\r\n\t\tassert(Task.class.isAssignableFrom(obj1.getClass()));\r\n\t\tassert(Task.class.isAssignableFrom(obj2.getClass()));\r\n\t\t\r\n\t\tTask t1 = (Task) obj1;\r\n\t\tTask t2 = (Task) obj2;\t\t\r\n\t\t\r\n\t\tassert( (t1.getName().equals(\"FIX_DEFECTS\") && t2.getName().equals(\"PRIORITIZE_DEFECTS\")) ||\r\n\t\t\t\t(t2.getName().equals(\"FIX_DEFECTS\") && t1.getName().equals(\"PRIORITIZE_DEFECTS\")) );\r\n\t}",
"@Test\n\tpublic void testRemoveAll() {\n\t\tSet<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t\tSet<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t\tsetA.removeAll(setB);\n\t\tSet<Integer> union = new HashSet<>(Arrays.asList(1, 2));\n\t\tassertEquals(setA, union);\n\t}",
"public static void main(String[] args)\n {\n // Laver et sæt til set1\n Set<Integer> set1 = new HashSet<Integer>();\n\n // Tilføjer til set1\n set1.add(1);\n set1.add(4);\n set1.add(7);\n set1.add(9);\n\n // Laver et sæt til set2\n Set<Integer> set2 = new HashSet<Integer>();\n\n // Tilføjer til set2\n set2.add(2);\n set2.add(4);\n set2.add(5);\n set2.add(6);\n set2.add(7);\n\n // Printer listerne ud\n System.out.println(\"Første set er: \" + set1);\n System.out.println(\"Andet set er: \" + set2);\n\n // laver et sæt som ligner metoden nedenfor\n Set<Integer> sysmetriskSet = symmetricSetDifference(set1,set2);\n\n // Printer listen ud symetrisk\n System.out.println(\"Sysmetrisk sammen er det således: \" + sysmetriskSet);\n }",
"public void queryTaskUnionSet2() {\r\n\t\t// task 1\r\n\t\tTask task1 = new Task();\r\n\t\ttask1.setName(\"DEFECTS\");\r\n\t\ttask1.setDisplayName(\"Defects\");\r\n\t\ttask1.setDescription(\"User story to address product defects\");\r\n\t\t\r\n\t\tTask d1 = new Task();\r\n\t\td1.setName(\"DEFECT 1\");\r\n\t\td1.setDisplayName(\"Defect 1\");\r\n\t\td1.setDescription(\"First defect\");\r\n\t\tTask d2 = new Task();\r\n\t\td2.setName(\"DEFECT 2\");\r\n\t\td2.setDisplayName(\"Defect 2\");\r\n\t\td2.setDescription(\"Second defect\");\r\n\t\tSet<Task> c = new HashSet<Task>();\r\n\t\tc.add(d1);\r\n\t\tc.add(d2);\r\n\t\ttask1.setTaskChildren(c);\r\n\t\ttask1 = (Task) aggregateService.create(task1, new Settings());\r\n\r\n\t\t\tSystem.out.println(\"Name: \" + task1.getName() + \", Id: \" + task1.getId());\r\n\r\n\t\t// task 2\r\n\t\tTask task2 = new Task();\r\n\t\ttask2.setName(\"FIX_DEFECTS\");\r\n\t\ttask2.setDisplayName(\"Fix defects\");\r\n\t\ttask2.setDescription(\"Task to track the defect fixing effort\");\r\n\t\ttask2 = (Task) aggregateService.create(task2, new Settings());\r\n\r\n\t\t// task 3\r\n\t\tTask task3 = new Task();\r\n\t\ttask3.setName(\"PRIORITIZE_DEFECTS\");\r\n\t\ttask3.setDisplayName(\"Prioritize defects\");\r\n\t\ttask3.setDescription(\"Based upon the effort required for the defects prioritize them\");\r\n\t\ttask3 = (Task) aggregateService.create(task3, new Settings());\r\n\r\n\t\ttask1 = (Task) aggregateService.read(task1, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setParam(\"name1\", \"DEFECTS\");\r\n\t\tsettings.setParam(\"name2\", \"PRIORITIZE_DEFECTS\");\r\n\t\tsettings.setParam(\"name3\", \"FIX_DEFECTS\");\r\n\t\tsettings.addFunction(FunctionHandler.NE, \"name\", \"name3\");\r\n\t\tsettings.addFunction(FunctionType.ASC, \"name\");\r\n\t\tsettings.setView(aggregateService.getView(\"TASKUNIONSET\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(new Task(), settings);\r\n\r\n\t\tSystem.out.println(\"SIZE : \" + toList.size());\r\n\t\tfor(Object o: toList) {\r\n\t\t\tTask t = (Task) o;\r\n\t\t\tSystem.out.println(\"Name: \" + t.getName() + \", Id: \" + t.getId());\r\n\t\t}\r\n\t\tassert(toList.size() == 2);\r\n\r\n\t\tObject obj1 = toList.get(0);\r\n\t\tObject obj2 = toList.get(1);\r\n\r\n\t\tassert(Task.class.isAssignableFrom(obj1.getClass()));\r\n\t\tassert(Task.class.isAssignableFrom(obj2.getClass()));\r\n\t\t\r\n\t\tTask t1 = (Task) obj1;\r\n\t\tTask t2 = (Task) obj2;\r\n\r\n\t\tassert ((t1.getName().equals(\"DEFECTS\") && t2.getName().equals(\"PRIORITIZE_DEFECTS\")) ||\r\n\t\t\t(t2.getName().equals(\"DEFECTS\") && t1.getName().equals(\"PRIORITIZE_DEFECTS\")));\r\n\r\n\t\tTask d = t1.getName().equals(\"DEFECTS\") ? t1 : t2;\r\n\t\tassert (d.getTaskChildren() != null && d.getTaskChildren().size() == 2);\r\n\r\n//\t\tSystem.out.println(\"Task 1: \" + t1.getName() + \", Task 2: \" + t2.getName());\r\n//\t\tassert (t1.getName().equals(\"DEFECTS\") && t2.getName().equals(\"DEFECT 1\"));\r\n//\t\tassert(t1.getTaskChildren() != null && t1.getTaskChildren().size() == 2);\r\n\t}",
"@Override\n public SetI union(SetI other) {\n Set o;\n\n if (!(other instanceof Set)) {\n // Different Set impl. Convertion needed.\n // Will impact performance.\n o = Set.fromAnotherImpl(other);\n }\n else {\n o = (Set) other;\n }\n\n int[] newArr = new int[count + o.count];\n int i = 0, j = 0, k = 0;\n\n // Merge sorted arrays.\n while (i < count && j < o.count) {\n // Skip duplicated elements.\n if (contains(o.arr[j])) {\n ++j;\n }\n else if (arr[i] < o.arr[j]) {\n newArr[k++] = arr[i++];\n }\n else {\n newArr[k++] = o.arr[j++];\n }\n }\n\n while (i < count) {\n newArr[k++] = arr[i++];\n }\n\n while (j < o.count) {\n // Skip duplicated elements.\n if (!contains(o.arr[j])) {\n newArr[k++] = o.arr[j];\n }\n ++j;\n }\n\n return new Set(newArr, k);\n }",
"public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }",
"public void union(int i, int j) {\n\tint p = findRoot(i);\n\tint q = findRoot(j);\n\t\n\tif (p == q) return;\n\t\n\tif (size[p] < size[q]) { //pick the smallest tree and append it to the bigger tree\n\t root[p] = q;\n\t size[p] += size[q];\n\t} else {\n\t root[q] = p;\n\t size[q] += size[p];\n\t}\n }",
"@Test\n\tpublic void testUnionSLLSetArrayAll0() {\n\n\t\tint[] arr1 = { 0, 0, 0 };\n\t\tint[] arr2 = { 0, 0, 0, 0 };\n\t\tint[] arr3 = { 0, 0 };\n\t\tint[] arr4 = { 0, 0 };\n\t\tSLLSet listObj100 = new SLLSet(arr1);\n\t\tSLLSet listObj99 = new SLLSet(arr2);\n\t\tSLLSet listObj98 = new SLLSet(arr3);\n\t\tSLLSet listObj97 = new SLLSet(arr4);\n\t\tSLLSet listObj96 = new SLLSet();\n\t\tSLLSet[] Array = { listObj100, listObj99, listObj98, listObj97, listObj96 }; // test static SLLSet union(sArray)\n\n\t\tSLLSet listObj23 = SLLSet.union(Array);\n\n\t\tString expected = \"0\";\n\t\tint expectedSize = 1;\n\n\t\tassertEquals(expectedSize, listObj23.getSize());\n\t\tassertEquals(expected, listObj23.toString());\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static String[] union(String[] t1, String[] t2) {\n \tSet<String> set = new HashSet<String>();\n \tfor(String t : t1) set.add(t);\n \tfor(String t : t2) set.add(t);\n \treturn set.toArray(new String[]{});\n }",
"public ZYSet<ElementType> intersection(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }",
"public void disjointSetMethod(Graph g)\n\t{\n\t\tsets = new DisjointSets(g.getNumNodes());\n\t\tsetup(g.getNumNodes());\n\t\tsets.print();\n\t\t\n\t}",
"public static Set symmetricDifference(Set a, Set b){\n\t\tSet aMinusB = a.difference(b);\n\t\tSet bMinusA = b.difference(b);\n\t\treturn aMinusB.union(bMinusA);\n\t}",
"public void union(int i, int j) {\n\n int root1 = find(i);\n int root2 = find(j);\n\n if (root2 == root1)\n return;\n\n if (_rank[root1] > _rank[root2]) {\n _parent[root2] = root1;\n } else if (_rank[root2] > _rank[root1]) {\n _parent[root1] = root2;\n } else {\n _parent[root2] = root1;\n _rank[root1]++;\n }\n }",
"@Override\n public SetInterface<T> symmDifference(SetInterface<T> rhs) {\n return this.difference(rhs).union(rhs.difference(this));\n }",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tTreeSet<String> ts = new TreeSet<String>();\n\t\tts.add(\"D\");\n\t\tts.add(\"B\");\n\t\tts.add(\"E\");\n\t\tts.add(\"A\");\n\t\tts.add(\"C\");\n\t\tts.add(\"B\");\t\t//duplicates are not stored\n\t\tts.add(null);\n\t\tSystem.out.println(\"Elements of TreeSet:\\n\" + ts);\n\t\t\n\t\tSortedSet<String> ts2 = new TreeSet<String>();\t//SortedSet is an interface\n\t\tts2 = ts.subSet(\"B\", \"D\");\n\t\tSystem.out.println(ts2);\n\t\t\n\t\tts2 = ts.subSet(\"B\", false, \"E\", true);\n\t\tSystem.out.println(ts2);\n\t}",
"void setDisjoint(DisjointSet disjoint);",
"public static void main(String[] args) {\n\t\tArraySet as = new ArraySet(10);\n\t\tArraySet as2 = new ArraySet();\n\n\t\t//Testing add method\n\t\tas.add(1);\n\t\tas.add(2);\n\t\tas.add(3);\n\t\tas.add(6);\n\t\tas.add(5);\n\t\tas.add(23);\n\n\t\tas2.add(2);\n\t\tas2.add(3);\n\n\t\t//Testing size method\n\t\tSystem.out.println(\"Size of as: \" + as.size() + \"\\nSize of as2: \" + as2.size());\n\n\t\t//Testing contains method\n\t\tSystem.out.println(\"as contains 2: \" + as.contains(2) + \"\\nas2 contains 5: \" + as2.contains(5));\n\n\t\t//Testing addall method\n\t\tas.addAll(as2);\n\t\tas2.addAll(as);\n\t\tSystem.out.println(\"Testing addall on as : \" + as.toString() +\"\\nTesting addall on as2: \" + as2.toString());\n\n\t\t//Testing remove method\n\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Testing remove 5 on as: \" + as.remove(5));\n\t\t\tSystem.out.println(\"Testing remove 33 on as2: \" + as2.remove(12));\n\n\t\t} catch (NoSuchElementException name) {\n\t\t\tSystem.out.println(\"NoSuchElementException: \" + name.getMessage());\n\t\t}\n\n\t\t//Testing removeRandom method\n\t\tSystem.out.println(\"Testing removeRandom on as: \" + as.removeRandom());\n\n\t\t//Testing union method\n\t\tas.add(7);\n\t\tas.add(56);\n\n\t\tas2.add(45);\n\t\tas2.add(8);\n\t\tSystem.out.println(\"Testing union method on as: \" + as.union(as2));\n\n\t\t//Testing equals method\n\t\tSystem.out.println(\"Testing equals method: \" + as.equals(as2));\n\t\tSystem.out.println(\"as to string: \" + as.toString());\n\t\tSystem.out.println(\"as2 tostring: \" + as2.toString());\n\t\tas.addAll(as2);\n\t\tas2.addAll(as);\n\t\tSystem.out.println(\"as to string: \" + as.toString());\n\t\tSystem.out.println(\"as2 tostring: \" + as2.toString());\n\n\n\t\tSystem.out.println(\"Testing equals method: \" + as2.equals(as));\n\n\t\t//Testing difference method\n\t\tas2.remove(6);\n\t\tSystem.out.println(\"Testing difference method: \" + as.difference(as2));\n\n\t}",
"void Union(int parent[], int x, int y){ \n int xset = find(parent, x); \n int yset = find(parent, y); \n parent[xset] = yset; \n }",
"public void mergeDisjoint(UFPartition<T> p2){\r\n\t\tp2 = p2.clone();\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tassert !nodes.containsKey(n.getE());\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tNode<T> newNode = getNode(n.getE());\r\n\t\t\tNode<T> newNodeRoot = getNode(n.getRoot().getE());\r\n\t\t\tnewNode.setParent(newNodeRoot);\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\t\r\n\t}",
"public void union(String p, String q) {\n if(p.equals(q)) return;\n String rootP = findRoot(p);\n String rootQ = findRoot(q);\n // skip if both users are already part of the same tree.\n if(rootP.equals(rootQ)) return;\n\n int newHeight = treesHeight.get(rootP) + treesHeight.get(rootQ);\n // Keep track of the highest tree.\n highestHeight = Math.max(highestHeight, newHeight);\n\n if (treesHeight.get(rootP) > treesHeight.get(rootQ)) {\n usersMap.put(rootQ, rootP);\n treesHeight.put(rootP, newHeight);\n }\n else {\n usersMap.put(rootP, rootQ);\n treesHeight.put(rootQ, newHeight);\n }\n }",
"public static <T> Set<T> diff(final Set<T> a, final Set<T> b) {\n return new Set<T>() {\n public boolean has(final T n) {\n return a.has(n) && ! b.has(n);\n }\n };\n }",
"public void union(Shape s);",
"@Test\r\n public void testCreateUnion_thisIsEmpty() {\r\n Tour tourA = new Tour();\r\n Tour tourB = new Tour(new int[][]{{12, 12}});\r\n Tour result = tourA.createUnion(tourB);\r\n Tour expected = new Tour(new int[][]{{12, 12}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }",
"public void union(int v1, int v2, int[] parent) {\n\t\tint parentV1 = findParent(parent, v1); // 4\n\t\tint parentV2 = findParent(parent, v2); // 6\n\n\t\t// 2. kya disjoint hai dono/ parent/leader different hai?\n\t\tif (parentV1 != parentV2) {\n\t\t\t// Ab tum union kr sakte ho\n\t\t\t// parent[v1] = v2;\n\t\t\t// parent[4] = 6\n\t\t\tparent[parentV1] = parentV2;\n\t\t}\n\t}",
"public boolean union(int x, int y) {\n int xParent = findParent(x);\r\n int yParent = findParent(y);\r\n \r\n //if x and y's parent are same, return false\r\n if(xParent == yParent) return false;\r\n \r\n // if xParent has higher rank then\r\n //yParent's parent will be xParent\r\n else if(rank[xParent] > rank[yParent]) {\r\n parent[yParent] = xParent;\r\n }\r\n //and vice versa here\r\n else if(rank[yParent] > rank[xParent]) {\r\n parent[xParent] = yParent;\r\n }\r\n // if x and y's parent are different but have same rank\r\n else {\r\n //make any one of them the parent of the other \r\n //and increase it's rank\r\n parent[xParent] = yParent;\r\n rank[yParent]++;\r\n }\r\n \r\n return true;\r\n }",
"public static Group union(Group group1, Group group2) throws MPJException {\n if ((group1 == null) && (group1 == null)) {\n return (null);\n } else if (group1 == null) {\n Group uGroup = new Group();\n uGroup.table = new Vector<IbisIdentifier>(group2.table);\n\n return (uGroup);\n } else if (group2 == null) {\n Group uGroup = new Group();\n uGroup.table = new Vector<IbisIdentifier>(group1.table);\n\n return (uGroup);\n } else {\n Group uGroup = new Group();\n uGroup.table = new Vector<IbisIdentifier>(group1.table);\n\n for (int i = 0; i < group2.size(); i++) {\n boolean check = false;\n IbisIdentifier a = group2.table.elementAt(i);\n for (int j = 0; j < group1.size(); j++) {\n IbisIdentifier b = group1.table.elementAt(j);\n\n if (a.equals(b)) {\n check = true;\n break;\n }\n }\n if (!check) {\n uGroup.addId(a);\n }\n }\n return (uGroup);\n }\n\n }",
"private TreeSet<Integer> getNeightborSets(DisjointSets<Pixel> ds, int root)\n {\n return null; //TODO: remove and replace this line\n }",
"public static Collection<Character> union(String string1, String string2){\n\t\tCollection<Character> mergedVector = new TreeSet<Character>();\n\t\tmergedVector.addAll(stringToCharacterSet(string1));\n\t\tmergedVector.addAll(stringToCharacterSet(string2));\n\t\treturn uniqueCharacters(mergedVector);\n\t}",
"private Set<String> intersection(Set<String> s1, Set<String> s2) {\n Set<String> intersection = new HashSet<>(s1);\n intersection.retainAll(s2);\n return intersection;\n }",
"@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //Declare return SetInterface\n SetInterface<T> answer = new ArraySet();\n //Add the items from the calling ArraySet to the return Set\n for (int i = 0; i < this.numItems; i++){\n answer.addItem(arr[i]);\n }\n //Convert the other set to an array in case it isnt and to \n //ease iteration\n T[] other = rhs.toArray();\n //Add the items from RHS to return Set\n for (int j = 0; j < rhs.getSize(); j++){\n answer.addItem(other[j]);\n }\n //Return the answer\n return answer; \n }",
"public static ArrayList<ArrayList<String>> unionD(String table1Name, String table2Name){\n\t\tArrayList<ArrayList<String>> union = new ArrayList<ArrayList<String>>();\r\n\t\t//these will hold the data from the input tables\r\n\t\tArrayList<ArrayList<String>> columns1 = new ArrayList<ArrayList<String>>();\r\n\t\tArrayList<ArrayList<String>> columns2 = new ArrayList<ArrayList<String>>();\r\n\t\t//find the input tables in the database list\r\n\t\tfor (int i = 0; i < tables.size(); i++) {\r\n\t\t\tif (tables.get(i).getName().equals(table1Name)) {\r\n\t\t\t\tcolumns1 = new ArrayList<ArrayList<String>>(tables.get(i).datas);\r\n\t\t\t}\r\n\t\t\tif (tables.get(i).getName().equals(table2Name)) {\r\n\t\t\t\tcolumns2 = new ArrayList<ArrayList<String>>(tables.get(i).datas);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check if the tables are union compatable\r\n\t\tif (columns1.size() != columns2.size()) {\r\n\t\t\tSystem.out.println(\"Unable to perform union - unnequal number of columns.\");\r\n\t\t}\r\n\t\telse {\t//only continue if they are union compatable\r\n\t\t\t//true if all columns have the same type\r\n\t\t\tint sameTypes = 1;\r\n\t\t\tint type1 = 0;\r\n\t\t\tint type2 = 0;\r\n\t\t\t//a max char value of -1 indicates the type is integer\r\n\t\t\tfor (int j = 0; j < columns1.size(); j++) {\r\n\t\t\t\ttype1 = Integer.valueOf(new String(columns1.get(j).get(1)));\r\n\t\t\t\ttype2 = Integer.valueOf(columns2.get(j).get(1));\r\n\t\t\t\tif (type1 > 0) { type1 = 1; }\r\n\t\t\t\telse if (type1 < 0) { type1 = -1; }\r\n\t\t\t\tif (type2 > 0) { type2 = 1; }\r\n\t\t\t\telse if (type2 < 0) { type2 = -1; }\r\n\t\t\t\t//if the types were not equal, don't continue\r\n\t\t\t\tif (type1 != type2) {\r\n\t\t\t\t\tSystem.out.println(\"Unable to perform union - incompatible types.\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\t//continue if the types are equal\r\n\t\t\t\t\t\t//create new columns holding the name from the first table and the greatest char max\r\n\t\t\t\t\tArrayList<String> newColumn = new ArrayList<String>();\r\n\t\t\t\t\tint largestChar = 0;\r\n\t\t\t\t\tif (type1 != -1) {\t//if they aren't integers\r\n\t\t\t\t\t\t//find the largest max char value\r\n\t\t\t\t\t\tif (Integer.parseInt(columns1.get(j).get(1)) >= Integer.parseInt(columns2.get(j).get(1))) {\r\n\t\t\t\t\t\t\tlargestChar = Integer.parseInt(new String(columns1.get(j).get(1)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse { \r\n\t\t\t\t\t\t\tlargestChar = Integer.parseInt(columns2.get(j).get(1)); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//keep the type as integer\r\n\t\t\t\t\telse { \r\n\t\t\t\t\t\tlargestChar = -1; \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t//use the name from the first table and largest char max\r\n\t\t\t\t\tnewColumn.add(new String(columns1.get(j).get(0)));\r\n\t\t\t\t\tnewColumn.add(String.valueOf(largestChar));\r\n\t\t\t\t\tunion.add(newColumn);\r\n\t\t\t\t\t//check if there are equal rows to avoid duplicates\r\n\t\t\t\t\tint colCount = 0;\r\n\t\t\t\t\tfor (int n = 2; n < columns1.get(colCount).size(); n++) {\t//for each row in table1\r\n\t\t\t\t\t\tunion.get(j).add(new String(columns1.get(j).get(n)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\t\t\tfor(int t = 2; t<columns2.get(0).size(); t++){\t//column2 row\r\n\t\t\t\tboolean completeUniqe = true;\r\n\t\t\t\tfor(int p = 2; p < union.get(0).size(); p++){// rows of union\r\n\t\t\t\t\tint sameCount = 0;\r\n\t\t\t\t\tfor(int u = 0; u<union.size(); u++){//columns of union\r\n\t\t\t\t\t\tif(columns2.get(u).get(t).equals(union.get(u).get(p))){\r\n\t\t\t\t\t\t\tsameCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(sameCount);\r\n\t\t\t\t\tif(sameCount == union.size()){\r\n\t\t\t\t\t\tcompleteUniqe = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(completeUniqe){\r\n\t\t\t\t\tfor(int u = 0; u<union.size(); u++){//columns of union\r\n\t\t\t\t\t\tunion.get(u).add(new String(columns2.get(u).get(t)));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn union;\r\n\t}",
"public DisjointSet() {}",
"public static void main(String[] args) {\n\t\tSet<String> guys = Set.of(\"Tom\", \"Dick\", \"Harry\");\n\t\tSet<String> stooges = Set.of(\"Larry\", \"Moe\", \"Curly\");\n\t\tSet<String> aflCio = union(guys, stooges);\n\t\tSystem.out.println(aflCio);\n\t}",
"public static void main(String[] args) {\n\t\tTreeSet<String> myset=new TreeSet<String>();\r\n\t\t myset.add(\"ardra\");\r\n\t\t myset.add(\"anakha\");\r\n\t\t myset.add(\"anusha\");\r\n\t\t myset.add(\"ananya\");\r\n\t\t \r\n\t\t \r\n\t\t TreeSet<String> myset1=new TreeSet<String>();\r\n\t\t myset1=(TreeSet<String>) myset.clone();\r\n\t\t System.out.println(myset1);\r\n\t\t \r\n\r\n\t}",
"Boolean same(MultiSet<X> s);",
"public TreeNode mergeTrees(TreeNode t1, TreeNode t2){\r\n if( t1==null )\r\n return t2;\r\n if( t2==null )\r\n return t1;\r\n t1.value += t2.value;\r\n t1.left = mergeTrees(t1.left, t2.left);\r\n t2.right = mergeTrees(t1.right, t2.right);\r\n return t1;\r\n }",
"public org.w3c.dom.NodeList union(org.w3c.dom.NodeList list1, org.w3c.dom.NodeList list2)throws Exception{\n\t return super.execute(list1, list2, op);\n }",
"public static boolean isEqualSet(Collection set1, Collection set2) {\n/* 99 */ if (set1 == set2) {\n/* 100 */ return true;\n/* */ }\n/* 102 */ if (set1 == null || set2 == null || set1.size() != set2.size()) {\n/* 103 */ return false;\n/* */ }\n/* */ \n/* 106 */ return set1.containsAll(set2);\n/* */ }"
]
| [
"0.72132295",
"0.7207892",
"0.69132835",
"0.6887533",
"0.6689672",
"0.66300493",
"0.65516365",
"0.6535653",
"0.65267366",
"0.6516833",
"0.6516574",
"0.6508973",
"0.6492867",
"0.6487883",
"0.64484143",
"0.63722026",
"0.6368811",
"0.63660526",
"0.6322291",
"0.62812567",
"0.62313104",
"0.622089",
"0.61547506",
"0.6154243",
"0.61511856",
"0.61441773",
"0.61036974",
"0.6085922",
"0.6077403",
"0.5999359",
"0.59492123",
"0.5940013",
"0.5917891",
"0.5909718",
"0.5884064",
"0.5807384",
"0.5802999",
"0.5786094",
"0.5755067",
"0.5745827",
"0.57443196",
"0.5741127",
"0.57392555",
"0.57005316",
"0.56891394",
"0.56612015",
"0.5653836",
"0.5648589",
"0.56047815",
"0.56024486",
"0.5591916",
"0.5583355",
"0.5567214",
"0.55568945",
"0.5554023",
"0.5545146",
"0.554399",
"0.5541004",
"0.5533739",
"0.5530183",
"0.55252",
"0.55047673",
"0.54966855",
"0.54750395",
"0.5447075",
"0.54447967",
"0.54000056",
"0.53968394",
"0.53597194",
"0.5347468",
"0.5325169",
"0.53240013",
"0.5305389",
"0.52920365",
"0.52850693",
"0.5278001",
"0.52754146",
"0.5274523",
"0.52511495",
"0.52486944",
"0.5246681",
"0.5242799",
"0.5231898",
"0.5219342",
"0.5214111",
"0.52113837",
"0.5209527",
"0.52018774",
"0.51955783",
"0.51930416",
"0.5192186",
"0.5177712",
"0.51772463",
"0.5171483",
"0.51662385",
"0.51642823",
"0.5164138",
"0.51365304",
"0.51293695",
"0.51156425"
]
| 0.68228596 | 4 |
This configuration tuning is custom. You can tune every option, you may tune some of them, or you can create default configuration by ImageLoaderConfiguration.createDefault(this); method. | private static void initImageLoader(Context context) {
ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context);
config.threadPriority(Thread.NORM_PRIORITY - 2);
config.denyCacheImageMultipleSizesInMemory();
config.diskCacheFileNameGenerator(new Md5FileNameGenerator());
config.diskCacheSize(50 * 1024 * 1024); // 50 MiB
config.tasksProcessingOrder(QueueProcessingType.LIFO);
config.writeDebugLogs(); // Remove for release app
// Initialize ImageLoader with configuration.
ImageLoader.getInstance().init(config.build());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void tuningInit() {\n\n }",
"public void customConfig() {\n KConfig kConfig = new KConfig.KConfigBuilder()\n .heapRatio(85.0f) //heap occupied ration in percent, 85.0f means use 85% memory of max heap\n .rootDir(this.getCacheDir().getAbsolutePath()) //root dir stores report and hprof files\n .heapOverTimes(3) //heap max times of over heap's used threshold\n .build();\n KOOM.getInstance().setKConfig(kConfig);\n }",
"public abstract Builder setImageProcessingOptions(ImageProcessingOptions value);",
"public Configuration() {\r\n\t\t\tmaxEffectiveWorker = (Runtime.getRuntime().availableProcessors()*3/2) + 2;\r\n\t\t\tmaxPhysicalWorker = Math.max(32, (maxEffectiveWorker * 2) + 2);\r\n\t\t}",
"@Override\n public void configure(Configuration conf) {\n this.convergenceRate = conf.getDouble(\"ConvergenceRate\");\n\n }",
"public APIConfig() {\r\n starvation = 5;\r\n moveGeneration = 30;\r\n huntingSites = 3;\r\n populationSize = 20;\r\n maxIterations = 300;\r\n minAcceptableError = 0;\r\n gradientWeight = 0.0;\r\n debugOn = false;\r\n }",
"public void configure(Configuration config) {\r\n learner = config.get(\"classifier\");\r\n if(learner == null)\r\n throw new IllegalArgumentException(\"No weka classifier specified. Make sure a 'classifier' property is specified.\");\r\n classifier = classifiers.get(learner);\r\n if(classifier == null)\r\n throw new IllegalArgumentException(\"Invalid weka classifier name of '\"+learner+\"' - must be one of \"+ArrayUtil.asString(classifiers.getValidNames()));\r\n\r\n super.configure(config);\r\n\r\n logger.config(\" \"+this.getClass().getName()+\"[\"+getName()+\"] configure: weka-classifier[\"+learner+\"]=\"+classifier);\r\n\r\n if(config.containsKey(\"options\"))\r\n {\r\n try\r\n {\r\n classifier.setOptions(config.get(\"options\").split(\" \"));\r\n }\r\n catch(Exception ex)\r\n {\r\n throw new RuntimeException(\"Failed to initialize \"+this.getClass().getName(),ex);\r\n }\r\n }\r\n }",
"@Override\n public Sampler<?> apply(ConfigurationAdapter conf) {\n Map<String, String> items = new HashMap<String, String>();\n items.put(ProbabilitySampler.SAMPLER_FRACTION_CONF_KEY,\n conf.get(QueryServices.TRACING_PROBABILITY_THRESHOLD_ATTRIB, Double.toString(QueryServicesOptions.DEFAULT_TRACING_PROBABILITY_THRESHOLD)));\n return new ProbabilitySampler(HTraceConfiguration.fromMap(items));\n }",
"public Config() {\n\t\tlambda = 5.0;\n\t\tnu = 1.3;\n\t\tlimit = 0.0001;\n\t\titerationLimit = 0;\n\t }",
"private void addConfigParamsFromConfig(\n final OkHttpClient.Builder builder,\n final GenieNetworkConfiguration genieNetworkConfiguration\n ) {\n if (genieNetworkConfiguration.getConnectTimeout() != GenieNetworkConfiguration.DEFAULT_TIMEOUT) {\n builder.connectTimeout(genieNetworkConfiguration.getConnectTimeout(), TimeUnit.MILLISECONDS);\n }\n\n if (genieNetworkConfiguration.getReadTimeout() != GenieNetworkConfiguration.DEFAULT_TIMEOUT) {\n builder.readTimeout(genieNetworkConfiguration.getReadTimeout(), TimeUnit.MILLISECONDS);\n }\n\n if (genieNetworkConfiguration.getWriteTimeout() != GenieNetworkConfiguration.DEFAULT_TIMEOUT) {\n builder.writeTimeout(genieNetworkConfiguration.getWriteTimeout(), TimeUnit.MILLISECONDS);\n }\n\n builder.retryOnConnectionFailure(genieNetworkConfiguration.isRetryOnConnectionFailure());\n }",
"@Override\n public void applyOptions(Context context, GlideBuilder builder) {\n builder.setDecodeFormat(DecodeFormat.PREFER_RGB_565);\n builder.setDiskCache(new DiskLruCacheFactory(Environment.getExternalStorageDirectory()\n .getAbsolutePath(), \"jake/cache/.image\", DISK_CACHE_SIZE));\n // builder.setDiskCache(new DiskLruCacheFactory(\n // Environment.getExternalStorageDirectory().getAbsolutePath(),\"jake/cache/.image\",DISK_CACHE_SIZE));\n // builder.setDiskCacheService(new FifoPriorityThreadPoolExecutor(10));\n // builder.setResizeService(new FifoPriorityThreadPoolExecutor(3));\n }",
"public E4KTunerConfiguration()\n\t{\n\t\tthis( \"Default\" );\n\t}",
"public void setDefaultSettings()\n {\n this.IndexerEffort = 0;\n this.indexZIPFiles = true;\n this.thumbnailsMatrix = \"64\";\n this.SaveThumbnails = false;\n }",
"private void setDefaultConfiguration(){\n\t\tthis.setProperty(\"DefaultNodeCapacity\", \"5\");\n\t\tthis.setProperty(\"ReplicaNumber\", \"3\");\n\t\tthis.setProperty(\"JobReattemptTimes\", \"2\");\n\t\tthis.setProperty(\"ReducerCount\", \"3\");\n\t}",
"@Override\n public void tuningPeriodic() {\n\n }",
"private void initImageLoader() {\n ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(this);\n config.threadPriority(Thread.NORM_PRIORITY - 2);\n config.denyCacheImageMultipleSizesInMemory();\n config.diskCacheFileNameGenerator(new Md5FileNameGenerator());\n config.diskCacheSize(50 * 1024 * 1024); // 50 MiB\n config.tasksProcessingOrder(QueueProcessingType.LIFO);\n // Initialize ImageLoader with configuration.\n ImageLoader.getInstance().init(config.build());\n }",
"private void configurePhotoLoaders() {\n String themePhotosUrl = null;\n String myPhotosUrl = null;\n String friendPhotosUrl = null;\n\n if (mTheme != null) {\n themePhotosUrl = String.format(Endpoints.THEME_PHOTO_LIST, mTheme.id);\n\n if (!isAuthenticating() && mPhotoUser != null) {\n myPhotosUrl = String.format(Endpoints.USER_THEME_PHOTO_LIST, Endpoints.ME_ID,\n mTheme.id);\n\n friendPhotosUrl = String.format(Endpoints.FRIENDS_PHOTO_LIST, Endpoints.ME_ID,\n mTheme.id);\n }\n }\n\n mThemePhotosLoader = restartLoader(mLoaderMgr, THEME_PHOTOS_ID, mThemePhotosLoader,\n new PhotoCallbacks(THEME_PHOTOS_ID, mThemePhotos), themePhotosUrl);\n mMyPhotosLoader = restartLoader(mLoaderMgr, MY_PHOTOS_ID, mMyPhotosLoader,\n new PhotoCallbacks(MY_PHOTOS_ID, mMyPhotos), myPhotosUrl);\n mFriendPhotosLoader = restartLoader(mLoaderMgr, FRIEND_PHOTOS_ID, mFriendPhotosLoader,\n new PhotoCallbacks(FRIEND_PHOTOS_ID, mFriendPhotos), friendPhotosUrl);\n }",
"public void imageLoader(File file)\n{\n float ratio;\n if (file == null)\n {\n return;\n } else\n {\n try\n {\n PImage img = loadImage(file.getAbsolutePath());\n //if(img.width < 300)\n //{\n // img.resize(300,img.height);\n // if(img.height/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n //if(img.height < 300)\n //{\n // img.resize(img.width, 300);\n // if(img.width/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n if(img.height/((float)img.width)>3)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.width*2.5f));\n }\n if(img.height/((float)img.width)<0.25f)\n {\n ratio = 1.0f;\n if(img.height < 400)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.height*2.5f),(int)(ratio*img.height));\n }\n if(img.width < 400 || img.height < 400)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n if(img.height < 400 && img.height < img.width)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.height));\n }\n m.getInputImageManager().setImage(img);\n m.getInputImageManager().setResizedImage(m.getInputImageManager().resizeToFit(img, width-150, height-20));\n if(m.getOutputImageManager().getMosaic()!= null)\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getOutputImageManager().getMosaic().getLastSeenImage(), m.getOutputImageManager().getMosaic().getTiles());\n }\n else\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getInputImageManager().getImage(), m.getTileManager().getTiles());\n }\n m.getOutputImageManager().getMosaic().setMiniatures();\n }\n catch(NullPointerException e)\n {\n println(e);\n }\n }\n}",
"ScaleStrategyConfig getScaleStrategyConfig();",
"private static void configureCaches(ImagePipelineConfig.Builder configBuilder, Context context) {\r\n final MemoryCacheParams bitmapCacheParams = new MemoryCacheParams(\r\n MAX_MEMORY_CACHE_SIZE, // Max total size of elements in the cache\r\n Integer.MAX_VALUE, // Max entries in the cache\r\n MAX_MEMORY_CACHE_SIZE, // Max total size of elements in eviction queue\r\n Integer.MAX_VALUE, // Max length of eviction queue\r\n Integer.MAX_VALUE); // Max cache entry size\r\n configBuilder\r\n .setBitmapMemoryCacheParamsSupplier(\r\n new Supplier<MemoryCacheParams>() {\r\n public MemoryCacheParams get() {\r\n return bitmapCacheParams;\r\n }\r\n })\r\n .setMainDiskCacheConfig(DiskCacheConfig.newBuilder(context)\r\n .setBaseDirectoryPath(createFile(AppFilePath.APP_SD_CARD_File_PATH))\r\n .setBaseDirectoryName(\"ImageCache\")\r\n .setMaxCacheSize(MAX_DISK_CACHE_SIZE)\r\n .build());\r\n }",
"@Override\n\tpublic void configureGAN() {\n\t\tGANProcess.type = GANProcess.GAN_TYPE.LODE_RUNNER;\n\t}",
"private ComputationGraph configurate() throws IOException {\r\n // Load Zoo model VGG16\r\n ZooModel zooModel = new VGG16();\r\n trainWriter.write(\"\\nLoading org.deeplearning4j.transferlearning.vgg16...\\n\");\r\n System.out.println(\"\\nLoading org.deeplearning4j.transferlearning.vgg16...\\n\\n\");\r\n ComputationGraph vgg16 = (ComputationGraph) zooModel.initPretrained(PretrainedType.VGGFACE);\r\n trainWriter.write(\"\\nLoaded model overview: \" + vgg16.summary());\r\n \r\n // Create Fine tune configuration, which will modify params of all layers, that are not frozen\r\n FineTuneConfiguration fineTuneConf = new FineTuneConfiguration.Builder()\r\n .updater(new Nesterovs(5e-5))\r\n .seed(123)\r\n .build();\r\n\r\n /*\r\n * Change to required config and print it.\r\n * Therefore the last layer (as seen when printing the summary) is a dense layer and not an output layer with a loss function.\r\n * Therefore to modify nOut of an output layer we delete the layer vertex,\r\n * keeping it’s connections and add back in a new output layer with the same name,\r\n * a different nOut, the suitable loss function etc etc.\r\n * */\r\n vgg16Transfer = new TransferLearning.GraphBuilder(vgg16)\r\n .fineTuneConfiguration(fineTuneConf)\r\n .setFeatureExtractor(featureExtractionLayer)\r\n .removeVertexKeepConnections(\"fc8\")\r\n .addLayer(\"fc8\",\r\n new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\r\n .nIn(4096).nOut(numLabels)\r\n .weightInit(WeightInit.DISTRIBUTION)\r\n .dist(new NormalDistribution(0,0.2*(2.0/(4096 + numLabels)))) //This weight init dist gave better results than Xavier\r\n .activation(Activation.SOFTMAX).build()\r\n ,\"fc7\").setOutputs(\"fc8\")\r\n .build();\r\n trainWriter.write(\"\\nCorrected model overview: \" + vgg16Transfer.summary());\r\n System.out.println(\"\\nCorrected model overview: \" + vgg16Transfer.summary()); // Print changes config\r\n\r\n return vgg16Transfer;\r\n }",
"private void setUpImageLoader() {\n\t\tfinal DisplayMetrics displayMetrics = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n\t\tfinal int height = displayMetrics.heightPixels;\n\t\tfinal int width = displayMetrics.widthPixels;\n\n\t\t// For this sample we'll use half of the longest width to resize our images. As the\n\t\t// image scaling ensures the image is larger than this, we should be left with a\n\t\t// resolution that is appropriate for both portrait and landscape. For best image quality\n\t\t// we shouldn't divide by 2, but this will use more memory and require a larger memory\n\t\t// cache.\n\t\tfinal int longest = (height > width ? height : width) / 4;\n\n\t\tImageCache.ImageCacheParams cacheParams =\n\t\t\t\tnew ImageCache.ImageCacheParams(this, IMAGE_CACHE_DIR);\n\t\tcacheParams.setMemCacheSizePercent(0.25f); // Set memory cache to 25% of app memory\n\n\t\timageResizer = new ImageResizer(this, longest);\n\t\timageResizer.addImageCache(getSupportFragmentManager(), cacheParams);\n\t\timageResizer.setImageFadeIn(true);\n\t}",
"@Override\n public void updateConfigFromAlgorithmParams(List<Param> algParams) {\n }",
"public interface BaseImageLoaderStrategy<T extends ImageConfig> {\n void loadImage(Context ctx, T config);\n void clear(Context ctx, T config);\n}",
"private boolean setConfiguration(){\r\n\t\tif(!checkInputFields()) return false;\r\n\t\t\r\n\t\tConfiguration conf = m_Categorizer.Configuration();\r\n\t\tconf.setMCSScore(Float.parseFloat(m_MCSTf.getText()));\r\n\t\tconf.setRelevanceWeight(Float.parseFloat(m_RelScoreTf.getText()));\r\n\t\tconf.setCoherenceWeight(Float.parseFloat(m_CohScoreTf.getText()));\r\n\t\tconf.setKeywordsWeight(Float.parseFloat(m_KeyTf.getText()));\r\n\t\tconf.setCategoryConfidenceWeight(Float.parseFloat(m_CatConfTf.getText()));\r\n\t\tconf.setRepeatedConceptWeight(Float.parseFloat(m_RepeatTf.getText()));\r\n\t\tconf.setMaxOutputCategories(Integer.parseInt(m_MaxCatsTf.getText()));\r\n\t\tconf.setMinOutputCategories(Integer.parseInt(m_MinCatsTf.getText()));\r\n\t\tconf.setMinScore(Float.parseFloat(m_MinCatScoreTf.getText()));\r\n\t\treturn true;\r\n\t}",
"public ImageConfigThree(){\n\t\tsetup();\n\t\tsetMinPos(100);\n\t}",
"public ImageAnalysis(ImageAnalysisConfig config) {\n super(config);\n mUseCaseConfigBuilder = ImageAnalysisConfig.Builder.fromConfig(config);\n\n // Get the combined configuration with defaults\n ImageAnalysisConfig combinedConfig = (ImageAnalysisConfig) getUseCaseConfig();\n mSubscribedAnalyzer = new AtomicReference<>();\n mHandler = combinedConfig.getCallbackHandler(null);\n if (mHandler == null) {\n throw new IllegalStateException(\"No default mHandler specified.\");\n }\n setImageFormat(ImageReaderFormatRecommender.chooseCombo().imageAnalysisFormat());\n }",
"public void tune() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}",
"static void configure() {\n float weight = (float) (Math.random() * 4000);\n System.out.println(\"Weight: \" + String.format(\"%.2f\", weight) + \"kg\");\n\n if (weight < 2000) {\n logisticsFactory = new RoadLogistics();\n } else {\n logisticsFactory = new SeaLogistics();\n }\n\n }",
"public void configure(JobConf jobConf, MapperConf mapConf)\r\n\t\t\tthrows TwisterException {\r\n\t\tthis.jobConf = jobConf;\r\n\t\tFileData fileData = (FileData) mapConf.getDataPartition();\r\n\t\tthis.image = new StaticImageVectorData();\r\n\t\ttry {\r\n\t\t\tthis.image.loadDataFromTextFile(fileData.getFileName());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new TwisterException(e);\r\n\t\t}\r\n\t}",
"public void initDisplayImageOptions() {\n this.mDisplayImageOptionBuilder = new DisplayImageOptions.Builder().cacheThumbnail(true).loadFromMicroCache(true).cacheInMemory(true).considerExifParams(true).showStubImage(R.drawable.default_face_cover).resetViewBeforeLoading(true).imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).displayer(new CircleBitmapDisplayer()).usingRegionDecoderFace(true);\n this.mDefaultDisplayImageOptions = this.mDisplayImageOptionBuilder.build();\n }",
"void configure(SamplerConfiguration configuration) throws UserErrorException;",
"private void configure() {\r\n LogManager manager = LogManager.getLogManager();\r\n String className = this.getClass().getName();\r\n String level = manager.getProperty(className + \".level\");\r\n String filter = manager.getProperty(className + \".filter\");\r\n String formatter = manager.getProperty(className + \".formatter\");\r\n\r\n //accessing super class methods to set the parameters\r\n\r\n\r\n }",
"@Override\n protected void validateConfig() {\n super.validateConfig();\n final int iterations = commonConfig.getIterations();\n queryInstancesAggregates = new MetricAggregates(iterations);\n firstResponseAggregates = new MetricAggregates(iterations);\n firstFrameAggregates = new MetricAggregates(iterations);\n totalAggregates = new MetricAggregates(iterations);\n transferRateAggregates = new MetricAggregates(iterations);\n frameRateAggregates = new MetricAggregates(iterations);\n }",
"public void setProperties() {\n\n Properties props = new Properties();\n props.setProperty(\"JOptExitCondition.JOptGenerationCount\", \"1000\");\n props.setProperty(\"JOpt.Algorithm.PreOptimization.SA.NumIterations\", \"1000\");\n\n // We have to tell the optimizer that we have an high interest in capacity planning, Default is\n // 100\n props.setProperty(\"JOptWeight.Capacity\", \"200\");\n this.addElement(props);\n }",
"protected Configuration createConfiguration()\r\n/* 76: */ {\r\n/* 77:119 */ this.configuration_d.setNumOfIterations(Integer.parseInt(this.jTextField1.getText()));\r\n/* 78:120 */ this.configuration_d.setPopulationSize(Integer.parseInt(this.popSize_d.getText()));\r\n/* 79:121 */ ((GAConfiguration)this.configuration_d).setCrossoverThreshold(Double.valueOf(this.jTextField2.getText()).doubleValue());\r\n/* 80:122 */ ((GAConfiguration)this.configuration_d).setMutationThreshold(Double.valueOf(this.jTextField3.getText()).doubleValue());\r\n/* 81:123 */ ((GAConfiguration)this.configuration_d).setMethod((String)this.methodList_d.getSelectedItem());\r\n/* 82:124 */ return this.configuration_d;\r\n/* 83: */ }",
"public void setAdaptiveRateAlgorithm(String algorithm);",
"public void updateConfig() {\n String[] config = getConfiguration();\n Config.MEASUREMENT_INTERVAL = (int)Double.parseDouble(config[2]);\n Config.MAX_INJECTION = Double.parseDouble(config[3]);\n Config.MIN_INJECTION = Double.parseDouble(config[4]);\n Config.MAX_CUMULATIVE_DOSE = Double.parseDouble(config[5]);\n }",
"protected void additionalConfig(ConfigType config){}",
"private static void forceBasicEditorConfiguration() {\n Game.graphics().setBaseRenderScale(1.0f);\n Game.config().debug().setDebugEnabled(true);\n Game.config().graphics().setGraphicQuality(Quality.VERYHIGH);\n Game.config().graphics().setReduceFramesWhenNotFocused(false);\n }",
"@Override\n public void configViews() {\n\n ImageView view = findViewById(R.id.iv);\n GlideUrl cookie = new GlideUrl(\"http://images.dmzj.com/tuijian/320_170/170623yinglingtj2.jpg\", new LazyHeaders.Builder()\n .addHeader(\"Referer\", Constant.IMG_BASE_URL)\n .addHeader(\"Accept-Encoding\",\"gzip\").build());\n// Glide.with(this).load(cookie)\n// .placeholder(R.mipmap.ic_launcher)\n// .error(R.drawable.a)\n// .transform(new GlideRoundTransform(this,6))\n// .into(view);\n\n// MultiTransformation multi = new MultiTransformation(\n// new RoundedCornersTransformation(20, 0));\n float density = getResources().getDisplayMetrics().density;\n Log.e(\"density\",\"density\"+density);\n RoundedCornersTransformation roundedCornersTransformation =\n new RoundedCornersTransformation((int) (density*20), 0);\n// Glide.with(this).loadOptions.bitmapTransform(roundedCornersTransformation))\n// .into(view);(cookie)\n// .apply(Request\n//\n DeviceUtils.printDisplayInfo(this);\n\n Glide.with(this).load(cookie)\n .apply((RequestOptions.bitmapTransform(roundedCornersTransformation)))\n .into(image01);\n Glide.with(this).load(cookie)\n .into(image02);\n }",
"@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"ν-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"γ in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter ν\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight × C)\", Parameter.TYPE.STRING, \"-W\");\n\t}",
"@Override\n public void configure(ConfigParams configParams) throws ConfigException {\n this._timeout = configParams.getAsLongWithDefault(\"options.timeout\", this._timeout);\n }",
"@Override\n\tpublic void checkPropertyConfiguration() throws IOException, CustomizedException {\n\t\tString conf=PropertyReader.getProperty(\"configuration\");\n\t\tString\tfileName=\"\";\n\t\tconfiguration=conf;\n\t\tif(conf == null || conf.isEmpty())\n\t\t{\n\t\t\tthrow new CustomizedException(\"Configuration property is not set,it must be set to 1 or 2 \");\n\n\t\t}\n\t\tif(conf.equals(\"1\"))\n\t\t{\n\t\t\titeration=1;\n\t\t\tfileName=PropertyReader.getProperty(\"anagram_file\");\n\t\t\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be set to sample against the key anagramFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(conf.equals(\"2\"))\n\t\t{\n\t\t\titeration=Integer.parseInt(PropertyReader.getProperty(\"load_testing_iteration\"));\n\t\t\tfileName=PropertyReader.getProperty(\"large_file\");\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be bigFile against the key largeFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tthis.fileName=fileName;\n\t\t\n\t}",
"protected void configure() {\n\t \n\t Configuration.BASE=true;\n\t Configuration.BASEMENUBAR=true;\n\t Configuration.BASETOOLBAR=true;\n\t Configuration.EDITMENUBAR=true;\n\t Configuration.EDITTOOLBAR=true;\n\t Configuration.FORMATMENUBAR=true;\n\t Configuration.FORMATTOOLBAR=true;\n\t Configuration.PERSISTENCEMENUBAR=true;\n\t Configuration.PERSISTENCETOOLBAR=true;\n\t Configuration.PRINTMENUBAR=true;\n\t Configuration.PRINTTOOLBAR=true;\n\t Configuration.SEARCHMENUBAR=true;\n\t Configuration.SEARCHTOOLBAR=true;\n\t Configuration.UNDOREDOMENUBAR=true;\n\t \t Configuration.UNDOREDOTOOLBAR=true;\n\t //\n\t Configuration.WORDCOUNTMENUBAR=true;\n\t Configuration.WORDCOUNTTOOLBAR=true;\n }",
"public void configure( final Configuration configuration )\n throws ConfigurationException\n {\n final String name =\n configuration.getChild( \"name\" ).getValue();\n setName( name );\n final int priority =\n configuration.getChild( \"priority\" ).getValueAsInteger( Thread.NORM_PRIORITY );\n setPriority( priority );\n final boolean isDaemon =\n configuration.getChild( \"is-daemon\" ).getValueAsBoolean( false );\n setDaemon( isDaemon );\n\n final GenericObjectPool.Config config = getCommonsConfig();\n\n final boolean limit =\n configuration.getChild( \"resource-limiting\" ).getValueAsBoolean( false );\n if( limit )\n {\n config.whenExhaustedAction = GenericObjectPool.WHEN_EXHAUSTED_BLOCK;\n }\n else\n {\n config.whenExhaustedAction = GenericObjectPool.WHEN_EXHAUSTED_GROW;\n }\n\n config.maxActive =\n configuration.getChild( \"max-threads\" ).getValueAsInteger( 10 );\n config.maxIdle = configuration.getChild( \"max-idle\" ).\n getValueAsInteger( config.maxActive / 2 );\n }",
"protected OeTemplateProcessorConfig getConfig() {\n final OeTemplateProcessorConfig config = OeTemplateProcessorConfig.create();\n config\n //.setPollingIntervalMillis(1000)\n //.setPollingMaxDurationSecs(5)\n //.setResultsBatchSize(100)\n .getInferenceParameterOverrides()\n .setMaxAnswerCount(MAX_ANSWERS);\n return config;\n }",
"public void initImageLoader(Context context){\n ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)\n\t .memoryCacheExtraOptions(1200, 1000) // default = device screen dimensions\n\t .discCacheExtraOptions(1200, 1000, CompressFormat.JPEG, 85, null)\n\t .threadPoolSize(3) // default\n\t .threadPriority(Thread.NORM_PRIORITY - 1) // default\n\t .tasksProcessingOrder(QueueProcessingType.FIFO) // default\n\t .denyCacheImageMultipleSizesInMemory()\n\t .memoryCache(new LruMemoryCache(2 * 1024 * 1024))\n\t .memoryCacheSize(2 * 1024 * 1024)\n\t .memoryCacheSizePercentage(13) // default\n\t .discCacheSize(50 * 1024 * 1024)\n\t .discCacheFileCount(100)\n\t .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default\n\t .imageDownloader(new BaseImageDownloader(context)) // default\n\t .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default\n\t .writeDebugLogs()\n .build();\n ImageLoader.getInstance().init(config);\n\t}",
"public interface PropertyKeys {\n\n String PRO_FILE_NAME = \"MyPerf4JPropFile\";\n\n interface Basic {\n\n ConfigKey APP_NAME = ConfigKey.of(\"app_name\", \"AppName\");\n\n ConfigKey DEBUG = ConfigKey.of(\"debug\", \"Debug.PrintDebugLog\");\n\n ConfigKey PROPERTIES_FILE_DIR = ConfigKey.of(\"properties.dir\", \"MyPerf4JPropDIR\");\n }\n\n interface HttpServer {\n\n ConfigKey PORT = ConfigKey.of(\"http.server.port\", \"http.server.port\");\n\n ConfigKey MIN_WORKERS = ConfigKey.of(\"http.server.min_workers\", \"http.server.min_workers\");\n\n ConfigKey MAX_WORKERS = ConfigKey.of(\"http.server.max_workers\", \"http.server.max_workers\");\n\n ConfigKey ACCEPT_COUNT = ConfigKey.of(\"http.server.accept_count\", \"http.server.accept_count\");\n }\n\n interface Metrics {\n\n ConfigKey EXPORTER = ConfigKey.of(\"metrics.exporter\", \"MetricsProcessorType\");\n\n ConfigKey TIME_SLICE_METHOD = ConfigKey.of(\"metrics.time_slice.method\", \"MethodMilliTimeSlice\");\n\n ConfigKey TIME_SLICE_JVM = ConfigKey.of(\"metrics.time_slice.jvm\", \"JvmMilliTimeSlice\");\n\n ConfigKey METHOD_SHOW_PARAMS = ConfigKey.of(\"metrics.method.show_params\", \"ShowMethodParams\");\n\n ConfigKey CLASS_LEVEL_MAPPINGS = ConfigKey.of(\"metrics.method.class_level_mappings\", \"ClassLevelMapping\");\n\n ConfigKey LOG_METHOD = ConfigKey.of(\"metrics.log.method\", \"MethodMetricsFile\");\n\n ConfigKey LOG_CLASS_LOADING = ConfigKey.of(\"metrics.log.class_loading\", \"ClassMetricsFile\");\n\n ConfigKey LOG_GC = ConfigKey.of(\"metrics.log.gc\", \"GCMetricsFile\");\n\n ConfigKey LOG_MEMORY = ConfigKey.of(\"metrics.log.memory\", \"MemMetricsFile\");\n\n ConfigKey LOG_BUFF_POOL = ConfigKey.of(\"metrics.log.buff_pool\", \"BufPoolMetricsFile\");\n\n ConfigKey LOG_THREAD = ConfigKey.of(\"metrics.log.thread\", \"ThreadMetricsFile\");\n\n ConfigKey LOG_FILE_DESC = ConfigKey.of(\"metrics.log.file_desc\", \"FileDescMetricsFile\");\n\n ConfigKey LOG_COMPILATION = ConfigKey.of(\"metrics.log.compilation\", \"CompilationMetricsFile\");\n\n ConfigKey LOG_ROLLING_TIME_UNIT = ConfigKey.of(\"metrics.log.rolling.time_unit\", \"LogRollingTimeUnit\");\n\n ConfigKey LOG_RESERVE_COUNT = ConfigKey.of(\"metrics.log.reserve.count\", \"LogReserveCount\");\n }\n\n interface InfluxDB {\n\n ConfigKey VERSION = ConfigKey.of(\"influxdb.version\", \"influxdb.version\");\n\n ConfigKey HOST = ConfigKey.of(\"influxdb.host\", \"influxdb.host\");\n\n ConfigKey PORT = ConfigKey.of(\"influxdb.port\", \"influxdb.port\");\n\n ConfigKey ORG_NAME = ConfigKey.of(\"influxdb.orgName\", \"influxdb.orgName\");\n\n ConfigKey DATABASE = ConfigKey.of(\"influxdb.database\", \"influxdb.database\");\n\n ConfigKey USERNAME = ConfigKey.of(\"influxdb.username\", \"influxdb.username\");\n\n ConfigKey PASSWORD = ConfigKey.of(\"influxdb.password\", \"influxdb.password\");\n\n ConfigKey CONN_TIMEOUT = ConfigKey.of(\"influxdb.conn_timeout\", \"influxdb.conn_timeout\");\n\n ConfigKey READ_TIMEOUT = ConfigKey.of(\"influxdb.read_timeout\", \"influxdb.read_timeout\");\n }\n\n interface Filter {\n\n ConfigKey PACKAGES_INCLUDE = ConfigKey.of(\"filter.packages.include\", \"IncludePackages\");\n\n ConfigKey PACKAGES_EXCLUDE = ConfigKey.of(\"filter.packages.exclude\", \"ExcludePackages\");\n\n ConfigKey METHODS_EXCLUDE = ConfigKey.of(\"filter.methods.exclude\", \"ExcludeMethods\");\n\n ConfigKey METHODS_EXCLUDE_PRIVATE = ConfigKey.of(\"filter.methods.exclude_private\", \"ExcludePrivateMethod\");\n\n ConfigKey CLASS_LOADERS_EXCLUDE = ConfigKey.of(\"filter.class_loaders.exclude\", \"ExcludeClassLoaders\");\n }\n\n interface Recorder {\n\n ConfigKey BACKUP_COUNT = ConfigKey.of(\"recorders.backup_count\", \"BackupRecordersCount\");\n\n ConfigKey MODE = ConfigKey.of(\"recorder.mode\", \"RecorderMode\");\n\n ConfigKey SIZE_TIMING_ARR = ConfigKey.of(\"recorder.size.timing_arr\", \"ProfilingTimeThreshold\");\n\n ConfigKey SIZE_TIMING_MAP = ConfigKey.of(\"recorder.size.timing_map\", \"ProfilingOutThresholdCount\");\n }\n}",
"private static void initConfig() {\n /*\n * Human IO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Joysticks\n */\n {\n addToConstants(\"joysticks.left\", 0);\n addToConstants(\"joysticks.right\", 1);\n addToConstants(\"joysticks.operator\", 2);\n }\n\n /*\n * Buttons and axis\n */\n {\n }\n }\n }\n\n /*\n * RobotIO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Kicker\n */\n addToConstantsA(\"kicker.encoder.distPerPulse\", 360.0 / 1024.0);\n }\n }\n\n /*\n * Chassis\n */\n {\n /*\n * Constants\n */\n {\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Kicker\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"kicker.kick.normal\", 1.75);\n addToConstants(\"kicker.kick.timeout\", 0.75);\n\n addToConstants(\"kicker.shaken.voltage\", -0.3316);\n addToConstants(\"kicker.shaken.tolerance\", 3.0);\n\n addToConstants(\"kicker.zero.voltage\", 0.8);\n addToConstants(\"kicker.zero.duration\", 0.75);\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Gripper\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"gripper.collection.voltage\", 0.82);\n addToConstants(\"gripper.ejection.voltage\", -0.45);\n }\n }\n }",
"private static Config defineConfig(RunSettings settings) {\r\n\t\tConfig config = ConfigUtils.createConfig();\r\n\r\n\t\t// set number of iterations\r\n\t\tconfig.controler().setLastIteration( 2 );\r\n\r\n\t\t// able or enable signals and lanes\r\n\t\tconfig.qsim().setUseLanes( settings.isUseLanes() );\r\n\t\tif(settings.isUseSignals()){\r\n\t\t\tSignalSystemsConfigGroup signalConfigGroup = ConfigUtils.addOrGetModule(config, SignalSystemsConfigGroup.GROUP_NAME,SignalSystemsConfigGroup.class);\r\n\t\t\tsignalConfigGroup.setUseSignalSystems(true);\r\n\t\t}\r\n\t\t\r\n\t\t// set brain exp beta\r\n\t\tconfig.planCalcScore().setBrainExpBeta( 20 );\r\n\r\n\t\t// choose between link to link and node to node routing\r\n\t\tif(settings.isUseLink2Link()){\r\n\t\t\tconfig.controler().setLinkToLinkRoutingEnabled( true );\r\n\t\t\tconfig.travelTimeCalculator().setCalculateLinkToLinkTravelTimes(true);\r\n\t\t\t// link2link currently does not work for separate modes\r\n\t\t\tconfig.travelTimeCalculator().setSeparateModes(false);\r\n\t\t}\r\n\t\t\r\n\t\tconfig.travelTimeCalculator().setCalculateLinkTravelTimes(true);\r\n\t\t\r\n\t\t// set travelTimeBinSize\r\n\t\tconfig.travelTimeCalculator().setTraveltimeBinSize( 900 );\r\n\t\t\r\n\t\tconfig.travelTimeCalculator().setTravelTimeCalculatorType(\r\n\t\t\t\tTravelTimeCalculatorType.TravelTimeCalculatorHashMap.toString());\r\n\t\t// hash map and array produce same results. only difference: memory and time.\r\n\t\t// for small time bins and sparse values hash map is better. theresa, may 2015\r\n\t\t\r\n\t\t// define strategies:\r\n\t\t{\r\n\t\t\tStrategySettings strat = new StrategySettings() ;\r\n\t\t\tstrat.setStrategyName( DefaultStrategy.ReRoute.toString() );\r\n\t\t\tstrat.setWeight( 0.1 );\r\n\t\t\tconfig.strategy().addStrategySettings(strat);\r\n\t\t}\r\n\t\t{\r\n\t\t\tStrategySettings strat = new StrategySettings() ;\r\n\t\t\tstrat.setStrategyName( DefaultSelector.ChangeExpBeta.toString() );\r\n\t\t\tstrat.setWeight( 0.9 ) ;\r\n\t\t\tstrat.setDisableAfter( config.controler().getLastIteration() );\r\n\t\t\tconfig.strategy().addStrategySettings(strat);\r\n\t\t}\r\n\t\t\r\n\t\tconfig.controler().setOutputDirectory(OUTPUT_DIR);\r\n\t\tconfig.controler().setOverwriteFileSetting(OverwriteFileSetting.overwriteExistingFiles);\t\t\r\n\t\t// note: the output directory is defined in createOutputDir(...) after all adaptations are done\r\n\t\t\r\n\t\tconfig.controler().setWriteEventsInterval(0);\r\n\t\tconfig.controler().setWritePlansInterval(0);\r\n\t\tconfig.controler().setWriteSnapshotsInterval(0);\r\n\t\tconfig.controler().setCreateGraphs(false);\r\n\t\t\r\n\t\t//set StuckTime\r\n\t\tconfig.qsim().setStuckTime(3600 * 10.);\r\n\t\t\r\n\t\tconfig.qsim().setUsingFastCapacityUpdate(false);\r\n\t\t\r\n\t\tActivityParams dummyAct = new ActivityParams(\"dummy\");\r\n\t\tdummyAct.setTypicalDuration(8 * 3600);\r\n\t\tconfig.planCalcScore().addActivityParams(dummyAct);\r\n\t\t\r\n\t\treturn config;\r\n\t}",
"@Parameterized.Parameters(name = \"{0}\")\n public static Collection<Object[]> algoOptions() {\n CarFlagEncoder encoder = new CarFlagEncoder();\n GraphHopper hopper = new GraphHopperOSM();\n hopper.setDataReaderFile(\"../map-data/leipzig_germany.osm.pbf\");\n hopper.setGraphHopperLocation(\"../target/mapmatchingtest-ch\");\n hopper.setEncodingManager(new EncodingManager(encoder));\n hopper.getCHFactoryDecorator().setDisablingAllowed(true);\n hopper.importOrLoad();\n\n // force CH\n AlgorithmOptions chOpts = AlgorithmOptions.start()\n .maxVisitedNodes(1000)\n .hints(new PMap().put(Parameters.CH.DISABLE, false))\n .build();\n\n // flexible should fall back to defaults\n AlgorithmOptions flexibleOpts = AlgorithmOptions.start()\n // TODO: fewer nodes than for CH are possible (short routes & different finish condition & higher degree graph)\n // .maxVisitedNodes(20)\n .build();\n\n return Arrays.asList(new Object[][]{\n {\"non-CH\", hopper, flexibleOpts},\n {\"CH\", hopper, chOpts}\n });\n }",
"public static void generateCustomGameConfiguration() {\n // GameConfig.getInstance().setMapWidthX(20);\n // GameConfig.getInstance().setMapHeightY(20);\n // GameConfig.getInstance().setMaxEnergyPirateValue(100);\n // GameConfig.getInstance().setMonkeyErraticSpeed(1000);\n // GameConfig.getInstance().setMonkeyHunterSpeed(750);\n // GameConfig.getInstance().setRumEnergyValue(10);\n // GameConfig.getInstance().setTimeRumVisibility(10000);\n // GameConfig.getInstance().setRumList(Brain.getInstance().getObjectManager().getRumList());\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // ArrayList<Monkey> monkeyArrayList = new ArrayList<Monkey>();\n // for(int i=0;i<10;i++) {\n // if (i % 2 == 0) {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.ERRATIC));\n // } else {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.HUNTER));\n // }\n // }\n // GameConfig.getInstance().setMonkeyList(monkeyArrayList);\n // for(int i=0;i< Brain.getInstance().getMapManager().getMap().getSquareList().size();i++) {\n // for (int j = 0; j < Brain.getInstance().getMapManager().getMap().getSquareList().get(i).size(); j++) {\n // if (i == 0 || j==0 || i == GameConfig.getInstance().getMapWidthX()-1\n // || j == GameConfig.getInstance().getMapHeightY()-1) {\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.SEA);\n // }else{\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.GROUND);\n // }\n // }\n // }\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // saveGameConfiguration();\n }",
"public static void initImageLoader(Context context) {\n ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context);\n config.threadPriority(Thread.NORM_PRIORITY - 2);\n config.denyCacheImageMultipleSizesInMemory();\n config.diskCacheFileNameGenerator(new Md5FileNameGenerator());\n config.diskCacheSize(50 * 1024 * 1024); // 50 MiB\n config.tasksProcessingOrder(QueueProcessingType.LIFO);\n //config.writeDebugLogs(); // Remove for release app\n\n // Initialize ImageLoader with configuration.\n ImageLoader.getInstance().init(config.build());\n }",
"@Override\n public void configure(Configuration conf) throws ConfigurationException\n {\n super.configure( conf );\n lazyLoading = conf.getAttributeAsBoolean( LAZY_LOADING, false);\n getLogger().debug(\"setting lazyLoading: \" + lazyLoading);\n }",
"private void applyDatabasePerformanceOptions() throws SQLException, SoarException, IOException\n {\n // cache\n if(params.driver.get().equals(\"org.sqlite.JDBC\"))\n {\n // TODO: Generalize this. Move to a resource somehow.\n final long cacheSize = params.cache_size.get();\n \n try(Statement s = db.getConnection().createStatement())\n {\n s.execute(\"PRAGMA cache_size = \" + cacheSize);\n }\n }\n \n // optimization\n if(params.optimization.get() == Optimization.performance)\n {\n // If /org/jsoar/kernel/smem/<driver>.performance.sql is found on\n // the class path, execute the statements in it.\n final String perfResource = params.driver.get() + \".performance.sql\";\n final String fullPath = \"/\" + getClass().getCanonicalName().replace('.', '/') + \"/\" + perfResource;\n \n LOG.info(\"Applying performance settings from '{}'.\", fullPath);\n try(InputStream perfStream = getClass().getResourceAsStream(perfResource);)\n {\n if(perfStream != null)\n {\n JdbcTools.executeSql(db.getConnection(), perfStream, null /*\n * no\n * filter\n */);\n }\n else\n {\n LOG.warn(\"Could not find performance resource at '{}'. No performance settings applied.\", fullPath);\n }\n }\n }\n \n // page_size\n if(params.driver.get().equals(\"org.sqlite.JDBC\"))\n {\n final PageChoices pageSize = params.page_size.get();\n \n long pageSizeLong = 0;\n \n switch(pageSize)\n {\n case page_16k:\n pageSizeLong = 16 * 1024;\n break;\n case page_1k:\n pageSizeLong = 1 * 1024;\n break;\n case page_2k:\n pageSizeLong = 2 * 1024;\n break;\n case page_32k:\n pageSizeLong = 32 * 1024;\n break;\n case page_4k:\n pageSizeLong = 4 * 1024;\n break;\n case page_64k:\n pageSizeLong = 64 * 1024;\n break;\n case page_8k:\n pageSizeLong = 8 * 1024;\n break;\n default:\n break;\n }\n \n try(Statement s = db.getConnection().createStatement())\n {\n s.execute(\"PRAGMA page_size = \" + pageSizeLong);\n }\n }\n }",
"protected AlgorithmConfiguration getSettings() {\n return new AlgorithmConfiguration(m_SplitMethod, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier,\n m_AttributesToSplit, m_AttributeSplitChoices);\n }",
"private void showCrawlerSettings()\n {\n SpiderConfig config = spider.getConfig();\n \n JPanel crawlerSettingsPanel = new JPanel(new GridLayout(8, 2));\n JLabel crawlDistanceLabel = new JLabel(\"Max crawl distance\");\n JLabel maxAdjLinksLabel = new JLabel(\"Max adjacent URL's\");\n JLabel bufferSizeLabel = new JLabel(\"Buffer size\");\n JLabel cacheSizeLabel = new JLabel(\"Cache size\");\n JLabel updateDurationLabel = new JLabel(\"Duration (days) until update\");\n JLabel maxImagesLabel = new JLabel(\"Max number of images\");\n JLabel collectImagesLabel = new JLabel(\"Fetch images\");\n JLabel defaultIndexFileLabel = new JLabel(\"Default index file\");\n JTextField crawlDistanceField = new JTextField();\n JTextField maxAdjLinksField = new JTextField();\n JTextField bufferSizeField = new JTextField();\n JTextField cacheSizeField = new JTextField();\n JTextField updateDurationField = new JTextField();\n JTextField maxImagesField = new JTextField();\n JTextField indexFileField = new JTextField();\n JCheckBox collectImagesCheck = new JCheckBox();\n \n crawlerSettingsPanel.add(crawlDistanceLabel);\n crawlerSettingsPanel.add(crawlDistanceField);\n crawlerSettingsPanel.add(maxAdjLinksLabel);\n crawlerSettingsPanel.add(maxAdjLinksField);\n crawlerSettingsPanel.add(bufferSizeLabel);\n crawlerSettingsPanel.add(bufferSizeField);\n crawlerSettingsPanel.add(cacheSizeLabel);\n crawlerSettingsPanel.add(cacheSizeField);\n crawlerSettingsPanel.add(updateDurationLabel);\n crawlerSettingsPanel.add(updateDurationField);\n crawlerSettingsPanel.add(maxImagesLabel);\n crawlerSettingsPanel.add(maxImagesField);\n crawlerSettingsPanel.add(defaultIndexFileLabel);\n crawlerSettingsPanel.add(indexFileField);\n crawlerSettingsPanel.add(collectImagesLabel);\n crawlerSettingsPanel.add(collectImagesCheck);\n \n crawlDistanceField.setText(\"\" + config.getMaxCrawlDistance());\n maxAdjLinksField.setText(\"\" + config.getMaxAdjUrls());\n bufferSizeField.setText(\"\" + config.getBufferSize());\n cacheSizeField.setText(\"\" + config.getCacheSize());\n updateDurationField.setText(\"\" + config.getUpdateDays());\n maxImagesField.setText(\"\" + config.getMaxImages());\n collectImagesCheck.setSelected(config.isFetchingImages());\n indexFileField.setText(config.getDatabaseFile());\n \n int option = JOptionPane.showConfirmDialog(null, crawlerSettingsPanel, \"Crawler settings\", JOptionPane.OK_CANCEL_OPTION);\n if(option == JOptionPane.YES_OPTION)\n {\n try\n {\n int maxDistance = Integer.parseInt(crawlDistanceField.getText());\n int maxLinks = Integer.parseInt(maxAdjLinksField.getText());\n int bufferSize = Integer.parseInt(bufferSizeField.getText());\n int cacheSize = Integer.parseInt(cacheSizeField.getText());\n int updateDays = Integer.parseInt(updateDurationField.getText());\n int maxImages = Integer.parseInt(maxImagesField.getText());\n String defaultIndex = indexFileField.getText();\n boolean fetchImages = collectImagesCheck.isSelected();\n \n config.setBufferSize(bufferSize);\n config.setCacheSize(cacheSize);\n config.setMaxCrawlDistance(maxDistance);\n config.setMaxAdjUrls(maxLinks);\n config.setUpdateDays(updateDays);\n config.setFetchImages(fetchImages);\n config.setMaxImages(maxImages);\n config.setDatabaseFile(defaultIndex);\n \n spider.updateConfig();\n }\n \n catch(NumberFormatException e)\n {\n JOptionPane.showMessageDialog(null, \"Invalid config settings\");\n }\n }\n }",
"public void configure(T aView) { aView.setType(ThumbWheel.TYPE_RADIAL); aView.setPrefSize(120,16); }",
"void setConfiguration();",
"private void initImageLoader(Context context) {\n\t\tImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context);\n\t\tconfig.threadPriority(Thread.NORM_PRIORITY - 2);\n\t\tconfig.denyCacheImageMultipleSizesInMemory();\n\t\tconfig.diskCacheFileNameGenerator(new Md5FileNameGenerator());\n\t\tconfig.diskCacheSize(50 * 1024 * 1024); // 50 MiB\n\t\tconfig.tasksProcessingOrder(QueueProcessingType.LIFO);\n\t\tconfig.writeDebugLogs(); // Remove for release app\n\n\t\t// Initialize ImageLoader with configuration.\n\t\tImageLoader.getInstance().init(config.build());\n\t}",
"public void reconfigure(double cf) {\n if (cf > 20000) {\n cf = 20000;\n } else if (cf < 20) {\n cf = 20;\n }\n Q = (Q == 0) ? 1e-9 : Q;\n center_freq = cf;\n // only used for peaking and shelving filters\n gain_abs = Math.pow(10, gainDB / 40);\n double omega = 2 * Math.PI * cf / sample_rate;\n double sn = Math.sin(omega);\n double cs = Math.cos(omega);\n double alpha = sn / (2 * Q);\n double beta = Math.sqrt(gain_abs + gain_abs);\n switch (type) {\n case BANDPASS:\n b0 = alpha;\n b1 = 0;\n b2 = -alpha;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case LOWPASS:\n b0 = (1 - cs) / 2;\n b1 = 1 - cs;\n b2 = (1 - cs) / 2;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case HIGHPASS:\n b0 = (1 + cs) / 2;\n b1 = -(1 + cs);\n b2 = (1 + cs) / 2;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case NOTCH:\n b0 = 1;\n b1 = -2 * cs;\n b2 = 1;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case PEAK:\n b0 = 1 + (alpha * gain_abs);\n b1 = -2 * cs;\n b2 = 1 - (alpha * gain_abs);\n a0 = 1 + (alpha / gain_abs);\n a1 = -2 * cs;\n a2 = 1 - (alpha / gain_abs);\n break;\n case LOWSHELF:\n b0 = gain_abs * ((gain_abs + 1) - (gain_abs - 1) * cs + beta * sn);\n b1 = 2 * gain_abs * ((gain_abs - 1) - (gain_abs + 1) * cs);\n b2 = gain_abs * ((gain_abs + 1) - (gain_abs - 1) * cs - beta * sn);\n a0 = (gain_abs + 1) + (gain_abs - 1) * cs + beta * sn;\n a1 = -2 * ((gain_abs - 1) + (gain_abs + 1) * cs);\n a2 = (gain_abs + 1) + (gain_abs - 1) * cs - beta * sn;\n break;\n case HIGHSHELF:\n b0 = gain_abs * ((gain_abs + 1) + (gain_abs - 1) * cs + beta * sn);\n b1 = -2 * gain_abs * ((gain_abs - 1) + (gain_abs + 1) * cs);\n b2 = gain_abs * ((gain_abs + 1) + (gain_abs - 1) * cs - beta * sn);\n a0 = (gain_abs + 1) - (gain_abs - 1) * cs + beta * sn;\n a1 = 2 * ((gain_abs - 1) - (gain_abs + 1) * cs);\n a2 = (gain_abs + 1) - (gain_abs - 1) * cs - beta * sn;\n break;\n }\n // prescale flter constants\n b0 /= a0;\n b1 /= a0;\n b2 /= a0;\n a1 /= a0;\n a2 /= a0;\n }",
"public void setFiltering(int FILTERING) {\n\t\tswitch(FILTERING) {\n\t\tdefault :\n\t\tcase GPUImageInterface.NEAREST : \n\t\t\t((PGraphicsOpenGL)this.src).textureSampling(2) ;\n\t\t\t((PGraphicsOpenGL)this.dst).textureSampling(2) ;\n\t\t\tbreak;\n\t\tcase GPUImageInterface.LINEAR :\n\t\t\t((PGraphicsOpenGL)this.src).textureSampling(3) ;\n\t\t\t((PGraphicsOpenGL)this.dst).textureSampling(3) ;\n\t\t\tbreak;\n\t\tcase GPUImageInterface.BILINEAR :\n\t\t\t((PGraphicsOpenGL)this.src).textureSampling(4) ;\n\t\t\t((PGraphicsOpenGL)this.dst).textureSampling(4) ;\n\t\t\tbreak;\n\t\tcase GPUImageInterface.TRILINEAR :\n\t\t\t((PGraphicsOpenGL)this.src).textureSampling(5) ;\n\t\t\t((PGraphicsOpenGL)this.dst).textureSampling(5) ;\n\t\t\tbreak;\n\t\t}\n\t}",
"protected void enhanceConfig(ConfigurationBuilder c) {\n }",
"private void setSize() {\n width = AppConfig.width;\n height = (int) (AppConfig.width * 0.56);\n requestOptions = new RequestOptions()\n .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC);\n \n }",
"public Builder() {\r\n // setting default values\r\n configurationBuilder.httpStatusCodesToRetry(Stream.of(408, 413, 429, 500, 502, 503, 504,\r\n 521, 522, 524).collect(Collectors.toSet()));\r\n configurationBuilder.httpMethodsToRetry(Stream.of(Method.GET,\r\n Method.PUT).collect(Collectors.toSet()));\r\n }",
"public ImageLoader(Context context){\n fileCache=new FileCache(context);\n executorService=Executors.newFixedThreadPool(5);\n }",
"@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}",
"@Override\n\tprotected void setMultiplier(DynamicMultiplier multiplier) {\n\t\tif (\"supportVectors\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors);\n\t\t} else if (\"supportVectorsMinusOne\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors - 1);\n\t\t} else if (\"supportVectorMachines\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((numberOfClasses * (numberOfClasses - 1)) / 2);\n\t\t} else if (\"squareAndMultiplyDegree\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((int) (2.0 * FastMath.floor(FastMath.log(2.0, ((Integer) kernelDegree.getValue())))));\n\t\t}\n\t}",
"public static void initImageLoader(Context context) {\n ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context);\n config.threadPriority(Thread.NORM_PRIORITY - 2);\n config.denyCacheImageMultipleSizesInMemory();\n config.diskCacheFileNameGenerator(new Md5FileNameGenerator());\n config.diskCacheSize(50 * 1024 * 1024); // 50 MiB\n config.tasksProcessingOrder(QueueProcessingType.LIFO);\n config.writeDebugLogs(); // Remove for release app\n\n // Initialize ImageLoader with configuration.\n ImageLoader.getInstance().init(config.build());\n }",
"public static void setImageLoadingTimeout(long newTimeout) {\n ImageLoader.setTimeout(newTimeout);\n }",
"public ImageLoader(int threadCount, Type type) {\r\n init(threadCount,type);\r\n }",
"@Override\r\n public void init(NegotiationSession negotiationSession, Map<String, Double> parameters) {\r\n super.init(negotiationSession, parameters);\r\n this.negotiationSession = negotiationSession;\r\n if (parameters != null && parameters.get(\"l\") != null) {\r\n learnCoef = parameters.get(\"l\");\r\n } else {\r\n learnCoef = 0.2;\r\n }\r\n learnValueAddition = 1;\r\n initializeModel();\r\n }",
"@Override\n protected PreprocessingConfig getPreprocessingConfig() {\n PreprocessingConfig config = super.getPreprocessingConfig();\n config.put(TargetEncoding.CONFIG_PREPARE_CV_ONLY, aml().isCVEnabled()); \n return config;\n }",
"private void configureAnalysisFeatures() {\n for (AnalysisFeatureSetting setting : analysisOptions.analysisFeatureSettingList) {\n setting.configure(AnalysisContext.currentAnalysisContext());\n }\n AnalysisContext.currentAnalysisContext().setBoolProperty(AnalysisFeatures.MERGE_SIMILAR_WARNINGS,\n analysisOptions.mergeSimilarWarnings);\n }",
"public interface BaseImageLoaderStrategy {\n //无占位图\n void loadImage(Object url, ImageView imageView);\n\n void loadImage(Object url, int placeholder, ImageView imageView);\n\n void loadImage(Context context, Object url, int placeholder, ImageView imageView);\n\n //这里的context指定为ApplicationContext\n void loadImageWithAppCxt(Object url, ImageView imageView);\n\n void loadImageWithListener(Object url, int placeholder, ImageView imageView, ImageLoadListener listener);\n\n void loadCenterCropWithCorner(Context context, Object model, ImageView imageView, int corner_px);\n\n void loadCenterCropWithCorner(Context context, Object model, int placeholder, ImageView imageView, int corner_px);\n\n void loadCircleImage(Object url, int placeholder, ImageView imageView);\n\n void loadCentercropCircleImage(Object model, int placeholder, ImageView imageView);\n\n void loadCircleImage(Bitmap bitmap, int placeholder, ImageView imageView);\n\n void loadCircleImage(Bitmap bitmap, int placeholder, ImageView imageView, ImageLoadListener listener);\n\n void loadCircleImage(Object url, int placeholder, ImageView imageView, ImageLoadListener listener);\n\n void loadCircleBorderImage(Object url, int placeholder, ImageView imageView, float borderWidth, int borderColor);\n\n void loadCornerImage(Bitmap bitmap, int placeholder, ImageView imageView, int dp);\n\n void loadCornerImage(Object url, int placeholder, ImageView imageView, int dp);\n\n void loadCornerImage(Object url, int placeholder, ImageView imageView, int dp, ImageLoadListener listener);\n\n //清除硬盘缓存\n void clearImageDiskCache(final Context context);\n\n //清除内存缓存\n void clearImageMemoryCache(Context context);\n\n //根据不同的内存状态,来响应不同的内存释放策略\n void trimMemory(Context context, int level);\n\n //获取缓存大小\n String getCacheSize(Context context);\n\n void saveImage(Context context, Object url, String savePath, String saveFileName, ImageSaveListener listener);\n\n void downloadOnly(Context context, String url, ImageDownloadListener listener);\n\n void loadDrawable(Context context, Object url, ImageDrawableListener listener);\n}",
"public void initImageLoader(Context context) {\n\n ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)\n .threadPoolSize(1)\n .tasksProcessingOrder(QueueProcessingType.LIFO)\n .diskCacheFileNameGenerator(new Md5FileNameGenerator())\n .threadPriority(Thread.NORM_PRIORITY - 2)\n .denyCacheImageMultipleSizesInMemory()\n .memoryCache(new WeakMemoryCache())\n .build();\n\t\t// Initialize ImageLoader with configuration.\n\t\tImageLoader.getInstance().init(config);\n\t}",
"@Override public void applyOptions(Context context, GlideBuilder builder) {\n builder.setDiskCache(\n new InternalCacheDiskCacheFactory(context, GLIDE_DISK_CACHE));\n }",
"public CrawlerConfiguration() {\n\t\tinitConfiguration();\n\t}",
"public abstract Builder options(RequestMappingInfo.BuilderConfiguration paramBuilderConfiguration);",
"protected void setJAIDefaultOptions() {\r\n\r\n\t\tthis.updateDynamicWelcomeText(\"Setting default JAI options...\");\r\n\r\n\t\tfinal long memCapacity = 1024L * 1024 * 1024; // 1024MByte\r\n\t\t// final long memCapacity = 0L; // 256MByte\r\n\t\t// final long tileCapacity = 1000L;\r\n\t\tJAI.getDefaultInstance().setTileCache(JAI.createTileCache(memCapacity));\r\n\t\tJAI.getDefaultInstance().setRenderingHint(\r\n\t\t\t\tJAI.KEY_CACHED_TILE_RECYCLING_ENABLED, Boolean.FALSE);\r\n\t\tTileScheduler ts = JAI.createTileScheduler();\r\n\t\tts.setPriority(Thread.MAX_PRIORITY);\r\n\t\t// ts.setParallelism(2); //default 2\r\n\t\tJAI.getDefaultInstance().setTileScheduler(ts);\r\n\r\n\t}",
"public void setDefaultParameters() {\n\t\toptions = 0;\n\t\toutBits = null;\n\t\ttext = new byte[0];\n\t\tyHeight = 3;\n\t\taspectRatio = 0.5f;\n\t}",
"public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}",
"public AdjustPeaksForPixelSensitivity_2(){\n super(\"AdjustPeaksForPixelSensitivity_2\");\n }",
"public void overrideProfileSize() {\n }",
"public ImageProcessor() {\n\t\t// Exit on Close\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t\t// sets up custom gain/bias filter objects\n\t\tadjustGain = new GainFilter();\n\t\tadjustBias = new BiasFilter();\n\n\t\t// Creates the Menus for file options, gain, and bias adjustments\n\t\toptionsMenu = new JMenu(\"File Options\");\n\t\tgainMenu = new JMenu(\"Gain Adjustment\");\n\t\tbiasMenu = new JMenu(\"Bias Adjustment\");\n\n\t\t// File Options Menu setup\n\t\topenImageOption = new JMenuItem(\"Open A New Image File\");\n\t\topenImageOption.addActionListener(this);\n\t\toptionsMenu.add(openImageOption);\n\n\t\t// Add Seperator in file menu\n\n\t\toptionsMenu.addSeparator();\n\n\t\tsaveImageOption = new JMenuItem(\"Save The Filtered Image\");\n\t\tsaveImageOption.addActionListener(this);\n\t\tsaveImageOption.setEnabled(false);\n\n\t\toptionsMenu.add(saveImageOption);\n\n\t\t// Setup bias Slider\n\t\tbiasFactorSlider = new JSlider(-200, 200);\n\t\tbiasFactorSlider.setMajorTickSpacing(50);\n\t\tbiasFactorSlider.setPaintTicks(true);\n\t\tbiasFactorSlider.setPaintLabels(true);\n\t\tbiasFactorSlider.addChangeListener(this);\n\t\tbiasFactorSlider.setEnabled(false);\n\t\tbiasFactorSlider.addChangeListener(this);\n\t\tbiasMenu.add(biasFactorSlider);\n\t\tbiasMenu.setEnabled(false);\n\n\t\t// Setup gain slider\n\t\tgainFactorSlider = new JSlider(2, 8);\n\t\tHashtable<Integer, JLabel> labelTable = new Hashtable<Integer, JLabel>();\n\t\tlabelTable.put(2, new JLabel(\"0.5\"));\n\t\tlabelTable.put(3, new JLabel(\"0.75\"));\n\t\tlabelTable.put(4, new JLabel(\"1.0\"));\n\t\tlabelTable.put(5, new JLabel(\"1.25\"));\n\t\tlabelTable.put(6, new JLabel(\"1.5\"));\n\t\tlabelTable.put(7, new JLabel(\"1.75\"));\n\t\tlabelTable.put(8, new JLabel(\"2.0\"));\n\t\tgainFactorSlider.setLabelTable(labelTable);\n\t\tgainFactorSlider.setPaintLabels(true);\n\t\tgainFactorSlider.setEnabled(false);\n\t\tgainFactorSlider.addChangeListener(this);\n\t\tgainMenu.add(gainFactorSlider);\n\t\tgainMenu.setEnabled(false);\n\n\t\t// Setup zoom slider\n\t\tzoomSlider = new JSlider(0, 10);\n\t\tzoomSlider.setMajorTickSpacing(1);\n\t\tzoomSlider.setPaintTicks(true);\n\t\tzoomSlider.setPaintLabels(true);\n\n\t\tzoomSlider.addChangeListener(this);\n\t\tJMenu zoomMenu = new JMenu(\"Zoom\");\n\t\tzoomMenu.add(zoomSlider);\n\n\t\t// Set up the menu bar, and add the items needed\n\t\tJMenuBar optionsBar = new JMenuBar();\n\t\toptionsBar.add(optionsMenu);\n\t\toptionsBar.add(biasMenu);\n\t\toptionsBar.add(gainMenu);\n\t\toptionsBar.add(zoomMenu);\n\t\tsetJMenuBar(optionsBar);\n\n\t\t//// Add Radio Buttons for the filters\n\t\tbutton1 = new JRadioButton(\"Red-Green Swap\", false);\n\t\tbutton2 = new JRadioButton(\"Red-Blue Swap\", false);\n\t\tbutton3 = new JRadioButton(\"Green-Blue Swap\", false);\n\t\tbutton4 = new JRadioButton(\"Black and White\", false);\n\t\tbutton5 = new JRadioButton(\"Rotate clockwise\", false);\n\t\tbutton6 = new JRadioButton(\"Rotate counter-clockwise\", false);\n\t\tbutton7 = new JRadioButton(\"Gain\", false);\n\t\tbutton8 = new JRadioButton(\"Bias\", false);\n\t\tbutton9 = new JRadioButton(\"Blur\", false);\n\t\tbutton10 = new JRadioButton(\"Red-Select\", false);\n\t\tbutton11 = new JRadioButton(\"Green-Select\", false);\n\t\tbutton12 = new JRadioButton(\"Blue-Select\", false);\n\n\t\t// Set Tool-tips for each radio Button\n\t\tbutton1.setToolTipText(\"This Filter will swap green colors with red\");\n\t\tbutton2.setToolTipText(\"This Filter will swap red colors with blue\");\n\t\tbutton3.setToolTipText(\"This Filter will swap green colors with blue\");\n\t\tbutton4.setToolTipText(\"This Filter will convert the image to Black and White\");\n\t\tbutton5.setToolTipText(\"This Button will rotate the image clockwise\");\n\t\tbutton6.setToolTipText(\"This Button will rotate the image counterclock-wise\");\n\t\tbutton7.setToolTipText(\"This Filter can make the image contrast brighter or darker, use slider to adjust\");\n\t\tbutton8.setToolTipText(\n\t\t\t\t\"This Filter will select a bais filter, you can select how bright or dark you want the image to be\");\n\t\tbutton9.setToolTipText(\"This Filter will blur the image\");\n\t\tbutton10.setToolTipText(\"This Filter will smooth out red areas of the image pallet\");\n\t\tbutton11.setToolTipText(\"This FIlter will smooth out green areas of the image pallet\");\n\t\tbutton12.setToolTipText(\"This Filter will smooth out blue areas of the image pallet\");\n\t\t// Set tool-tips for each slider\n\t\tbiasFactorSlider.setToolTipText(\n\t\t\t\t\"Slide to adjust the amount of bias, and select Apply {Negative values will make image darker, positive values will make image brighter}\");\n\t\tgainFactorSlider.setToolTipText(\n\t\t\t\t\"Slide to adjust the amount of gain, and select Apply {Higher gain values will result in higher contrast, and brighter image}\");\n\n\t\t// Create a button group to store the buttons so only one can be\n\t\t// selected\n\t\tfilterGroup = new ButtonGroup();\n\t\tfilterGroup.add(button1);\n\t\tfilterGroup.add(button2);\n\t\tfilterGroup.add(button3);\n\t\tfilterGroup.add(button4);\n\t\tfilterGroup.add(button5);\n\t\tfilterGroup.add(button6);\n\t\tfilterGroup.add(button7);\n\t\tfilterGroup.add(button8);\n\t\tfilterGroup.add(button9);\n\t\tfilterGroup.add(button10);\n\t\tfilterGroup.add(button11);\n\t\tfilterGroup.add(button12);\n\n\t\t// Add a new panel to put into main panel\n\t\tradioButtons = new JPanel();\n\t\tradioButtons.setLayout(new GridLayout(4, 3));\n\t\tradioButtons.add(button1);\n\t\tradioButtons.add(button2);\n\t\tradioButtons.add(button3);\n\t\tradioButtons.add(button4);\n\t\tradioButtons.add(button5);\n\t\tradioButtons.add(button6);\n\t\tradioButtons.add(button7);\n\t\tradioButtons.add(button8);\n\t\tradioButtons.add(button9);\n\t\tradioButtons.add(button10);\n\t\tradioButtons.add(button11);\n\t\tradioButtons.add(button12);\n\n\t\tradioButtons\n\t\t\t\t.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Select an Option:\"));\n\t\t// Initially Disable the Radio Buttons\n\t\tbutton1.setEnabled(false);\n\t\tbutton2.setEnabled(false);\n\t\tbutton3.setEnabled(false);\n\t\tbutton4.setEnabled(false);\n\t\tbutton5.setEnabled(false);\n\t\tbutton6.setEnabled(false);\n\t\tbutton7.setEnabled(false);\n\t\tbutton8.setEnabled(false);\n\t\tbutton9.setEnabled(false);\n\t\tbutton10.setEnabled(false);\n\t\tbutton11.setEnabled(false);\n\t\tbutton12.setEnabled(false);\n\n\t\t// Setup Multi-selection radio buttons\n\t\tOn = new JRadioButton(\"On\");\n\t\tOff = new JRadioButton(\"Off\");\n\t\tmultiSelect = new ButtonGroup();\n\t\tmultiSelect.add(On);\n\t\tmultiSelect.add(Off);\n\n\t\tOn.setEnabled(false);\n\t\tOff.setEnabled(false);\n\t\tmultiSelectPanel = new JPanel();\n\t\tmultiSelectPanel.setLayout(new GridLayout(1, 3));\n\t\tmultiSelectPanel.add(On);\n\t\tmultiSelectPanel.add(Off);\n\t\tmultiSelectPanel\n\t\t\t\t.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Multi-Filter Select\"));\n\t\tmultiSelectPanel.setPreferredSize(new Dimension(150, 80));\n\n\t\t// Sets up the Tabbed Pane for the image\n\n\t\timagePane = new JTabbedPane();\n\n\t\t// Create a button to apply filters, and to apply adjustments\n\t\tfilterButton = new JButton(\"Apply\");\n\t\tfilterButton.setEnabled(false);\n\t\tfilterButton.setToolTipText(\"Apply the Selected Operation\");\n\n\t\t// Setup Crop Button\n\t\tcropButton = new JButton(\"Crop\");\n\t\tcropButton.setEnabled(false);\n\t\tcropButton.setToolTipText(\"Select Region of Image to Crop\");\n\n\t\t// Set up region selection button\n\t\tregionFilterButton = new JButton(\"Region Filter\");\n\t\tregionFilterButton.setEnabled(false);\n\t\tregionFilterButton.setToolTipText(\n\t\t\t\t\"Select this button to apply filter to a region of Image, will not work for Rotation, blur, gain, and bias\");\n\n\t\t// Setup panel for Apply, crop, and region-select buttons\n\t\tselectionPanel = new JPanel();\n\t\tselectionPanel.setLayout(new GridLayout(1, 2));\n\t\tselectionPanel.setPreferredSize(new Dimension(350, 30));\n\t\tselectionPanel.add(filterButton);\n\t\tselectionPanel.add(cropButton);\n\t\tselectionPanel.add(regionFilterButton);\n\n\t\t// Set the JPanel area\n\t\tJPanel content = new JPanel();\n\t\tcontent.setLayout(new FlowLayout());\n\t\tcontent.setPreferredSize(new Dimension(1024, 900));\n\t\tcontent.add(radioButtons);\n\t\tcontent.add(multiSelectPanel);\n\n\t\tcontent.add(selectionPanel);\n\t\tcontent.add(imagePane);\n\t\tsetTitle(\"ImageProcessor\");\n\t\tsetContentPane(content);\n\t\tpack();\n\n\t\t// All major events for standard filters will occur when the \"apply\"\n\t\t// button is pressed\n\n\t\tfilterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tOn.setEnabled(true);\n\t\t\t\tOff.setEnabled(true);\n\t\t\t\tgainMenu.setEnabled(false);\n\t\t\t\tbiasMenu.setEnabled(false);\n\t\t\t\tgainFactorSlider.setEnabled(false);\n\t\t\t\tbiasFactorSlider.setEnabled(false);\n\n\t\t\t\t// Setup conditions depending on which button is pressed\n\n\t\t\t\tif (button1.isSelected()) {\n\n\t\t\t\t\tf = new RedGreenSwapFilter();\n\n\t\t\t\t} else if (button2.isSelected()) {\n\n\t\t\t\t\tf = new RedBlueSwapFilter();\n\n\t\t\t\t} else if (button3.isSelected()) {\n\n\t\t\t\t\tf = new GreenBlueSwapFilter();\n\n\t\t\t\t} else if (button4.isSelected()) {\n\n\t\t\t\t\tf = new BlackAndWhiteFilter();\n\n\t\t\t\t} else if (button5.isSelected()) {\n\n\t\t\t\t\tf = new RotateClockwise();\n\n\t\t\t\t} else if (button6.isSelected()) {\n\n\t\t\t\t\tf = new RotateCounterClockwise();\n\n\t\t\t\t} else if (button7.isSelected()) {\n\t\t\t\t\t// conditions to apply gain filter\n\t\t\t\t\tgainMenu.setEnabled(true);\n\t\t\t\t\tgainFactorSlider.setEnabled(true);\n\n\t\t\t\t\tadjustGain.setGainValue(gainFactor);\n\t\t\t\t\tfinalImage = adjustGain.filter(originalImage);\n\n\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t} else {\n\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t}\n\n\t\t\t\t} else if (button8.isSelected()) {\n\t\t\t\t\t// conditions to apply bias filter\n\t\t\t\t\tbiasMenu.setEnabled(true);\n\t\t\t\t\tbiasFactorSlider.setEnabled(true);\n\n\t\t\t\t\tadjustBias.setBiasValue(biasFactor);\n\t\t\t\t\tfinalImage = adjustBias.filter(originalImage);\n\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t} else {\n\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t}\n\n\t\t\t\t} else if (button9.isSelected()) {\n\n\t\t\t\t\tf = new BlurFilter();\n\n\t\t\t\t} else if (button10.isSelected()) {\n\n\t\t\t\t\tf = new RedSelectFilter();\n\n\t\t\t\t} else if (button11.isSelected()) {\n\n\t\t\t\t\tf = new GreenSelectFilter();\n\n\t\t\t\t} else {\n\n\t\t\t\t\tf = new BlueSelectFilter();\n\t\t\t\t}\n\t\t\t\t// Determines is multi filter apply selection option button is\n\t\t\t\t// on or off\n\t\t\t\tif (!(button7.isSelected() || button8.isSelected())) {\n\n\t\t\t\t\tif ((!On.isSelected()) || (Off.isSelected())) {\n\n\t\t\t\t\t\tfinalImage = f.filter(originalImage);\n\n\t\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinalImage = f.filter(finalImage);\n\n\t\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tsaveImageOption.setEnabled(true);\n\n\t\t\t}\n\t\t});\n\n\t\t// Crop Button action Listener\n\n\t\tcropButton.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// make buttons visable\n\t\t\t\tOn.setEnabled(true);\n\t\t\t\tOff.setEnabled(true);\n\t\t\t\t// if multi select option is turned on, then cumilitive effects\n\t\t\t\t// will occur with crop\n\t\t\t\tif ((!On.isSelected()) || (Off.isSelected())) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tf2 = new CropImageFilter();\n\t\t\t\t\t\tf2.setRegion(originalPanel.getSelectedRegion());\n\t\t\t\t\t\tfinalImage = f2.filter(originalImage);\n\t\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception d) {\n\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tf2 = new CropImageFilter();\n\t\t\t\t\t\tf2.setRegion(originalPanel.getSelectedRegion());\n\t\t\t\t\t\tfinalImage = f2.filter(finalImage);\n\t\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception d) {\n\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t\t// Region Filter Button Listener\n\t\tregionFilterButton.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tOn.setEnabled(true);\n\t\t\t\tOff.setEnabled(true);\n\t\t\t\t// sets up the filtering\n\t\t\t\tif (button1.isSelected()) {\n\t\t\t\t\tf2 = new RedGreenSwapSelect();\n\t\t\t\t} else if (button2.isSelected()) {\n\t\t\t\t\tf2 = new RedBlueSwapSelect();\n\t\t\t\t} else if (button3.isSelected()) {\n\t\t\t\t\tf2 = new GreenBlueSwapSelect();\n\t\t\t\t} else if (button4.isSelected()) {\n\t\t\t\t\tf2 = new BlackAndWhiteSelect();\n\t\t\t\t} else if (button9.isSelected()) {\n\t\t\t\t\tf2 = new BlurFilterSelect();\n\n\t\t\t\t} else if (button10.isSelected()) {\n\t\t\t\t\tf2 = new RedSelectFilterSelect();\n\t\t\t\t} else if (button11.isSelected()) {\n\t\t\t\t\tf2 = new GreenSelectFilterSelect();\n\t\t\t\t} else if (button12.isSelected()) {\n\t\t\t\t\tf2 = new BlueSelectFilterSelect();\n\t\t\t\t}\n\t\t\t\t// if statement will determine is multi selection option is\n\t\t\t\t// turned on for cumulative selection,\n\t\t\t\t// if on, it will accumulate the filters.\n\t\t\t\tif ((!On.isSelected()) || (Off.isSelected())) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tf2.setRegion(originalPanel.getSelectedRegion());\n\t\t\t\t\t\tfinalImage = f2.filter(originalImage);\n\t\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception d) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tf2.setRegion(originalPanel.getSelectedRegion());\n\t\t\t\t\t\tfinalImage = f2.filter(finalImage);\n\t\t\t\t\t\tif (imagePane.getTabCount() >= 2) {\n\t\t\t\t\t\t\timagePane.setComponentAt(1, new ImagePanel(finalImage));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timagePane.add(new ImagePanel(finalImage), \"Filtered\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception d) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t}",
"@Override\n public void settings(){\n size(500, 500);\n }",
"public void setPerformanceTuningSettings(Properties aPerformanceTuningSettings) {\n mPerformanceTuningSettings = aPerformanceTuningSettings;\n }",
"private static Bitmap readImageWithSampling(String imagePath, int targetWidth, int targetHeight,\n Bitmap.Config bmConfig) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(imagePath, bmOptions);\n\n int photoWidth = bmOptions.outWidth;\n int photoHeight = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoWidth / targetWidth, photoHeight / targetHeight);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inPreferredConfig = bmConfig;\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bmOptions.inDither = false;\n\n Bitmap orgImage = BitmapFactory.decodeFile(imagePath, bmOptions);\n\n return orgImage;\n\n }",
"public FireflyOptimization(){\n this(25, 1000);\n }",
"public LimitConfiguration() {\n try {\n yellowLimit = new AlertLimit((float) 0.75);\n redLimit = new AlertLimit((float)0.9);\n } catch(Exception e){\n //This exception should not happen\n System.out.println(e.getMessage());\n }\n }",
"public ListenerConfig(String threshold, int size) { \n\t\tmThreshold = threshold;\n\t\tmSize = size;\n\t}",
"void configure(DecisionContextItemConfig config);",
"public void settings() {\n size(640, 384);\n }",
"@Override\n public void setupConfiguration(Configuration config)\n {\n\n }",
"public ConfigGeneratorApi(ToolOptions options) {\n super(options);\n }",
"@Generated\n @Selector(\"configurationWithScale:\")\n public static native UIImageSymbolConfiguration configurationWithScale(@NInt long scale);",
"public static Config createJeruslaemConfig() {\n\t\tConfig config = ConfigUtils.createConfig();\n\n\t\tconfig.network().setInputFile(INPUT_NETWORK);\n\t\tconfig.plans().setInputFile(INPUT_POPULATION);\n\t\tconfig.facilities().setInputFile(INPUT_FACILITES);\n\t\tconfig.households().setInputFile(INPUT_HOUSEHOLDS);\n\n\t\t// modify controler\n\t\tconfig.controler().setWriteEventsInterval(25);\n\t\tconfig.controler().setWritePlansInterval(25);\n\t\tconfig.controler().setEventsFileFormats(EnumSet.of(EventsFileFormat.xml));\n\t\tconfig.controler().setOutputDirectory(OUTPUT_FOLDER + RUN_ID + \"/\");\n\t\tconfig.controler().setOverwriteFileSetting(OverwriteFileSetting.overwriteExistingFiles);\n\t\tconfig.controler().setFirstIteration(0);\n\t\tconfig.controler().setLastIteration(300);\n\t\tconfig.controler().setMobsim(\"qsim\");\n\t\tconfig.controler().setRoutingAlgorithmType(RoutingAlgorithmType.FastAStarLandmarks);\n\t\tconfig.controler().setRunId(RUN_ID);\n\t\t\n\t\t// modify Qsim\n\t\tconfig.qsim().setStartTime(0.0);\n\t\tconfig.qsim().setEndTime(30 * 3600);\n\t\tconfig.qsim().setFlowCapFactor(0.3);\n\t\tconfig.qsim().setStorageCapFactor(Math.pow(0.3, 0.75));\n\t\tconfig.qsim().setNumberOfThreads(12);\n\t\tconfig.qsim().setSnapshotPeriod(1);\n\t\tconfig.qsim().setStuckTime(10);//30,60 or multiply by 60\n\t\tconfig.qsim().setRemoveStuckVehicles(false);\n\t\tconfig.qsim().setTimeStepSize(1);\n\t\tconfig.qsim().setTrafficDynamics(TrafficDynamics.kinematicWaves);// kinematic waves\n\t\tconfig.qsim().setMainModes(Arrays.asList(TransportMode.car));\n\t\tconfig.qsim().setInsertingWaitingVehiclesBeforeDrivingVehicles(true);\n\n\t\t// modify global\n\t\tconfig.global().setCoordinateSystem(\"EPSG:2039\");\n\t\tconfig.global().setNumberOfThreads(16);\n\t\t// ?? random seed?<param name=\"randomSeed\" value=\"4711\" />\n\t\t\n\t\t// Add transit\n\t\tconfig.transit().setUseTransit(true);\n\t\tconfig.transit().setTransitScheduleFile(INPUT_TRANSIT_SCHEDULE);\n\t\tconfig.transit().setVehiclesFile(INPUT_TRANSIT_VEHICLES);\n\t\t\n\n\n//\t\t// Add sub-tour mode choice\n//\t\tconfig.subtourModeChoice()\n//\t\t\t\t.setModes(new String[] { TransportMode.car, TransportMode.pt, TransportMode.walk, TransportMode.bike });\n//\t\t// TODO check that bike is biycle\n//\t\tconfig.subtourModeChoice().setChainBasedModes(new String[] { TransportMode.car });\n//\n\t\t// Add sub-tour mode choice\n\t\tconfig.timeAllocationMutator().setMutationRange(3600);\n\n\t\t// Add strategy\n\t\tconfig.strategy().setMaxAgentPlanMemorySize(5);\n\t\tconfig.strategy().setFractionOfIterationsToDisableInnovation(0.8);\n\n\t\t// Add strategy - plan selector\n\t\tStrategySettings changeExpStrategy = new StrategySettings();\n\t\tchangeExpStrategy.setDisableAfter(-1);\n\t\tchangeExpStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultSelector.ChangeExpBeta.toString());\n\t\tchangeExpStrategy.setWeight(0.8);\n\t\tconfig.strategy().addStrategySettings(changeExpStrategy);\n\n//\t\t Add strategy - time-mutation\n\t\tStrategySettings timeMutatorStrategy = new StrategySettings();\n\t\ttimeMutatorStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.TimeAllocationMutator.toString());\n\t\ttimeMutatorStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(timeMutatorStrategy);\n\n\t\t// Add strategy - re-route\n\t\tStrategySettings reRouteStrategy = new StrategySettings();\n\t\treRouteStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.ReRoute.toString());\n\t\treRouteStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(reRouteStrategy);\n\n//\t\t Add strategy - Sub-tour strategy\n\t\tStrategySettings subTourModeChoiceStrategy = new StrategySettings();\n\t\tsubTourModeChoiceStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.SubtourModeChoice.toString());\n\t\tsubTourModeChoiceStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(subTourModeChoiceStrategy);\n\n\t\t// add car Availability after adding attributes to popualtion\n\t\t config.subtourModeChoice().setConsiderCarAvailability(true);\n\n\t\t// add network modes which are simulated on network in future add more modes\n\t\t// config.plansCalcRoute().setNetworkModes(Arrays.asList(TransportMode.car));\n\t\t// config.plansCalcRoute().setInsertingAccessEgressWalk(true);\n\n\t\t// // just a place hodler\n\t\t// ModeRoutingParams taxiModeRoute = new ModeRoutingParams();\n\t\t// taxiModeRoute.setMode(TransportMode.taxi);\n\t\t// taxiModeRoute.setTeleportedModeSpeed(100.0);\n\t\t// config.plansCalcRoute().addModeRoutingParams(taxiModeRoute);\n\n\t\t// global scoring values taken from TLVM model = SF 14\n\t\tconfig.planCalcScore().setEarlyDeparture_utils_hr(0.0);\n\t\tconfig.planCalcScore().setLateArrival_utils_hr(0);\n\t\tconfig.planCalcScore().setMarginalUtilityOfMoney(0.062);\n\t\tconfig.planCalcScore().setPerforming_utils_hr(0.96);\n\t\tconfig.planCalcScore().setUtilityOfLineSwitch(0);\n\t\tconfig.planCalcScore().setMarginalUtlOfWaitingPt_utils_hr(-0.18);\n\n\t\t// car scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams carCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.car);\n\t\tcarCalcScoreParams.setConstant(-0.562);\n\t\tcarCalcScoreParams.setMode(\"car\");\n\t\tcarCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(carCalcScoreParams);\n\n\t\t// PT scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams ptCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.pt);\n\t\tptCalcScoreParams.setConstant(-0.124);\n\t\tptCalcScoreParams.setMode(\"pt\");\n\t\tptCalcScoreParams.setMarginalUtilityOfTraveling(-0.18);\n\t\tconfig.planCalcScore().addModeParams(ptCalcScoreParams);\n\n\t\t// Walk scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams walkCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.walk);\n\t\twalkCalcScoreParams.setMode(\"walk\");\n\t\twalkCalcScoreParams.setMarginalUtilityOfTraveling(-1.14);\n\t\tconfig.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO get values for Taxi scoring\n\t\t// Taxi scoring functions place holder (taken from car)\n\t\t// PlanCalcScoreConfigGroup.ModeParams TaxiCalcScoreParams = new\n\t\t// PlanCalcScoreConfigGroup.ModeParams(TransportMode.taxi);\n\t\t// TaxiCalcScoreParams.setConstant(-0.562);\n\t\t// TaxiCalcScoreParams.setMode(\"taxi\");\n\t\t// TaxiCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\t// config.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO add ride as network mode remove from modechoice\n\t\t// Ride scoring functions place holder taken from Berlin MATSim model -\n\t\t// monetaryDistanceRate same as car -0.0004\n\t\tPlanCalcScoreConfigGroup.ModeParams rideCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.ride);\n\t\trideCalcScoreParams.setMode(\"ride\");\n\t\trideCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(rideCalcScoreParams);\n\n\t\t// TODO check with JLM bike - bicyle\n\t\t// bike scoring functions place holder taken from Berlin MATSim model of bicyke\n\t\tPlanCalcScoreConfigGroup.ModeParams bikeCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.bike);\n\t\tbikeCalcScoreParams.setConstant(-1.9);\n\t\tbikeCalcScoreParams.setMode(\"bike\");\n\t\tconfig.planCalcScore().addModeParams(bikeCalcScoreParams);\n\n\t\t// TODO get activities open hours\n\t\tActivityParams home = new ActivityParams(\"home\");\n\t\thome.setTypicalDuration(16 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(home);\n\n\t\tActivityParams work = new ActivityParams(\"work\");\n\t\twork.setOpeningTime(6 * 3600);\n\t\twork.setClosingTime(20 * 3600);\n\t\twork.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(work);\n\n\t\tActivityParams school = new ActivityParams(\"school\");\n\t\tschool.setOpeningTime(8 * 3600);\n\t\tschool.setClosingTime(14 * 3600);\n\t\tschool.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(school);\n\n\t\tActivityParams leisure = new ActivityParams(\"leisure\");\n\t\tleisure.setOpeningTime(9 * 3600);\n\t\tleisure.setClosingTime(24 * 3600);\n\t\tleisure.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(leisure);\n\n\t\tActivityParams other = new ActivityParams(\"other\");\n\t\tother.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(other);\n\n\t\treturn config;\n\n\t}",
"public interface Settings {\n boolean dynamicMetricsEnabled();\n}"
]
| [
"0.6340863",
"0.57906646",
"0.5732757",
"0.56633276",
"0.56220955",
"0.555943",
"0.55333996",
"0.5359088",
"0.5340771",
"0.5277873",
"0.5272685",
"0.52127135",
"0.5180789",
"0.51478416",
"0.51308477",
"0.5125148",
"0.50945455",
"0.5088088",
"0.50816613",
"0.5068659",
"0.5040782",
"0.49670237",
"0.49617356",
"0.4941473",
"0.49355033",
"0.49312535",
"0.49283284",
"0.49253446",
"0.4918113",
"0.48821416",
"0.48730654",
"0.48645014",
"0.48519352",
"0.48463583",
"0.47761884",
"0.47725388",
"0.4759682",
"0.4735889",
"0.47349015",
"0.47311482",
"0.47304052",
"0.47282454",
"0.4727777",
"0.47259316",
"0.47011146",
"0.46913728",
"0.46895623",
"0.46887305",
"0.46844038",
"0.46779317",
"0.46733013",
"0.4672834",
"0.46720496",
"0.46715543",
"0.46620655",
"0.46616217",
"0.46579173",
"0.46502241",
"0.46441054",
"0.46355906",
"0.46218693",
"0.46151984",
"0.46151885",
"0.46121",
"0.46094602",
"0.46089792",
"0.46028394",
"0.4601717",
"0.46006554",
"0.45948637",
"0.45945194",
"0.45911607",
"0.4583212",
"0.45781538",
"0.45761344",
"0.45750007",
"0.45701483",
"0.4555413",
"0.45552403",
"0.45543706",
"0.45514253",
"0.45452613",
"0.4542231",
"0.4522934",
"0.45226485",
"0.451965",
"0.45191106",
"0.45153773",
"0.45123768",
"0.45115927",
"0.45065275",
"0.45022792",
"0.44998366",
"0.4497534",
"0.4486203",
"0.44844204",
"0.44842938",
"0.4483031",
"0.4476272",
"0.44758186"
]
| 0.4649683 | 58 |
Get file format description | public String getDescription()
{
return "unknow";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String descFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return f.getPath();\n }\n return StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }",
"FileFormat getFormat();",
"public abstract String getFileFormatName();",
"@UML(identifier=\"fileFormat\", obligation=MANDATORY, specification=ISO_19139)\n Format getFileFormat();",
"public static String getSupportedformats() {\r\n\t\tString description = \"\";\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tdescription += ff.description +\"\\n\";\r\n\t\t\t}\r\n\t\treturn description;\r\n\t}",
"public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}",
"public FileDesc getFileDesc();",
"public String getReadFormatDescription(int formatIndex);",
"Object getFormat();",
"public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }",
"private String inFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return \" in format file \" + f.getPath();\n }\n return \" in format \" + StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }",
"@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }",
"public String fileFormat() {\n DateTimeFormatter df = DateTimeFormatter.ofPattern(\"dd MMM yyyy HHmm\");\n return \"D | \" + (super.isDone ? \"1 | \" : \"0 | \") + this.description + \" | \" + df.format(this.date);\n }",
"public String getWriteFormatDescription(int formatIndex);",
"@Override\n public String toString() {\n String str = \"Unknown file format\";\n //$$fb2002-11-01: fix for 4672864: AudioFileFormat.toString() throws unexpected NullPointerException\n if (getType() != null) {\n str = getType() + \" (.\" + getType().getExtension() + \") file\";\n }\n if (getByteLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", byte length: \" + getByteLength();\n }\n str += \", data format: \" + getFormat();\n if (getFrameLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", frame length: \" + getFrameLength();\n }\n return str;\n }",
"public String getFileTypeDescription() {\n return \"GrADS Binary Gridded Data\";\n }",
"String getContentFormat();",
"String getFormat();",
"String getFormat();",
"String getFormat();",
"public String getFormat() throws Exception {\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@metaFormat\").getText();\n\t}",
"public String getTypeDescription(FileObject f)\n {\n return getName(f);\n }",
"public String getFiledesc() {\n return filedesc;\n }",
"String documentFormat();",
"@Override\n public String getDescription() {\n return \"(*.txt) (*.avro) (*.json) (*.text) (*.seqjson) (*.seqfile)\";\n }",
"public String getDescription(FileObject f)\n {\n return getName(f);\n }",
"String getFpDescription();",
"public String getChangeFileEndFormat() {\r\n \t\treturn properties.getProperty(KEY_CHANGE_FILE_END_FORMAT);\r\n \t}",
"public String getFormatDesign() {\n return (String)getAttributeInternal(FORMATDESIGN);\n }",
"public int getFormat()\n {\n return format;\n }",
"public String getFormat() {\n\t\treturn getAttribute(FORMAT_TAG);\n\t}",
"public String getReadFileExtension(int formatIndex);",
"public String getFormatCode() {\n if (format == null) return \"MP4\";\n switch(format) {\n case \"Windows Media\": return \"WMV\";\n case \"Flash Video\": return \"FLV\";\n case \"MPEG-4\": return \"MP4\";\n case \"Matroska\": return \"MKV\";\n case \"AVI\": return \"AVI\";\n default: return \"MP4\";\n }\n }",
"public String getChangeFileBeginFormat() {\r\n \t\treturn properties.getProperty(KEY_CHANGE_FILE_BEGIN_FORMAT);\r\n \t}",
"public abstract String getImageFormat();",
"com.google.protobuf.ByteString\n getFormatBytes();",
"public String getDescription() {\n return \"Text file (.text)\";\n }",
"public String getFormat() {\n\t\treturn format;\n\t}",
"public int getFormat ()\n {\n return this.format;\n }",
"public String[] getSupportedFileFormatsList();",
"public String getFormat()\n {\n return format;\n }",
"public String getFormattedFileContents ();",
"public String getFormat() {\n return format;\n }",
"public String getFormat() {\n return format;\n }",
"public String getFormat() {\n return format;\n }",
"public String getDescription() {\n return \"*\" + extension_pattern;\n }",
"public String getDescription() {\n return \"*\" + extension_pattern;\n }",
"public final AdFormat getFormat() {\n\t\treturn impl.getFormat();\n }",
"public String getFormat() {\r\n return _format;\r\n }",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"@Override\n\t\t\tpublic String getDescription() {\n\t\t\t\treturn \"*.dat file\";\n\t\t\t}",
"Format internalGetFormat()\n {\n return doGetFormat();\n }",
"@Override\n public String getFormatName() throws IOException {\n return input == null? myDefaultFormat.getName() : getInfo().getFormat().getName();\n }",
"ImageFormat getFormat();",
"public RMFormat getFormat()\n {\n return getStyle().getFormat();\n }",
"public boolean fileFormatSupported(String fmt);",
"public String getFormat() {\n return this.format;\n }",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();"
]
| [
"0.7948487",
"0.7896145",
"0.78269976",
"0.76726055",
"0.7577224",
"0.7570288",
"0.7569642",
"0.7419354",
"0.7334358",
"0.72026867",
"0.7163753",
"0.714408",
"0.7119055",
"0.70762223",
"0.70335996",
"0.6993277",
"0.6984089",
"0.697011",
"0.697011",
"0.697011",
"0.69129926",
"0.6854501",
"0.6848476",
"0.6843897",
"0.68143",
"0.67814374",
"0.6781391",
"0.6735579",
"0.6713386",
"0.6710843",
"0.66797537",
"0.66783816",
"0.6666131",
"0.66661215",
"0.6653604",
"0.6628337",
"0.6611084",
"0.65903413",
"0.65880877",
"0.655578",
"0.6549474",
"0.6527554",
"0.65239507",
"0.65239507",
"0.65239507",
"0.6509833",
"0.6509833",
"0.6505235",
"0.65038353",
"0.64386934",
"0.64386934",
"0.64386934",
"0.64386934",
"0.64386934",
"0.64386934",
"0.64386934",
"0.64386934",
"0.64386934",
"0.64333135",
"0.64044815",
"0.63812363",
"0.6368537",
"0.6367603",
"0.63666785",
"0.6334334",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849",
"0.6326849"
]
| 0.0 | -1 |
Get file format extensions | public String[] getExtensions()
{
return new String[] {""};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFileExtension();",
"String getFileExtension();",
"public List<String> getFileExtensions()\n/* */ {\n/* 619 */ if ((useRegisteredSuffixPatternMatch()) && (this.contentNegotiationManager != null)) {\n/* 620 */ return this.contentNegotiationManager.getAllFileExtensions();\n/* */ }\n/* 622 */ return null;\n/* */ }",
"public String getFileExtension() {\n return toString().toLowerCase();\n }",
"public String getExt() {\n\t\treturn IpmemsFile.getFileExtension(file);\n\t}",
"protected abstract String getFileExtension();",
"String getExtension();",
"public abstract String getFileExtension();",
"private String extensions() {\n return Arrays.stream(f.getName().split(\"\\\\.\")).skip(1).collect(Collectors.joining(\".\"));\n }",
"public String getReadFileExtension(int formatIndex);",
"public String[] getSupportedFileFormatsList();",
"public String fileExtension() {\r\n return getContent().fileExtension();\r\n }",
"public String getWriteFileExtension(int formatIndex);",
"public static String getFileExtension() {\n return fileExtension;\n }",
"String getFileExtensionByFileString(String name);",
"private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }",
"String getOutputExtension();",
"public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn filename.substring(dotIndex + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn \"\"; // no dot in filename\r\n\t\t\t}\r\n\t\t}",
"public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }",
"public String[] getExtensions() {\n return new String[] { \"ino\", \"pde\", \"c\", \"cpp\", \"h\" };\n }",
"public String getExtensions()\n {\n return ext;\n }",
"public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}",
"private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }",
"public String[] getExtensions() {\n\t\treturn url.getExtensions();\n }",
"private String getFileExtension(File f) {\n String fileName = f.getName();\n return getFileExtension(fileName);\n }",
"public String extension() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n return fullPath.substring(dot + 1);\n }",
"public String[] getOutputExtensions();",
"public static String getSupportedformats() {\r\n\t\tString description = \"\";\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tdescription += ff.description +\"\\n\";\r\n\t\t\t}\r\n\t\treturn description;\r\n\t}",
"public String getExtensions() {\n return extensions;\n }",
"public String[] getExtensions() {\r\n return extensions;\r\n }",
"java.lang.String getExtensionText();",
"public String[] getExtensions()\n\t{\n\t\treturn extensions;\n\t}",
"public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}",
"private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }",
"private static String getFileExtension(String fileName) {\r\n\t\tString ext = IConstants.emptyString;\r\n\t\tint mid = fileName.lastIndexOf(\".\");\r\n\t\text = fileName.substring(mid + 1, fileName.length());\r\n\t\tSystem.out.println(\"File Extension --\" + ext);\r\n\t\treturn ext;\r\n\t}",
"public static FileFormat getFileFormat(String ext)\r\n {\r\n return getFileFormat(ext, null);\r\n }",
"List<String> getAllowedExtensions();",
"public ArrayList<String> getAvalaibleExtensions() {\n ArrayList<String> ext = new ArrayList<String>();\n ext.add(\"txt\");\n return ext;\n }",
"public static String[] getAcceptedExtensions()\n\t{\n\t\tArrayList<String> acceptedExtensions = new ArrayList<String>();\n\n\t\tfor (ImageWriter imageWriter : imageWriters)\n\t\t{\n\t\t\tString[] imageFormats = imageWriter.getAcceptedImageFormats();\n\n\t\t\tif (imageFormats != null)\n\t\t\t{\n\t\t\t\tfor (String format : imageFormats)\n\t\t\t\t{\n\t\t\t\t\tacceptedExtensions.add(format);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tString[] toReturn = null;\n\t\treturn (String[])acceptedExtensions.toArray( toReturn );\n\t}",
"public String getOutputExtension(String inputExtension);",
"@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // [email protected]: Review of patch from [email protected]\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }",
"String[] getFileTypes();",
"public List<String> getExts() {\n return this.exts;\n }",
"private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }",
"public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}",
"private static String getFileExtension(File cFile) {\n\t\tString oldname = cFile.getName();\r\n\t\tString extension = oldname.substring(oldname.lastIndexOf(\".\"));\r\n\t\treturn extension;\r\n\t}",
"@CheckForNull\n String getPreferredExtension();",
"public String getExtension() {\n return extension;\n }",
"public String getExtension() {\n return extension;\n }",
"String getContentType(String fileExtension);",
"public final String getExtension(File f) {\n\t String ext = null;\n\t String s = f.getName();\n\t int i = s.lastIndexOf('.');\n\n\t if (i > 0 && i < s.length() - 1) {\n\t ext = s.substring(i+1).toLowerCase();\n\t }\n\t return ext;\n\t }",
"public abstract String getFileFormatName();",
"public FileNameExtensionFilter getExtensionFilter() {\r\n\t\treturn extensionFilter;\r\n\t}",
"public static String getFileExtension(URL url) {\n\t\tString fileName = url.getFile();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}",
"String getFileMimeType();",
"public String getExtension() {\n return extension;\n }",
"protected String getExtension() {\n\t\treturn \"\";\n\t}",
"public String getFileExtension(File file) {\n String name = file.getName();\n try {\n return name.substring(name.lastIndexOf(\".\") + 1);\n } catch (Exception e) {\n return \"\";\n }\n }",
"final public String getExtension()\n\t{\n\t\treturn this.getLocation().getExtension(); \n\t}",
"default String fileExtension() {\n\t\treturn \".json\";\n\t}",
"private String getFileExtension(String fileName) {\n return fileName.substring(fileName.lastIndexOf('.') + 1);\n }",
"public Set<String> getSupportedExtensions() {\n\t\tLogger.i(TAG, \"getSupportedExtensions value \" + extensions);\n\t\treturn extensions;\n\t}",
"public String getFormatByExtension(String fileExtenstion) throws DataServiceException{\r\n\t\tString format = \"\";\r\n\t\tformat = (String)queryForObject(\"document.query_format\",fileExtenstion);\r\n\t\treturn format;\r\n\t}",
"protected FileNameExtensionFilter[] getExtensions()\n {\n List<FileNameExtensionFilter> filters = new ArrayList<FileNameExtensionFilter>();\n\n // Step through each engine factory\n for (ScriptEngineFactory factory : scriptFactories)\n {\n // Get the engine language name\n String name = factory.getLanguageName();\n\n // Check if the name begins with \"ECMA\"\n if (name.toLowerCase().startsWith(\"ecma\"))\n {\n // Use \"JavaScript\" in place of \"ECMAScript\"\n name = \"JavaScript\";\n }\n // Not JavaScript\n else\n {\n // Capitalize the first letter of the engine name\n name = Character.toString(name.charAt(0)).toUpperCase()\n + name.substring(1);\n }\n\n // Add the engine extension to the list\n filters.add(new FileNameExtensionFilter(name + \" files\",\n factory.getExtensions().toArray(new String[0])));\n }\n\n // Sort the engine extensions by extension description\n Collections.sort(filters, new Comparator<FileNameExtensionFilter>()\n {\n /******************************************************************\n * Compare the descriptions of two engine extensions. Force lower\n * case to eliminate case differences in the comparison\n *****************************************************************/\n @Override\n public int compare(FileNameExtensionFilter ext1, FileNameExtensionFilter ext2)\n {\n return ext1.getDescription().toLowerCase().compareTo(ext2.getDescription().toLowerCase());\n }\n });\n\n return filters.toArray(new FileNameExtensionFilter[0]);\n }",
"public String getExtension(File f) {\n\t\t\tString ext = null;\n\t\t\tString s = f.getName();\n\t\t\tint i = s.lastIndexOf('.');\n\n\t\t\tif (i > 0 && i < s.length() - 1)\n\t\t\t\text = s.substring(i + 1).toLowerCase();\n\t\t\treturn ext;\n\t\t}",
"FileFormat getFormat();",
"public String getDataFileExtension() {\r\n return dataFileExtension;\r\n }",
"public Collection<FileExtensionDTO> getFileExtensions() throws Exception;",
"private String getExtension(String path){\n System.out.println(\"Начато получение расширения: \");\n if (path.contains(\".\")){\n int dot = path.lastIndexOf(\".\");\n System.out.println(\"return \"+path.substring(dot, path.length()));\n return path.substring(dot, path.length());\n } else {\n// System.out.println(\"return \\\"\\\"\");\n return \"\";\n }\n }",
"private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }",
"public static String getExt(File song)\n\t{\n\t\treturn song.getName().substring(song.getName().lastIndexOf('.') + 1);\n\t}",
"public static String sourceExtension()\n {\n read_if_needed_();\n \n return _ext; \n }",
"public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}",
"public static String getSafeFileExtension(IPath path) {\r\n\t\tString fileExtension = \"\"; //$NON-NLS-1$\r\n\t\tif (path != null) {\r\n\t\t\tString temp = path.getFileExtension();\r\n\t\t\tif (temp != null)\r\n\t\t\t\tfileExtension = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn fileExtension;\r\n\t}",
"public static String extractExtension(String filename)\n\t{\n\t\treturn ImageWriterFilter.extractExtension(filename);\n\t}",
"public static String getFileExtension(File f) {\n\t\tString fileName = f.getName();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}",
"public String[] getFormats() {\n String[] formats = {\"bmp\", \"gif\", \"jpeg\", \"jpg\", \"png\"};\n TreeSet<String> formatSet = new TreeSet<String>();\n for (String s : formats) {\n formatSet.add(s.toLowerCase());\n }\n return formatSet.toArray(new String[0]);\n }",
"public String[] getFormats() {\n String[] formats = {\"bmp\", \"gif\", \"jpeg\", \"jpg\", \"png\"};\n TreeSet<String> formatSet = new TreeSet<String>();\n for (String s : formats) {\n formatSet.add(s.toLowerCase());\n }\n return formatSet.toArray(new String[0]);\n }",
"public final String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i+1).toLowerCase();\n }\n return ext;\n }",
"public static String getExtension(final String file) throws IOException {\n return FilenameUtils.getExtension(file);\n }",
"public Set<String> getExtensions() {\n return extensions;\n }",
"public static String getExtension(final File file) throws IOException {\n return FilenameUtils.getExtension(file.getName());\n }",
"public String[] getAllOutputExtensions();",
"String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}",
"public static String getExtension(File file) {\r\n String ext = null;\r\n String s = file.getName();\r\n int i = s.lastIndexOf('.');\r\n if(i > 0 && i < s.length() - 1) {\r\n ext = s.substring(i + 1).toLowerCase();\r\n }\r\n return ext;\r\n }",
"public final String getCurrentExt() {\n FileFilter filter = this.getFileFilter();\n if (filter instanceof ExtensionFileFilter) {\n return ((ExtensionFileFilter)filter).getExt();\n }\n return null;\n }",
"public static String getFileExtension(File f) {\r\n\tfinal int idx = f.getName().indexOf(\".\");\r\n\tif (idx == -1)\r\n\t return \"\";\r\n\telse\r\n\t return f.getName().substring(idx + 1);\r\n }",
"public boolean buildsFileType(String extension);",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf(\".\");\n ext = s.substring(i+1).toLowerCase();\n return ext;\n }",
"public String GetFileExtension(Uri uri) {\n\n ContentResolver contentResolver = getContentResolver();\n\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n\n // Returning the file Extension.\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri)) ;\n\n }",
"public String getFileExtension(File objFile) {\n\n String sFileName = null;\n String sExtension = null;\n\n try {\n\n if (!objFile.exists()) {\n throw new Exception(\"File does not exists\");\n }\n\n sFileName = objFile.getName();\n int i = sFileName.lastIndexOf('.');\n if (i > 0) {\n sExtension = sFileName.substring(i + 1).trim();\n }\n\n } catch (Exception e) {\n println(\"Methods.getFileExtension : \" + e.toString());\n sExtension = \"\";\n } finally {\n return sExtension;\n }\n }",
"public static String getExtension(File file) {\n\t\tString ext = null;\n\t\tString fileName = file.getName();\n\t\tint i = fileName.lastIndexOf('.');\n\n\t\tif (i > 0 && i < fileName.length() - 1) {\n\t\t\text = fileName.substring(i+1).toLowerCase();\n\t\t}\n\t\treturn ext;\n\t}",
"private String getFileExtension(Uri uri) {\n ContentResolver contentResolver = getApplicationContext().getContentResolver();\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"private String getExtension(File aFile) {\n String ext = null;\n String s = aFile.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"public List<String> getTemplateExtension() {\n\t\treturn tplExtension;\n\t}",
"public static String getFileExtension(String filename) {\n\t\tif(filename.indexOf(\".\") == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn \".\"+filename.substring(filename.lastIndexOf(\".\")+1);\n\t}",
"private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}",
"@XmlElement\n @Nullable\n public String getFileExtension() {\n return this.fileExtension;\n }",
"public String getZipExtensions() {\n return zipExtensions;\n }"
]
| [
"0.8279938",
"0.81749076",
"0.78413826",
"0.7659964",
"0.76150393",
"0.7575544",
"0.7550702",
"0.75277287",
"0.75258994",
"0.74914676",
"0.7397777",
"0.7382227",
"0.72894603",
"0.72850233",
"0.7277344",
"0.72606134",
"0.7208824",
"0.7202462",
"0.7178234",
"0.71606916",
"0.71136075",
"0.70703083",
"0.7063997",
"0.7032177",
"0.702441",
"0.6969611",
"0.69569",
"0.6875544",
"0.68640584",
"0.68494225",
"0.682228",
"0.6805923",
"0.6759397",
"0.6749214",
"0.67415833",
"0.6733302",
"0.67076033",
"0.6705437",
"0.6694654",
"0.66783726",
"0.66708803",
"0.666582",
"0.6654468",
"0.66386855",
"0.6636891",
"0.6625714",
"0.6613931",
"0.658115",
"0.658115",
"0.6531453",
"0.6522676",
"0.6517985",
"0.6509844",
"0.6507651",
"0.65055096",
"0.6502705",
"0.6478669",
"0.64734536",
"0.646985",
"0.6466798",
"0.6454704",
"0.64531696",
"0.6452287",
"0.6451698",
"0.6443269",
"0.64415306",
"0.64254236",
"0.64190245",
"0.6417831",
"0.64158213",
"0.6414795",
"0.6413762",
"0.6406921",
"0.6395976",
"0.63933927",
"0.6379295",
"0.6377724",
"0.6377724",
"0.63727075",
"0.6371008",
"0.636979",
"0.6359502",
"0.6353241",
"0.634279",
"0.63419676",
"0.6336789",
"0.6329968",
"0.6328764",
"0.6325822",
"0.6324872",
"0.63017136",
"0.63006157",
"0.6296168",
"0.6293183",
"0.62908363",
"0.62696546",
"0.62637746",
"0.6257208",
"0.625713",
"0.6249748"
]
| 0.65961677 | 47 |
Return true if the specified extension matches this format. defaultValue is returned if no matching format is found. | public boolean matches(String ext)
{
for (String e : getExtensions())
if (e.equals(ext))
return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FileFormat getFileFormat(String ext, FileFormat defaultValue)\r\n {\r\n for (FileFormat ff : values())\r\n if (ff.matches(ext))\r\n return ff;\r\n\r\n return defaultValue;\r\n }",
"public boolean isCorrectExtFormat( String extension ) {\n try {\n int ext = Integer.parseInt( extension );\n } catch ( Exception e ){\n return false;\n }\n return true;\n }",
"public boolean supportsExtension(String extension) {\n return extensions.stream().anyMatch(target -> target.equalsIgnoreCase(extension));\n }",
"public boolean isDefaultExtension(String what) {\n return what.equals(getDefaultExtension());\n }",
"public boolean fileFormatSupported(String fmt);",
"public boolean isInputFileType(String extension);",
"public static boolean acceptsExtension(String extension)\n\t{\n\t\tif (extension == null)\n\t\t\treturn false;\n\n\t\tfor (ImageWriter imageWriter : imageWriters)\n\t\t{\n\t\t\tif (imageWriter.isValidFileFormat(extension))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public Boolean validExtension(String extension) {\n ArrayList<String> acceptedExtensions = new ArrayList<>();\n acceptedExtensions.add(\"obj\");\n acceptedExtensions.add(\"mtl\");\n// acceptedExtensions.add(\"md2\");\n// acceptedExtensions.add(\"g3d\");\n// acceptedExtensions.add(\"g3dt\");\n\n //For testing purposes\n acceptedExtensions.add(\"png\");\n acceptedExtensions.add(\"jpg\");\n\n Log.i(\"extract\",\"Extension: \"+extension);\n\n for(int i = 0; i < acceptedExtensions.size(); i++) {\n if(extension.equals(acceptedExtensions.get(i)))\n return true;\n }\n return false;\n }",
"@objid (\"e20e1709-9e0b-4c6a-bf6c-3f3e7b57cdfe\")\n @Override\n boolean isExtension();",
"boolean hasExtensionText();",
"private boolean isSourceType(String extension) {\n return srcFileName.toLowerCase().endsWith(extension);\n }",
"public boolean buildsFileType(String extension);",
"public boolean hasDefaultExtension(SketchCode code) {\n return code.getExtension().equals(getDefaultExtension());\n }",
"public boolean hasFormat() {\r\n return hasFormat;\r\n }",
"Boolean has(String extension) {\n File f = new File(baseName + \".\" + extension);\n return f.exists();\n }",
"public boolean validExtension(String what) {\n String[] ext = getExtensions();\n for (int i = 0; i < ext.length; i++) {\n if (ext[i].equals(what)) return true;\n }\n return false;\n }",
"public boolean producesFileType(String outputExtension);",
"public boolean contains(Video.Format format) {\n\t\n\t\tif (type == format) {\n\t\t\treturn true;\t\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean isCompatibleWithFormat(Format format) {\n\t\treturn formats.contains(format);\n\t}",
"boolean supportsFormat(UUID formatid);",
"public static FileFormat getFileFormat(String ext)\r\n {\r\n return getFileFormat(ext, null);\r\n }",
"public String getFormatByExtension(String fileExtenstion) throws DataServiceException{\r\n\t\tString format = \"\";\r\n\t\tformat = (String)queryForObject(\"document.query_format\",fileExtenstion);\r\n\t\treturn format;\r\n\t}",
"@CheckForNull\n String getPreferredExtension();",
"private boolean isSameExtension(ListGridRecord[] selectedNode, Extension extension) {\n boolean result = true;\n for (ListGridRecord record : selectedNode) {\n FileTreeNode node = (FileTreeNode) record;\n VMResource resource = node.getResource();\n if (resource instanceof VMDirectory) {\n result = false;\n break;\n }\n if (resource instanceof VMFile) {\n Extension selExtension = ((VMFile) resource).getExtension();\n if (selExtension != extension) {\n result = false;\n break;\n }\n }\n }\n return result;\n }",
"private boolean isAbailableExtension(String value) {\n for (Extension extension : Extension.values()) {\n if (extension.getValue().equalsIgnoreCase(value)) {\n return true;\n }\n }\n return false;\n }",
"public boolean equals(String fileFormat) {\r\n\t\treturn this.fileFormat.equalsIgnoreCase(fileFormat);\r\n\t}",
"public boolean isExtension() {\n\t\treturn true;\n\t}",
"public boolean hasExtension(String extension) {\n int lastIndexOfDot = extension.lastIndexOf('.');\n if (lastIndexOfDot != -1) {\n extension = extension.substring(lastIndexOfDot + 1);\n }\n\n return extensions.contains(extension.toLowerCase());\n }",
"boolean hasAdGroupExtensionSetting();",
"public boolean isAllowedExtension(String fileExtenstion) throws DataServiceException {\r\n\t\tboolean isAllowed = false;\r\n\t\tInteger count = (Integer)queryForObject(\"document.query_isvalid_extension\",fileExtenstion);\r\n\t\tif (count == 1) {\r\n\t\t\tisAllowed = true;\r\n\t\t}\r\n\t\treturn isAllowed;\r\n\t}",
"public boolean isFileformatRegistered(String fileformat)\r\n\t\t\tthrows ProcessingException;",
"public boolean isFormat() {\n\t\treturn isFormat;\n\t}",
"public boolean isImageFormatSupported(String format) {\n if (format != null) {\n String[] formats = com.esri.mo2.map.img.ImageSupport.getListOfWriterByTypeName();\n for (int i=0; i<formats.length; i++)\n if (format.trim().compareToIgnoreCase(formats[i])==0) return true;\n }\n return false;\n }",
"public boolean isExtensionElement();",
"public static boolean isImage(String extension) {\n if (extension != null && (\n \t\textension.equalsIgnoreCase(JPG.toString())\n \t\t|| extension.equalsIgnoreCase(JPEG.toString())\n \t\t|| extension.equalsIgnoreCase(PNG.toString())\n \t\t|| extension.equalsIgnoreCase(BMP.toString()))) {\n return true;\n }\n return false;\n }",
"FileFormat getFormat();",
"public boolean isLosslessAudioFormat(String extension) {\n\t\treturn lossless.contains(extension);\n\t}",
"public boolean equals(FileFormats fileFormat) {\r\n\t\treturn this.equals(fileFormat.fileFormat);\r\n\t}",
"public boolean isSetFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FORMAT$10) != 0;\n }\n }",
"public boolean setFileExt() {\n\n String url = VideoURLs.get(0).toLowerCase();\n\n if (url.endsWith(\".mpg\")) {\n //isVideo = true;\n FileExt = \".mpg\";\n } else if (url.endsWith(\".mp3\")) {\n //isVideo = false;\n FileExt = \".mp3\";\n } else if (url.endsWith(\".m4a\")) {\n //isVideo = false;\n FileExt = \".m4a\";\n } else {\n //isVideo = true;\n FileExt = \".flv\";\n }\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.setFileExt: FileExt = \" + FileExt);\n\n return true;\n }",
"public void testDefaultFormat() {\n ThemeLayer tl = new ThemeLayer();\n assertTrue(tl.getFormat().equals(\"image/png\"));\n }",
"public String getOutputExtension(String inputExtension);",
"public boolean isHeaderFile(String ext);",
"boolean hasExtensionFeedItem();",
"public boolean hasExtensions() {\n return (buffer.get(0) & 0x10) == 0x010;\n }",
"public boolean isLossyAudioFormat(String extension) {\n\t\treturn lossy.contains(extension);\n\t}",
"Object getFormat();",
"public boolean isInFormatDialog() {\n if(inFormatFragment.getValue() != null)\n return inFormatFragment.getValue();\n else return false;\n }",
"public MatchStrength hasFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 478 */ if (getClass() == JsonFactory.class) {\n/* 479 */ return hasJSONFormat(acc);\n/* */ }\n/* 481 */ return null;\n/* */ }",
"boolean hasCampaignExtensionSetting();",
"public static boolean isValid(String fileFormat) {\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tif(ff.equals(fileFormat)) {\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 canUseSchema(FormatSchema schema)\n/* */ {\n/* 445 */ if (schema == null) {\n/* 446 */ return false;\n/* */ }\n/* 448 */ String ourFormat = getFormatName();\n/* 449 */ return (ourFormat != null) && (ourFormat.equals(schema.getSchemaType()));\n/* */ }",
"private boolean endsWithAny(String fileName, String[] extensions) {\r\n\r\n\t\t// Loop through the list of supported extensions\r\n\t\tfor (int i = 0; i < extensions.length; i++) {\r\n\t\t\tif (fileName.endsWith(extensions[i])) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean isValidExtension(String originalName) {\n String originalNameExtension = originalName.substring(originalName.lastIndexOf(\".\") + 1);\n switch(originalNameExtension) {\n case \"jpg\":\n case \"png\":\n case \"gif\":\n return true;\n }\n return false;\n }",
"Boolean supportsMultipleExtensions();",
"static public boolean isImageFormatSupported(String _format) {// for applet mode saveImage\r\n\t\ttry {\r\n\t\t\tString[] names = javax.imageio.ImageIO.getWriterFormatNames();\r\n\t\t\tfor (int i = 0; i < names.length; i++) {\r\n// System.out.println(\"Image format supported = \"+names[i]);\r\n\t\t\t\tif (names[i].equalsIgnoreCase(_format))\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"String getExtension();",
"public String getDefaultInputExtension();",
"public Format getBestFormat() {\n\t\tif (formats.contains(Format.JSON)) {\n\t\t\treturn Format.JSON;\n\t\t}\n\t\tif (formats.contains(Format.XML)) {\n\t\t\treturn Format.XML;\n\t\t}\n\t\treturn null;\n\t}",
"public boolean useSuffixPatternMatch()\n/* */ {\n/* 590 */ return this.suffixPatternMatch;\n/* */ }",
"public boolean removeExtension(String extension) {\n return extensions.removeIf(target -> target.equalsIgnoreCase(extension));\n }",
"public void setExtension(String extension) {\n this.extension = extension;\n }",
"public void setExtension(String extension) {\n this.extension = extension;\n }",
"String getOutputExtension();",
"public String getReadFileExtension(int formatIndex);",
"public static boolean isValid(String format) {\r\n return null != DictionaryFormat.valueEnumMap.get(format);\r\n }",
"@Override\n public boolean needsFormat()\n {\n return delegates.stream().anyMatch(SplittableInputSource::needsFormat);\n }",
"public CompletionStage<Boolean> existsIn(final Storage storage) {\n final CompletionStage<Boolean> res;\n if (this.isYamlOrYml() || this.extension().isEmpty()) {\n final String name = this.name();\n final Key yaml = Extension.YAML.key(name);\n res = storage.exists(yaml)\n .thenCompose(\n exist -> {\n final CompletionStage<Boolean> result;\n if (exist) {\n result = CompletableFuture.completedFuture(true);\n } else {\n final Key yml = Extension.YML.key(name);\n result = storage.exists(yml);\n }\n return result;\n }\n );\n } else {\n res = CompletableFuture.completedFuture(false);\n }\n return res;\n }",
"public String getExtension() {\n return extension;\n }",
"public String getExtension() {\n return extension;\n }",
"public String getWriteFileExtension(int formatIndex);",
"private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }",
"boolean isPictureFormatSupported(int format);",
"public String getExtension() {\n return extension;\n }",
"@Internal(\"Represented as part of archiveName\")\n public String getExtension() {\n return extension;\n }",
"String getFormat();",
"String getFormat();",
"String getFormat();",
"public ResourceFormatGenerator getGeneratorForFileExtension(final String extension) throws\n UnsupportedFormatException {\n for (final ResourceFormatGenerator generator : listGenerators()) {\n if (generator.getFileExtensions().contains(extension)) {\n return generator;\n }\n }\n throw new UnsupportedFormatException(\"No provider available to parse file extension: \" + extension);\n }",
"private boolean isValidExtension(String url){\n for (String ext : IGNORED_EXTENSIONS) {\n if (url.contains(ext)) {\n return false;\n }\n }\n return true;\n }",
"@Test\n\tpublic void testFormats() throws IOException {\n\t\tassertArrayEquals(Formats.FORMATS, ffmpeg.formats().toArray());\n\t\tassertArrayEquals(Formats.FORMATS, ffmpeg.formats().toArray());\n\n\t\tverify(runFunc, times(1)).run(argThatHasItem(\"-formats\"));\n\t}",
"public boolean isFormatMultipleAssigned(String fileformat)\r\n\t\t\tthrows ProcessingException;",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Format)) {\n return false;\n }\n Format other = (Format) object;\n if ((this.type == null && other.type != null) || (this.type != null && !this.type.equals(other.type))) {\n return false;\n }\n return true;\n }",
"public final boolean selectExportFileFormat(final String fileFormat)\n {\n String crystalTableId = this.getBrowser().getAttribute(\"//body/table\",\"id\");\n String comboBoxId = \"IconImg_Txt_iconMenu_icon_\" + crystalTableId + \"_combo\";\n this.getBrowser().click(comboBoxId);\n this.getBrowser().click(\"//span[.='\" + fileFormat +\"']\"); \n return (this.getBrowser().getText(comboBoxId).trim().equals(fileFormat)) ? true: false; \n }",
"@Override\n public boolean accept(File file) {\n return file.getName().toUpperCase().endsWith(extension.toUpperCase());\n }",
"@Override\r\n public boolean accept(File file)\r\n {\n return FileUtil.getFileExtension(file.getPath(), true).toLowerCase().equals(EXT);\r\n }",
"boolean hasCustomerExtensionSetting();",
"@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }",
"public boolean isWarningAudioFotmat(String extension) {\n\t\treturn warning.contains(extension);\n\t}",
"@VisibleForTesting\n static boolean isExtensionVersionSupported(@Nullable Version extensionVersion) {\n if (extensionVersion == null) {\n return false;\n }\n if (extensionVersion.getMajor() == 1) {\n // Disable androidx.window.extensions support in release builds of the library until the\n // extensions API is finalized.\n return DEBUG;\n }\n return Version.CURRENT.getMajor() >= extensionVersion.getMajor();\n }",
"public static boolean checkFileType(String fileName) {\n\t\t// properties file has a comma delimited list of extensions\n\t\tString extension_value = PropertiesFile.getInstance().getProperty(\"accepted_ext\");\n\n\t\tif (extension_value != null) {\n\t\t\tString[] extensions = extension_value.split(\",\");\n\t\t\tfor (int i = 0; extensions != null && i < extensions.length; i++) {\n\t\t\t\tif (fileName.endsWith(extensions[i].trim()))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static ContentType extensionContentType(String fileExt) {\r\n\r\n\t\tfileExt = fileExt.toLowerCase();\r\n\r\n\t\tif (\"tiff\".equals(fileExt) || \"tif\".equals(fileExt)) {\r\n\t\t\t// return MIMEConstants.\r\n\t\t} else if (\"zip\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_ZIP;\r\n\t\t} else if (\"pdf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_PDF;\r\n\t\t} else if (\"wmv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_WMV;\r\n\t\t} else if (\"rar\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_RAR;\r\n\t\t} else if (\"swf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_SWF;\r\n\t\t} else if (\"exe\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WINDOWSEXEC;\r\n\t\t} else if (\"avi\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_AVI;\r\n\t\t} else if (\"doc\".equals(fileExt) || \"dot\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WORD;\r\n\t\t} else if (\"ico\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_ICO;\r\n\t\t} else if (\"mp2\".equals(fileExt) || \"mp3\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_MPEG;\r\n\t\t} else if (\"rtf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_RTF;\r\n\t\t} else if (\"xls\".equals(fileExt) || \"xla\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_EXCEL;\r\n\t\t} else if (\"jpg\".equals(fileExt) || \"jpeg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_JPEG;\r\n\t\t} else if (\"gif\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_GIF;\r\n\t\t} else if (\"svg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_SVG;\r\n\t\t} else if (\"png\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_PNG;\r\n\t\t} else if (\"csv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSV;\r\n\t\t} else if (\"ps\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_POSTSCRIPT;\r\n\t\t} else if (\"html\".equals(fileExt) || \"htm\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_HTML;\r\n\t\t} else if (\"css\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSS;\r\n\t\t} else if (\"xml\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_XML;\r\n\t\t} else if (\"js\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_JAVASCRIPT;\r\n\t\t} else if (\"wma\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_WMA;\r\n\t\t}\r\n\r\n\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_PLAIN;\r\n\t}",
"private boolean checkFile(String filename, String[] extensions) {\n \n // flag to indicate the file was found\n boolean foundFile = false;\n \n // iterate through all the extensions\n for (String currentExtension : extensions) {\n \n // check if the file has the current extension\n if (filename.toLowerCase().endsWith(currentExtension)) {\n \n // set flag\n foundFile = true;\n \n // set configuration\n configuration.setChosenFilePattern(currentExtension);\n \n // break iteration\n break;\n }\n }\n \n // create a new file status\n File fileStatus = null;\n \n // check if a reference was found\n if (foundFile) {\n \n // create new instance\n fileStatus = new File(filename);\n \n // check if exists\n if (fileStatus.exists()) {\n \n // add file\n theFile = filename;\n \n // found it!\n return true;\n } else {\n \n // print message about it\n System.out.println(localization.getMessage(\"Error_FileDoesNotExist\", filename));\n \n // not found\n return false;\n }\n \n } else {\n \n // there's no extension, we will add them and see if something\n // is found\n for (String currentExtension : extensions) {\n \n // new file with extension\n fileStatus = new File(filename + currentExtension);\n \n // let's check it\n if (fileStatus.exists()) {\n \n // add file\n theFile = filename + currentExtension;\n \n // add reference\n configuration.setChosenFilePattern(currentExtension);\n \n // found it!\n return true;\n \n }\n \n }\n \n // print message about it\n System.out.println(AraraUtils.wrap(localization.getMessage(\"Error_FileDoesNotExistWithExtensionsList\", filename, getExtensionsList(extensions))));\n \n // file not found\n return false;\n \n }\n \n }",
"public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }",
"public static Optional<TurfVariant> findFromFilenameExtension(@Nonnull final String filenameExtension) {\n\t\tswitch(filenameExtension) {\n\t\t\tcase FILENAME_EXTENSION:\n\t\t\t\treturn Optional.of(TURF);\n\t\t\tcase PROPERTIES_FILENAME_EXTENSION:\n\t\t\t\treturn Optional.of(TURF_PROPERTIES);\n\t\t\tdefault:\n\t\t\t\treturn Optional.empty();\n\t\t}\n\t}",
"protected abstract String getExtension(JasperPrint jrprint);",
"public int lookupWriteFileExtension(String extension);",
"public boolean useRegisteredSuffixPatternMatch()\n/* */ {\n/* 610 */ return this.registeredSuffixPatternMatch;\n/* */ }",
"private static int getFormatFromComponentModel(ComponentSampleModel sm, boolean hasAlpha) {\r\n // Multiple data arrays (banks) not supported\r\n int bankIndex = sm.getBankIndices()[0];\r\n for (int i=1; i < sm.getNumBands(); i++) {\r\n if (sm.getBankIndices()[i] != bankIndex) {\r\n return 0;\r\n }\r\n }\r\n\r\n int channels = hasAlpha ? sm.getNumBands()-1 : sm.getNumBands();\r\n int extra = hasAlpha ? 1 : 0;\r\n int bytes = 1;\r\n switch (sm.getDataType()) {\r\n case DataBuffer.TYPE_BYTE:\r\n bytes = 1; break;\r\n case DataBuffer.TYPE_SHORT:\r\n case DataBuffer.TYPE_USHORT:\r\n bytes = 2; break;\r\n case DataBuffer.TYPE_INT:\r\n bytes = 4; break;\r\n case DataBuffer.TYPE_DOUBLE:\r\n bytes = 0; break;\r\n default:\r\n return 0; // Unsupported data type\r\n }\r\n\r\n int doSwap = 0;\r\n int swapFirst = 0;\r\n boolean knownFormat = false;\r\n\r\n int i;\r\n\r\n // \"RGBA\"\r\n for (i=0; i < sm.getNumBands(); i++) {\r\n if (sm.getBandOffsets()[i] != i) break;\r\n }\r\n if (i == sm.getNumBands()) { // Ok, it is it\r\n doSwap = 0;\r\n swapFirst = 0;\r\n knownFormat = true;\r\n }\r\n\r\n // \"ARGB\"\r\n if (!knownFormat) {\r\n for (i=0; i < sm.getNumBands()-1; i++) {\r\n if (sm.getBandOffsets()[i] != i+1) break;\r\n }\r\n if (sm.getBandOffsets()[i] == 0) i++;\r\n if (i == sm.getNumBands()) { // Ok, it is it\r\n doSwap = 0;\r\n swapFirst = 1;\r\n knownFormat = true;\r\n }\r\n }\r\n\r\n // \"BGRA\"\r\n if (!knownFormat) {\r\n for (i=0; i < sm.getNumBands()-1; i++) {\r\n if (sm.getBandOffsets()[i] != sm.getNumBands() - 2 - i) break;\r\n }\r\n if (sm.getBandOffsets()[i] == sm.getNumBands()-1) i++;\r\n if (i == sm.getNumBands()) { // Ok, it is it\r\n doSwap = 1;\r\n swapFirst = 1;\r\n knownFormat = true;\r\n }\r\n }\r\n\r\n // \"ABGR\"\r\n if (!knownFormat) {\r\n for (i=0; i < sm.getNumBands(); i++) {\r\n if (sm.getBandOffsets()[i] != sm.getNumBands() - 1 - i) break;\r\n }\r\n if (i == sm.getNumBands()) { // Ok, it is it\r\n doSwap = 1;\r\n swapFirst = 0;\r\n knownFormat = true;\r\n }\r\n }\r\n\r\n // XXX - Planar formats are not supported yet\r\n if (!knownFormat)\r\n return 0;\r\n\r\n return\r\n channelsSh(channels) |\r\n bytesSh(bytes) |\r\n extraSh(extra) |\r\n doswapSh(doSwap) |\r\n swapfirstSh(swapFirst);\r\n }",
"public int lookupReadFileExtension(String extension);"
]
| [
"0.6547131",
"0.63951635",
"0.63471",
"0.61838263",
"0.60225177",
"0.6011618",
"0.5997623",
"0.599052",
"0.57811385",
"0.57693624",
"0.5765339",
"0.5635772",
"0.5625048",
"0.55754375",
"0.5506156",
"0.54921544",
"0.54758126",
"0.5434957",
"0.5418954",
"0.5368208",
"0.5364854",
"0.5364133",
"0.5359973",
"0.5359316",
"0.5329618",
"0.53284466",
"0.5283475",
"0.5281009",
"0.5251044",
"0.5229554",
"0.5216089",
"0.5152584",
"0.51236826",
"0.5123392",
"0.5122719",
"0.5108658",
"0.50872976",
"0.5084583",
"0.50641596",
"0.5052755",
"0.5042574",
"0.50416386",
"0.5039366",
"0.49793985",
"0.4973665",
"0.49732247",
"0.4966653",
"0.49569732",
"0.49451682",
"0.49427208",
"0.49285045",
"0.4912373",
"0.48881322",
"0.48820865",
"0.4848868",
"0.48407418",
"0.48195088",
"0.4812684",
"0.47884402",
"0.47863328",
"0.47855222",
"0.4768538",
"0.4768538",
"0.47658652",
"0.47655043",
"0.47527105",
"0.4732795",
"0.47290087",
"0.47064286",
"0.47064286",
"0.4689266",
"0.4677183",
"0.467479",
"0.46568206",
"0.4651032",
"0.4648319",
"0.4648319",
"0.4648319",
"0.46304086",
"0.46077338",
"0.46020883",
"0.45989662",
"0.45986667",
"0.45957762",
"0.4589161",
"0.45871007",
"0.45865455",
"0.4575534",
"0.45735717",
"0.45675787",
"0.45640823",
"0.45614317",
"0.45548195",
"0.4550241",
"0.4548",
"0.45442423",
"0.45431852",
"0.45380384",
"0.4536024",
"0.4527528"
]
| 0.6096749 | 4 |
Return the FileFormat corresponding to specified extension. defaultValue is returned if no matching format is found. | public static FileFormat getFileFormat(String ext, FileFormat defaultValue)
{
for (FileFormat ff : values())
if (ff.matches(ext))
return ff;
return defaultValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FileFormat getFileFormat(String ext)\r\n {\r\n return getFileFormat(ext, null);\r\n }",
"public String getFormatByExtension(String fileExtenstion) throws DataServiceException{\r\n\t\tString format = \"\";\r\n\t\tformat = (String)queryForObject(\"document.query_format\",fileExtenstion);\r\n\t\treturn format;\r\n\t}",
"FileFormat getFormat();",
"private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }",
"public String getReadFileExtension(int formatIndex);",
"@CheckForNull\n String getPreferredExtension();",
"public ResourceFormatGenerator getGeneratorForFileExtension(final String extension) throws\n UnsupportedFormatException {\n for (final ResourceFormatGenerator generator : listGenerators()) {\n if (generator.getFileExtensions().contains(extension)) {\n return generator;\n }\n }\n throw new UnsupportedFormatException(\"No provider available to parse file extension: \" + extension);\n }",
"public String getWriteFileExtension(int formatIndex);",
"@UML(identifier=\"fileFormat\", obligation=MANDATORY, specification=ISO_19139)\n Format getFileFormat();",
"public String getFileExtension();",
"public String getOutputExtension(String inputExtension);",
"public boolean buildsFileType(String extension);",
"public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}",
"String getFileExtension();",
"Object getFormat();",
"@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }",
"public String getFormatCode() {\n if (format == null) return \"MP4\";\n switch(format) {\n case \"Windows Media\": return \"WMV\";\n case \"Flash Video\": return \"FLV\";\n case \"MPEG-4\": return \"MP4\";\n case \"Matroska\": return \"MKV\";\n case \"AVI\": return \"AVI\";\n default: return \"MP4\";\n }\n }",
"public String getFileType()\n {\n if (m_fileOptions.m_type == null ||\n m_fileOptions.m_type.length() <= 0)\n {\n return getTypeFromExtension();\n }\n\n return m_fileOptions.m_type;\n }",
"String getContentType(String fileExtension);",
"public Format getBestFormat() {\n\t\tif (formats.contains(Format.JSON)) {\n\t\t\treturn Format.JSON;\n\t\t}\n\t\tif (formats.contains(Format.XML)) {\n\t\t\treturn Format.XML;\n\t\t}\n\t\treturn null;\n\t}",
"public abstract String getFileFormatName();",
"String getExtension();",
"public static String getFileExtension() {\n return fileExtension;\n }",
"public String getDefaultInputExtension();",
"protected abstract String getFileExtension();",
"String getOutputExtension();",
"public ResourceFormatGenerator getGeneratorForFileExtension(final File file) throws UnsupportedFormatException {\n String extension = file.getName().lastIndexOf(\".\") > 0 ? file.getName().substring(file.getName().lastIndexOf(\n \".\") + 1) : null;\n if (null != extension) {\n return getGeneratorForFileExtension(extension);\n } else {\n throw new UnsupportedFormatException(\"Could not determine format for file: \" + file.getAbsolutePath());\n }\n }",
"public String getFileExtension() {\n return toString().toLowerCase();\n }",
"public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }",
"private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }",
"public static String GetMimeType(String extension) {\n if (extension == null || extension.length() ==0) {\n return null;\n }\n return extensionToMimeTypeMap.get(extension);\n }",
"String getFileExtensionByFileString(String name);",
"default String fileExtension() {\n\t\treturn \".json\";\n\t}",
"public static String defaultFileExtension() {\n return \"dot\";\n }",
"ImageFormat getFormat();",
"public abstract String getFileExtension();",
"public String fileExtension() {\r\n return getContent().fileExtension();\r\n }",
"public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}",
"public static ContentType extensionContentType(String fileExt) {\r\n\r\n\t\tfileExt = fileExt.toLowerCase();\r\n\r\n\t\tif (\"tiff\".equals(fileExt) || \"tif\".equals(fileExt)) {\r\n\t\t\t// return MIMEConstants.\r\n\t\t} else if (\"zip\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_ZIP;\r\n\t\t} else if (\"pdf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_PDF;\r\n\t\t} else if (\"wmv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_WMV;\r\n\t\t} else if (\"rar\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_RAR;\r\n\t\t} else if (\"swf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_SWF;\r\n\t\t} else if (\"exe\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WINDOWSEXEC;\r\n\t\t} else if (\"avi\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_AVI;\r\n\t\t} else if (\"doc\".equals(fileExt) || \"dot\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WORD;\r\n\t\t} else if (\"ico\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_ICO;\r\n\t\t} else if (\"mp2\".equals(fileExt) || \"mp3\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_MPEG;\r\n\t\t} else if (\"rtf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_RTF;\r\n\t\t} else if (\"xls\".equals(fileExt) || \"xla\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_EXCEL;\r\n\t\t} else if (\"jpg\".equals(fileExt) || \"jpeg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_JPEG;\r\n\t\t} else if (\"gif\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_GIF;\r\n\t\t} else if (\"svg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_SVG;\r\n\t\t} else if (\"png\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_PNG;\r\n\t\t} else if (\"csv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSV;\r\n\t\t} else if (\"ps\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_POSTSCRIPT;\r\n\t\t} else if (\"html\".equals(fileExt) || \"htm\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_HTML;\r\n\t\t} else if (\"css\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSS;\r\n\t\t} else if (\"xml\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_XML;\r\n\t\t} else if (\"js\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_JAVASCRIPT;\r\n\t\t} else if (\"wma\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_WMA;\r\n\t\t}\r\n\r\n\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_PLAIN;\r\n\t}",
"public static Format getTheirDefaultFormat()\n {\n return (Format) theirDefaultFormat.clone();\n }",
"public String getMimeType(String extension, String def) throws IOException {\n byte[] type = new byte[128];\n byte[] buf = new byte[16];\n byte[] ext = extension.toLowerCase().getBytes(\"ASCII\");\n int state = 1;\n int x = 0;\n int t = 0;\n for (int off = 0; off < this.inLen; off++) {\n byte ch = this.in[off];\n switch (state) {\n case 1:\n if (!(ch == (byte) 32 || ch == (byte) 9)) {\n if (ch == (byte) 35) {\n state = 2;\n break;\n }\n state = 3;\n }\n case 2:\n if (ch != (byte) 10) {\n break;\n }\n x = 0;\n t = 0;\n state = 1;\n break;\n case 3:\n if (ch != (byte) 32 && ch != (byte) 9) {\n int t2 = t + 1;\n type[t] = ch;\n t = t2;\n break;\n }\n state = 4;\n break;\n case 4:\n if (!(ch == (byte) 32 || ch == (byte) 9)) {\n state = 5;\n }\n case 5:\n switch (ch) {\n case (byte) 9:\n case SmbConstants.DEFAULT_MAX_MPX_COUNT /*10*/:\n case (byte) 32:\n case (byte) 35:\n int i = 0;\n while (i < x && x == ext.length && buf[i] == ext[i]) {\n i++;\n }\n if (i != ext.length) {\n if (ch == (byte) 35) {\n state = 2;\n } else if (ch == (byte) 10) {\n x = 0;\n t = 0;\n state = 1;\n }\n x = 0;\n break;\n }\n return new String(type, 0, t, \"ASCII\");\n break;\n default:\n int x2 = x + 1;\n buf[x] = ch;\n x = x2;\n break;\n }\n default:\n break;\n }\n }\n return def;\n }",
"private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }",
"@SuppressWarnings(\"unchecked\")\n public <F> ConverterFormat<F> getFormat(Class<F> formatType) {\n ConverterFormat<F> format = (ConverterFormat<F>) formats.get(formatType);\n\n if (format == null) {\n throw new UnsupportedOperationException(\"The format \" + formatType + \" is not supported.\");\n }\n\n return format;\n }",
"public String getDefaultExtension() {\n return \"ino\";\n }",
"public String getExtension() {\n return extension;\n }",
"public String getExtension() {\n return extension;\n }",
"public Bitmap.CompressFormat getFormat() {\n return fullPhoto.getFormat();\n }",
"public final String getCurrentExt() {\n FileFilter filter = this.getFileFilter();\n if (filter instanceof ExtensionFileFilter) {\n return ((ExtensionFileFilter)filter).getExt();\n }\n return null;\n }",
"public String extension() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n return fullPath.substring(dot + 1);\n }",
"public boolean fileFormatSupported(String fmt);",
"public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }",
"public final AdFormat getFormat() {\n\t\treturn impl.getFormat();\n }",
"@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // [email protected]: Review of patch from [email protected]\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }",
"public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn filename.substring(dotIndex + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn \"\"; // no dot in filename\r\n\t\t\t}\r\n\t\t}",
"private String getFileExtension(File f) {\n String fileName = f.getName();\n return getFileExtension(fileName);\n }",
"public static Optional<TurfVariant> findFromFilenameExtension(@Nonnull final String filenameExtension) {\n\t\tswitch(filenameExtension) {\n\t\t\tcase FILENAME_EXTENSION:\n\t\t\t\treturn Optional.of(TURF);\n\t\t\tcase PROPERTIES_FILENAME_EXTENSION:\n\t\t\t\treturn Optional.of(TURF_PROPERTIES);\n\t\t\tdefault:\n\t\t\t\treturn Optional.empty();\n\t\t}\n\t}",
"public int lookupReadFileExtension(String extension);",
"private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}",
"public String getExtension() {\n return extension;\n }",
"public String[] getSupportedFileFormatsList();",
"public static String getSupportedformats() {\r\n\t\tString description = \"\";\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tdescription += ff.description +\"\\n\";\r\n\t\t\t}\r\n\t\treturn description;\r\n\t}",
"public ParameterTypeFile(String key, String description, String extension, String defaultFileName) {\n\t\tsuper(key, description, defaultFileName);\n\t\tthis.extensions = new String[] { extension };\n\t}",
"public String getDefaultFilePattern();",
"@XmlElement\n @Nullable\n public String getFileExtension() {\n return this.fileExtension;\n }",
"public boolean producesFileType(String outputExtension);",
"public Class<F> getFormatType() {\n\t\treturn formatType;\n\t}",
"public static String GetExtension(String mimeType) {\n if (mimeType == null || mimeType.length() ==0) {\n return null;\n }\n return mimeTypeToExtensionMap.get(mimeType);\n }",
"public int lookupWriteFileExtension(String extension);",
"public static String mapToMimeType(String extension)\n {\n return mimeMap.get(extension.toLowerCase(java.util.Locale.ROOT));\n }",
"String getFormat();",
"String getFormat();",
"String getFormat();",
"public final Class<? extends ItemFormat<?>> getDefaultItemFormatClass(){\n String defaultItemFormatClassName = getText(\"defaultItemFormatClassName\");\n if(defaultItemFormatClassName != null){\n try{\n return (Class<? extends ItemFormat<?>>) Class.forName(defaultItemFormatClassName);\n }\n catch(Exception e){\n LOG.error(\"Failed to load ItemFormat class: \" + defaultItemFormatClassName, e);\n }\n }\n return getAny(\"defaultItemFormatClass\", Class.class);\n }",
"public String getFileType() {\n return fileType;\n }",
"@Override\n public String getFormatName() throws IOException {\n return input == null? myDefaultFormat.getName() : getInfo().getFormat().getName();\n }",
"public String getFormat() {\n\t\treturn format;\n\t}",
"public String getExt() {\n\t\treturn IpmemsFile.getFileExtension(file);\n\t}",
"public AudioFormat getFormat() throws AudioSourceException {\n if (format==null){\n AudioInputStream dummyStream=getAudioInputStream();\n try {\n dummyStream.close();\n } catch (IOException e) {\n throw new AudioSourceException(e);\n }\n }\n \n\t\treturn format;\n\t}",
"public IIOMetadataFormat getMetadataFormat(String formatName) {\n\t\tif (formatName.equals(nativeMetadataFormatName)) {\n\t\t\treturn null;\n\t\t\t// return (IIOMetadataFormat) nativeDoc;\n\t\t} else if (formatName.equals(commonMetadataFormatName)) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Not a recognized format!\");\n\t\t}\n\t}",
"public static String obtainMediaTypeOfExtn(String extn) {\n switch(categorisedAttachmentType(extn)) {\n case TYPE_IMAGE_ATTACHMENT:\n return KoreMedia.MEDIA_TYPE_IMAGE;\n case TYPE_VIDEO_ATTACHMENT:\n return KoreMedia.MEDIA_TYPE_VIDEO;\n case TYPE_AUDIO_ATTACHMENT:\n return KoreMedia.MEDIA_TYPE_AUDIO;\n default:\n return extn;\n }\n }",
"java.lang.String getExtensionText();",
"public static optionFormats getFormatByNr (int optionNumber) {\n\t\tswitch (optionNumber) {\n\t\tcase RESERVED_0:\n\t\t\treturn optionFormats.unknown;\n\t\tcase CONTENT_TYPE:\n\t\t\treturn optionFormats.integer;\n\t\tcase PROXY_URI:\n\t\t\treturn optionFormats.string;\n\t\tcase ETAG:\n\t\t\treturn optionFormats.opaque;\n\t\tcase URI_HOST:\n\t\t\treturn optionFormats.string;\n\t\tcase LOCATION_PATH:\n\t\t\treturn optionFormats.string;\n\t\tcase URI_PORT:\n\t\t\treturn optionFormats.integer;\n\t\tcase LOCATION_QUERY:\n\t\t\treturn optionFormats.string;\n\t\tcase URI_PATH:\n\t\t\treturn optionFormats.string;\n\t\tcase TOKEN:\n\t\t\treturn optionFormats.opaque;\n\t\tcase URI_QUERY:\n\t\t\treturn optionFormats.string;\n\t\tdefault:\n\t\t\treturn optionFormats.error;\n\t\t}\n\t}",
"public String getType(String fileExtension) {\n // trim leading dot if given\n if (fileExtension.startsWith(\".\")) {\n fileExtension = fileExtension.substring(1);\n }\n return this.typeMap.get(fileExtension);\n }",
"public String getChangeFileEndFormat() {\r\n \t\treturn properties.getProperty(KEY_CHANGE_FILE_END_FORMAT);\r\n \t}",
"public String getWriteMimeType(int formatIndex);",
"public edu.umich.icpsr.ddi.FormatType getFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().find_element_user(FORMAT$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getFileType(){\n\t\treturn type;\n\t}",
"public static String getFileType(){\n\t\t//Get the selected file type\n\t\tString type = (String) fileType.getSelectedItem();\n\t\t//Re-enable the combobox, since download has already started\n\t\tfileType.setEnabled(true);\n\t\t//Reset the default file type\n\t\tfileType.setSelectedIndex(0);\n\t\treturn type;\n\t}",
"public abstract String getImageFormat();",
"public String getMIMEType(String format)\n\t{\n\t\treturn engine.getMIMEType(format);\n\t}",
"public boolean isInputFileType(String extension);",
"public static String sourceExtension()\n {\n read_if_needed_();\n \n return _ext; \n }",
"public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}",
"public void setExtension(String extension) {\n this.extension = extension;\n }",
"public void setExtension(String extension) {\n this.extension = extension;\n }",
"public static String getFileExtension(String filename) {\n\t\t\n\t\tint periodIndex = filename.lastIndexOf(\".\");\n\t\t\n\t\tif(periodIndex == -1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(periodIndex == filename.length() - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn filename.substring(periodIndex + 1, filename.length());\n\t}",
"Builder addFileFormat(String value);",
"public static String getFilenameExtension() {return \"json\";}",
"public boolean isDefaultExtension(String what) {\n return what.equals(getDefaultExtension());\n }",
"public int getFormat()\n {\n return format;\n }"
]
| [
"0.77468646",
"0.68009454",
"0.67900586",
"0.6550549",
"0.6433195",
"0.6427251",
"0.6328408",
"0.62659013",
"0.61711335",
"0.616439",
"0.6160364",
"0.60427374",
"0.60290265",
"0.6024517",
"0.5949412",
"0.5905413",
"0.589898",
"0.58799934",
"0.58707947",
"0.58652467",
"0.5864361",
"0.58443296",
"0.58303934",
"0.57962567",
"0.5791751",
"0.57630694",
"0.5745031",
"0.57406694",
"0.57391644",
"0.5736513",
"0.5727455",
"0.5717785",
"0.5708708",
"0.5696009",
"0.5673858",
"0.5644135",
"0.5637223",
"0.56235665",
"0.5609751",
"0.5599941",
"0.5538385",
"0.55163956",
"0.5510835",
"0.55082214",
"0.54850656",
"0.54850656",
"0.5482776",
"0.54818684",
"0.5478476",
"0.54702514",
"0.54695475",
"0.54684573",
"0.5448811",
"0.5446351",
"0.5439454",
"0.54381746",
"0.5420769",
"0.5407109",
"0.54032356",
"0.53925204",
"0.5391067",
"0.53818727",
"0.5376028",
"0.53670913",
"0.5365555",
"0.53616685",
"0.53566146",
"0.53418994",
"0.5336949",
"0.5333122",
"0.5333122",
"0.5333122",
"0.53083384",
"0.52963644",
"0.52933323",
"0.5288528",
"0.52834517",
"0.5270441",
"0.52644074",
"0.52577186",
"0.52497286",
"0.52473843",
"0.52472997",
"0.52472746",
"0.5246203",
"0.5244198",
"0.52403027",
"0.5237088",
"0.52264273",
"0.5224186",
"0.5223262",
"0.5222255",
"0.5218256",
"0.52112913",
"0.52112913",
"0.51918286",
"0.5187749",
"0.51860833",
"0.5185888",
"0.51858824"
]
| 0.8439037 | 0 |
Return the FileFormat corresponding to specified filename extension. null is returned if no matching format is found. | public static FileFormat getFileFormat(String ext)
{
return getFileFormat(ext, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FileFormat getFileFormat(String ext, FileFormat defaultValue)\r\n {\r\n for (FileFormat ff : values())\r\n if (ff.matches(ext))\r\n return ff;\r\n\r\n return defaultValue;\r\n }",
"FileFormat getFormat();",
"public String getFormatByExtension(String fileExtenstion) throws DataServiceException{\r\n\t\tString format = \"\";\r\n\t\tformat = (String)queryForObject(\"document.query_format\",fileExtenstion);\r\n\t\treturn format;\r\n\t}",
"private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }",
"public String getReadFileExtension(int formatIndex);",
"public ResourceFormatGenerator getGeneratorForFileExtension(final String extension) throws\n UnsupportedFormatException {\n for (final ResourceFormatGenerator generator : listGenerators()) {\n if (generator.getFileExtensions().contains(extension)) {\n return generator;\n }\n }\n throw new UnsupportedFormatException(\"No provider available to parse file extension: \" + extension);\n }",
"@UML(identifier=\"fileFormat\", obligation=MANDATORY, specification=ISO_19139)\n Format getFileFormat();",
"public static String getFileExtension(String filename) {\n\t\t\n\t\tint periodIndex = filename.lastIndexOf(\".\");\n\t\t\n\t\tif(periodIndex == -1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(periodIndex == filename.length() - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn filename.substring(periodIndex + 1, filename.length());\n\t}",
"public ResourceFormatGenerator getGeneratorForFileExtension(final File file) throws UnsupportedFormatException {\n String extension = file.getName().lastIndexOf(\".\") > 0 ? file.getName().substring(file.getName().lastIndexOf(\n \".\") + 1) : null;\n if (null != extension) {\n return getGeneratorForFileExtension(extension);\n } else {\n throw new UnsupportedFormatException(\"Could not determine format for file: \" + file.getAbsolutePath());\n }\n }",
"public abstract String getFileFormatName();",
"public String getWriteFileExtension(int formatIndex);",
"String getFileExtensionByFileString(String name);",
"public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}",
"public String getFormatCode() {\n if (format == null) return \"MP4\";\n switch(format) {\n case \"Windows Media\": return \"WMV\";\n case \"Flash Video\": return \"FLV\";\n case \"MPEG-4\": return \"MP4\";\n case \"Matroska\": return \"MKV\";\n case \"AVI\": return \"AVI\";\n default: return \"MP4\";\n }\n }",
"public static Optional<TurfVariant> findFromFilenameExtension(@Nonnull final String filenameExtension) {\n\t\tswitch(filenameExtension) {\n\t\t\tcase FILENAME_EXTENSION:\n\t\t\t\treturn Optional.of(TURF);\n\t\t\tcase PROPERTIES_FILENAME_EXTENSION:\n\t\t\t\treturn Optional.of(TURF_PROPERTIES);\n\t\t\tdefault:\n\t\t\t\treturn Optional.empty();\n\t\t}\n\t}",
"public String getFileExtension();",
"@CheckForNull\n String getPreferredExtension();",
"public boolean buildsFileType(String extension);",
"String getFileExtension();",
"private int getFileType(String fileName) {\n\t\tString[] buffer = fileName.split(\"\\\\.\");\n\t\tif (buffer[buffer.length - 1].equals(\"txt\"))\n\t\t\treturn 0;\n\t\telse if (buffer[buffer.length - 1].equals(\"pdf\"))\n\t\t\treturn 1;\n\t\telse if (buffer[buffer.length - 1].equals(\"jpg\")\n\t\t\t\t|| buffer[buffer.length - 1].equals(\"png\"))\n\t\t\treturn 2;\n\t\telse if (buffer[buffer.length - 1].equals(\"mp3\"))\n\t\t\treturn 3;\n\t\telse if (buffer[buffer.length - 1].equals(\"avi\")\n\t\t\t\t|| buffer[buffer.length - 1].equals(\"mp4\"))\n\t\t\treturn 4;\n\t\telse\n\t\t\treturn -1;\n\t}",
"public Format getBestFormat() {\n\t\tif (formats.contains(Format.JSON)) {\n\t\t\treturn Format.JSON;\n\t\t}\n\t\tif (formats.contains(Format.XML)) {\n\t\t\treturn Format.XML;\n\t\t}\n\t\treturn null;\n\t}",
"String getContentType(String fileExtension);",
"private String getFileExtension(File f) {\n String fileName = f.getName();\n return getFileExtension(fileName);\n }",
"Object getFormat();",
"private FileType getFileType(String name) {\n\t\tif(name==null)\n\t\t\treturn null;\n\t\tfor(FileType fileType: fileTypes){\n\t\t\tif(name.startsWith(fileType.getFileNamePrefix())){\n\t\t\t\treturn fileType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String getFileType()\n {\n if (m_fileOptions.m_type == null ||\n m_fileOptions.m_type.length() <= 0)\n {\n return getTypeFromExtension();\n }\n\n return m_fileOptions.m_type;\n }",
"public String getExtension(File f) {\n\t if(f != null) {\n\t String filename = f.getName();\n\t int i = filename.lastIndexOf('.');\n\t if(i>0 && i<filename.length()-1) {\n\t\t return filename.substring(i+1).toLowerCase();\n\t }\n\t }\n\t return null;\n }",
"public static String getFileType(String fileName) {\n String[] fileNames = fileName.split(\"\\\\.\");\n\n if (\"cs\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CSHARP;\n } else if (\"java\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_JAVA;\n } else if (\"cpp\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else if (\"h\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else if (\"hpp\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else if (\"cc\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else {\n return null;\n }\n }",
"ImageFormat getFormat();",
"public static String GetMimeType(String extension) {\n if (extension == null || extension.length() ==0) {\n return null;\n }\n return extensionToMimeTypeMap.get(extension);\n }",
"public IIOMetadataFormat getMetadataFormat(String formatName) {\n\t\tif (formatName.equals(nativeMetadataFormatName)) {\n\t\t\treturn null;\n\t\t\t// return (IIOMetadataFormat) nativeDoc;\n\t\t} else if (formatName.equals(commonMetadataFormatName)) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Not a recognized format!\");\n\t\t}\n\t}",
"@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }",
"private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}",
"public String getFileExtension() {\n return toString().toLowerCase();\n }",
"public static String getFileExtension(File f) {\n String name = f.getName();\n int index = name.lastIndexOf(\".\");\n if(index == -1) return null;\n \n // the file must have a name other than the extension\n if(index == 0) return null;\n \n // if the last character of the string is the \".\", then there's\n // no extension\n if(index == (name.length()-1)) return null;\n \n return name.substring(index+1);\n }",
"public Long getFiletypeForFileFormat(String fileformat)\r\n\t\t\tthrows ProcessingException;",
"public int lookupReadFileExtension(String extension);",
"public static String getFileExtension() {\n return fileExtension;\n }",
"public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}",
"public boolean fileFormatSupported(String fmt);",
"public edu.umich.icpsr.ddi.FormatType getFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().find_element_user(FORMAT$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getExtension(String filename, String extensionSymbol) {\n\t\tif (filename == null) {\n\n\t\t\treturn null;\n\n\t\t}\n\t\tint extensionPos = filename.lastIndexOf(extensionSymbol);\n\t\treturn filename.substring(extensionPos + 1);\n\t}",
"@SuppressWarnings(\"unchecked\")\n public <F> ConverterFormat<F> getFormat(Class<F> formatType) {\n ConverterFormat<F> format = (ConverterFormat<F>) formats.get(formatType);\n\n if (format == null) {\n throw new UnsupportedOperationException(\"The format \" + formatType + \" is not supported.\");\n }\n\n return format;\n }",
"public String getType(String fileExtension) {\n // trim leading dot if given\n if (fileExtension.startsWith(\".\")) {\n fileExtension = fileExtension.substring(1);\n }\n return this.typeMap.get(fileExtension);\n }",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"public static String extractExtension(String filename)\n\t{\n\t\treturn ImageWriterFilter.extractExtension(filename);\n\t}",
"private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }",
"public AudioFormat getFormat() throws AudioSourceException {\n if (format==null){\n AudioInputStream dummyStream=getAudioInputStream();\n try {\n dummyStream.close();\n } catch (IOException e) {\n throw new AudioSourceException(e);\n }\n }\n \n\t\treturn format;\n\t}",
"public String getOutputExtension(String inputExtension);",
"public String getExtension(File f) {\n\t\t\tString ext = null;\n\t\t\tString s = f.getName();\n\t\t\tint i = s.lastIndexOf('.');\n\n\t\t\tif (i > 0 && i < s.length() - 1)\n\t\t\t\text = s.substring(i + 1).toLowerCase();\n\t\t\treturn ext;\n\t\t}",
"public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }",
"public final String getExtension(File f) {\n\t String ext = null;\n\t String s = f.getName();\n\t int i = s.lastIndexOf('.');\n\n\t if (i > 0 && i < s.length() - 1) {\n\t ext = s.substring(i+1).toLowerCase();\n\t }\n\t return ext;\n\t }",
"public static optionFormats getFormatByNr (int optionNumber) {\n\t\tswitch (optionNumber) {\n\t\tcase RESERVED_0:\n\t\t\treturn optionFormats.unknown;\n\t\tcase CONTENT_TYPE:\n\t\t\treturn optionFormats.integer;\n\t\tcase PROXY_URI:\n\t\t\treturn optionFormats.string;\n\t\tcase ETAG:\n\t\t\treturn optionFormats.opaque;\n\t\tcase URI_HOST:\n\t\t\treturn optionFormats.string;\n\t\tcase LOCATION_PATH:\n\t\t\treturn optionFormats.string;\n\t\tcase URI_PORT:\n\t\t\treturn optionFormats.integer;\n\t\tcase LOCATION_QUERY:\n\t\t\treturn optionFormats.string;\n\t\tcase URI_PATH:\n\t\t\treturn optionFormats.string;\n\t\tcase TOKEN:\n\t\t\treturn optionFormats.opaque;\n\t\tcase URI_QUERY:\n\t\t\treturn optionFormats.string;\n\t\tdefault:\n\t\t\treturn optionFormats.error;\n\t\t}\n\t}",
"public String extension() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n return fullPath.substring(dot + 1);\n }",
"public String[] getSupportedFileFormatsList();",
"private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf(\".\");\n ext = s.substring(i+1).toLowerCase();\n return ext;\n }",
"public final AdFormat getFormat() {\n\t\treturn impl.getFormat();\n }",
"public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn filename.substring(dotIndex + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn \"\"; // no dot in filename\r\n\t\t\t}\r\n\t\t}",
"public final String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i+1).toLowerCase();\n }\n return ext;\n }",
"public static String GetExtension(String mimeType) {\n if (mimeType == null || mimeType.length() ==0) {\n return null;\n }\n return mimeTypeToExtensionMap.get(mimeType);\n }",
"private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}",
"public static String getFileExtension(File f) {\r\n\tfinal int idx = f.getName().indexOf(\".\");\r\n\tif (idx == -1)\r\n\t return \"\";\r\n\telse\r\n\t return f.getName().substring(idx + 1);\r\n }",
"private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }",
"public String getMIMEType(String format)\n\t{\n\t\treturn engine.getMIMEType(format);\n\t}",
"protected abstract String getFileExtension();",
"public static String getFileExtension(String filename) {\n\t\tif(filename.indexOf(\".\") == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn \".\"+filename.substring(filename.lastIndexOf(\".\")+1);\n\t}",
"public static Format getFormat(int format) throws IOException {\r\n\r\n switch (format) {\r\n case Order.FORMAT_FLAT: return new FormatFlat();\r\n case Order.FORMAT_TREE: return new FormatTree();\r\n case Order.FORMAT_NORITSU: return new FormatNoritsu();\r\n case Order.FORMAT_KONICA: return new FormatKonica();\r\n case Order.FORMAT_FUJI: return new FormatFuji();\r\n case Order.FORMAT_FUJI_NEW: return new FormatFujiNew();\r\n case Order.FORMAT_DLS: return new FormatDLSStub();\r\n case Order.FORMAT_KODAK: return new FormatKodak();\r\n case Order.FORMAT_AGFA: return new FormatAgfa();\r\n case Order.FORMAT_LUCIDIOM: return new FormatLucidiom();\r\n case Order.FORMAT_PIXEL: return new FormatPixel();\r\n case Order.FORMAT_DP2: return new FormatDP2();\r\n case Order.FORMAT_BEAUFORT: return new FormatBeaufort();\r\n case Order.FORMAT_DKS3: return new FormatDKS3();\r\n case Order.FORMAT_DIRECT_PDF: return new FormatDirectPDF();\r\n case Order.FORMAT_ZBE: return new FormatZBE();\r\n case Order.FORMAT_FUJI3: return new FormatFuji3();\r\n case Order.FORMAT_HP: return new FormatHP();\r\n case Order.FORMAT_XEROX: return new FormatXerox();\r\n case Order.FORMAT_DIRECT_JPEG: return new FormatDirectJPEG();\r\n case Order.FORMAT_BURN: return new FormatBurn();\r\n case Order.FORMAT_HOT_FOLDER: return new FormatHotFolder();\r\n case Order.FORMAT_DNP: return new FormatDNP();\r\n case Order.FORMAT_PURUS: return new FormatPurus();\r\n case Order.FORMAT_RAW_JPEG: return new FormatRawJPEG();\r\n default:\r\n throw new IOException(Text.get(Format.class,\"e1\"));\r\n }\r\n }",
"public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}",
"private String getExtension(File aFile) {\n String ext = null;\n String s = aFile.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"public static String getFileExtension(File f) {\n\t\tString fileName = f.getName();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}",
"private static String getFileExtension(String fileName) {\r\n\t\tString ext = IConstants.emptyString;\r\n\t\tint mid = fileName.lastIndexOf(\".\");\r\n\t\text = fileName.substring(mid + 1, fileName.length());\r\n\t\tSystem.out.println(\"File Extension --\" + ext);\r\n\t\treturn ext;\r\n\t}",
"QFileFormatKey getFormatKey();",
"public static String getExtension(File file) {\r\n String ext = null;\r\n String s = file.getName();\r\n int i = s.lastIndexOf('.');\r\n if(i > 0 && i < s.length() - 1) {\r\n ext = s.substring(i + 1).toLowerCase();\r\n }\r\n return ext;\r\n }",
"public static String getExtension(File file) {\n\t\tString ext = null;\n\t\tString fileName = file.getName();\n\t\tint i = fileName.lastIndexOf('.');\n\n\t\tif (i > 0 && i < fileName.length() - 1) {\n\t\t\text = fileName.substring(i+1).toLowerCase();\n\t\t}\n\t\treturn ext;\n\t}",
"private int getFileType(SourceFile sourceFile)\n\t{\n\t\tString name = sourceFile.getName();\n\t\tString pkg = sourceFile.getPackageName();\n\n\t\tif (name.startsWith(\"<\") && name.endsWith(\">\") || name.equals(\"GeneratedLocale\")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\t\treturn SYNTHETIC_FILE;\n\n for (final String frameworkPkg : FRAMEWORK_FILE_PACKAGES )\n {\n // look for packages starting with pkgName\n if (pkg.startsWith(frameworkPkg + '\\\\') || //$NON-NLS-1$\n pkg.startsWith(frameworkPkg + '/') || //$NON-NLS-1$\n pkg.equals(frameworkPkg)) //$NON-NLS-1$\n {\n return FRAMEWORK_FILE;\n }\n }\n\n if (name.startsWith(\"Actions for\")) //$NON-NLS-1$\n return ACTIONS_FILE;\n\n return AUTHORED_FILE;\n}",
"@Override\n public String getFormatName() throws IOException {\n return input == null? myDefaultFormat.getName() : getInfo().getFormat().getName();\n }",
"public Bitmap.CompressFormat getFormat() {\n return fullPhoto.getFormat();\n }",
"public static String getSupportedformats() {\r\n\t\tString description = \"\";\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tdescription += ff.description +\"\\n\";\r\n\t\t\t}\r\n\t\treturn description;\r\n\t}",
"public String fileExtension() {\r\n return getContent().fileExtension();\r\n }",
"String getFormat();",
"String getFormat();",
"String getFormat();",
"public Class<F> getFormatType() {\n\t\treturn formatType;\n\t}",
"public RMFormat getFormat()\n{\n // Return format from first binding\n if(getBindingCount()>0)\n return (RMFormat)getBinding(0).getFormat();\n \n // Return null\n return null;\n}",
"private String getFileExtension(String fileName) {\n return fileName.substring(fileName.lastIndexOf('.') + 1);\n }",
"String getExtension();",
"public static RDFFormat getFormatFromString(String format) throws NoValidArgumentException {\n RDFFormat result = getFormatNoException(format);\n\n if (result == null) {\n throw new NoValidArgumentException(\"Unknown language format: \" + format);\n }\n return result;\n }",
"public int lookupWriteFileExtension(String extension);",
"public String getFormat() {\n\t\treturn format;\n\t}",
"public boolean producesFileType(String outputExtension);",
"private static String getFileExtension(File cFile) {\n\t\tString oldname = cFile.getName();\r\n\t\tString extension = oldname.substring(oldname.lastIndexOf(\".\"));\r\n\t\treturn extension;\r\n\t}",
"public String getFileType() {\n return fileType;\n }",
"public abstract String getFileExtension();",
"public static FileType valueOf(File file){\r\n\t\tString fileName = file.getName().toUpperCase();\r\n\t\treturn FileType.valueOf(fileName.substring(fileName.lastIndexOf(\".\")+1));\r\n\t}",
"public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }",
"public String getFormatName() {\n\t\tString name = getName();\n\t\tif (name.startsWith(SpotlessPlugin.EXTENSION)) {\n\t\t\tString after = name.substring(SpotlessPlugin.EXTENSION.length());\n\t\t\tif (after.endsWith(SpotlessPlugin.CHECK)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.CHECK.length()).toLowerCase(Locale.US);\n\t\t\t} else if (after.endsWith(SpotlessPlugin.APPLY)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.APPLY.length()).toLowerCase(Locale.US);\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}",
"public static String getExtension(final String file) throws IOException {\n return FilenameUtils.getExtension(file);\n }",
"public boolean isInputFileType(String extension);",
"private boolean isSourceType(String extension) {\n return srcFileName.toLowerCase().endsWith(extension);\n }"
]
| [
"0.71281487",
"0.68624574",
"0.67299116",
"0.66553515",
"0.64478284",
"0.62881815",
"0.6268727",
"0.60729516",
"0.6055873",
"0.60539055",
"0.60518456",
"0.6041887",
"0.6038896",
"0.6027975",
"0.59457046",
"0.5926292",
"0.58362484",
"0.5835345",
"0.58292574",
"0.5824065",
"0.57829696",
"0.5768302",
"0.5760784",
"0.57489157",
"0.5738086",
"0.57317954",
"0.5713298",
"0.5693284",
"0.56876606",
"0.568161",
"0.5681531",
"0.56804526",
"0.5678555",
"0.56671643",
"0.5666245",
"0.5631711",
"0.562924",
"0.5621509",
"0.56196964",
"0.56141156",
"0.5606256",
"0.56040484",
"0.5600441",
"0.5592844",
"0.5584112",
"0.5581808",
"0.55589694",
"0.5555405",
"0.55504054",
"0.5525869",
"0.55206317",
"0.5505488",
"0.5488663",
"0.54702675",
"0.54678756",
"0.5463578",
"0.54585606",
"0.54544526",
"0.545263",
"0.5450332",
"0.5442003",
"0.5439655",
"0.5437656",
"0.5421706",
"0.541589",
"0.5406961",
"0.5398876",
"0.5387475",
"0.53694147",
"0.53663105",
"0.5361441",
"0.53604525",
"0.5352554",
"0.5338578",
"0.53178686",
"0.53159505",
"0.53084415",
"0.53076965",
"0.53017974",
"0.52745074",
"0.5269267",
"0.5269267",
"0.5269267",
"0.52679336",
"0.5266137",
"0.52595043",
"0.52563494",
"0.5254257",
"0.52515227",
"0.5251473",
"0.52502203",
"0.5246246",
"0.5234043",
"0.52274525",
"0.5224727",
"0.52167845",
"0.52094924",
"0.5206363",
"0.5205765",
"0.5203288"
]
| 0.7780848 | 0 |
Created by perusu on 20/11/17. | public interface IMainView extends IView{
void refreshRecyclerData(List<Data> newData);
} | {
"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}",
"@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 poetries() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void gored() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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}",
"public void mo38117a() {\n }",
"@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}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n public void init() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"private void strin() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void nghe() {\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 protected void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public void skystonePos4() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n void init() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n public void init() {}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\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\tprotected void initdata() {\n\n\t}",
"public void mo6081a() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\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 }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void skystonePos6() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"protected void mo6255a() {\n }"
]
| [
"0.60674584",
"0.5982526",
"0.59092855",
"0.58232486",
"0.58232486",
"0.58200145",
"0.58094853",
"0.5797666",
"0.57867175",
"0.57721484",
"0.5763906",
"0.5752272",
"0.5732841",
"0.5729434",
"0.57072806",
"0.5693598",
"0.56909823",
"0.5688064",
"0.567449",
"0.5671644",
"0.5659341",
"0.5649711",
"0.56432635",
"0.5611102",
"0.5602195",
"0.5602195",
"0.5602195",
"0.5602195",
"0.5602195",
"0.5583474",
"0.5577855",
"0.5562045",
"0.5557375",
"0.5555224",
"0.555175",
"0.5529324",
"0.5519327",
"0.5517993",
"0.5503775",
"0.5496272",
"0.54684615",
"0.54534537",
"0.54534537",
"0.54534537",
"0.54525745",
"0.54525745",
"0.5452285",
"0.5452285",
"0.5452285",
"0.5450305",
"0.5446265",
"0.5446265",
"0.5446265",
"0.5446265",
"0.5446265",
"0.5446265",
"0.5446265",
"0.5445686",
"0.5443299",
"0.54393905",
"0.5436602",
"0.5436602",
"0.5436602",
"0.54333556",
"0.542064",
"0.54162216",
"0.541425",
"0.5410633",
"0.54062647",
"0.54039264",
"0.53990614",
"0.53896916",
"0.53896916",
"0.5386442",
"0.53839153",
"0.5381942",
"0.53800577",
"0.5377671",
"0.5375516",
"0.5372164",
"0.5371421",
"0.537138",
"0.5367532",
"0.5367532",
"0.5366816",
"0.5364115",
"0.5358404",
"0.53511816",
"0.53487885",
"0.53393126",
"0.53393126",
"0.53393126",
"0.53393126",
"0.53393126",
"0.53393126",
"0.53373444",
"0.5332863",
"0.5331944",
"0.53316367",
"0.53255606",
"0.53199494"
]
| 0.0 | -1 |
The initialization method for the Source. The context contains all the Flume configuration info, and can be used to retrieve any configuration values necessary to set up the Source. | @Override
public void configure(Context context) {
consumerKey = context.getString(TwitterSourceConstant.CONSUMER_KEY);
consumerSecret = context.getString(TwitterSourceConstant.CONSUMER_SECRET_KEY);
accessToken = context.getString(TwitterSourceConstant.ACCESS_TOKEN);
accessTokenSecret = context.getString(TwitterSourceConstant.ACCESS_TOKEN_SECRET);
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setOAuthConsumerKey(consumerKey);
cb.setOAuthConsumerSecret(consumerSecret);
cb.setOAuthAccessToken(accessToken);
cb.setOAuthAccessTokenSecret(accessTokenSecret);
cb.setJSONStoreEnabled(true);
String keywordString = context.getString(TwitterSourceConstant.KEYWORDS,TwitterSourceConstant.DEFAULT_KEYWORD);
//keywords = keywordString.replace(TwitterSourceConstant.COMMA_CHARACTER, TwitterSourceConstant.OR_CHARACTER);
if (keywordString.trim().length() == 0) {
keywords = new String[0];
} else {
keywords = keywordString.split(",");
for (int i = 0; i < keywords.length; i++) {
keywords[i] = keywords[i].trim();
}
}
twitterStream = new TwitterStreamFactory(cb.build()).getInstance();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void initialize(ExternalContext context)\n {\n }",
"public void init(MailetContext context);",
"public static synchronized void initialize(Context context) {\n instance.context = context;\n initInternal();\n }",
"void init(HandlerContext context);",
"public void initializeContext(Context context) {\n this.context = context;\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 }",
"@Override\n public void initialize(BatchRuntimeContext context) throws Exception {\n super.initialize(context);\n // create any resources required by transform()\n }",
"public Context() {\n }",
"private void init(File contextXml) {\n //this.contextXml = contextXml;\n try {\n getContext();\n } catch (ConfigurationException e) {\n LOGGER.log(Level.INFO, null, e);\n }\n if (contextDataObject == null) {\n try {\n contextDataObject = DataObject.find(FileUtil.toFileObject(FileUtil.normalizeFile(contextXml)));\n contextDataObject.addPropertyChangeListener(this);\n } catch(DataObjectNotFoundException donfe) {\n LOGGER.log(Level.FINE, null, donfe);\n }\n }\n }",
"void init(@NotNull ExecutionContext context);",
"private void setupSource() {\n source = new GeoJsonSource( geojsonSourceId, featureCollection );\n map.addSource( source );\n }",
"public void init() {\n log.info(\"initialization\");\n }",
"@Override\n public void initialize(ConfigurableApplicationContext applicationContext) {\n\n System.out.println(\"========ApplicationContextInitializer===================\");\n\n ConfigurableEnvironment environment = applicationContext.getEnvironment();\n\n\n MutablePropertySources propertySources = environment.getPropertySources();\n\n // 模拟远程拉配置信息\n Map<String, Object> config = ConfigServer.getRemoteConfig();\n\n MapPropertySource propertySource = new MapPropertySource(\"test-config\", config);\n propertySources.addFirst(propertySource);\n }",
"@Override\n\tpublic void init() {\n\t\t// Nothing to do in this example\n\t}",
"protected void setup(Context context) {}",
"@Override public void init()\n\t\t{\n\t\t}",
"public void init() {\n \n }",
"private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}",
"public void initialize() {\n // TODO\n }",
"public void initialize()\n {\n }",
"public void init() {\n\t\t}",
"protected void initialize() {\n \t\n }",
"@Override\n public void init(ProcessingEnvironment env) {\n // Not working at the moment.\n // myEnv = env;\n filer = env.getFiler();\n }",
"@Override\n\tpublic void init() {\n\t\tsuper.init();\n\t\tlog.info(getClass().getSimpleName()+\" initialized\");\n\t}",
"public void init() {\n\n\t\tString rootdir = null;\n\t\ttry {\n\t\t\trootdir = ServletActionContext.getServletContext().getRealPath(\"/\");\n\t\t} catch (Exception ex) {\n\n\t\t}\n\n\t\tif (rootdir == null) {\n\t\t\trootdir = \"/Users/huangic/Documents/jetty-6.1.22/webapps/TransWeb\";\n\t\t}\n\n\t\tlogger.debug(rootdir);\n\t\tString classesdir = rootdir + \"/WEB-INF/classes/\";\n\t\tthis.xmlBatchRule = ReadXML(classesdir\n\t\t\t\t+ \"applicationContext-BatchRule.xml\");\n\t\tthis.xmlDB = ReadXML(classesdir + \"applicationContext-DB.xml\");\n\t\tthis.xmlSystem = ReadXML(classesdir + \"applicationContext-system.xml\");\n\n\t}",
"protected void init() {\n }",
"public static void initialize(Context context) {\n _db = new DatabaseHandler(context);\n }",
"public void init() {\n LOG.info(\"Initializing side input stores.\");\n\n initializeStoreDirectories();\n }",
"protected void init()\n {\n context.setConfigured(false);\n ok = true;\n\n if (!context.getOverride())\n {\n processContextConfig(\"context.xml\", false);\n processContextConfig(getHostConfigPath(org.apache.catalina.startup.Constants.HostContextXml), false);\n }\n // This should come from the deployment unit\n processContextConfig(context.getConfigFile(), true);\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public void initialize() {\n // empty for now\n }",
"public static void initialize() {\n \tinitialize(new Configuration().configure());\n }",
"public void initialize(UimaContext aContext) throws ResourceInitializationException {\r\n\t\tsuper.initialize(aContext);\r\n\t\tlogger = aContext.getLogger();\t\r\n\t\tlogger.log(Level.INFO, \"FactExtractCloud: initializing:\");\r\n\t\tpAccount = CASUtils.getConfigurationStringValue(aContext, null, PARAM_ACCOUNT);\r\n\t\tpUsername = CASUtils.getConfigurationStringValue(aContext, null, PARAM_USERNAME);\r\n\t\tpPassword = CASUtils.getConfigurationStringValue(aContext, null, PARAM_PASSWORD);\r\n\t\tpDatabase = CASUtils.getConfigurationStringValue(aContext, null, PARAM_DATABASE);\r\n\t\tpTriggerFeature = CASUtils.getConfigurationStringValue(aContext, null, PARAM_TRIGGER);\r\n\t\tCloudantClient client = ClientBuilder.account(pAccount)\r\n\t\t\t\t.username(pUsername)\r\n\t\t\t\t.password(pPassword)\r\n\t\t\t\t.build();\r\n\t\tdb = client.database(pDatabase, true);\r\n\t\t//logger.log(Level.INFO,\"Server Version: \" + client.serverVersion());\t\r\n\t}",
"@PostConstruct\n public void init() {\n String[] commandPathPatterns = new String[]{\"classpath*:/commands/**\",\n \"classpath*:/crash/commands/**\"};\n\n // Patterns to use to look for configurations.\n String[] configPathPatterns = new String[]{\"classpath*:/crash/*\"};\n\n // Comma-separated list of commands to disable.\n String[] disabledCommands = new String[]{\"jpa*\", \"jdbc*\", \"jndi*\"};\n\n // Comma-separated list of plugins to disable. Certain plugins are disabled by default\n // based on the environment.\n String[] disabledPlugins = new String[0];\n\n FS commandFileSystem = createFileSystem(\n commandPathPatterns,\n disabledCommands);\n FS configurationFileSystem = createFileSystem(\n configPathPatterns, new String[0]);\n\n PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(\n this.resourceLoader.getClassLoader(), this.beanFactory,\n disabledPlugins);\n\n PluginContext context = new PluginContext(discovery,\n createPluginContextAttributes(), commandFileSystem,\n configurationFileSystem, this.resourceLoader.getClassLoader());\n\n context.refresh();\n start(context);\n }",
"public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}",
"@Override\n public void init() {\n logger.info(\"Initializing Sample TAL adapter\");\n\n // In order to get ticket updates from Symphony adapter must subscribe to this explicitly here\n // After subscription is done, all updates will come to this adapter instance via calls to syncTalTicket method\n talProxy.subscribeUpdates(accountId, this);\n\n try {\n // obtain adapter configuration\n setConfig(talConfigService.retrieveTicketSystemConfig(accountId));\n } catch (Exception e) {\n throw new RuntimeException(\"SampleTalAdapterImpl was unable to retrieve \" +\n \"configuration from TalConfigService: \" + e.getMessage(), e);\n }\n\n // subscribe for getting adapter configuration updates\n talConfigService.subscribeForTicketSystemConfigUpdate(accountId,\n (ticketSystemConfig) -> setConfig(ticketSystemConfig));\n }",
"public void init() {\n // the config string contains just the asset store directory path\n //set baseDir?\n this.initialized = true;\n }",
"public void init(Context context) {\n\t\t\n\t EMOptions options = initChatOptions();\n\t //options传null则使用默认的\n\t\tif (EaseUI.getInstance().init(context, options)) {\n\t\t appContext = context;\n\t\t \n\t\t userDao=new UserDao(appContext);\n\t\t //设为调试模式,打成正式包时,最好设为false,以免消耗额外的资源\n\t\t EMClient.getInstance().setDebugMode(true);\n\t\t //get easeui instance\n\t\t easeUI = EaseUI.getInstance();\n\t\t //调用easeui的api设置providers\n\t\t setEaseUIProviders();\n\t\t\t//初始化PreferenceManager\n\t\t//\tPreferenceManager.init(context);\n\t\t\t//初始化用户管理类\n\t\t//\tgetUserProfileManager().init(context);\n\t\t\t\n\t\t\t//设置全局监听\n\t\t//\tsetGlobalListeners();\n\t\t//\tbroadcastManager = LocalBroadcastManager.getInstance(appContext);\n\t // initDbDao();\n\t\t //注册消息事件监听\n\t registerEventListener();\n\n\t\t}\n\t}",
"@Init\r\n\tpublic void init() {\r\n\t\t// Component initialization code.\r\n\t\t// All properties are initialized and references are injected.\r\n\t\tif(emailConfiguration==null){\r\n\t\t\tloadConfiguration();\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init(FloodlightModuleContext context)\n\t\t\tthrows FloodlightModuleException {\n\t\t\n\t\tfloodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);\n\t macAddresses = new ConcurrentSkipListSet<Long>();\n\t logger = LoggerFactory.getLogger(MySimpleFirewall.class);\n\t \n\t}",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}",
"@Override\n public void start(BundleContext context) throws Exception {\n super.start(context);\n\n this.ctx = context;\n }",
"public void init()\n {\n context = getServletContext();\n parameters = (Siu_ContainerLabel)context.getAttribute(\"parameters\");\n }",
"@Override\n public void initialize(UimaContext aUimaContext) {\n try {\n chunker = (NBestChunker) AbstractExternalizable.readResourceObject((String) aUimaContext\n .getConfigParameterValue(\"LingpipeModel\"));\n /*\n * chunker = (ConfidenceChunker) AbstractExternalizable.readResourceObject(\n * LingPipeAnnotator.class, (String)\n * aUimaContext.getConfigParameterValue(\"LingPipeNERModel\"));\n */\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public final void init() {\n onInit();\n }",
"public void init() {\n\t\tM_log.info(\"initialization...\");\n\t\t\n\t\t// register as an entity producer\n\t\tm_entityManager.registerEntityProducer(this, SakaiGCalendarServiceStaticVariables.REFERENCE_ROOT);\n\t\t\n\t\t// register functions\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW_ALL);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_EDIT);\n\t\t\n \t\t//Setup cache. This will create a cache using the default configuration used in the memory service.\n \t\tcache = memoryService.newCache(CACHE_NAME);\n\t}",
"@Override\n public void init(Properties properties) {\n super.init(properties);\n String categoriesFilePath = properties.getProperty(\"categoriesFilePath\", \"\");\n String gemetFilePath = properties.getProperty(\"gemetFilePath\", \"\");\n String lang = properties.getProperty(\"lang\", \"\");\n\n for (Locale l: Locale.getAvailableLocales()) {\n if (l.getLanguage().equalsIgnoreCase(lang)) {\n locale = l;\n break;\n }\n }\n\n ContextInitializer initializer = new ContextInitializer(ontCtx,\n categoriesFilePath, gemetFilePath);\n initializer.initialize();\n\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"public void init() {\r\n\r\n\t}",
"protected void initialize() {\r\n }",
"protected void initialize() {\r\n }",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"@Override\n\tpublic void init(BundleContext context, DependencyManager manager)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"protected void initialize() {}",
"protected void initialize() {}",
"@Mod.EventHandler\n public void init(FMLInitializationEvent e) {\n proxy.init(e);\n }",
"@Mod.EventHandler\n public void init(FMLInitializationEvent e) {\n proxy.init(e);\n }",
"@Override\n public void init(final FilterConfig filterConfig) {\n Misc.log(\"Request\", \"initialized\");\n }",
"public void init(){\n \n }",
"public void initialize() {\r\n }",
"public void init() {\n\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n ds = (DataSource) envCtx.lookup(\"jdbc/QuotingDB\");\n// dbCon = ds.getConnection();\n }\n catch (javax.naming.NamingException e) {\n System.out.println(\"A problem occurred while retrieving a DataSource object\");\n System.out.println(e.toString());\n }\n\n }",
"protected void init() {\n\t}",
"protected void init() {\n\t}",
"public void initialize() {\n }",
"public void init()\n\t{\n\t\tsuper.init();\n\t\tM_log.info(\"init()\");\n\t}",
"public void init()\n\t{\n\t\tsuper.init();\n\t\tM_log.info(\"init()\");\n\t}",
"public void init() { }",
"public void init() { }",
"@Override\r\n\tpublic void init() {\n\t\tsuper.init();\r\n\t}",
"private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }",
"@Override\n protected void init() {\n }",
"@Mod.EventHandler\n public void init(FMLInitializationEvent event) {\n proxy.init(event);\n }",
"protected void initialize() {\n\n\t}",
"@Override\n public void initialize(UimaContext context) throws ResourceInitializationException {\n super.initialize(context);\n // call init method to perform check of UIMA parameters and general init of other parameters\n this.init(this.newsQueries, this.wikiQueries, this.numOfQueries, this.queryLanguages);\n\n try {\n this.generateQueries();\n } catch (UIMAException | IOException e) {\n e.printStackTrace();\n }\n\n this.isInitializedForUima = true;\n }",
"public void init()\n {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}"
]
| [
"0.6952986",
"0.66714376",
"0.6588838",
"0.6545886",
"0.6505141",
"0.6372611",
"0.63022614",
"0.6275073",
"0.6201037",
"0.61283755",
"0.6110974",
"0.61073667",
"0.61006135",
"0.6069467",
"0.6042092",
"0.6041786",
"0.6028859",
"0.6000547",
"0.6000186",
"0.5988103",
"0.59816784",
"0.59691906",
"0.5966852",
"0.5965761",
"0.5964588",
"0.5954546",
"0.5948895",
"0.5948048",
"0.5924333",
"0.5923602",
"0.5916512",
"0.5899392",
"0.58964896",
"0.5879008",
"0.58782715",
"0.5876613",
"0.5869377",
"0.58680195",
"0.5865074",
"0.5862573",
"0.58484054",
"0.58484054",
"0.58484054",
"0.58484054",
"0.5844551",
"0.5841873",
"0.5838037",
"0.58367395",
"0.5832557",
"0.58258104",
"0.58222806",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.5819484",
"0.58191407",
"0.5819096",
"0.5819096",
"0.5817433",
"0.5817433",
"0.5817433",
"0.5812326",
"0.5811297",
"0.580885",
"0.580885",
"0.5804749",
"0.5804749",
"0.579981",
"0.5789643",
"0.57892704",
"0.5788344",
"0.5786564",
"0.5786564",
"0.57811004",
"0.5773613",
"0.5773613",
"0.5758626",
"0.5758626",
"0.57533985",
"0.5747804",
"0.57450026",
"0.5738966",
"0.5738342",
"0.5735127",
"0.5730278",
"0.57291216",
"0.572533"
]
| 0.0 | -1 |
The channel is the piece of Flume that sits between the Source and Sink, and is used to process events. | @Override
public void start(){
final ChannelProcessor channel = getChannelProcessor();
final Map<String, String> headers = new HashMap<String, String>();
// The StatusListener is a twitter4j API, which can be added to a Twitter
// stream, and will execute methods every time a message comes in through
// the stream.
StatusListener statusListener = new StatusListener() {
// The onStatus method is executed every time a new tweet comes in.
@Override
public void onStatus(Status status) {
// The EventBuilder is used to build an event using the headers and
// the raw JSON of a tweet
// shouldn't log possibly sensitive customer data
//logger.debug("tweet arrived");
headers.put("timestamp",String.valueOf(status.getCreatedAt().getTime()));
Event event1;
event1 = EventBuilder.withBody(TwitterObjectFactory.getRawJSON(status).getBytes(),headers);
//event2 = EventBuilder.withBody(Integer.toString(status.getRetweetCount()),(Charset)headers);
//event3 = EventBuilder.withBody(status.getText().getBytes(), headers);
channel.processEvent(event1);
//channel.processEvent(event2);
}
@Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {
}
@Override public void onTrackLimitationNotice(int i) {
}
@Override public void onScrubGeo(long l, long l1) {
}
@Override public void onStallWarning(StallWarning stallWarning) {
}
@Override public void onException(Exception e) {
}
};
twitterStream.addListener(statusListener);
if(keywords.length != 0){
FilterQuery filterQuery = new FilterQuery().track(keywords);
twitterStream.filter(filterQuery);
}else{
twitterStream.sample();
}
super.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setChannel(Channel channel)\n {\n this.channel = channel;\n }",
"public void setChannel(String channel) {\n\t\tthis.channel = channel;\n\t}",
"public void setChannel(Byte channel) {\n this.channel = channel;\n }",
"@Override\n public int getChannel()\n {\n return channel;\n }",
"public Channel getChannel() {\n return channel;\n }",
"public Channel getChannel()\n {\n return channel;\n }",
"public String getChannel() {\r\n return channel;\r\n }",
"public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}",
"EventChannelDestination destination();",
"public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}",
"public String getChannel() {\n return channel;\n }",
"public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}",
"public void SetChannel(int channel);",
"EventChannelSource source();",
"public Connection(Channel channel) {\r\n this.channel = channel;\r\n }",
"@Override\n\tpublic void eventFired(TChannel channel, TEvent event, Object[] args) {\n\t\t\n\t}",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public ChannelDesc(SocketChannel channel) {\n this.channel = channel;\n }",
"public void setChannel(String channel) {\r\n this.channel = channel == null ? null : channel.trim();\r\n }",
"Update withDestination(EventChannelDestination destination);",
"@Override\n public void initChannel(SocketChannel ch) throws Exception {\n ch.pipeline().addLast(new OutMessageHandler());\n\n }",
"@Override\n public void handleEvent(final StreamSinkChannel theConnectionChannel) {\n if (anyAreSet(state, FLAG_DELEGATE_SHUTDOWN)) {\n try {\n //either it will work, and the channel is closed\n //or it won't, and we continue with writes resumed\n channel.flush();\n return;\n } catch (IOException e) {\n handleError(channel, e);\n }\n }\n //if there is data still to write\n if (buffersToWrite != null) {\n long toWrite = Buffers.remaining(buffersToWrite);\n long written = 0;\n long res;\n do {\n try {\n res = channel.write(buffersToWrite);\n written += res;\n if (res == 0) {\n return;\n }\n } catch (IOException e) {\n handleError(channel, e);\n }\n } while (written < toWrite);\n buffersToWrite = null;\n }\n if (anyAreSet(state, FLAG_CLOSED)) {\n try {\n channel.shutdownWrites();\n state |= FLAG_DELEGATE_SHUTDOWN;\n channel.flush(); //if this does not succeed we are already resumed anyway\n } catch (IOException e) {\n handleError(channel, e);\n }\n } else {\n state |= FLAG_READY;\n theConnectionChannel.suspendWrites();\n theConnectionChannel.getWorker().submit(new Runnable() {\n @Override\n public void run() {\n try {\n state |= FLAG_IN_CALLBACK;\n listener.onWritePossible();\n theConnectionChannel.getWriteSetter().set(WriteChannelListener.this);\n theConnectionChannel.resumeWrites();\n } catch (Throwable e) {\n IoUtils.safeClose(channel);\n } finally {\n state &= ~FLAG_IN_CALLBACK;\n }\n }\n });\n }\n }",
"public int getChannel() {\r\n\t\treturn channel;\r\n\t}",
"protected Channel getChannel()\n {\n return mChannel;\n }",
"Channel channel() {\n return channel;\n }",
"public interface Channel {\n\n\t/**\n\t * Call this to send an article to its destination.\n\t * @param article the article to send\n\t */\t\n\tvoid accept(Article article);\n}",
"public int getChannel() {\n return channel;\n }",
"public void setChannelName(String channel)\n {\n mChannelName = channel;\n }",
"public void setChannel(String channel) {\n\t\tthis.channel = channel == null ? null : channel.trim();\n\t}",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) {\n log.error(\"Input Stream {} : Channel Disconnected - Stream Engine RTS process!\", name);\n channelAtomicReference.set(null);\n }",
"@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}",
"EventChannel apply();",
"public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }",
"public void setChannelId( int channelId ) {\r\n this.channelId = channelId;\r\n }",
"void setChannel(EzyChannel channel);",
"@Override\n\tpublic void channelParted(String channel) {\n\t}",
"public void setChannel(org.apache.axis.types.UnsignedInt channel) {\n this.channel = channel;\n }",
"@Override\r\n\tpublic void changeChannel(int channel) {\n\t\tSystem.out.println(\"채널을 바꾸다\");\r\n\t}",
"public void setChannelId(String channelId)\n {\n this.channelId = channelId;\n }",
"public Byte getChannel() {\n return channel;\n }",
"@Override\n protected void initChannel (SocketChannel ch) throws Exception {\n // can utilize channel to push message to different client since one channel correspond to one client\n System.out.println(\"client socket channel hashcode = \" + ch.hashCode());\n ch.pipeline().addLast(new NettyServerHandler());\n }",
"@Override\n public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {\n Channel ch = ctx.getChannel();\n //Player player = (Player) ch.getAttachment();\n Client client = (Client) ch.getAttachment();\n \n if (ch.isConnected()) { // && !client.getPlayer().destroyed() \n RSCPacket packet = (RSCPacket) e.getMessage();\n //player.addPacket(p); // Used to log packets for macro detection\n //engine.addPacket(p); // This one actually results in the packet being processed!\n client.pushToMessageQueue(packet);\n }\n }",
"public void onChannel(String channel, String title, String subtitle);",
"@Override\n protected void initChannel(SocketChannel ch) throws Exception {\n //4. Add ChannelHandler to intercept events and allow to react on them\n ch.pipeline().addLast(new ChannelHandlerAdapter() {\n @Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n //5. Write message to client and add ChannelFutureListener to close connection once message written\n ctx.write(buf.duplicate()).addListener(ChannelFutureListener.CLOSE);\n }\n });\n }",
"@Override\n public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception {\n super.handleUpstream(ctx, e);\n }",
"Update withSource(EventChannelSource source);",
"@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\n log.info( ctx.channel().id().asLongText()+\"-> channelRead , msg={}\" , msg.getClass().getName());\n\n ctx.fireChannelRead( msg ) ;\n }",
"java.lang.String getChannel();",
"public SocketChannel getChannel() {\n return channel;\n }",
"public void setChannelId(String channelId) {\n this.channelId = channelId;\n }",
"private void uponInConnectionUp(InConnectionUp event, int channelId) {\n }",
"public void setChannelFuture(ChannelFuture channelFuture) {\n this.channelFuture = channelFuture;\n }",
"void onMessage(String pattern, String channel, String message);",
"public void setChannel(PowerChannel channel) {\n this.channel = channel;\n }",
"@Override\n protected void sink(Message message) {\n }",
"EventChannel apply(Context context);",
"@Override\n protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception { // (4)\n Channel incoming = ctx.channel();\n\n String remoteAddress = incoming.remoteAddress().toString();\n logger.info(\"[BudsRpc ][Registry-server] receive data=[{}] from {}\", msg, remoteAddress);\n\n String[] cmd = msg.split(\"\\r\\n\");\n ActionEnum action = ActionEnum.getAction(cmd[0]);\n String service = cmd[1];\n String address = cmd[2];\n String port = cmd[3];\n\n switch (action) {\n case ACTION_REGISTRY:\n Set<Channel> channelSet = registryMap.get(service);\n if (channelSet == null) {\n channelSet = new HashSet<>();\n registryMap.put(service, channelSet);\n }\n channelSet.add(incoming);\n\n Set<String> serviceSet = providerMap.get(remoteAddress);\n if (serviceSet == null) {\n serviceSet = new HashSet<>();\n providerMap.put(remoteAddress, serviceSet);\n }\n serviceSet.add(service);\n\n // 通知订阅者\n notify(service);\n\n case ACTION_SUBSCRIBE:\n ChannelGroup channelGroup = subscribMap.get(service);\n if (channelGroup == null) {\n channelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);\n subscribMap.put(service, channelGroup);\n }\n channelGroup.add(incoming);\n break;\n\n }\n\n for (Channel channel : channels) {\n if (channel != incoming) {\n channel.writeAndFlush(\"[\" + incoming.remoteAddress() + \"]\" + msg + \"\\n\");\n } else {\n channel.writeAndFlush(\"[you]\" + msg + \"\\n\");\n }\n }\n }",
"@Override\n public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) {\n Channel channel = ctx.getChannel();\n //session.setAttachment(new Player(session));\n Client client = new Client(channel);\n channel.setAttachment(client);\n engine.addClient(client);\n }",
"void start(Channel channel, Object msg);",
"public abstract void message(String channel, String message);",
"public void setChannel(SubscribableChannel messageChannel) {\n\t\tthis.messageChannel = messageChannel;\n\t}",
"@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }",
"EzyChannel getChannel();",
"void startHelloSender(Channel channel);",
"@Override\n\tpublic void changeChannel() {\n\t\tSystem.out.println(\"Listening to Radio...\\n channel 1 2 3 4....\");\n\t}",
"EventChannelFilter filter();",
"public void partChannel(String channel, String reason);",
"public String getChannelId() {\n return channelId;\n }",
"@Override\n\t\t\tpublic void callStarted(String channel) {\n\t\t\t}",
"@Override\n\tpublic void useChannel(ICommunicationChannel channelToUse) {\n\t\t\n\t}",
"@Override\n\tpublic void useChannel(ICommunicationChannel channelToUse) {\n\t\t\n\t}",
"@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\t\tLog.i(\"channelRead\", ((String) msg));\n\t\tsuper.channelRead(ctx, msg);\n\t}",
"@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();",
"public String getChannelId()\n {\n return channelId;\n }",
"public void setChannelid(Integer channelid) {\n this.channelid = channelid;\n }",
"public abstract Pipe deliver( Pipe sink );",
"public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}",
"@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\t\tctx.write(msg);\n\t}",
"public Channel() {\n this(DSL.name(\"channel\"), null);\n }",
"public String getChannelId() {\n\t\treturn channelId;\n\t}",
"void send(IMessage message, IChannel channel);",
"@Override\n protected void initChannel(SocketChannel ch) throws Exception {\n ch.pipeline().addLast(new TimeServerHandler());\n }",
"@Override\n public void onSubscribe(String channel, int subscribedChannels) {\n System.out.println(\"Client is Subscribed to channel : \"+ channel);\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n super.channelActive(ctx);\n \n }",
"public void MessageEvent(ChannelMessageEvent ev) {\n\t\t\n\t\tif (ev == null)\n\t\t\treturn;\n\t\tstdGroup.fireEventStatus(new StatusEvent(this,\"Channel \"+ ev.getChannelName() + \"is speaking to me\"));\n\t\tsetChanged();\n\t\tnotifyObservers(ev);\n\t\tstdGroup.fireEventStatus(new StatusEvent(this,\"Notifying for channel \"+ ev.getChannelName() + \" all views\"));\n\t\t\n\t}",
"SocketChannel getChannel();",
"@Override\n\tpublic void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {\n\t\ttransferredBytes.addAndGet(((ChannelBuffer) e.getMessage())\n\t\t\t\t.readableBytes());\n\t\tlogger.info(\"收到消息: \"+e.getMessage());\n\t\te.getChannel().write(e.getMessage());\n\t}",
"public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}",
"@Override\n\tpublic void handleUpstream(ChannelHandlerContext arg0, ChannelEvent arg1) throws Exception {\n\t\tsuper.handleUpstream(arg0, arg1);\n\t}",
"void forward(IMessage message, IChannel sender);",
"@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}",
"public int getChannelId( ) {\r\n return channelId;\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}",
"@Override\n\tpublic void channelRegistered(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelRegistered\");\n\t\tsuper.channelRegistered(ctx);\n\t}",
"@Override\r\n\tpublic void onChannelSuccess() {\n\t\t\r\n\t}",
"private void uponOutConnectionUp(OutConnectionUp event, int channelId) {\n }",
"public void acceptNewChannel(Channel channel)\n {\n ProviderSession provSession = new ProviderSession(_xmlMsgData, _itemEncoder);\n ++_connectionCount;\n provSession.init(_channelHandler.addChannel(channel, provSession, true));\n }",
"public BroadcastChannel(String channelName)\n {\n mChannelName = channelName;\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }",
"public interface Sink<I>\n extends Consumer<I>\n{\n /**\n * {@inheritDoc}\n */\n @Override\n public default void accept (I message)\n {\n dataIn().send(message);\n }\n\n /**\n * Input Connection.\n *\n * @return the data-input that provides the messages to the pipeline.\n */\n public Input<I> dataIn ();\n}"
]
| [
"0.701483",
"0.66494185",
"0.6549597",
"0.65095484",
"0.64734656",
"0.64711064",
"0.6422183",
"0.6409867",
"0.63933665",
"0.63745403",
"0.63456386",
"0.6334781",
"0.6300465",
"0.6294534",
"0.6263739",
"0.62422156",
"0.6240853",
"0.6240853",
"0.6210415",
"0.6190536",
"0.61841094",
"0.6144062",
"0.61310893",
"0.6126893",
"0.6117007",
"0.6073098",
"0.6061578",
"0.60539365",
"0.60504544",
"0.60180855",
"0.59919924",
"0.59894216",
"0.5987327",
"0.597589",
"0.59670246",
"0.594362",
"0.594093",
"0.593961",
"0.59172064",
"0.5917187",
"0.5897412",
"0.58951813",
"0.5858573",
"0.58422285",
"0.5829103",
"0.5818952",
"0.5815058",
"0.5811359",
"0.5803604",
"0.57937384",
"0.57899034",
"0.57683784",
"0.5747344",
"0.57262826",
"0.5720637",
"0.57199967",
"0.5716593",
"0.56981945",
"0.5696774",
"0.569538",
"0.56864697",
"0.56776303",
"0.5677262",
"0.5676722",
"0.5658336",
"0.56533396",
"0.5644887",
"0.56374973",
"0.5634249",
"0.5633529",
"0.5632098",
"0.5632098",
"0.56294996",
"0.5619156",
"0.5611702",
"0.5608162",
"0.5588861",
"0.55870914",
"0.5586517",
"0.55629086",
"0.5545398",
"0.55289704",
"0.552303",
"0.55175406",
"0.5517133",
"0.55170083",
"0.55167025",
"0.5515664",
"0.5511265",
"0.5510582",
"0.5500616",
"0.5499303",
"0.54834414",
"0.54831564",
"0.5479995",
"0.5475546",
"0.5462393",
"0.546201",
"0.54567593",
"0.54516786",
"0.5451599"
]
| 0.0 | -1 |
The onStatus method is executed every time a new tweet comes in. | @Override
public void onStatus(Status status) {
// The EventBuilder is used to build an event using the headers and
// the raw JSON of a tweet
// shouldn't log possibly sensitive customer data
//logger.debug("tweet arrived");
headers.put("timestamp",String.valueOf(status.getCreatedAt().getTime()));
Event event1;
event1 = EventBuilder.withBody(TwitterObjectFactory.getRawJSON(status).getBytes(),headers);
//event2 = EventBuilder.withBody(Integer.toString(status.getRetweetCount()),(Charset)headers);
//event3 = EventBuilder.withBody(status.getText().getBytes(), headers);
channel.processEvent(event1);
//channel.processEvent(event2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public void onStatus(Status status) {\n\t\t\tif (Calendar.getInstance().getTime().before( shutdownTime.getTime() )) {\r\n\t\t\t\ttweets.add(status);\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.log(Level.FINE, \"Shutting down Twitter stream..\");\r\n\t\t\t\tclearLists();\r\n\t\t\t\tshutdown = true;\r\n\t\t\t\ttwitterStream.shutdown();\r\n\t\t\t}\r\n\t\t}",
"@Override public void onStatus(Status status) {\n\t\t\tif (Calendar.getInstance().getTime().before( shutdownTime.getTime() )) {\r\n\t\t\t\ttweets.add(status);\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.log(Level.FINE, \"Shutting down Twitter stream..\");\r\n\t\t\t\tclearLists();\r\n\t\t\t\tshutdown = true;\r\n\t\t\t\ttwitterStream.shutdown();\r\n\t\t\t}\r\n\t\t}",
"public void onStatus(Status arg0) {\r\n count++;\r\n if (count <= maxCount)\r\n tweets.add(arg0);\r\n }",
"public void onStatus(Status status) {\n String userName = status.getUser().getScreenName();\n String userId = Long.toString(status.getUser().getId());\n String messageTweet = status.getText();\n String imageUrl = status.getUser().getProfileImageURL();\n String lang = status.getUser().getLang();\n String timeZone = status.getUser().getTimeZone();\n String userLocation = status.getUser().getLocation();\n String time = tweetTime();\n\n makeJson(userId,userName,messageTweet,imageUrl, lang, timeZone, userLocation, time);\n \n}",
"void onStatusUpdate(int status);",
"public void onTweetSuccess(Tweet tweet);",
"@Override\n\t\t\tpublic void onStatus(Status status) {\n\n\t\t\t\tUser user = status.getUser();\n\t\t\t\t/*String username = status.getUser().getName();// name\n\t\t\t\tString location = user.getLocation();// location\n\t\t\t\tString content = status.getText();// tweet\n\t\t\t\tint followers_count = status.getUser().getFollowersCount();\n\t\t\t\tint friends_count = status.getUser().getFriendsCount();\n\t\t\t\tDate created_at = status.getCreatedAt();\n\t\t\t\tlong retweet_count = status.getRetweetCount();*/\n\t\t\t\t\n\t\t\t\tentry = new BasicDBObject();\n\t\t\t\t\tentry.append(\"username\", status.getUser().getName());\n\t\t\t\t\tentry.append(\"location\", user.getLocation());\n\t\t\t\t\tentry.append(\"content\", status.getText());\n\t\t\t\t\tentry.append(\"followers_count\", status.getUser().getFollowersCount());\n\t\t\t\t\tentry.append(\"friends_count\", status.getUser().getFriendsCount());\n\t\t\t\t\tentry.append(\"created_at\", status.getCreatedAt());\n\t\t\t\t\tentry.append(\"retweet_count\", status.getRetweetCount());\n\t\t\t\t\tentry.append(\"lang\", status.getUser().getLang());\n\t\t\t\t\tcollection.insert(entry);\n\t\t\t\t\t//System.out.println(\"name\");\n\t\t\t\t\tentry=null;\n\t\t\t\t\t\n\t\t\t}",
"public void onStatus(Status status) {\n \t\t\t\t_receivedStatus++;\n \t\t\t\tif(!_statusQueue.offer(status)){\n \t\t\t\t\t_lostStatus++; \n \t\t\t\t}\t\t\t\n \t\t\t}",
"Status updateStatus(String status) throws TwitterException;",
"Status updateStatus(StatusUpdate latestStatus) throws TwitterException;",
"void makeTweet(OnTweetPostListener onTweetPostListener);",
"public void receiveMyStatus(int status) {\n \t\n \tfinal int s = status;\n// \tLog.d(\"handler\", \"receiveMyStatus\");\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n \tstatusTextView.setText(statusText(s));\n }\n });\n }",
"public void tweet() {\r\n try {\r\n\r\n String twet = JOptionPane.showInputDialog(\"Tweett:\");\r\n Status status = twitter.updateStatus(twet);\r\n System.out.println(\"Successfully updated the status to [\" + status.getText() + \"].\");\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\ttwitter.setSource(\"keyrani\");\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\ttwitter.updateStatus(status.getText().toString());\n\t\t\t\t\t\t\n\t\t\t\t\t}catch (Repetition e) {\n\t\t\t\t\t\t Toast.makeText(TwitUpdate.this, \"status tdk boleh sama\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}",
"void onStatusChanged(Status newStatus);",
"@Override\n public void addStatusEvent(Status status) {\n }",
"@Override\n\tpublic void onStatusUpdate(String arg0, int arg1, String arg2) {\n\t}",
"private static void reply(Status status){\n String tweetedAtMe = \"@\" + status.getUser().getScreenName(); //retrieve username\n String completeReply = tweetedAtMe + \" \" + replyStatus + tweetedAtMe + \"?”\"; //message to tweet\n long inReply = status.getId(); //get id of status for reply\n StatusUpdate statusUpdate = new StatusUpdate(completeReply).inReplyToStatusId(inReply); //Status update is indicated as a reply\n\n Twitter twitter = TwitterInstantiator.instantiateTwitter(); //authorize to tweet on my behalf\n\n try{\n twitter.updateStatus(statusUpdate); //send tweet\n } catch (TwitterException te) {\n System.out.println(\"Ran into twitter exception: \" + te); //this tells me if I've sent too many tweets in a short time\n }\n }",
"@Override\n public void onStatusChange(int status) {\n }",
"@Override\r\n public void onStatusUpdate(String arg0, int arg1, String arg2) {\n\r\n }",
"public void getTweets() {\r\n\t\t\r\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\r\n\t\tcb.setDebugEnabled(true);\r\n\t\t\r\n\t\t//provide your own keys\r\n\t cb.setOAuthConsumerKey(\"ConsumerKey\");\r\n\t cb.setOAuthConsumerSecret(\"ConsumerSecret\");\r\n\t cb.setOAuthAccessToken(\"AccessToken\");\r\n\t cb.setOAuthAccessTokenSecret(\"TokenSecret\");\r\n\r\n TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); \r\n \r\n //Check for live status updates\r\n StatusListener listener = new StatusListener() {\r\n\r\n @Override\r\n public void onException(Exception arg0) {\r\n \tSystem.out.println(\"Exception!! Data Not Inserted Into Database\");\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\r\n \tSystem.out.println(\"Got a status deletion notice id:\" + arg0.getStatusId());\r\n }\r\n \r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n \r\n @Override\r\n public void onStatus(Status status) {\r\n \t\r\n \t User user = status.getUser();\r\n \t \r\n String username = status.getUser().getScreenName();\r\n String profileLocation = user.getLocation();\r\n long tweetId = status.getId(); \r\n String content = status.getText();\r\n \r\n \r\n //Create a model for the live data\r\n TweetModel memoryData = new TweetModel(username, profileLocation, tweetId, content);\r\n \r\n //store to MongoDB if data is correct\r\n System.out.println(++counter + \") username: \" + username + \" location: \" + profileLocation + \" tweetId \" + tweetId + \" Text: \" + content );\r\n data.save(memoryData);\r\n }\r\n \r\n\t\t\t@Override\r\n public void onTrackLimitationNotice(int arg0) {\r\n\t System.out.println(\"Got track limitation notice:\" + arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onStallWarning(StallWarning warning) {}\r\n };\r\n \r\n //Filter the live tweet results\r\n FilterQuery filterQuery = new FilterQuery();\r\n //Search for tweets with specific keywords\r\n String keywords[] = {\"Java\", \"Python\", \"PHP\"};\r\n //Restrict the language to English\r\n String[] lang = {\"en\"}; \r\n //Add the Filters\r\n filterQuery.language(lang);\r\n filterQuery.track(keywords);\r\n //Listen for Live Tweets\r\n twitterStream.addListener(listener);\r\n twitterStream.filter(filterQuery);\r\n\t}",
"public Listener() {\r\n count = 0;\r\n error = false;\r\n maxCount = Integer.MAX_VALUE - 1;\r\n tweets = new LinkedList<Status>();\r\n }",
"public void handleStatusUpdated() {\n copyWifiStates();\n notifyListenersIfNecessary();\n }",
"public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }",
"@Override\n public void start(){\n final ChannelProcessor channel = getChannelProcessor();\n\n final Map<String, String> headers = new HashMap<String, String>();\n\n // The StatusListener is a twitter4j API, which can be added to a Twitter\n // stream, and will execute methods every time a message comes in through\n // the stream.\n StatusListener statusListener = new StatusListener() {\n // The onStatus method is executed every time a new tweet comes in.\n @Override\n public void onStatus(Status status) {\n // The EventBuilder is used to build an event using the headers and\n // the raw JSON of a tweet\n // shouldn't log possibly sensitive customer data\n //logger.debug(\"tweet arrived\");\n\n headers.put(\"timestamp\",String.valueOf(status.getCreatedAt().getTime()));\n\n Event event1;\n event1 = EventBuilder.withBody(TwitterObjectFactory.getRawJSON(status).getBytes(),headers);\n //event2 = EventBuilder.withBody(Integer.toString(status.getRetweetCount()),(Charset)headers);\n //event3 = EventBuilder.withBody(status.getText().getBytes(), headers);\n channel.processEvent(event1);\n //channel.processEvent(event2);\n\n }\n\n @Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n\n }\n @Override public void onTrackLimitationNotice(int i) {\n\n }\n @Override public void onScrubGeo(long l, long l1) {\n\n }\n @Override public void onStallWarning(StallWarning stallWarning) {\n\n }\n @Override public void onException(Exception e) {\n\n }\n };\n\n twitterStream.addListener(statusListener);\n\n if(keywords.length != 0){\n FilterQuery filterQuery = new FilterQuery().track(keywords);\n twitterStream.filter(filterQuery);\n }else{\n twitterStream.sample();\n }\n super.start();\n }",
"@Override\n public void updateStatus(Status status) {\n this.status = status;\n }",
"Status retweetStatus(long statusId) throws TwitterException;",
"public List<String> statusUpdate(String status) {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.status.update\");\r\n\t\t\tapiUrl = apiUrl + \"?status=\" + status.replace(\" \", \"%20\"); //Appending the API url with the messgae to be tweeted.\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpPost(apiUrl);\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\ttwitterResponseList.add(\"API call was Successful. Tweeted: \"+ status );\r\n\t\t\t} else {\r\n\t\t\t\ttwitterResponseList.add(\"API call was Unsuccessful\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\t}",
"void onComplete(String status);",
"@Override\n\tpublic void onRetweet(User source, User target, Status retweetedStatus) {\n\n\t}",
"private void fireOnTweetsReceived(ArrayList<AbstractTweet> arlis) {\n if ( mOnNewTweet != null ){\n mOnNewTweet.onNewTweet(arlis);\n }\n else{\n throw new NullPointerException(\"fireOnTweetsReceived(): WARNING:: we don't have listener registered. Suspicious logic\"); \n }\n }",
"@Override\n public void statusChanged(String text) {\n fireStatusChanged(text);\n }",
"public void timeLine() {\r\n\r\n try {\r\n List<Status> statuses = twitter.getHomeTimeline();\r\n System.out.println(\"Showing home timeline.\");\r\n for (Status status : statuses) {\r\n System.out.println(status.getUser().getName() + \":\"\r\n + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }",
"public void setStatus(int status) {\n result.setStatus(status);\n latch.countDown();\n ResultCallback<? super TokenResult> cb = getCallback();\n TokenResult res = getResult();\n if (cb != null) {\n Log.d(TAG, \" Calling onResult for callback. result: \" + res);\n getCallback().onResult(res);\n }\n }",
"public void receiveMyBtStatus(String status) {\n \t\n \tfinal String s = status;\n \t\n \t\n// \tLog.d(\"handler\", \"receiveMyBtStatus\"); \t\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }\n });\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject json) {\n Tweet newTweet = Tweet.fromJSON(json);\n tweets.add(0, newTweet);\n aTweets.notifyItemInserted(0);\n }",
"private void populateStatus() {\n\t\t\n\t\tstatusList.add(new Status(MainActivity.profileUrls[1], \"Mohamed\", \"14 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[4], \"Ahmed Adel\", \"10 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[0], \"Manar\", \"Yesterday, 5:08 PM\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[5], \"Ramadan\", \"Today, 10:30 AM\"));\n\t\t\n\t}",
"public void listener() {\n\t\tif (this.command.getMode().equals(Command.MODE_TRACK)) {\n\t\t\tFilterQuery filterQuery = new FilterQuery();\n\t\t\tfilterQuery.track(this.command.getKeywords().toArray(new String[this.command.getKeywords().size()]));\n\t\t\ttwitterStream.addListener(myListener);\n\t\t\ttwitterStream.filter(filterQuery);\n\t\t} else if (this.command.getMode().equals(Command.MODE_SAMPLE)) {\n\t\t\ttwitterStream.addListener(myListener);\n\t\t\ttwitterStream.sample();\n\t\t} else {\n\t\t\t// do search\n\t\t}\n\t}",
"@Override\n public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n\n int result = tts.setLanguage(Locale.US);\n tts.setSpeechRate(0.8f);\n\n int uResult = tts.setOnUtteranceProgressListener(this);\n\n if (result == TextToSpeech.LANG_MISSING_DATA\n || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Log.e(\"TTS\", \"This Language is not supported\");\n }\n\n } else {\n Log.e(\"TTS\", \"Initialization Failed!\");\n Toast.makeText(mainActivity, \"TTS Initialization Failed!\", Toast.LENGTH_SHORT).show();\n }\n\n }",
"Status showStatus(long id) throws TwitterException;",
"@Override\n\tpublic void tweet(String message) throws Exception {\n\t\t\n\t}",
"public void addUserVenuesListener(long userId) {\r\n\tStatusListener listener = new StatusListener() { \r\n\t\t@Override public void onStatus(Status status) {\r\n\t\t\t// If the shutdown time is after the current time, record the tweet, otherwise close the connection\r\n\t\t\tif (Calendar.getInstance().getTime().before( shutdownTime.getTime() )) {\r\n\t\t\t\ttweets.add(status);\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.log(Level.FINE, \"Shutting down Twitter stream..\");\r\n\t\t\t\tclearLists();\r\n\t\t\t\tshutdown = true;\r\n\t\t\t\ttwitterStream.shutdown();\r\n\t\t\t}\r\n\t\t} \r\n\t\t@Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {} \r\n\t\t@Override public void onTrackLimitationNotice(int numberOfLimitedStatuses) {} \r\n\t\t@Override public void onScrubGeo(long userId, long upToStatusId) {} \r\n\t\t@Override public void onStallWarning(StallWarning warning) {}\r\n\t\t@Override public void onException(Exception ex) { ex.printStackTrace(); }\r\n\t\t};\r\n\t\ttwitterStream.addListener(listener);\r\n\t\t\r\n\t\t// Filter the listener to tweets from the given user\r\n\t\tint count = 0;\r\n\t\tlong[] idToFollow = new long[1];\r\n\t\tidToFollow[0] = userId; \r\n\t\tString[] stringsToTrack = null;\r\n\t\tdouble[][] locationsToTrack = null;\r\n\t\ttwitterStream.filter(new FilterQuery(count, idToFollow, stringsToTrack, locationsToTrack));\r\n\t}",
"void onWeatherLoaded(ArrayList<WeatherStatus> weatherStatusList);",
"@Override\n public void onStatusChanged(String s, int i, Bundle bundle) {\n }",
"@Override\n public void onStatusChanged(String s, int i, Bundle bundle) {\n }",
"@Override\n public void update(String tweet, Long tweetTime) {\n\tuserFeed.add(tweet);\n\tlastUpdateTime = tweetTime;\n }",
"@Override\n public void onTweetsFetched(List<Tweet> tweets) {\n finalTweetID = tweets.get(tweets.size() - 1).getId();\n twitterCallback.onTweetsFetched(tweets); //Return tweets\n }",
"public void addUsersAtVenueListener(String venueName, double latitude, double longitude, double radius) {\r\n\tStatusListener listener = new StatusListener() { \r\n\t\t@Override public void onStatus(Status status) {\r\n\t\t\t// If the shutdown time is after the current time, record the tweet, otherwise close the connection\r\n\t\t\tif (Calendar.getInstance().getTime().before( shutdownTime.getTime() )) {\r\n\t\t\t\ttweets.add(status);\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.log(Level.FINE, \"Shutting down Twitter stream..\");\r\n\t\t\t\tclearLists();\r\n\t\t\t\tshutdown = true;\r\n\t\t\t\ttwitterStream.shutdown();\r\n\t\t\t}\r\n\t\t} \r\n\t\t@Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {} \r\n\t\t@Override public void onTrackLimitationNotice(int numberOfLimitedStatuses) {} \r\n\t\t@Override public void onScrubGeo(long userId, long upToStatusId) {} \r\n\t\t@Override public void onStallWarning(StallWarning warning) {}\r\n\t\t@Override public void onException(Exception ex) { ex.printStackTrace(); }\r\n\t\t};\r\n\t\ttwitterStream.addListener(listener);\r\n\r\n\t\tint count = 0;\r\n\t\tlong[] idToFollow = null; \r\n\t\tString[] stringsToTrack = null;\r\n\t\tdouble[][] locationsToTrack = null;\r\n\t\t\r\n\t\t// If a geolocation is given, calculate the bounding box for that location and use as a filter,\r\n\t\t// otherwise listen for tweets that contain the venue name\r\n\t\tif (!Double.isNaN(latitude) && !Double.isNaN(longitude) && !Double.isNaN(radius)) {\r\n\t\t\t// Calculate geo bounding box from lat/lon coordinates and radius\r\n\t\t\tdouble oneKmDeg = 90/10001.965729;\r\n\t\t\tdouble radiusAdjustDeg = oneKmDeg*radius;\r\n\t\t\tdouble lat1 = latitude - radiusAdjustDeg;\r\n\t\t\tdouble lon1 = longitude - radiusAdjustDeg;\r\n\t\t\tdouble lat2 = latitude + radiusAdjustDeg;\r\n\t\t\tdouble lon2 = longitude + radiusAdjustDeg;\r\n\t\t\tlocationsToTrack = new double[][]{{lon1, lat1}, {lon2, lat2}};\r\n\t\t} else {\r\n\t\t\tstringsToTrack = new String[]{venueName};\r\n\t\t}\t\t\t\t\r\n\t\ttwitterStream.filter(new FilterQuery(count, idToFollow, stringsToTrack, locationsToTrack));\r\n\t}",
"@Override\r\n\tpublic void onStatusChanged(String arg0, int arg1, Bundle arg2) {\n\r\n\t}",
"private void battleTickStatuses(){\n updateStatuses(battleEnemies);\n updateStatuses(battleAllies);\n }",
"@Override\n public void run() {\n \tstatusTextView.setText(statusText(s));\n }",
"@Override\r\n\tpublic void onStatusChanged(String arg0, int arg1, Bundle arg2) {\n\t\t\r\n\t}",
"@Override\n \tpublic void onClick (View v)\n \t{\n \t\tString status = editText.getText().toString();\n \t\tnew PostToTwitter().execute(status);\n \t}",
"protected void setStatus(String status) {\n Message msg = mHandler.obtainMessage(DIALOG_UPDATE, status);\n mHandler.sendMessage(msg);\n }",
"public interface Observer {\n public void notification(String handle, String tweet);\n}",
"@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }",
"private String getTweetLink(Status status) {\n \t\treturn \"http://twitter.com/\" + status.getUser().getScreenName()\n \t\t\t\t+ \"/status/\" + status.getId();\n \t}",
"public void composeTweet(Tweet tweet, AsyncHttpResponseHandler handler) {\n String apiUrl = getApiUrl(\"statuses/update.json\");\n RequestParams params = new RequestParams();\n\n params.put(\"status\", tweet.getBody());\n params.put(\"in_reply_to_status_id\", tweet.getInReplyToStatusId());\n\n // Execute the request\n getClient().post(apiUrl, params, handler);\n }",
"@Override\n\tpublic void onStatusChanged(String arg0, int arg1, Bundle arg2) {\n\t\t\n\t}",
"@Override\n\tpublic void onStatusChanged(String arg0, int arg1, Bundle arg2) {\n\t\t\n\t}",
"public static void main(String[] args) throws TwitterException, IOException {\n\t\tfinal long count = 10;\n\n\t\t// Twitter Conf.\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\n\t\tcb.setDebugEnabled(true).setOAuthConsumerKey(CONSUMER_KEY)\n\t\t\t\t.setOAuthConsumerSecret(CONSUMER_SECRET)\n\t\t\t\t.setOAuthAccessToken(ACCESS_KEY)\n\t\t\t\t.setOAuthAccessTokenSecret(ACCESS_SECRET);\n\n\t\tfinal TwitterStream twitterStream = new TwitterStreamFactory(cb.build())\n\t\t\t\t.getInstance();\n\n\t\tStatusListener listener = new StatusListener() {\n\t\t\tprivate long counter = 0;\n\n\t\t\t@Override\n\t\t\tpublic void onStatus(Status status) {\n//\t\t\t\tSystem.out.println(status.getUser().getName());\n//\t\t\t\twriter.println(TwitterObjectFactory.getRawJSON(status)+\",\");\n\t\t\t\tTweet tweet = new Tweet(status);\n\t\t\t\ttry {\n\t\t\t\t\tHBaseHelper.put(tweet);\n\t\t\t\t} catch (IOException | JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcounter++;\n\t\t\t\tSystem.out.println(counter);\n//\t\t\t\tif (counter >= count) {\n//\t\t\t\t\ttwitterStream.shutdown();\n//\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDeletionNotice(\n\t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t\t\t// System.out.println(statusDeletionNotice.toString());\n\t\t\t\t// System.out.println(\"Got a status deletion notice id:\" +\n\t\t\t\t// statusDeletionNotice.getStatusId());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n\t\t\t\tSystem.out.println(\"Got track limitation notice:\"\n\t\t\t\t\t\t+ numberOfLimitedStatuses);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onScrubGeo(long userId, long upToStatusId) {\n\t\t\t\tSystem.out.println(\"Got scrub_geo event userId:\" + userId\n\t\t\t\t\t\t+ \" upToStatusId:\" + upToStatusId);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStallWarning(StallWarning warning) {\n\t\t\t\tSystem.out.println(\"Got stall warning:\" + warning);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onException(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t};\n\t\ttwitterStream.addListener(listener);\n\t\tFilterQuery fq = new FilterQuery();\n\t\tString keywords[] = { \"#nosql\" };\n\t\tfq.track(keywords);\n\n\t\ttwitterStream.sample();\n\t}",
"@Override\n\tpublic void onStatusChanged(String arg0, int arg1, Bundle arg2) {\n\n\t}",
"public void addTypingStatus(String user, String status){\n if (status.equals(\"is_typing\")) {\n userStatuses.put(user, \"Typing\");\n } else if (status.equals(\"has_typed\")) {\n userStatuses.put(user, \"Has typed\");\n } else if (status.equals(\"no_text\")) {\n userStatuses.put(user, \"No Text\");\n }\n refreshTypingStatuses(user);\n }",
"@Override\n public void onStatusChanged(String arg0, int arg1, Bundle arg2) {\n\n }",
"public void setStatus(String stat)\n {\n status = stat;\n }",
"@Override\n public void onNotificationPosted(StatusBarNotification sbn) {\n LogUtil.logDebug(\"Notification got\");\n\n if (!preferences.isServiceActiveSetting().load()) return;\n if ((System.currentTimeMillis() - lastMessageTimeMillis)\n < MIN_NOTIFICATION_TIMEOUT) return;\n lastMessageTimeMillis = System.currentTimeMillis();\n\n String text = sbn.getNotification().extras.getString(\"android.text\");\n String title = sbn.getNotification().extras.getString(\"android.title\");\n if (text == null) return;\n if (title == null) title = \"\";\n\n String sourceAppPackage = sbn.getPackageName();\n\n String message;\n if (preferences.spellTitleSetting().load())\n message = title + \".\" + text;\n else message = text;\n\n String finalMessage = message.replaceAll(linkRegex, \" LINK \");\n\n if (message.equals(lastMessage)) return;\n\n timerSubscription = Observable.timer(1000, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread())\n .onErrorResumeNext(throwable -> {\n LogUtil.logError(throwable);\n return Observable.never();\n })\n .subscribe(it -> {\n if ((headphonesPlugged || !preferences.headphonesOnlySetting().load())\n && appWhiteList.contains(sourceAppPackage)) {\n //LogUtil.logDebug(\"Utterance started\");\n lastMessage = finalMessage;\n tts.speak(finalMessage);\n }\n });\n\n }",
"@Override\n\t\t\tpublic void onStatusChanged(String arg0, int arg1, Bundle arg2) {\n\t\t\t}",
"@Override\n public void populateTimeline() {\n long fetchMoreStart = tweets.size() > 0 ? tweets.get(tweets.size() - 1).getUid() : -1;\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n // on success\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n addAll(Tweet.fromJSONArray(json));\n }\n\n // on failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, fetchMoreStart);\n }",
"@Override\n public void onInit(int status) {\n showNotification(\"text to speech is ready\", Snackbar.LENGTH_SHORT);\n registerBroadCastReceiver();\n }",
"private void updateStatus(@NonNull MediaTaskStatus newStatus) {\n if (mStatus != newStatus) {\n mStatus = newStatus;\n mChanged = true;\n }\n }",
"void getTweets(long lastUid) {\n client.getMentionsTimeline(lastUid, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG\", response.toString());\n addAll(Tweet.fromJsonArray(response));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n });\n }",
"public abstract void updateStatus(PresenceType presenceType);",
"public void setStatusCallback(final IStatusCallback callback);",
"void setStatus(final UserStatus status);",
"public interface IOnNewTweet {\n void onNewTweet(ArrayList<AbstractTweet> tweetArlis);\n }",
"public void setStatus(java.lang.Object status) {\n this.status = status;\n }",
"public JsonHttpResponseHandler getRefreshTimelineHandler(final Context context, final TweetAdapter adapter, final SwipeRefreshLayout swipeRefreshLayout, final ProgressBarListener progressBarListener) {\n progressBarListener.showProgressBar();\n\n JsonHttpResponseHandler handler = new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"TwitterClient\", response.toString());\n\n adapter.addAll(Tweet.fromJsonArray(response));\n swipeRefreshLayout.setRefreshing(false);\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"TwitterClient\", responseString);\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, String responseString) {\n super.onSuccess(statusCode, headers, responseString);\n progressBarListener.hideProgressBar();\n }\n };\n\n return handler;\n }",
"public synchronized void startUpdates(){\n mStatusChecker.run();\n }",
"public void getInterest(List<Status> statusList) {\n System.out.println(\"##########Getting The Tweeters##########\");\n\n }",
"public void sendStatusToServer(String status){\n System.out.println(\"typingstatus\" + chatID + username + \" \" + status);\n toServer.println(\"typingstatus\"+ \" \" + chatID + \" \" + username + \" \" + status);\n toServer.flush();\n }",
"public void setStatus(Status status) {\r\n this.status = status;\r\n }",
"public void addNewStatusToWall(String status, String userUuid);",
"interface Observer {\n void notify(String tweet);\n}",
"public void setStatus(Status status)\n {\n this.status = status;\n }",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"public interface TweetHandlerListener {\n public void setCurrentUser(User user);\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"@Override\n public void onASRStatusUpdated(ASRStatus asrStatus, Bundle bundle) {\n }",
"@Override\n public void onResult(@NonNull Status status) {\n }",
"@Override\n\t\tpublic void onStatusChanged(String provider, int status,\n\t\t\t\tBundle extras) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void onStatusChanged(String provider, int status,\n\t\t\t\tBundle extras) {\n\t\t\t\n\t\t}",
"public void setStatus(STATUS status) {\n this.status = status;\n }",
"public void onStatusChanged(String provider, int status, Bundle extras) {\n\t\t\t\n\t\t}",
"public void onStatusChanged(String provider, int status, Bundle extras) {\n\t\t\t\n\t\t}",
"public void setStatus(String _status) {\n this._status = _status;\n }",
"public void onStatusChanged(String provider, int status,\n\t\t\t\t\t\tBundle extras) {\n\n\t\t\t\t}",
"public void setStatus(String status) { this.status = status; }"
]
| [
"0.8152591",
"0.814104",
"0.7823599",
"0.7304801",
"0.71745956",
"0.7111631",
"0.6970688",
"0.6883705",
"0.68516415",
"0.67357695",
"0.66537863",
"0.6516599",
"0.6480106",
"0.63844335",
"0.6382891",
"0.6373752",
"0.6284909",
"0.62769115",
"0.6275005",
"0.6269008",
"0.620894",
"0.6184969",
"0.6149975",
"0.61485267",
"0.6127601",
"0.60871476",
"0.60676575",
"0.59651643",
"0.5964314",
"0.5948384",
"0.59223944",
"0.59017664",
"0.5893968",
"0.58876234",
"0.5887251",
"0.58850205",
"0.5866882",
"0.5854926",
"0.58519405",
"0.5846399",
"0.58191854",
"0.5794357",
"0.57907474",
"0.5789099",
"0.5789099",
"0.5755158",
"0.57420886",
"0.5737629",
"0.573107",
"0.5723441",
"0.572232",
"0.57191",
"0.571448",
"0.5706999",
"0.57040167",
"0.5702428",
"0.5694081",
"0.568119",
"0.56760436",
"0.56760436",
"0.5675223",
"0.5671298",
"0.56501216",
"0.5634872",
"0.5625706",
"0.5625147",
"0.56206995",
"0.5608697",
"0.5605686",
"0.5605177",
"0.5603641",
"0.5590246",
"0.5581946",
"0.5578391",
"0.5576012",
"0.5563422",
"0.55614865",
"0.5556352",
"0.5551623",
"0.55463886",
"0.5539821",
"0.5537663",
"0.5537007",
"0.5535305",
"0.5535197",
"0.5531296",
"0.5526448",
"0.5526448",
"0.5526448",
"0.5526448",
"0.55260754",
"0.552553",
"0.5515597",
"0.5515597",
"0.5511352",
"0.55109096",
"0.55109096",
"0.5509973",
"0.55084175",
"0.5505815"
]
| 0.782156 | 3 |
Returns the after any of this job. | @Override
public String getAfterAny() {
return model.getAfterAny();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getAfterResult() {\r\n return afterResult;\r\n }",
"public String getAfterReason() {\r\n return afterReason;\r\n }",
"public Optional<Instant> getAfter() {\n\t\t\treturn after;\n\t\t}",
"@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}",
"public void afterDone() {\n }",
"public void afterDone() {\n }",
"public Optional<Instant> getAfter() {\n\t\treturn after;\n\t}",
"protected void afterJobExecution() {\n\t}",
"public Collection<AfterComplete> getAfterCompleteOptions(){\n return afterCompleteOptions;\n }",
"@Override\n public Wrapper getAfterLast()\n {\n return null;\n }",
"Optional<URI> getAfterURI() {\n return getCompensatorLink(\"after\");\n }",
"protected abstract void after();",
"public Integer getAfterMission() {\r\n return afterMission;\r\n }",
"public String getAfterValue() {\n return afterValue;\n }",
"public Integer getAfterP() {\r\n return afterP;\r\n }",
"@Override\n public Wrapper getAfterEach()\n {\n return null;\n }",
"public Date getAfterTime() {\r\n return afterTime;\r\n }",
"public Integer getAfterId() {\r\n return afterId;\r\n }",
"void after();",
"Set<Object> getAfterProcessors();",
"public void after(OUT out) {\n\n }",
"public TestCase afterThis( Procedure callafter );",
"@Override\n\tpublic String getAfterOk() {\n\t\treturn model.getAfterOk();\n\t}",
"public void after(OUT out) {\n }",
"public Date getAfterCt() {\r\n return afterCt;\r\n }",
"default void afterInvocation() {\n afterInvocation(false);\n }",
"public void doAfter(JoinPoint jp) {\n }",
"@Override \r\n public void afterReturning(Object arg0, Method arg1, Object[] arg2, \r\n Object arg3) throws Throwable {\n \r\n System.out.println(\"-------------------\"); \r\n \r\n System.out.println(\"After method \"); \r\n \r\n \r\n \r\n }",
"@Stub\n\tpublic void after()\n\t{\n\t\t//\n\t}",
"public boolean isSetAfter() {\n return this.after != null;\n }",
"@Override\n public void afterFinish() {\n \n }",
"@Override\n public void setAfterLast(Wrapper afterLast)\n {\n\n }",
"public void doafter() {\r\n\t\t\r\n\t\tendTme = System.currentTimeMillis();\r\n\t\tString ended = \"MethodEnded: \" + endTme;\r\n\t\tString duration = \"Duration: \" + (endTme - startTime)\r\n\t\t\t\t+ \" Milliseconds\";\r\n\t\tmethodlog += ended + duration + tendency;\r\n\t\tfinallog += methodlog;\r\n\t\t\r\n\t\tmyAnalysis.writeLogtoFile(finallog);// calls method to write to file the log of all methods.\r\n\t}",
"protected abstract void doAfter(T result);",
"public void setAfterOperations(List<Operation> after){\n\n if (after == null){\n this.after = null;\n }\n else{\n if (this.after != null){\n this.after.clear();\n }\n for (Operation op : after){\n addAfterOperation(op);\n }\n }\n }",
"public java.lang.String getFinishCondition() {\n return finishCondition;\n }",
"public void setAfterLastOperations(List<Operation> afterLast){\n\n if (afterLast == null){\n this.afterLast = null;\n }\n else{\n if (this.afterLast != null){\n this.afterLast.clear();\n }\n for (Operation op : afterLast){\n addAfterOperation(op);\n }\n }\n }",
"public void finalizeJob() {\n // override to implement\n }",
"protected void runAfterStep() {}",
"public Integer getAfterTypeId() {\r\n return afterTypeId;\r\n }",
"public Integer getAfterStore() {\r\n return afterStore;\r\n }",
"@After\n public void after() {\n System.out.format(\"In After of %s\\n\", ExecutionProcedureJunit2.class.getName());\n }",
"protected void runAfterIteration() {}",
"@Override\r\n\tprotected void doLast() {\n\t\t\r\n\t}",
"public int getAfterCost() {\n return afterCost;\n }",
"public int getAfterCost() {\n return afterCost;\n }",
"public process get_last() {\n\t\treturn queue.getLast();\n\t}",
"public String[] getLastThings() {\n return lastThings;\n }",
"static ElementMatcher.Junction<? super MethodDescription> createAfterExecuteMethodMatcher() {\n return named(\"afterExecute\")\n .and(isOverriddenFrom(ThreadPoolExecutor.class))\n .and(not(isAbstract()));\n }",
"protected void after( boolean successful ) throws Throwable\n {\n // do nothing\n }",
"protected abstract void afterWait();",
"public void afterLast() throws SQLException\n {\n m_rs.afterLast();\n }",
"@AfterMethod\n\tpublic void end()\n\t{\n\n\t}",
"void afterRun();",
"public void onLast() {\r\n\t\t\t\t\tif (wip.decrementAndGet() == 0) {\r\n\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t\tclose();\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"protected String[] getItemsAfter()\n {\n return createItemList(new int[] { 0, 1, 2, 3, 4, 5 });\n }",
"public Instant getLastCompletion() {\n\t\treturn Last;\n\t}",
"@Override\n\tpublic void afterInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\tSystem.out.println(\"Test method Finish\" + arg0.getTestMethod().getQualifiedName() + \",\" + new Date());\n\t}",
"public void after(int seqId) {\n totalRunningRPCCounter.decrementAndGet();\n }",
"LateFinishType getLateFinish();",
"public T getLast(){\n\treturn _end.getCargo();\n }",
"@Override\n public MsgList<VLongArrayListWritable> finishFinal() {\n return null;\n }",
"void after(final Node currentNode, final ActivityResult activityResult);",
"protected void finished(){\n if (doFilterUpdate) {\n //runFilterUpdates();\n }\n \n double groupTotalTimeSecs = (System.currentTimeMillis() - (double) groupStartTime) / 1000;\n log.info(\"Job \"+id+\" finished \" /*+ parsedType*/ + \" after \"\n + groupTotalTimeSecs + \" seconds\");\n \n ((DistributedTileBreeder)breeder).jobDone(this);\n }",
"public boolean getHasMoreJobs() ;",
"public E finishedState() {\r\n\t\treturn this.values[this.values.length - 1];\r\n\t}",
"public boolean getFinish(){\n\t\treturn finish;\n\t}",
"public String[] getJobsWaiting();",
"public E pollLast();",
"@Override\n protected void after()\n {\n stop();\n }",
"void completeJob();",
"@Override\n protected void after() {\n }",
"public void setAfterReason(String afterReason) {\r\n this.afterReason = afterReason;\r\n }",
"OIterator<V> after();",
"public SubmitMethod getLastMethod() {\n return lastMethod_;\n }",
"public ResponseTime finish(){\n return finish(Instant.now());\n }",
"@Override\n public boolean isAfterLast() {\n boolean result = true;\n if (mCalllogDatas != null) {\n result = (mIndex >= mCalllogDatas.size()) ? true : false;\n }\n\n MyLogger.logD(CLASS_TAG, \"isAfterLast():\" + result);\n return result;\n }",
"protected void runAfterIterations() {}",
"public boolean getMoveCompletedEndsBack()\r\n {\r\n return (m_moveCompletedEndsBack);\r\n }",
"@Override\n\tpublic List<Class> endingSoon() {\n\t\treturn mainDao.endingSoon();\n\t}",
"public static boolean LifecycleAfter(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"LifecycleAfter\")) return false;\n if (!nextTokenIs(b, JB_TOKEN_AFTER)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, null);\n r = consumeToken(b, JB_TOKEN_AFTER);\n p = r; // pin = 1\n r = r && report_error_(b, WhiteSpace(b, l + 1));\n r = p && LifecycleAfter_2(b, l + 1) && r;\n exit_section_(b, l, m, JB_LIFECYCLE_AFTER, r, p, null);\n return r || p;\n }",
"public void allFinished() {\n\t}",
"@AfterEach\n private void afterEachEnd()\n {\n System.out.println(\"Test Completed \" + testInfo.getDisplayName());\n System.out.println(\"After Each Clean Test........\");\n System.out.println(\"Elapsed TIme : \" + ELAPSED_TIME + \" ns\");\n LOGGER.info(\"Elapsed TIme for \" + testInfo.getDisplayName() + \" : \" + ELAPSED_TIME);\n }",
"public String getAfter_sale() {\n return after_sale;\n }",
"public void afterLast() throws SQLException {\n\n try {\n debugCodeCall(\"afterLast\");\n checkClosed();\n while (nextRow()) {\n // nothing\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"private void addAfterRule(AroundProcesser<AggMaschineVO> processer)\r\n {\n\t \r\n\t\t\r\n\t processer.addAfterRule(new FireEventRule(\"1006\"));\r\n\t\t\r\n\t processer.addAfterRule(new WriteBusiLogRule(\"delete\"));\r\n }",
"@Override\n public void onSequenceFinish() {\n // Yay\n }",
"void afterMethod(Object self, Method method, Method originalMethod, Object[] args) throws Throwable;",
"ActualFinishType getActualFinish();",
"public ResultMessage finish() {\n\t\treturn null;\r\n\t}",
"public long logicallyCompletedAt() {\n return logicallyCompletedAt;\n }",
"protected void finishExecution() {\r\n\r\n\t}",
"boolean getFinished();",
"public void afterExecution(final Object bapiObject) {\n }",
"public void setAfterResult(Integer afterResult) {\r\n this.afterResult = afterResult;\r\n }",
"boolean isFinished() {\n return includedInLastStep() && (end == elementList.size() - 1);\n }",
"protected abstract void afterCall(final Object result);",
"private AbstractBuild<?, ?> getLastFinishedBuild() {\n AbstractBuild<?, ?> lastBuild = m_project.getLastBuild();\n while (lastBuild != null && (lastBuild.isBuilding() || lastBuild.getAction(AbstractBuildReport.class) == null)) {\n lastBuild = lastBuild.getPreviousBuild();\n }\n return lastBuild;\n }",
"public boolean hasCompleted() {\n return this.tail.value != null && NotificationLite.isComplete(leaveTransform(this.tail.value));\n }",
"void Finished(Task task, Action<TResult> lastFinishedAction);"
]
| [
"0.67660487",
"0.6403662",
"0.63299435",
"0.6252773",
"0.622769",
"0.622769",
"0.6215784",
"0.6214624",
"0.61683065",
"0.60733694",
"0.60694635",
"0.6061327",
"0.602672",
"0.5972745",
"0.59145653",
"0.58391476",
"0.56880945",
"0.5681057",
"0.5667627",
"0.56238526",
"0.56234723",
"0.55947715",
"0.55875486",
"0.5582676",
"0.55750585",
"0.5555705",
"0.5534196",
"0.5518107",
"0.55154836",
"0.55009276",
"0.5483411",
"0.54645586",
"0.54259115",
"0.5424526",
"0.5399274",
"0.5394145",
"0.53825814",
"0.5379449",
"0.53516185",
"0.5342152",
"0.53321755",
"0.5310693",
"0.5301491",
"0.52754563",
"0.52635664",
"0.52635664",
"0.5246128",
"0.5245306",
"0.5226605",
"0.52166194",
"0.52098584",
"0.5209103",
"0.5208663",
"0.5197606",
"0.5174908",
"0.51304483",
"0.5124333",
"0.51226205",
"0.51046914",
"0.50977886",
"0.5093671",
"0.5061507",
"0.50588834",
"0.505815",
"0.50562716",
"0.5041054",
"0.50347424",
"0.5033545",
"0.502017",
"0.50054276",
"0.50026476",
"0.4998756",
"0.49942297",
"0.49844062",
"0.49830198",
"0.49756533",
"0.49618617",
"0.49589884",
"0.49569428",
"0.4954241",
"0.49512395",
"0.49503553",
"0.49471465",
"0.4944742",
"0.49389353",
"0.49368268",
"0.4934963",
"0.49316996",
"0.4925856",
"0.4924763",
"0.48887444",
"0.48859337",
"0.48689833",
"0.48670697",
"0.48667908",
"0.48591116",
"0.48582247",
"0.48563352",
"0.48556525",
"0.4846247"
]
| 0.65267605 | 1 |
Returns the after ok of this job. | @Override
public String getAfterOk() {
return model.getAfterOk();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getAfterResult() {\r\n return afterResult;\r\n }",
"public String getAfterReason() {\r\n return afterReason;\r\n }",
"public String getDone() {\n return (isDone ? \"1\" : \"0\");\n }",
"public void afterDone() {\n }",
"public void afterDone() {\n }",
"public boolean isSetAfter() {\n return this.after != null;\n }",
"boolean getFinished();",
"public boolean getFinish(){\n\t\treturn finish;\n\t}",
"public boolean wasFinished()\n {\n return this.isFinished;\n }",
"public String getIsDone() {\n if (isDone) {\n return \"1\";\n } else {\n return \"0\";\n }\n }",
"public Date getAfterCt() {\r\n return afterCt;\r\n }",
"public boolean exchangeFinishedSuccessfully() {\n\t\treturn isExchangeCompleteCondition();\n\t}",
"public boolean isDone(){\n return status;\n }",
"public Integer getAfterMission() {\r\n return afterMission;\r\n }",
"public boolean isDone() { return true; }",
"public Date getAfterTime() {\r\n return afterTime;\r\n }",
"@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}",
"public boolean checkDone() {\n return this.isDone;\n }",
"public boolean getFinished() {\n return finished;\n }",
"public boolean lastCheckResult() {\n return fLastCheckResult;\n }",
"public boolean getFinished() {\n\t\treturn finished;\n\t}",
"public boolean isDone();",
"public boolean isDone();",
"public Optional<Instant> getAfter() {\n\t\t\treturn after;\n\t\t}",
"Boolean isFinished();",
"public boolean isSuccessful() {\n return this.reason == Reason.NONE;\n }",
"public Optional<Instant> getAfter() {\n\t\treturn after;\n\t}",
"public boolean is_completed();",
"@Override\n\tpublic void setAfterOk(String afterOk) {\n\t\tmodel.setAfterOk(afterOk);\n\t}",
"protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }",
"public boolean isDone() { return false; }",
"public boolean isFinished(){\n return this.finished;\n }",
"public boolean isFinished(){\n return true;\n }",
"public void setAfterResult(Integer afterResult) {\r\n this.afterResult = afterResult;\r\n }",
"public boolean getFinished() {\n return finished_;\n }",
"public boolean checkComplete(){\n return Status;\n }",
"public String getAfterValue() {\n return afterValue;\n }",
"protected void after( boolean successful ) throws Throwable\n {\n // do nothing\n }",
"public java.lang.String getFinishCondition() {\n return finishCondition;\n }",
"public void reasoningFinished(ReasoningResult result);",
"public boolean getFinished() {\n return finished_;\n }",
"public long getCompleted() { return completed; }",
"public String getStatus() {\n return isDone ? \"1\" : \"0\";\n }",
"public abstract boolean isCompleted();",
"boolean isCompleted();",
"protected boolean isFinished() {\n\treturn this.isDone;\n }",
"boolean completed();",
"public boolean isDone()\n {\n return (this.elapsed >= this.duration);\n }",
"public boolean isFinished();",
"public abstract boolean isFinished ();",
"public boolean getDone() {\n return isDone;\n }",
"public boolean isDone() {\r\n return isDone;\r\n }",
"public boolean getDone(){\r\n\t\treturn done;\r\n\t}",
"public int getDone() {\n\t\treturn done;\n\t}",
"@Override\n public boolean isCompleted() {\n return time.secondsPassed==finishLevel;\n }",
"public boolean getStatus() {\n return this.isDone;\n }",
"ActualFinishType getActualFinish();",
"protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }",
"public Status waitUntilFinished();",
"public boolean isOk() {\n\t\treturn ok;\n\t}",
"public int succeeded() {\n return this.succeeded;\n }",
"boolean isFinished();",
"public final boolean isOk() {\n return ok;\n }",
"protected boolean isFinished(){\r\n return true;\r\n }",
"public boolean isDone() {\n return isDone;\n }",
"public boolean isDone() {\n return isDone;\n }",
"public boolean isDone() {\n return isDone;\n }",
"public boolean actionCompleted() {\n return !mAttacking;\n }",
"public String getOk() {\r\n\t\treturn \"\";\r\n\t}",
"boolean isDone();",
"public int getSuccess() {\n return success;\n }",
"public boolean isFinished() {\r\n\t\treturn this.finished;\r\n\t}",
"public boolean completed() {\n return completed;\n }",
"public int getSubjectFinish()\n\t{\n\t\treturn mySubjectFinish;\n\t}",
"public boolean performOk() {\r\n\t\treturn super.performOk();\r\n\t}",
"public Integer getIsfinish() {\n return isfinish;\n }",
"public boolean getOK() {\n return userAction.equals(OK);\n }",
"public boolean isDone() {\n return this.done;\n }",
"protected void afterJobExecution() {\n\t}",
"public int getQueryFinish()\n\t{\n\t\treturn myQueryFinish;\n\t}",
"@Override\n public void afterFinish() {\n \n }",
"public boolean isFinished() {\n return true;\n }",
"public boolean lastOpSuccess()\r\n {\r\n \treturn this.stat == VirtualPointer.Serializer.STATUS_SUCCESS;\r\n }",
"public Integer getIfsuccess() {\n return ifsuccess;\n }",
"protected abstract void after();",
"public boolean isFinishing() {\n return isFinishing;\n }",
"public synchronized boolean getFinished(){\n return finished;\n }",
"@Override\n public boolean isFinished() {\n return isDone;\n }",
"@Override\n public boolean isFinished() {\n return isDone;\n }",
"public int completed() {\n return this.completed;\n }",
"public boolean isFinished() {\n\t\treturn (finished);\n\t}",
"public boolean isDone() {\n\t\treturn true;\n\t}",
"boolean isDone() {\n return this.isDone;\n }",
"public Date getLastSuccess() {\n\t\treturn _last_success;\n\t}",
"public boolean getIsDone() {\n return this.isDone;\n }",
"boolean hasFinished();",
"public boolean isFinished() {\r\n\t\t\treturn tIsFinished;\r\n\t\t}",
"public boolean isOK() {\r\n return getPayload().getString(\"status\").equals(\"ok\");\r\n }",
"protected abstract void afterWait();",
"public boolean isCompleted() {\r\n\r\n\t\treturn (getAmount() - offeredQuantity) == 0 || isAborted();\r\n\r\n\t}"
]
| [
"0.72712386",
"0.66086817",
"0.6175625",
"0.61581427",
"0.61581427",
"0.61244845",
"0.6095801",
"0.60649514",
"0.60603505",
"0.6042986",
"0.59794235",
"0.5936689",
"0.59344053",
"0.58971995",
"0.5893695",
"0.58635896",
"0.5840551",
"0.58231175",
"0.58133674",
"0.5810026",
"0.58037347",
"0.5792332",
"0.5792332",
"0.5767778",
"0.5763691",
"0.57427937",
"0.57402015",
"0.57321656",
"0.57302916",
"0.57134384",
"0.5706938",
"0.5704249",
"0.57036614",
"0.5703497",
"0.5698267",
"0.56969124",
"0.5694497",
"0.5692844",
"0.568501",
"0.56826365",
"0.56800145",
"0.5660517",
"0.566031",
"0.56575143",
"0.5657444",
"0.5652952",
"0.5651461",
"0.5648722",
"0.56447774",
"0.5642425",
"0.5642209",
"0.56391865",
"0.563503",
"0.56247807",
"0.5623192",
"0.56226766",
"0.56142074",
"0.5612472",
"0.5612217",
"0.56077296",
"0.56061244",
"0.5606025",
"0.558994",
"0.558872",
"0.558265",
"0.558265",
"0.558265",
"0.55768687",
"0.55735624",
"0.5572559",
"0.55699635",
"0.5569506",
"0.55654395",
"0.5557823",
"0.5547402",
"0.55458534",
"0.55298626",
"0.5527673",
"0.5526807",
"0.5524996",
"0.5524591",
"0.5523095",
"0.5520823",
"0.5514272",
"0.551072",
"0.55034465",
"0.5500666",
"0.54938024",
"0.54938024",
"0.54904664",
"0.5487707",
"0.54844254",
"0.5480574",
"0.5478092",
"0.5472064",
"0.5471188",
"0.5470883",
"0.54666203",
"0.5464582",
"0.5463008"
]
| 0.74033564 | 0 |
Returns the cluster ID of this job. | @Override
public long getClusterId() {
return model.getClusterId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String clusterId() {\n return this.innerProperties() == null ? null : this.innerProperties().clusterId();\n }",
"public String clusterId() {\n return this.clusterId;\n }",
"public String getClusterId() {\n return clusterId;\n }",
"java.lang.String getClusterId();",
"java.lang.String getClusterId();",
"java.lang.String getClusterId();",
"java.lang.String getClusterId();",
"java.lang.String getClusterId();",
"java.lang.String getClusterId();",
"public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getClusterIdentifier() {\n return this.clusterIdentifier;\n }",
"public String getClusterId() {\n return this.ClusterId;\n }",
"@java.lang.Override\n public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getClusterId() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n clusterId_ = s;\n return s;\n }\n }",
"public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterIdBytes() {\n java.lang.Object ref = clusterId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n clusterId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"com.google.protobuf.ByteString\n getClusterIdBytes();",
"com.google.protobuf.ByteString\n getClusterIdBytes();",
"com.google.protobuf.ByteString\n getClusterIdBytes();",
"com.google.protobuf.ByteString\n getClusterIdBytes();",
"com.google.protobuf.ByteString\n getClusterIdBytes();",
"com.google.protobuf.ByteString\n getClusterIdBytes();",
"@JsonProperty(\"clusterId\")\n public String getClusterId() {\n return clusterId;\n }",
"public String getCluster() {\n return this.cluster;\n }",
"public String getCluster() {\n return this.cluster;\n }",
"public String getClusterUuid() {\n return clusterUuid;\n }",
"public java.lang.String getCluster() {\n java.lang.Object ref = cluster_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n cluster_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@java.lang.Override\n public java.lang.String getCluster() {\n java.lang.Object ref = cluster_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n cluster_ = s;\n return s;\n }\n }",
"public String getCloudHsmClusterId() {\n return this.cloudHsmClusterId;\n }",
"public String getClusterArn() {\n return this.clusterArn;\n }",
"@Nullable\n public String getRemoteClusterId()\n {\n return remoteClusterId;\n }",
"java.lang.String getClusterName();",
"public com.tangosol.net.Cluster getCluster()\n {\n return __m_Cluster;\n }",
"@Override\n\tpublic java.lang.String getCluster() {\n\t\treturn _scienceApp.getCluster();\n\t}",
"public java.lang.String getClusterName() {\n return clusterName;\n }",
"public String getClusterName() {\n\t\treturn clusterName;\n\t}",
"String getClusterName();",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterBytes() {\n java.lang.Object ref = cluster_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n cluster_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Cluster getCluster()\n \t{\n \t\treturn mParentCluster;\n \t}",
"public com.google.protobuf.ByteString\n getClusterBytes() {\n java.lang.Object ref = cluster_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n cluster_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getClusterAddress() {\r\n return clusterAddress;\r\n }",
"public int[] getCluster() {\r\n return this.clusters[this.clusterIndex];\r\n }",
"public ClusterConfig getClusterConfig() {\n return cluster;\n }",
"public void setClusterId(String id) {\n clusterId = id;\n }",
"public String getClusteringKey(int index) {\n return clusteringKey_.get(index);\n }",
"public String getClusteringKey(int index) {\n return clusteringKey_.get(index);\n }",
"public Builder setClusterId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n clusterId_ = value;\n onChanged();\n return this;\n }",
"public Builder setClusterId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n clusterId_ = value;\n onChanged();\n return this;\n }",
"public Builder setClusterId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n clusterId_ = value;\n onChanged();\n return this;\n }",
"public Builder setClusterId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n clusterId_ = value;\n onChanged();\n return this;\n }",
"public Builder setClusterId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n clusterId_ = value;\n onChanged();\n return this;\n }",
"public Builder setClusterId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n clusterId_ = value;\n onChanged();\n return this;\n }",
"String getClusteringKey(int index);",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<String> getClusterIDs() {\r\n\t\tArrayList<String> clusterIDs = new ArrayList<String>();\r\n\t\t//xPath expression to get the classname\r\n\t\tString xPath = \"//jdbcluster/clustertype/cluster\";\r\n\r\n\t\tList<Node> nodes = document.selectNodes(xPath);\r\n\t\tif(nodes != null) {\r\n\t\t\tfor(Node n : nodes){\r\n\t\t\t\tclusterIDs.add(n.valueOf(\"@id\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn clusterIDs;\r\n\t}",
"com.google.protobuf.ByteString\n getClusterNameBytes();",
"public int getSelectedNumberOfCluster() {\n\t\treturn selectedNumberOfCluster;\n\t}",
"public void setClusterId(String clusterId) {\n this.clusterId = clusterId;\n }",
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"public static ClusterId getClusterId(FileSystem fs, Path rootdir) throws IOException {\n Path idPath = new Path(rootdir, HConstants.CLUSTER_ID_FILE_NAME);\n ClusterId clusterId = null;\n FileStatus status = fs.exists(idPath) ? fs.getFileStatus(idPath) : null;\n if (status != null) {\n int len = Ints.checkedCast(status.getLen());\n byte[] content = new byte[len];\n FSDataInputStream in = fs.open(idPath);\n try {\n in.readFully(content);\n } catch (EOFException eof) {\n LOG.warn(\"Cluster ID file {} is empty\", idPath);\n } finally {\n in.close();\n }\n try {\n clusterId = ClusterId.parseFrom(content);\n } catch (DeserializationException e) {\n throw new IOException(\"content=\" + Bytes.toString(content), e);\n }\n // If not pb'd, make it so.\n if (!ProtobufUtil.isPBMagicPrefix(content)) {\n String cid = null;\n in = fs.open(idPath);\n try {\n cid = in.readUTF();\n clusterId = new ClusterId(cid);\n } catch (EOFException eof) {\n LOG.warn(\"Cluster ID file {} is empty\", idPath);\n } finally {\n in.close();\n }\n rewriteAsPb(fs, rootdir, idPath, clusterId);\n }\n return clusterId;\n } else {\n LOG.warn(\"Cluster ID file does not exist at {}\", idPath);\n }\n return clusterId;\n }",
"@Override\n public boolean getIsClusteringKey() {\n return isClusteringKey_;\n }",
"public java.lang.Integer getClusterSize() {\n return clusterSize;\n }",
"public ClusterSession getClusterSession() {\n return cl;\n }",
"@Override\n public boolean getIsClusteringKey() {\n return isClusteringKey_;\n }",
"public int getId() {\n return decision.getConsensusId();\n }",
"public void setClusterIdentifier(String clusterIdentifier) {\n this.clusterIdentifier = clusterIdentifier;\n }",
"public String getClusterArea() {\r\n return clusterArea;\r\n }",
"public String getClaimedStorageVolumeClusterName(VolumeInfo volumeInfo)\n throws VPlexApiException {\n VPlexStorageVolumeInfo storageVolumeInfo = _discoveryMgr\n .findStorageVolume(volumeInfo.getVolumeName());\n return storageVolumeInfo.getClusterId();\n }",
"public int getClusterSize() {\r\n \treturn this.clusterSize;\r\n }",
"public String getJobID() {\n\t\t\treturn JobID;\n\t\t}",
"public int nextAvailableCluster()\r\n\t{\r\n\t\tfor (int i = 0; i < MAX_CLUSTERS; i++)\r\n\t\t\tif (cluster[i] == false)\r\n\t\t\t\treturn i;\r\n\t\treturn -1;\r\n\t}",
"public void setClusterId(String ClusterId) {\n this.ClusterId = ClusterId;\n }",
"public CustomClusterManager getClusterManager(){\n return mClusterManager;\n }",
"public String clusterState() {\n return this.clusterState;\n }",
"public TrackerCluster getCluster() {return _cluster;}",
"io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Cluster getCluster();",
"public String getClusterLeader() throws RemoteException;",
"private static Object getClusterId(BgpPeerConfig peer) {\n return !peer.getRouteReflectorClient() || peer.getClusterId() == null\n ? null\n : Ip.create(peer.getClusterId());\n }",
"public String clusterCodeVersion() {\n return this.clusterCodeVersion;\n }",
"public Long getJobID() {\n return jobID;\n }",
"@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}",
"public java.lang.String getClusterName() {\n java.lang.Object ref = \"\";\n if (endpointConfigCase_ == 2) {\n ref = endpointConfig_;\n }\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (endpointConfigCase_ == 2) {\n endpointConfig_ = s;\n }\n return s;\n }\n }"
]
| [
"0.8384653",
"0.83699673",
"0.8292627",
"0.8244621",
"0.8244621",
"0.8244621",
"0.8244621",
"0.8244621",
"0.8244621",
"0.8182455",
"0.8182455",
"0.8182455",
"0.8182455",
"0.8182455",
"0.8182455",
"0.8091628",
"0.8053737",
"0.8045269",
"0.8045269",
"0.8045269",
"0.8045269",
"0.8045269",
"0.8045269",
"0.7542404",
"0.7542404",
"0.7542404",
"0.7542404",
"0.7542404",
"0.7542404",
"0.75241786",
"0.75241786",
"0.75241786",
"0.75241786",
"0.75241786",
"0.75241786",
"0.7404174",
"0.7404174",
"0.7404174",
"0.7404174",
"0.7404174",
"0.7404174",
"0.7381991",
"0.7295978",
"0.7295978",
"0.71181166",
"0.70589083",
"0.6909108",
"0.68891084",
"0.675471",
"0.6606471",
"0.6578894",
"0.65653557",
"0.65400654",
"0.6534602",
"0.64669424",
"0.6443396",
"0.64355415",
"0.64069796",
"0.6356545",
"0.6348922",
"0.63447946",
"0.620247",
"0.61815023",
"0.61546993",
"0.61518747",
"0.60735315",
"0.60735315",
"0.60735315",
"0.60735315",
"0.60735315",
"0.60735315",
"0.60648257",
"0.6039557",
"0.60335267",
"0.6028648",
"0.59823245",
"0.5954104",
"0.58994484",
"0.589793",
"0.5895649",
"0.5887362",
"0.5857084",
"0.5845626",
"0.58164465",
"0.57839835",
"0.5776122",
"0.57588404",
"0.57332903",
"0.5720706",
"0.5719408",
"0.570848",
"0.5701161",
"0.5696893",
"0.56828773",
"0.56408054",
"0.56395704",
"0.56218994",
"0.56146234",
"0.5612772",
"0.5604802"
]
| 0.80208045 | 23 |
Returns the command of this job. | @Override
public String getCommand() {
return model.getCommand();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getCommand() {\n java.lang.Object ref = command_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n command_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getCommand()\r\n\t{\r\n\t\treturn command;\r\n\t}",
"public java.lang.String getCommand() {\n java.lang.Object ref = command_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n command_ = s;\n }\n return s;\n }\n }",
"public String getCommand() {\n\n return command;\n }",
"public String getCommand(){\n return getCommand(null);\n }",
"public String getCommand() {\n return command;\n }",
"public String getCommand() {\n return command;\n }",
"public String getCommand() {\n return this.command;\n }",
"public String getCommand() {\r\n return command;\r\n }",
"public String Command() {\n\treturn command;\n }",
"public String getCommand() {\n\t\tString[] lines = commandLine.getText().split(\"\\n\");\n\t\treturn lines[commandLine.getLineCount() - 2];\n\t}",
"java.lang.String getCommand();",
"public int getCommand() {\n return command_;\n }",
"public String getCmd() {\r\n return cmd;\r\n }",
"@Override\r\n\tpublic String getCOMMAND() {\n\t\treturn COMMAND;\r\n\t}",
"public int getCommand() {\n return command_;\n }",
"public int getCommand()\n\t{\n\t\treturn this.command;\n\t}",
"public int getCmd() {\n return cmd_;\n }",
"public int getCmd() {\n return cmd_;\n }",
"public String getCommand() { return command; }",
"public int getCommand() {\r\n\t\tif(this.command == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.command.ordinal();\r\n\t}",
"final public String getActionCommand() {\n return command;\n }",
"String getCommand();",
"@JsonIgnore\n\tdefault short getCmd() {\n\t\tMessageMeta annotation = getClass().getAnnotation(MessageMeta.class);\n\t\tif (annotation != null) {\n\t\t\treturn annotation.cmd();\n\t\t}\n\t\treturn 0;\n\t}",
"public String getCommand(){\n return command;\n }",
"public com.google.protobuf.ByteString\n getCommandBytes() {\n java.lang.Object ref = command_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n command_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getCommandBytes() {\n java.lang.Object ref = command_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n command_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public network.message.PlayerResponses.Command getCommand() {\n if (commandBuilder_ == null) {\n if (responseCase_ == 2) {\n return (network.message.PlayerResponses.Command) response_;\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n } else {\n if (responseCase_ == 2) {\n return commandBuilder_.getMessage();\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n }\n }",
"@Override\n public final Command getCommand() {\n return commandIdentifier;\n }",
"com.google.protobuf.ByteString\n getCommandBytes();",
"public Command getCurrentCommand();",
"public CommandManager getCommand() {\n\treturn command;\n }",
"public byte getCmd() {\n return this.btCmd;\n }",
"public network.message.PlayerResponses.Command getCommand() {\n if (responseCase_ == 2) {\n return (network.message.PlayerResponses.Command) response_;\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n }",
"public String getOriginalCommand() {\n return command;\n }",
"java.lang.String getCommandName();",
"public java.lang.String getCommand(int index) {\n return command_.get(index);\n }",
"public String getCommandName() {\n try {\n if (command != null) {\n if (command.has(GnsProtocol.COMMANDNAME)) {\n return command.getString(GnsProtocol.COMMANDNAME);\n }\n }\n } catch (JSONException e) {\n // Just ignore it\n }\n return \"unknown\";\n }",
"public Command getCommand() {\n\t\treturn redCom;\n\t}",
"public String getCommandReturned() {\n return commandReturned;\n }",
"public int getActionCommand() {\n return actionCommand_;\n }",
"public int getActionCommand() {\n return actionCommand_;\n }",
"public java.lang.String getCommand(int index) {\n return command_.get(index);\n }",
"public String getCommand() {\n if (words.length == 0) {\n return NO_INPUT;\n }\n return words[0].toLowerCase();\n }",
"public String getSyntaxCheckCommand() {\n return replaceFilePathToken(syntaxCheckCommand);\n }",
"public abstract String getCommand();",
"public Command commandType() {\r\n if (command.startsWith(\"push\")) {\r\n return Command.C_PUSH;\r\n } else if (command.startsWith(\"pop\")) {\r\n return Command.C_POP;\r\n } else if (isArithmeticCmd()) {\r\n return Command.C_ARITHMETIC;\r\n } else if (command.startsWith(\"label\")) {\r\n return Command.C_LABEL;\r\n } else if (command.startsWith(\"goto\")) {\r\n return Command.C_GOTO;\r\n } else if (command.startsWith(\"if-goto\")) {\r\n return Command.C_IF;\r\n } else if (command.startsWith(\"function\")) {\r\n return Command.C_FUNCTION;\r\n } else if (command.startsWith(\"call\")) {\r\n return Command.C_CALL;\r\n } else if (command.startsWith(\"return\")) {\r\n return Command.C_RETURN;\r\n } else {\r\n return null;\r\n }\r\n }",
"public String getUnprocessedCommand() {\n if (currentIndex == 0) {\n // Not necessary but saves initialising a redundant string object\n return command;\n }\n if (isComplete()) {\n /* If there's no remaining command, return an empty string. This allows us to use the String\n * pool and avoid StringIndexOutOfBoundsExceptions. */\n return \"\";\n }\n return command.substring(currentIndex);\n }",
"public CommandValue getCommand() {\n\t\treturn value;\n\t}",
"public String getCommandKey()\n\t{\n\t\treturn commandKey;\n\t}",
"public String getLastCommand() {\n return lastCommand;\n }",
"public String commandLine() {\n String command = \"\";\n for (String arg : builder.command()) {\n command += arg + ' ';\n }\n if (command.endsWith(\" \")) {\n command = command.substring(0, command.length() - 1);\n }\n return command;\n }",
"public String getCommand() {\n String command = \"\";\n switch (turnCount) {\n case 0:\n command = \"NAME Bot0\";\n break;\n case 1:\n command = \"PASS\";\n break;\n case 2:\n command = \"HELP\";\n break;\n case 3:\n command = \"SCORE\";\n break;\n case 4:\n command = \"POOL\";\n break;\n default:\n command = \"H8 A AN\";\n break;\n }\n turnCount++;\n return command;\n }",
"public EventType getCommand(){\n return this.command;\n }",
"public String arg1() {\r\n return command.split(\"\\\\s+\")[1];\r\n }",
"int getCommand();",
"final Commands getLastCommand() {\n\t\t// retornamos el ultimo comando enviado\n\t\treturn this.lastCommand;\n\t}",
"public String \n getCommand() \n {\n return pCommand;\n }",
"com.google.protobuf.ByteString\n getCommandNameBytes();",
"public static final String getCommand(final FTPCommand command) {\n return command.command();\n }",
"public String readCommand() {\n return scanner.nextLine();\n }",
"public String getRemoteCommand() {\n return agentConfig.getRemoteCommand();\n }",
"public BatchExecutionCommandImpl getBatchCommand() {\n return getBatchCommand(DAFAULT_KIE_SESSION);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn CMD_NAME;\n\t}",
"int getCmd();",
"public network.message.PlayerResponses.CommandOrBuilder getCommandOrBuilder() {\n if ((responseCase_ == 2) && (commandBuilder_ != null)) {\n return commandBuilder_.getMessageOrBuilder();\n } else {\n if (responseCase_ == 2) {\n return (network.message.PlayerResponses.Command) response_;\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n }\n }",
"@Override\n\tprotected String getCommand() {\n\t\treturn super.getCommand() + \" --cluster-name=\" + clusterName + \" --data-dir=\" + dataDir;\n\t}",
"public static String getCommand(String cmd) throws IOException {\n Scanner s = new Scanner(Runtime.getRuntime().exec(cmd).getInputStream()).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }",
"java.lang.String getJobId();",
"public String getToolCommand();",
"Optional<String> command();",
"public String getStartCommand() {\n return startCommand;\n }",
"@Localized\n public String getCommandName() {\n return NucLang.get(_commandName).toString();\n }",
"String getCommandId();",
"String getCommandName();",
"java.lang.String getCommand(int index);",
"public abstract String getCommandName();",
"public abstract String getCommandName();",
"String getCommand(){\n\t\tString command=\"\";\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tcommand = br.readLine();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Somethinf went wrong with the system input!! Please try again.\");\n\t\t}\n\t\treturn command;\n\t}",
"public String getUserCommand() {\n out.print(\"Enter command: \");\n String fullInputLine = in.nextLine();\n\n return fullInputLine;\n }",
"public static RollCommand getCommand() {\n\t\treturn INSTANCE;\n\t}",
"public network.message.PlayerResponses.CommandOrBuilder getCommandOrBuilder() {\n if (responseCase_ == 2) {\n return (network.message.PlayerResponses.Command) response_;\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n }",
"public String getUserCommand();",
"public abstract String getLaunchCommand();",
"public int getCommand() {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tint value = Integer.parseInt(getToken(\"\"));\r\n\t\t\t\tif (value >= EXIT && value <= SAVE) {\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new NumberFormatException();\r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException nfe) {\r\n\t\t\t\tSystem.out.print(\"Invalid entry please try again.\");\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}",
"public String getJobId();",
"@Override\n public String getCommandName() {\n return s_name;\n }",
"@Override\n public String getCommandName() {\n return s_name;\n }",
"@Override\n public String getCommandName() {\n return s_name;\n }",
"@Override\n public String getCommandName() {\n return s_name;\n }",
"@Override\n public String getCommandName() {\n return s_name;\n }",
"@Override\n public String getCommandName() {\n return s_name;\n }",
"@Override\n public String getCommandName() {\n return s_name;\n }",
"public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}",
"public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }",
"public String getCommand(){\r\n return commandUpdate;\r\n }",
"public Commands getCommand(String cmdName) {\n return cmdMap.get(cmdName);\n }",
"public DrawingCommand getLastCommand() {\r\n\t\tint i = this.commands.size() - 1;\r\n\t\tif (i >= 0) {\r\n\t\t\treturn this.commands.get(this.commands.size() - 1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public static String getCommandString() {\n String string = \"\";\n for (String validCommand : validCommands.keySet()) {\n string += \" \" + validCommand;\n }\n return string;\n }",
"public com.google.protobuf.ByteString\n getCommandBytes(int index) {\n return command_.getByteString(index);\n }"
]
| [
"0.7889653",
"0.7871432",
"0.78553134",
"0.7842512",
"0.7823527",
"0.7773119",
"0.7773119",
"0.77729285",
"0.77329934",
"0.76604223",
"0.76241446",
"0.7619792",
"0.76071095",
"0.760497",
"0.7578467",
"0.7572487",
"0.75511956",
"0.7422672",
"0.740164",
"0.72815377",
"0.7247151",
"0.7228077",
"0.7200307",
"0.7160423",
"0.7154809",
"0.71193314",
"0.7107028",
"0.7005507",
"0.7005243",
"0.68689317",
"0.68207055",
"0.6812761",
"0.6783464",
"0.6758488",
"0.67078304",
"0.6705537",
"0.6703036",
"0.6682294",
"0.66775393",
"0.6669595",
"0.66589284",
"0.66498715",
"0.66491055",
"0.66328126",
"0.6627112",
"0.66033274",
"0.66014117",
"0.6589839",
"0.65812033",
"0.65540475",
"0.6526931",
"0.65145415",
"0.6509822",
"0.64284945",
"0.6420855",
"0.64204276",
"0.639373",
"0.6372518",
"0.6359955",
"0.6357681",
"0.63478726",
"0.6335495",
"0.6310696",
"0.6307635",
"0.62872016",
"0.62740993",
"0.6252478",
"0.62422854",
"0.6240121",
"0.62201804",
"0.62199074",
"0.6212109",
"0.6168279",
"0.61256695",
"0.6123276",
"0.6123242",
"0.60687697",
"0.60687697",
"0.6054835",
"0.60489553",
"0.6038492",
"0.6027289",
"0.6023242",
"0.60159254",
"0.6012059",
"0.59995586",
"0.5977411",
"0.5977411",
"0.5977411",
"0.5977411",
"0.5977411",
"0.5977411",
"0.5977411",
"0.59497905",
"0.5921783",
"0.5916291",
"0.59124076",
"0.5903791",
"0.58946806",
"0.5885595"
]
| 0.7550685 | 17 |
Returns the company ID of this job. | @Override
public long getCompanyId() {
return model.getCompanyId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}",
"public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}",
"public long getCompanyId() {\n return companyId;\n }",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _employee.getCompanyId();\n\t}",
"public String getCompanyId() {\r\n return companyId;\r\n }",
"public String getCompanyId() {\r\n return companyId;\r\n }",
"@Override\n\tpublic long getCompanyId();",
"@Override\n\tpublic long getCompanyId();",
"@Override\n\tpublic long getCompanyId();",
"@Override\n\tpublic long getCompanyId();",
"public Long getCompanyId() {\n return companyId;\n }",
"public String getCompanyId() {\n return companyId;\n }",
"public Integer getCompanyId() {\n return this.companyId;\n }",
"public Integer getCompanyId() {\n return companyId;\n }",
"public Integer getCompanyId() {\n return companyId;\n }",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _scienceApp.getCompanyId();\n\t}",
"public long getCompanyId();",
"public long getCompanyId();",
"public long getCompanyId();",
"public long getCompanyId();",
"public long getCompanyId();",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _dictData.getCompanyId();\n\t}",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _esfTournament.getCompanyId();\n\t}",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _userTracker.getCompanyId();\n\t}",
"public String getCompanyId()\n {\n return companyId;\n }",
"@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}",
"public int getCompanyId() {\n return companyId;\n }",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}",
"public String getCompany()\n {\n return (String) getProperty(PropertyIDMap.PID_COMPANY);\n }",
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"public String getCompany() {\n\t\treturn company;\n\t}",
"public String getCompany() {\n\t\treturn company;\n\t}",
"public String getCompany() {\r\n\t\treturn company;\r\n\t}",
"public Long getJobID() {\n return jobID;\n }",
"public java.lang.Integer getCompany() {\n\treturn company;\n}",
"@Override\n\tpublic long getCompanyId() {\n\t\treturn _permissionType.getCompanyId();\n\t}",
"public String getJobID() {\n\t\t\treturn JobID;\n\t\t}",
"public String getCompany() {\n return company;\n }",
"public String getCompany() {\n return (String) get(\"company\");\n }",
"public String getSysCompanyId() {\n return sysCompanyId;\n }",
"public java.lang.Integer getCompanyheaderId () {\n\t\treturn companyheaderId;\n\t}",
"public Company getCompany() {\n\t\treturn company;\n\t}",
"public java.lang.String getCompany() {\n java.lang.Object ref = company_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n company_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public static final String getCompany() { return company; }",
"public String getCompanyCode() {\n return companyCode;\n }",
"public String getCompanyCode() {\r\n return companyCode;\r\n }",
"public String getCompanyCode() {\r\n return companyCode;\r\n }",
"public String getCompany() {\n return company;\n }",
"public String getCompany() {\n return company;\n }",
"public String getCompany()\r\n {\r\n return (m_company);\r\n }",
"public String getJdCompany() {\r\n\t\treturn jdCompany;\r\n\t}",
"public String getPrimaryCompanyName() {\r\n return primaryCompanyName;\r\n }",
"public BigDecimal getJOB_ID() {\r\n return JOB_ID;\r\n }",
"public String getCompanyCd() {\r\n return companyCd;\r\n }",
"public String getCompanyCd() {\r\n return companyCd;\r\n }",
"@java.lang.Override\n public java.lang.String getCompany() {\n java.lang.Object ref = company_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n company_ = s;\n return s;\n }\n }",
"public java.lang.String getDocumentCompany() {\n return documentCompany;\n }",
"public String getCompany()\n\t{\n\t\treturn getCompany( getSession().getSessionContext() );\n\t}",
"public String getCompanyName() {\r\n\r\n\t\treturn this.companyName;\r\n\t}",
"public String getCompanyName() {\n\t\treturn companyName;\n\t}",
"public String getCompanyName() {\r\n\t\treturn companyName;\r\n\t}",
"public java.lang.Integer getCompanycode() {\n\treturn companycode;\n}",
"public static String getCompanyName() {\n\t\treturn CompanyName;\n\t}",
"@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}",
"public void setCompanyId(Integer value) {\n this.companyId = value;\n }",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }",
"public Long getCompId() {\n return compId;\n }",
"public Long getCompId() {\n return compId;\n }",
"public String getCompanyContact() {\n\t\treturn companyContact;\n\t}",
"public String getContactCompany() {\n return contactCompany;\n }",
"public String getCompanyName() {\n\t\treturn companyName + \"\\\"\";\n\t}",
"public String getCompanyName() {\r\n return companyName;\r\n }",
"public String getCompanyName() {\r\n return companyName;\r\n }",
"public String getCompanyName() {\r\n return companyName;\r\n }",
"public String getCompanyName() {\n return companyName;\n }",
"public String getCompanyName() {\n return companyName;\n }",
"public String getCompanyName() {\n return companyName;\n }",
"public String getCompanyName() {\n return companyName;\n }",
"public java.lang.String getCompanyAgId() {\n\t\treturn _imageCompanyAg.getCompanyAgId();\n\t}",
"public java.lang.String getPrimaryKey() {\n\t\treturn _imageCompanyAg.getPrimaryKey();\n\t}",
"public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }",
"Company getOrCreateCompanyId(String companyID) throws Exception;",
"public JobId job() { return Objects.requireNonNull(job, \"production revisions have no associated job\"); }",
"public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }",
"public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }",
"public Integer getCompId() {\n return compId;\n }",
"public Company getCompany() {\r\n return this.company;\r\n }",
"public java.lang.String getCompanyName () {\n\t\treturn companyName;\n\t}",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }"
]
| [
"0.8003796",
"0.79412895",
"0.7789676",
"0.7762786",
"0.77459216",
"0.77395356",
"0.77395356",
"0.7718125",
"0.7718125",
"0.7718125",
"0.7718125",
"0.77099824",
"0.77079827",
"0.7569567",
"0.7543034",
"0.7543034",
"0.7542039",
"0.75403196",
"0.75403196",
"0.75403196",
"0.75403196",
"0.75403196",
"0.7475764",
"0.742622",
"0.73877317",
"0.73625904",
"0.73594916",
"0.73221356",
"0.718364",
"0.71766615",
"0.71730804",
"0.7048772",
"0.694048",
"0.6909985",
"0.6909985",
"0.6903073",
"0.6815124",
"0.68074113",
"0.6787762",
"0.6781967",
"0.6766927",
"0.6755851",
"0.6631599",
"0.66109884",
"0.6598249",
"0.65790904",
"0.65674484",
"0.65649974",
"0.6559369",
"0.6559369",
"0.6540107",
"0.6540107",
"0.647155",
"0.6462715",
"0.64508617",
"0.64418226",
"0.6430415",
"0.6430415",
"0.6430394",
"0.6418665",
"0.64141625",
"0.63836586",
"0.6373573",
"0.63693106",
"0.635795",
"0.6333928",
"0.6326249",
"0.6321212",
"0.63169163",
"0.63169163",
"0.63169163",
"0.63169163",
"0.63169163",
"0.630941",
"0.63054633",
"0.63054633",
"0.6292506",
"0.625988",
"0.6238379",
"0.6225004",
"0.6225004",
"0.6225004",
"0.62158275",
"0.62158275",
"0.62158275",
"0.62158275",
"0.61860603",
"0.61590284",
"0.61576676",
"0.61479074",
"0.61409265",
"0.61354357",
"0.6130619",
"0.6130619",
"0.61219573",
"0.61128145",
"0.61044663",
"0.61005634"
]
| 0.77338576 | 9 |
Returns the complete date of this job. | @Override
public Date getCompleteDate() {
return model.getCompleteDate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getCompleteTime() {\n return completeTime;\n }",
"public Date getCompletionDate() {\r\n\t\treturn completionDate;\r\n\t}",
"public Date getCompletedDate() {\n return this.completedDate;\n }",
"public Timestamp\tgetCompletionDate();",
"LocalDateTime getCompletionDate();",
"public Date getFinishDate()\r\n {\r\n Date result = m_finishDate;\r\n if (result == null)\r\n {\r\n result = getParentFile().getFinishDate();\r\n }\r\n return (result);\r\n }",
"public Date getFinishedAt() {\n\t\treturn finishedAt;\n\t}",
"public Date getFinishDate() {\n if (this.finishDate == null) {\n return null;\n }\n return new Date(this.finishDate.getTime());\n }",
"@Override\n\tpublic Calendar getFinishDate() {\n\t\treturn Calendar.getInstance();\n\t}",
"public Date getDoneDate() {\n return doneDate;\n }",
"public Date getDoneDate() {\n return doneDate;\n }",
"public Date getDoneDate() {\n return doneDate;\n }",
"public Date getDoneDate() {\n return doneDate;\n }",
"public Date getBEGIN_DATE() {\n return BEGIN_DATE;\n }",
"public Date getActualFinish()\r\n {\r\n return (m_actualFinish);\r\n }",
"public Date getEarliestFinishingDate();",
"public String get_task_due_date()\n {\n return task_due_date.toString();\n }",
"public java.util.Date getFinishedTime () {\r\n\t\treturn finishedTime;\r\n\t}",
"@DISPID(8)\r\n\t// = 0x8. The runtime will prefer the VTID if present\r\n\t@VTID(12)\r\n\tjava.util.Date completionDateTime();",
"public Date getDateExecution() {\r\n return dateExecution;\r\n }",
"long getBeginDate();",
"public void CompleteTask() {\n\t\tCompletionDate = new Date();\n\t}",
"public long getDate() {\n return date;\n }",
"public double getTime() {\n\t\treturn this.completedTime;\n\t}",
"public String toString(){\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(\"dd-MM-yyyy HH:mm\");\n\t\treturn \"Estimated completion: \" + fmt.print(super.getEstimatedEndTime());\n\t}",
"public static final Date getBuildDate() { return buildDate; }",
"public static final Date getBuildDate() { return buildDate; }",
"public Date getFinalActiveDate() {\n if (_finalActiveDate == null) {\n _finalActiveDate = DEFAULT_FINAL_ACTIVE_DATE;\n }\n return _finalActiveDate;\n }",
"public Date getaBrithdate() {\n return aBrithdate;\n }",
"public long getDate() {\n return date_;\n }",
"public long getDate() {\n return date_;\n }",
"public long getDate() {\n\t\treturn date;\n\t}",
"public long getDate() {\n\t\treturn date;\n\t}",
"public java.lang.String getBegDate() {\n return begDate;\n }",
"public long getDate() {\n return date;\n }",
"public String Get_date() \n {\n \n return date;\n }",
"public Date getBudgetDate() {\n return (Date) getAttributeInternal(BUDGETDATE);\n }",
"public java.lang.String getBegDate() {\n return begDate;\n }",
"public static String getBuildDate() {\n return mBuildDate;\n }",
"@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGtStatus.getRequestedDate();\n\t}",
"public Date getDeadlineDate() {\r\n return deadlineDate;\r\n }",
"public Instant getBuildDate() {\r\n\t\treturn buildDate;\r\n\t}",
"@Override\n\tpublic Date getQueuedDate() {\n\t\treturn model.getQueuedDate();\n\t}",
"public String getCompletedDate(int position) {\n HashMap<String, String> map = list.get(position);\n return map.get(COMPLETED_DATE_COLUMN);\n }",
"public org.apache.xmlbeans.XmlDate xgetJobStartDate()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDate target = null;\r\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n return target;\r\n }\r\n }",
"public Date getBaselineFinish()\r\n {\r\n return (m_baselineFinish);\r\n }",
"public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public String getDeadline() {\n if (!this.by.equals(\"\")) {\n return this.by;\n }\n return this.todoDate.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }",
"public Date getInspectionResultCompletionDate() {\n return inspectionResultCompletionDate;\n }",
"public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}",
"public long getBeginDate() {\n return beginDate_;\n }",
"public long getBeginDate() {\n return beginDate_;\n }",
"String getStartDate();",
"@Override\n public int getDate() {\n return this.deadline.getDay();\n }",
"public java.sql.Date getREQ_END_DATE()\n {\n \n return __REQ_END_DATE;\n }",
"public String getCurrentDate() {\n return currentDate;\n }",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getDate() {\r\n\t\treturn date;\r\n\t}",
"public Date getRealDeadline() {\r\n return realDeadline;\r\n }",
"public String getDate() {\n\t\treturn date;\n\t}",
"public String getDate() {\n\t\treturn date;\n\t}",
"java.lang.String getStartDate();",
"public Timestamp getDateFinishSchedule() {\n\t\treturn (Timestamp) get_Value(\"DateFinishSchedule\");\n\t}",
"public String getDate() {\r\n return date;\r\n }",
"public String getDeadline(){\n\t\treturn this.deadline ;\n\t}",
"private Date getDeadlineDate() {\n String dateString = jtf_DeadLine.getText();\n Date date = Utils.parseDateFromString(dateString);\n System.out.println(\"Date:\" + date.toString());\n return date;\n }",
"public Date getEND_DATE() {\n return END_DATE;\n }",
"public static String getCurrentDateTimeFull() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public Date getExecutionDate()\n {\n return executionDate;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public java.util.Date getArrivalDate() {\n\t\treturn _tempNoTiceShipMessage.getArrivalDate();\n\t}",
"@ApiModelProperty(example = \"null\", value = \"The commitment end date related to the offer\")\n public DateTime getCommitmentCalculatedFinishDate() {\n return commitmentCalculatedFinishDate;\n }",
"public static String getDate() {\n return getDate(System.currentTimeMillis());\n }",
"String getEndDate();",
"public Date getAgcProCertiObtDate() {\n\t\treturn agcProCertiObtDate;\n\t}",
"@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}",
"public String getDate(){ return this.start_date;}",
"public String getDate() {\n return date;\n }",
"long getStartDate();",
"public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}",
"public final String getEnddate() {\n\t\treturn enddate;\n\t}",
"public String getdate() {\n\t\treturn date;\n\t}",
"public String getFechaFinal(){\n\n\t\treturn campoFinal.getText();\n\n\t}",
"public String getDate() {\r\n\t\treturn this.date;\r\n\t}",
"public alluxio.proto.journal.File.CompleteFileEntry getCompleteFile() {\n return completeFile_;\n }",
"public Date date() {\r\n\t\treturn date;\r\n\t}",
"public String getDate() {\n\t\treturn this.date;\n\t}",
"public String getDateString() {\n DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return format.format(mDate);\n }",
"public alluxio.proto.journal.File.CompleteFileEntry getCompleteFile() {\n if (completeFileBuilder_ == null) {\n return completeFile_;\n } else {\n return completeFileBuilder_.getMessage();\n }\n }",
"public Date getBeginnDate() {\n\t\treturn beginnDate;\n\t}",
"@NotNull\r\n public String getDate() {\r\n return date;\r\n }",
"public String getLastPaymentDate() {\n\t\treturn stateEqualMasterDao.getElementValueList(\"PAYMENT_DATE\").get(0);\n\t}",
"public java.lang.String getDate() {\n return date;\n }",
"public Date getDate() {\n return this.currentDate;\n }",
"public Date date()\n\t{\n\t\treturn this.date;\n\t}"
]
| [
"0.7293971",
"0.70445246",
"0.6970068",
"0.6756367",
"0.666821",
"0.656283",
"0.6443649",
"0.6434822",
"0.64070904",
"0.6299239",
"0.6299239",
"0.6299239",
"0.6299239",
"0.6275276",
"0.62458086",
"0.620423",
"0.6169756",
"0.6140234",
"0.61062133",
"0.6093619",
"0.606973",
"0.6066006",
"0.60619974",
"0.6044636",
"0.60433817",
"0.6022564",
"0.6022564",
"0.60223615",
"0.6011157",
"0.60008126",
"0.60002947",
"0.59900475",
"0.59900475",
"0.5988541",
"0.59879524",
"0.5986963",
"0.5964269",
"0.5962196",
"0.59611607",
"0.59485626",
"0.59310544",
"0.59303504",
"0.5929048",
"0.59247303",
"0.59130275",
"0.5903331",
"0.5897592",
"0.5896302",
"0.58941996",
"0.5894005",
"0.58929724",
"0.58912003",
"0.5888497",
"0.5882832",
"0.58819765",
"0.58812773",
"0.5880592",
"0.5880592",
"0.5877071",
"0.5876265",
"0.5873755",
"0.5873755",
"0.5871964",
"0.5862839",
"0.58617634",
"0.5856682",
"0.5854373",
"0.5848007",
"0.58430046",
"0.5841429",
"0.5839575",
"0.5839575",
"0.5839575",
"0.5839575",
"0.5839575",
"0.5834245",
"0.5833575",
"0.58220184",
"0.5821826",
"0.5820144",
"0.5814568",
"0.58137774",
"0.5813112",
"0.5808678",
"0.5804963",
"0.580299",
"0.5802287",
"0.57977927",
"0.5796731",
"0.5796317",
"0.5791356",
"0.5789305",
"0.5777276",
"0.57771134",
"0.5775884",
"0.57714003",
"0.5771163",
"0.57704717",
"0.5769903",
"0.57663184"
]
| 0.792743 | 0 |
Returns the create date of this job. | @Override
public Date getCreateDate() {
return model.getCreateDate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getCreateDate() {\n\t\treturn createDate;\n\t}",
"public Date getCreateDate() {\r\n\t\treturn createDate;\r\n\t}",
"public String getCreateDate() {\r\n\t\treturn createDate;\r\n\t}",
"public Date getCreateDatetime() {\r\n\t\treturn createDatetime;\r\n\t}",
"public Date getCreateDt() {\n\t\treturn this.createDt;\n\t}",
"public String getCreateDate() {\n return createDate;\n }",
"@Override\n\tpublic Date getCreateDate() {\n\t\treturn _changesetEntry.getCreateDate();\n\t}",
"public Long getCreateDatetime() {\n return createDatetime;\n }",
"public Long getCreateDatetime() {\n return createDatetime;\n }",
"public Date getCreateDt() {\n return createDt;\n }",
"public Date getCreateTimestamp() {\n return createTimestamp;\n }",
"public String getCreateDate() {\n return createDate;\n }",
"public String getCreateDate() {\n return createDate;\n }",
"public Date getCreateTimestamp() {\r\n return createTimestamp;\r\n }",
"public java.lang.String getCreateDate() {\n java.lang.Object ref = createDate_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n createDate_ = s;\n return s;\n }\n }",
"Date getCreateDate();",
"Date getCreateDate();",
"public Date getCreateDate() {\r\n return createDate;\r\n }",
"public Date getCreateDate() {\r\n return createDate;\r\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreateDate() {\n return createDate;\n }",
"public java.util.Date getCreateDate() {\n return this.createDate;\n }",
"public String getCreateDate() {\n return createDate;\n }",
"@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _candidate.getCreateDate();\n\t}",
"public Date getTimeCreate() {\n return timeCreate;\n }",
"public java.lang.String getCreateDate() {\n java.lang.Object ref = createDate_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n createDate_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n\tpublic Date getCreateDate();",
"@Override\n\tpublic Date getCreateDate();",
"public Date getCreateDate() {\n return createDate;\n }",
"public Date getCreate_date() {\n return create_date;\n }",
"public Date getCreateAt() {\n return createAt;\n }",
"public Date getCreateAt() {\n return createAt;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Timestamp getCreateDate() {\n return createDate;\n }",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCREATED_DATE() {\r\n return CREATED_DATE;\r\n }",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public java.util.Calendar getCreateDate() {\n return createDate;\n }",
"public Date getCreateOn() {\n\t\treturn this.createOn;\r\n\t}",
"public Date getCreatedate() {\r\n return createdate;\r\n }",
"public Date getCreatedate() {\r\n return createdate;\r\n }",
"public Date getCreateTime() {\n\t\treturn this.createTime;\n\t}",
"public Long getCreationDate()\r\n\t{\r\n\t\treturn creationDate;\r\n\t}",
"@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }",
"@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _employee.getCreateDate();\n\t}",
"public String getCreateStartTime() {\n return createStartTime;\n }",
"public Date getCreateDate();",
"public Date getCreateDate();",
"public Date getCreateDate();",
"public Date getCreatedate() {\n return createdate;\n }",
"public Date getCreatedate() {\n return createdate;\n }",
"public Date getCreatedate() {\n return createdate;\n }",
"public Date getCreatedate() {\n return createdate;\n }",
"@ZAttr(id=790)\n public Date getCreateTimestamp() {\n return getGeneralizedTimeAttr(Provisioning.A_zimbraCreateTimestamp, null);\n }",
"Date getCreationDate();",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Date getCreationDate() {\n\t\treturn this.creationDate;\n\t\t\n\t}",
"public Date getCreationDate() {\n\t\treturn creationDate;\n\t}",
"public Date getCreationDate() {\r\n\t\treturn creationDate;\r\n\t}",
"public Date getCreationDate() {\n return m_module.getConfiguration().getCreationDate();\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }"
]
| [
"0.7517145",
"0.7479996",
"0.74650824",
"0.7447201",
"0.7445887",
"0.7430383",
"0.7318202",
"0.730264",
"0.730264",
"0.7300553",
"0.72949284",
"0.72776717",
"0.72776717",
"0.7272605",
"0.72719264",
"0.7263944",
"0.7263944",
"0.7237165",
"0.7237165",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7229366",
"0.7220696",
"0.7212226",
"0.7209551",
"0.72036135",
"0.7189741",
"0.7175187",
"0.7175187",
"0.7169616",
"0.71606076",
"0.7158607",
"0.7158607",
"0.7152256",
"0.7151184",
"0.7140189",
"0.7140189",
"0.7140189",
"0.7140189",
"0.7140189",
"0.7130048",
"0.71276456",
"0.71276456",
"0.71229094",
"0.71117973",
"0.7101688",
"0.7101688",
"0.70988756",
"0.70930177",
"0.70905644",
"0.7090562",
"0.70766926",
"0.70702964",
"0.70702964",
"0.70702964",
"0.7058865",
"0.7058865",
"0.7058865",
"0.7058865",
"0.7058238",
"0.7056035",
"0.705292",
"0.705292",
"0.7050153",
"0.70498294",
"0.7049206",
"0.7044662",
"0.70272493",
"0.70268804",
"0.70268804",
"0.70268804",
"0.70268804",
"0.70268804",
"0.70268804",
"0.70268804",
"0.70268804",
"0.70201033",
"0.70201033",
"0.70201033"
]
| 0.7318405 | 8 |
Returns the eligible time of this job. | @Override
public String getEligibleTime() {
return model.getEligibleTime();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getReadyTime()\n {\n if (scheduledOPs.isEmpty())\n {\n return 0;\n\n }else{\n\n \t//Get latest scheduled op's completion time as ready time\n return scheduledOPs.get(scheduledOPs.size() - 1).getCompletionTime();\n }\n }",
"public Date getRequiredTime() {\n return requiredTime;\n }",
"@Basic\n\tpublic double getTimeInvincible(){\n\t\treturn this.time_invincible;\n\t}",
"long getInhabitedTime();",
"public int getWorkRequired() {\n return time;\n }",
"public java.util.Calendar getRequestedTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }",
"@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }",
"public int getWaitedTime() {\n\t\treturn this.waitedTime;\n\t}",
"public double getTime() {\n\t\treturn this.completedTime;\n\t}",
"public double getRemainingTime()\n {\n return totalTime - scheduledTime;\n }",
"public java.sql.Time getREQ_END_TIME()\n {\n \n return __REQ_END_TIME;\n }",
"public java.util.Date getValidTime() {\r\n return validTime;\r\n }",
"public int getEventTime() {\n\t\treturn scheduledTime;\n\t}",
"public String getEstimatedRemainingTime() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return \"N/A\";\n \n long eta = d-(System.currentTimeMillis()-startTime);\n if(eta<=0) return \"N/A\";\n \n return Util.getTimeSpanString(eta);\n }",
"BusinessCenterTime getValuationTime();",
"public Time getTime() {\n return this.time; // returns the time associated with the task\n }",
"private long remainingTime() {\n final long remainingTime = this.designatedEnd - System.currentTimeMillis();\n return remainingTime >= 0 ? remainingTime : 0L;\n }",
"public Date getCompleteTime() {\n return completeTime;\n }",
"@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}",
"public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }",
"public TimeValue getMaxTaskWaitTime() {\n final var oldestTaskTimeMillis = allBatchesStream().mapToLong(Batch::getCreationTimeMillis).min().orElse(Long.MAX_VALUE);\n\n if (oldestTaskTimeMillis == Long.MAX_VALUE) {\n return TimeValue.ZERO;\n }\n\n return TimeValue.timeValueMillis(threadPool.relativeTimeInMillis() - oldestTaskTimeMillis);\n }",
"public double getScheduledTime() {\n return scheduledTime;\n }",
"public String getAvailability() {\n\t\treturn availableAt;\n\t}",
"public Long getChecktime() {\n return checktime;\n }",
"public Long getEstimatedEvaluationTimeRemainingInMinutes() {\n return this.estimatedEvaluationTimeRemainingInMinutes;\n }",
"public java.util.Date getFinishedTime () {\r\n\t\treturn finishedTime;\r\n\t}",
"public long getEvaluationTime() {\r\n\t\treturn evaluationTime;\r\n\t}",
"public org.apache.xmlbeans.XmlDateTime xgetRequestedTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDateTime target = null;\n target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(REQUESTEDTIME$2, 0);\n return target;\n }\n }",
"public long getRemainingTime() {\n return (maxTime_ * 1000L)\n - (System.currentTimeMillis() - startTime_);\n }",
"Double getRemainingTime();",
"public List<String> getTime() {\r\n\t\treturn timeAvailable;\r\n\t}",
"public String getArriveTime() {\n return arriveTime;\n }",
"java.lang.String getDepartureTime();",
"java.lang.String getDepartureTime();",
"public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }",
"boolean hasDesiredTime();",
"public java.lang.String getActTime() {\r\n return localActTime;\r\n }",
"public static int getWatcherWaitingTime() {\r\n return watcherWaitingTime.getValue(); \r\n }",
"public String getEstimatedTime() {\n return estimatedTime;\n }",
"java.lang.String getArrivalTime();",
"java.lang.String getArrivalTime();",
"public BigDecimal getCheckAfterHours() {\n return checkAfterHours;\n }",
"public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}",
"public String getAvailableTime() {\n String output = \"\";\n for (int i = 0; i < 24; ++i) {\n if (availableTime[i] == true) {\n output += i;\n break;\n }\n }\n output += \" to \";\n for (int i = 23; i >= 0; --i) {\n if (availableTime[i] == true) {\n output += i;\n break;\n }\n }\n return output;\n }",
"public Date getDeductSubmitTime() {\n return deductSubmitTime;\n }",
"public OffsetDateTime submittedTime() {\n return this.submittedTime;\n }",
"public String getWaiting_lock_duration() {\n return waiting_lock_duration;\n }",
"Date getEndedOn();",
"public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }",
"DateTime getSubmissionTime();",
"public double getEndTime() {\n return endTime;\n }",
"public boolean hasDesiredTime() {\n return desiredTimeBuilder_ != null || desiredTime_ != null;\n }",
"public TLifeTimeInSeconds getLifetimeAssigned() {\n\n\t\treturn lifetimeAssigned;\n\t}",
"public int getOccupiedHours(){\n \t\treturn getOccupiedMinutes()/60;\n \t}",
"int getEndTime();",
"int getEndTime();",
"int getEndTime();",
"public Time getBestTime()\n\t{\n\t\treturn bestTime;\n\t}",
"@Override\n\tpublic long getInhabitedTime()\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}",
"Double getScheduleDuration();",
"public int getConfirmTime() {\n\t\treturn _tempNoTiceShipMessage.getConfirmTime();\n\t}",
"public String getValidtime() {\n return validtime;\n }",
"public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }",
"Duration getRemainingTime();",
"public Date getScheduleTime() {\n return this.scheduleTime;\n }",
"java.lang.String getWaitTime();",
"public long logicallyCompletedAt() {\n return logicallyCompletedAt;\n }",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"boolean hasCollectEndTime();",
"public String getReservationTime() {\n return reservationTime;\n }",
"public int getParkingTime() {\r\n\t\treturn parkingTime;\r\n\t}",
"public java.sql.Time getREQ_START_TIME()\n {\n \n return __REQ_START_TIME;\n }",
"boolean hasVotingEndTime();",
"public String getTimeLeft() {\n return NumberToTimeLeft.convert(_dateExpiration - System.currentTimeMillis(),true);\n }",
"public long getOccupiedSeconds(){\n \t\treturn occupiedSeconds;\n \t}",
"public long getArrivalTime()\n {\n return arrivalTime;\n }",
"com.google.protobuf.Timestamp getVotingEndTime();",
"int getEvalTm();",
"public Timestamp getStatusTime() {\n\t\treturn null;\n\t}",
"@Column(name = \"EFFECTIVE_TIME\")\n\tpublic Date getEffectiveTime()\n\t{\n\t\treturn effectiveTime;\n\t}",
"public TimeValue getAwardedProgramTime() {\n if (_timeAllocation == null) return new TimeValue(0, TimeValue.Units.hours);\n return TimeValue.millisecondsToTimeValue(_timeAllocation.getSum().getProgramAward().toMillis(), TimeValue.Units.hours);\n }",
"public Double getBestTime() {\n return bestTime;\n }",
"public String getReqTime() {\n return reqTime;\n }",
"public long getElapsedTime() {\n\t\treturn this.getTime();\n\t}",
"long getStartTime();",
"public Date getExpirationTime() {\n return expirationTime;\n }",
"public long getEndTime() {\r\n return endTime;\r\n }",
"public long getEndTime() {\n return endTime;\n }",
"public long getEndTime() {\n return endTime;\n }",
"long getRetrievedTime();",
"public long getStartTime();",
"public long getStartTime();",
"public int getIdleTime() {\n int[] processorFinishTimes = new int[AlgorithmConfig.getNumOfProcessors()];\n int[] processorWeights = new int[AlgorithmConfig.getNumOfProcessors()];\n int processor;\n // Find the end time and weight of each processor\n for (ScheduledTask task : this) {\n processor = task.getProcessorNum() - 1;\n if (task.getFinishTime() > processorFinishTimes[processor]) {\n processorFinishTimes[processor] = task.getFinishTime();\n }\n processorWeights[processor] += task.getNode().getWeight();\n }\n // Calculate the idle time\n int idleTime = 0;\n for (int i = 0; i < AlgorithmConfig.getNumOfProcessors(); i++) {\n idleTime += processorFinishTimes[i] - processorWeights[i];\n }\n\n return idleTime;\n }",
"public double getStartTime();",
"public int getTimeToLive() {\n\t\treturn deathsTillForget;\n\t}",
"public DateTime batchSupportEndOfLife() {\n return this.batchSupportEndOfLife;\n }",
"boolean hasSubmitTime();",
"public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }",
"public long getTimeLeft() {\n return getExpiration() - System.currentTimeMillis() / 1000L <= 0 ? 0 : getExpiration() - System.currentTimeMillis() / 1000L;\n }",
"StatusTimeType getStatusTime();"
]
| [
"0.6607307",
"0.63947845",
"0.639404",
"0.63193023",
"0.6201435",
"0.61903363",
"0.6177963",
"0.6176691",
"0.617038",
"0.6119179",
"0.60754853",
"0.6068852",
"0.60564315",
"0.6040579",
"0.60025346",
"0.598264",
"0.59701645",
"0.59490925",
"0.5923841",
"0.592348",
"0.59025234",
"0.58898485",
"0.5884834",
"0.588155",
"0.5877844",
"0.5862793",
"0.58617294",
"0.5839279",
"0.58248377",
"0.5819462",
"0.5793874",
"0.5792232",
"0.578447",
"0.578447",
"0.5782917",
"0.5782432",
"0.5772706",
"0.5745048",
"0.57445",
"0.57346684",
"0.57346684",
"0.57310534",
"0.5724945",
"0.5719856",
"0.57074374",
"0.57015306",
"0.570034",
"0.56899285",
"0.56705815",
"0.5664544",
"0.565696",
"0.56494236",
"0.56473255",
"0.56406564",
"0.5635407",
"0.5635407",
"0.5635407",
"0.5634537",
"0.5629116",
"0.5623329",
"0.5622976",
"0.5620838",
"0.561641",
"0.5613858",
"0.5613611",
"0.5612395",
"0.56101835",
"0.5607323",
"0.5602217",
"0.55989534",
"0.5595462",
"0.5590817",
"0.5589178",
"0.5587094",
"0.55821383",
"0.55818254",
"0.55804974",
"0.55752397",
"0.55751735",
"0.5572068",
"0.5570155",
"0.55700874",
"0.5565906",
"0.55658245",
"0.5554241",
"0.55504936",
"0.5536727",
"0.5536667",
"0.5536667",
"0.55295134",
"0.55170566",
"0.55170566",
"0.55164087",
"0.55155945",
"0.5508879",
"0.5507322",
"0.54983616",
"0.5498029",
"0.5497702",
"0.5496415"
]
| 0.7478788 | 0 |
Returns the environment vars of this job. | @Override
public String getEnvironmentVars() {
return model.getEnvironmentVars();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] getEnvironmentParams()\r\n\t{\r\n\t\treturn environmentParams;\r\n\t}",
"public Map<String, String> environmentVariables() {\n return this.environmentVariables;\n }",
"public Map<String, String> getEnv()\n {\n return env;\n }",
"public Map<String, String> getEnvironmentVariables(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return environmentVariables;\n }",
"public synchronized Map<String, String> getenv() {\n return System.getenv();\n }",
"public String[] getEnvArray()\n {\n return (String[])envMap.values().toArray(new String[envMap.size()]);\n }",
"public String getEnv() {\n\n return env;\n }",
"private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }",
"public int[][] getEnvironment() {\n return this.environment;\n }",
"public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }",
"java.util.List<java.lang.String>\n getEnvList();",
"public Map<String, String> getEnvironment();",
"Properties getEnvironment();",
"Properties getEnvironment();",
"public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_;\n }",
"public IEnvVarBuildPath[] getEnvVarBuildPaths();",
"public String getEnvironment() {\n return environment;\n }",
"public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }",
"public Env getEnv() {\n\t\treturn _env;\n\t}",
"String getEnvironment();",
"public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }",
"public Environment environment()\n {\n return theEnv;\n }",
"public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_.getUnmodifiableView();\n }",
"public int getEnvCount() {\n return env_.size();\n }",
"public int getEnvCount() {\n return env_.size();\n }",
"public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}",
"public String getContainerEnv() {\n return containerEnv;\n }",
"private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }",
"public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}",
"public Map<String, String> getEnv(IProject project) throws CoreException;",
"public FxEnvironment getEnvironment() {\n return CacheAdmin.getFilteredEnvironment();\n }",
"public static List<VarListEntryType> getJobEnvVars(API api) {\n\t\tList<VarListEntryType> list = new ArrayList<VarListEntryType>();\n\t\tJobEnvVariableList moduleJobEnvVarList = api.getJobEnvVariableList();\n\t\tif (moduleJobEnvVarList != null) {\n\t\t\tfor (EnvVariable var : moduleJobEnvVarList.getEnvVariables()) {\n\n\t\t\t\tVarListEntryType entry = DocbookFactory.eINSTANCE.createVarListEntryType();\n\t\t\t\tgenerateEnvVarEntry(entry, var.getName(), var.getDescription(), null);\n\t\t\t\tlist.add(entry);\n\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public static Properties getEnvVars() throws Throwable {\n Process p = null;\n Properties envVars = new Properties();\n Runtime r = Runtime.getRuntime();\n String OS = System.getProperty(\"os.name\").toLowerCase();\n if (OS.indexOf(\"windows 9\") > -1) {\n p = r.exec(\"command.com /c set\");\n } else if ((OS.indexOf(\"nt\") > -1) || (OS.indexOf(\"windows 2000\") > -1)\n || (OS.indexOf(\"windows xp\") > -1)) {\n p = r.exec(\"cmd.exe /c set\");\n } else {\n // our last hope, we assume Unix\n p = r.exec(\"env\");\n }\n try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()))) {\n String line;\n while ((line = br.readLine()) != null) {\n int idx = line.indexOf('=');\n if (idx < 0)\n continue;\n String key = line.substring(0, idx);\n String value = (idx < line.length() - 1) ? line.substring(idx + 1) : \"\";\n envVars.setProperty(key, value);\n }\n }\n // do nothing\n return envVars;\n }",
"public String[] getLocalVariables() {\r\n return scope != null? scope.getLocalVariables() : null;\r\n }",
"java.lang.String getEnv(int index);",
"Environment getEnvironment() {\n return recordingEnv;\n }",
"private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }",
"public static ApplicationEnvironment getEnvironment (){\n\t\treturn _applicationEnvironment;\n\t}",
"private void getStageVariablesForJob() throws IGCException {\n final String methodName = \"getStageVariablesForJob\";\n String jobRid = job.getId();\n log.debug(\"Retrieving stage variables for job: {}\", jobRid);\n IGCSearch igcSearch = new IGCSearch(\"stage_variable\");\n igcSearch.addProperties(DataStageConstants.getStageVariableSearchProperties());\n IGCSearchCondition condition = new IGCSearchCondition(\"stage.job_or_container\", \"=\", jobRid);\n IGCSearchConditionSet conditionSet = new IGCSearchConditionSet(condition);\n igcSearch.addConditions(conditionSet);\n ItemList<StageVariable> vars = igcRestClient.search(igcSearch);\n buildStageVariableMaps(igcRestClient.getAllPages(null, vars));\n }",
"public abstract Map<String, String> getEnvironment(NIOWorker nw);",
"private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }",
"public String getEnvironmentName() {\n return this.environmentName;\n }",
"com.google.protobuf.ByteString\n getEnvBytes(int index);",
"public List<AppServiceEnvironmentInner> hostingEnvironments() {\n return this.hostingEnvironments;\n }",
"public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }",
"public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }",
"public EnvironmentFrame getEnvironmentFrame() {\n\t\treturn myEnvFrame;\n\t}",
"@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}",
"public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }",
"private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }",
"public Continuous2D getEnvironment() {\n return environment;\n }",
"public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}",
"public PythonInterpreter getEnvironment(String name) {return environments.get(name);}",
"@Override\n public List<EnvironmentVariable> findAll() throws Exception {\n return null;\n }",
"public static java.util.List<it.vmt.gh.sb.model.Environment>\n\t\tgetEnvironments(int start, int end) {\n\n\t\treturn getService().getEnvironments(start, end);\n\t}",
"public EnvironmentType getEnvTypes() {\n return envTypes;\n }",
"public static int getEnvironmentsCount() {\n\t\treturn getService().getEnvironmentsCount();\n\t}",
"public String getSystemEnv() {\n return \"\";\n }",
"public JMeterVariables getVariables() {\n return variables;\n }",
"int getEnvCount();",
"public static String getEnvironmentVariable(String name) {\n return System.getenv(name);\n }",
"protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}",
"@Override\n\tpublic Environment getEnvironment() {\n\t\tif (environment == null) {\n\t\t\tenvironment = new StandardEnvironment();\n\t\t}\n\t\treturn environment;\n\t}",
"public List<String> extractVariables() {\n if (this.value == null) {\n return Collections.<String>emptyList();\n }\n Matcher matcher = VARS_RE.matcher(this.value);\n ArrayList<String> vars = new ArrayList<>();\n while (matcher.find()) {\n vars.add(matcher.group(1));\n }\n return vars;\n }",
"public List<String> getVariables() {\r\n List<String> list = new ArrayList<String>();\r\n list.add(this.variable);\r\n return list;\r\n }",
"public Collection<BatchJobParameters> getCurrentJobs() {\n return runningJobs.values();\n }",
"public java.util.Map<String, String> getStageVariableOverrides() {\n return stageVariableOverrides;\n }",
"public org.eclipse.stardust.engine.api.runtime.RuntimeEnvironmentInfo\n getRuntimeEnvironmentInfo()\n throws org.eclipse.stardust.common.error.WorkflowException;",
"public ArrayList<LogVar> getArgs() {\n\t\treturn this.args;\n\t}",
"String getEnvironmentProperty(String key);",
"public String environmentId() {\n return environmentId;\n }",
"public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}",
"public Map<String, String> getEnv(URI uri) throws CoreException;",
"public String getDefaultEnvironmentVariableName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDefaultEnvironmentVariableName\");\n\t\t\treturn SemanticVersionBuildWrapper.DEFAULT_ENVIRONMENT_VARIABLE_NAME;\n\t\t}",
"public List<String> getAngularVariables()\n {\n if (angularVariables == null)\n {\n angularVariables = new ArrayList<>();\n }\n return angularVariables;\n }",
"public String getEnvironmentId() {\n return this.EnvironmentId;\n }",
"final static String[] getEnvVarArray(@SuppressWarnings(\"rawtypes\") Map map)\n {\n if (map == null)\n {\n return null;\n }\n\n String[] arr = new String[map.size()];\n\n int x = 0;\n for (Object k : map.keySet())\n {\n Object v = map.get(k);\n arr[x] = String.format(\"%s=%s\", k, v);\n ++x;\n }\n\n return arr;\n }",
"public Environment getActorEnvironment() {\r\n\t\treturn actorEnv;\r\n\t}",
"public List<String> getVariables() {\r\n List<String> newList = new ArrayList<String>();\r\n newList.addAll(e1.getVariables());\r\n return newList;\r\n }",
"public List<HostingEnvironmentDeploymentInfo> hostingEnvironmentDeploymentInfos() {\n return this.hostingEnvironmentDeploymentInfos;\n }",
"public Map getActorStateVariables() {\r\n\t\treturn actorEnv.localBindings();\r\n\t}",
"public String getDevelopmentToolingandEnvironmentPreconditions() {\n return developmentToolingandEnvironmentPreconditions;\n }",
"public GameEnvironment getGameEnvironment() {\r\n return this.gameE;\r\n }",
"public Properties getCommandLineArgs()\n {\n return this.commandLineArgs;\n }",
"@Override\n public List<String> getVariables() {\n return super.getVariables();\n }",
"public List<LocalVariable> getLocalVariables() {\n\t\treturn localVariables;\n\t}",
"public DataStoreEnvironment getDataStoreEnvironment (){\n\t\treturn _dataStoreEnvironment;\n\t}",
"public final FileMincVarElem[] getVarArray() {\r\n return varArray;\r\n }",
"public byte[] marshal() {\n\t\t\n\t\tByteBuffer byteBuf = ByteBuffer.allocate(10240);\t// FIXME!!!! -- HR.\n\t\t\n\t\tmarshal(byteBuf);\n\t\tbyteBuf.flip();\n\t\t\n\t\tint envLength = byteBuf.limit();\n\t\tbyte[] envBytes = new byte[envLength];\n\t\tbyteBuf.get(envBytes);\n\t\t\n\t\treturn envBytes;\n\t}",
"protected HashSet<String> getEnvironmentDependentSystems() {\r\n\t\tif (environmentDependentSystems==null) {\r\n\t\t\tenvironmentDependentSystems = new HashSet<String>();\r\n\t\t}\r\n\t\treturn environmentDependentSystems;\r\n\t}",
"public String[] getArguments(){\r\n\t\treturn args.toArray(new String[args.size()]);\r\n\t}",
"public Collection<String> list() {\n return jobs.keySet();\n }",
"public static void printSystemVariables() {\n\t\tMap<String, String> env = System.getenv();\n\t\tfor (Map.Entry<String, String> entry : env.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \" : \" + entry.getValue());\n\t\t}\n\t}",
"public String getDevelopmentToolingandEnvironmentServiceInputsandOuputs() {\n return developmentToolingandEnvironmentServiceInputsandOuputs;\n }",
"public EnvironmentStateManager getEnvironmentStateManager() {\n\t\treturn environmentStateManager;\n\t}",
"public List<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}",
"public ImmutableMap<String, Integer> getStorageParametres() {\n return storageParametres;\n }",
"public List<String> getStateVariablesList() {\r\n\t\treturn stateVariablesList;\r\n\t}"
]
| [
"0.7620705",
"0.7605565",
"0.7372752",
"0.72960764",
"0.720251",
"0.7073558",
"0.7006451",
"0.69756263",
"0.69273585",
"0.6925455",
"0.68948364",
"0.6785067",
"0.67148924",
"0.67148924",
"0.67041993",
"0.6636206",
"0.66328305",
"0.6535535",
"0.65130883",
"0.64656526",
"0.64556324",
"0.64275855",
"0.6379166",
"0.63127667",
"0.63059807",
"0.62815535",
"0.62447345",
"0.6205767",
"0.6202123",
"0.61731493",
"0.6152522",
"0.6026502",
"0.60062945",
"0.5999669",
"0.5972569",
"0.59660715",
"0.59340614",
"0.59292537",
"0.5911386",
"0.59102124",
"0.5812288",
"0.57818836",
"0.57459056",
"0.5744455",
"0.5735574",
"0.5696969",
"0.5695516",
"0.5687926",
"0.56647414",
"0.5639423",
"0.5624915",
"0.5620424",
"0.5620021",
"0.55934036",
"0.55814135",
"0.55615324",
"0.552504",
"0.5512232",
"0.5491874",
"0.5483351",
"0.54796016",
"0.5467311",
"0.5462221",
"0.54242235",
"0.5406382",
"0.5401819",
"0.5388234",
"0.5376565",
"0.5363103",
"0.5346966",
"0.53317726",
"0.5320953",
"0.53146523",
"0.5311553",
"0.5309226",
"0.53070873",
"0.52929974",
"0.5290967",
"0.52821565",
"0.52778786",
"0.5275815",
"0.5271691",
"0.52600527",
"0.5257544",
"0.52554727",
"0.52463526",
"0.52449226",
"0.524059",
"0.5235748",
"0.52186346",
"0.5211836",
"0.5204505",
"0.52020776",
"0.51970667",
"0.5195645",
"0.51906806",
"0.51681495",
"0.51573896",
"0.5151187",
"0.5132566"
]
| 0.8010266 | 0 |
Returns the group ID of this job. | @Override
public long getGroupId() {
return model.getGroupId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getGroup_id() {\n return group_id;\n }",
"public Long getGroupID()\n {\n return groupID;\n }",
"public Long getGroupId() {\n\t\treturn groupId;\n\t}",
"public long getGroupId() {\n return groupId;\n }",
"public String getGroupId() {\n\t\treturn groupId;\n\t}",
"public String groupId() {\n return this.groupId;\n }",
"public Long getGroupId() {\n return groupId;\n }",
"public String getGroupId() {\n\t\treturn this.groupId;\n\t}",
"public Number getGroupId() {\r\n\t\treturn (this.groupId);\r\n\t}",
"public String getGroupKey() {\n return groupKey;\n }",
"public int getGroupID() {\n return groupID;\n }",
"public int getGroupId() {\n return groupId;\n }",
"public int getGroupId() {\n return groupId;\n }",
"java.lang.String getGroupId();",
"java.lang.String getGroupId();",
"public ID getGroupID() {\n\treturn groupID;\n }",
"public Long getGroupID() {\n return this.GroupID;\n }",
"public long getGroup()\r\n { return group; }",
"public Integer getGroupId() {\n return groupId;\n }",
"public Integer getGroupId() {\n return groupId;\n }",
"public String getGroupId()\n {\n return groupId;\n }",
"public Integer getGroupId() {\r\n return groupId;\r\n }",
"public Integer getGroupId() {\n return (Integer) get(1);\n }",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _dataset.getGroupId();\n\t}",
"public String getGroupKey() {\n return this.GroupKey;\n }",
"public int getGroup() {\n return group;\n }",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _changesetEntry.getGroupId();\n\t}",
"public long getGroupId();",
"public long getGroupId();",
"public long getGroupId();",
"public long getGroupId();",
"public long getGroupId();",
"public long getGroupId();",
"public String getGroupUuid() {\n\t\treturn groupUuid;\n\t}",
"public int getIdGroup() {\n return idGroup;\n }",
"Integer getGroupId();",
"@Override\n\tpublic long getGroupId();",
"@Override\n\tpublic long getGroupId();",
"String getGroupId();",
"String getGroupId();",
"public Optional<String> groupInstanceId() {\n return groupInstanceId;\n }",
"public String getGroup() {\n\t\treturn group;\n\t}",
"public String getGroup() {\n return group;\n }",
"public String getGroup() {\n return group;\n }",
"public String getGroup() {\n return this.group;\n }",
"public int getGroupId() {\n return folderACL.getGroupId();\n }",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _employee.getGroupId();\n\t}",
"public String getGroup ()\n {\n return group;\n }",
"public String getGroup ()\n {\n return group;\n }",
"UUID getGroupId();",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _esfTournament.getGroupId();\n\t}",
"public String getSGroupID() {\n return sGroupID;\n }",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _paper.getGroupId();\n\t}",
"public short getGroupId() {\n Logger.d(TAG, \"getGroupId() entry getGroupId is \" + mGroupId);\n return mGroupId;\n }",
"protected String getGroupId() {\n return getActorPath().name();\n }",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _scienceApp.getGroupId();\n\t}",
"public String getClGrpId() {\r\n\t\treturn clGrpId;\r\n\t}",
"public String getClGrpId() {\r\n return clGrpId;\r\n }",
"public String getGroupId() {\n return groupId != null ? groupId : topic;\n }",
"public String getSizeGroupId() {\n return (String)getAttributeInternal(SIZEGROUPID);\n }",
"public Long getAdgroupid() {\r\n return adgroupid;\r\n }",
"public String getEnrollmentGroupId()\n {\n //SRS_X509RegistrationResultParser_25_011: [ This method shall return the parsed enrollmentGroupId. ]\n return enrollmentGroupId;\n }",
"@Override\n public long getGroupId() {\n return _partido.getGroupId();\n }",
"public List<String> groupIds() {\n return this.groupIds;\n }",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _second.getGroupId();\n\t}",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _dictData.getGroupId();\n\t}",
"public String getGroup() {\n if (overrideGroupKey != null) {\n return overrideGroupKey;\n }\n return getNotification().getGroup();\n }",
"GroupId groupId();",
"public String getGroup() {\n return groupName;\n }",
"public String group() { return group; }",
"public java.lang.String getGroupname() {\n\treturn groupname;\n}",
"@Override\n\tpublic long getGroupId() {\n\t\treturn _permissionType.getGroupId();\n\t}",
"@Override\n\tpublic long getGroupId(int arg0) {\n\t\treturn arg0;\n\t}",
"public PeerGroupID getPeerGroupID() {\n return gid;\n }",
"public String getUsergroupId() {\n return usergroupId;\n }",
"public java.lang.Integer getGroupcode() {\n\treturn groupcode;\n}",
"@Override\n\t\tpublic long getGroupId(int groupPosition) {\n\t\t\treturn groupPosition;\n\t\t}",
"@Override\n\t\tpublic long getGroupId(int groupPosition) {\n\t\t\treturn groupPosition;\n\t\t}",
"public Group getGroup() {\r\n\t\tif (this.group == null)\r\n\t\t\tthis.group = this.groupEjb.getGroupById(this.getGroupId());\r\n\t\treturn this.group;\r\n\t}",
"@ApiModelProperty(value = \"Unique identifier for the group\")\n @JsonProperty(\"id\")\n public Long getId() {\n return id;\n }",
"public String getGroupKey() {\n StringWriter sw = new StringWriter();\n writeGroupKey(sw);\n return sw.toString();\n }",
"public Group getGroup() {\n return group;\n }",
"public Long getAdGroupId() {\r\n return adGroupId;\r\n }",
"public String getUserGroupId() {\r\n return userGroupId;\r\n }",
"com.google.protobuf.ByteString\n getGroupIdBytes();",
"com.google.protobuf.ByteString\n getGroupIdBytes();",
"@Override\r\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\r\n\t}",
"@Override\r\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\r\n\t}",
"public String getGroupId(String name);",
"public Group getGroup() {\n return _group;\n }",
"public Long getGroupGoodId() {\n return this.groupGoodId;\n }",
"public WorkerGroupId getWorkerGroupId() {\n return workerGroupId;\n }",
"String getParentGroupId();",
"@Override\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\n\t}",
"@Override\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\n\t}",
"public TerminalRule getGROUPRule() {\n\t\treturn tGROUP;\n\t}",
"UUID getNestedGroupId();",
"BigInteger getReportGroup();"
]
| [
"0.7445978",
"0.7445315",
"0.73758024",
"0.73497677",
"0.7278491",
"0.7261302",
"0.72602254",
"0.7205412",
"0.71739036",
"0.71690696",
"0.71303475",
"0.7121507",
"0.7121507",
"0.71100515",
"0.71100515",
"0.7105779",
"0.7100299",
"0.7095626",
"0.7093404",
"0.7093404",
"0.7083833",
"0.7063567",
"0.7025663",
"0.7011035",
"0.6949571",
"0.6937666",
"0.6931133",
"0.692942",
"0.692942",
"0.692942",
"0.692942",
"0.692942",
"0.692942",
"0.6926745",
"0.6917876",
"0.6904669",
"0.6871565",
"0.6871565",
"0.6868853",
"0.6868853",
"0.68271387",
"0.6825298",
"0.6817336",
"0.6817336",
"0.6790671",
"0.6778658",
"0.6731073",
"0.6714661",
"0.6714661",
"0.6693886",
"0.6677116",
"0.6654296",
"0.6629306",
"0.6623542",
"0.6608663",
"0.65823287",
"0.65791017",
"0.6523586",
"0.65233797",
"0.65187025",
"0.6507533",
"0.64727247",
"0.64535",
"0.6432785",
"0.64207983",
"0.6416296",
"0.6396371",
"0.63931894",
"0.63775617",
"0.6376426",
"0.63461953",
"0.62836033",
"0.62801653",
"0.62762153",
"0.62690276",
"0.62689775",
"0.6241477",
"0.6241477",
"0.6231847",
"0.6213026",
"0.62123287",
"0.6211976",
"0.6207724",
"0.6205021",
"0.61787647",
"0.61787647",
"0.6168378",
"0.6168378",
"0.6163522",
"0.615614",
"0.61413956",
"0.6132749",
"0.6124424",
"0.61117345",
"0.61117345",
"0.6109083",
"0.6100111",
"0.60972536"
]
| 0.7034899 | 24 |
Returns the job ID of this job. | @Override
public long getJobId() {
return model.getJobId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"public Long getJobID() {\n return jobID;\n }",
"public String getJobID() {\n\t\t\treturn JobID;\n\t\t}",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n jobId_ = s;\n }\n return s;\n }\n }",
"@DISPID(1)\r\n\t// = 0x1. The runtime will prefer the VTID if present\r\n\t@VTID(7)\r\n\tint jobID();",
"public String getJobId() {\n\t\treturn this.jobId;\n\t}",
"public int getJobId() {\r\n\t\treturn jobId;\r\n\t}",
"public JobId job() { return Objects.requireNonNull(job, \"production revisions have no associated job\"); }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return jobId;\n }",
"public int getJobNum()\n\t{\n\t\treturn jobNum;\n\t}",
"public BigDecimal getJOB_ID() {\r\n return JOB_ID;\r\n }",
"public String getJobId();",
"java.lang.String getJobId();",
"public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}",
"public long getJobIDTarget() {\n return jobIDTarget_;\n }",
"public String getJob() {\n return job;\n }",
"public long getJobIDTarget() {\n return jobIDTarget_;\n }",
"public java.lang.String getJobNumber() {\r\n return jobNumber;\r\n }",
"public String jobRunResourceId() {\n return this.jobRunResourceId;\n }",
"long getJobIDTarget();",
"private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}",
"public int getJobId() ;",
"public String getJobReqID() {\n\t\treturn jobReqID;\n\t}",
"protected abstract String getJobSubmitId();",
"@Override\n public String getTypeID() {\n return job_id;\n }",
"com.google.protobuf.ByteString\n getJobIdBytes();",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"The identifier of the job\")\n\n public String getJob() {\n return job;\n }",
"public com.google.protobuf.ByteString\n getJobIdBytes() {\n java.lang.Object ref = jobId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n jobId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getJobIdBytes() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n jobId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static JobID generate() {\n return new JobID();\n }",
"public long getJobIDSource() {\n return jobIDSource_;\n }",
"public long getJobIDSource() {\n return jobIDSource_;\n }",
"long getJobIDSource();",
"public String getJobName() {\n return this.mJob;\n }",
"@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}",
"public String getJobName() {\n return jobName;\n }",
"public String getJobName() {\n return jobName;\n }",
"@ApiModelProperty(required = true, value = \"JobId of associated job\")\n public String getJobId() {\n return jobId;\n }",
"java.lang.String getWorkerId();",
"public String getJobName() {\n return this.jobName;\n }",
"public String getJobName() {\n return this.JobName;\n }",
"@Override\n\tpublic String getJobName() {\n\t\treturn model.getJobName();\n\t}",
"public byte[] getNextJobID() {\n // Get next job id from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetNextJobID(globalStateAccessorNativePointer);\n }\n }",
"public String getJobURI() {\n\t\treturn jobURI;\n\t}",
"public int getJobType() {\n return jobType;\n }",
"public JobVertexID getJobVertexID() {\n\t\treturn jobVertexID;\n\t}",
"public long getId() {\n\t\treturn Long.parseLong(_id);\n\t}",
"@Override\n public AsyncJob getJob() {\n final AsyncJob job = s_jobMgr.getAsyncJob(_job.getId());\n return job;\n }",
"public String getJobProperty() {\r\n return jobProperty;\r\n }",
"public int getHC_JobDataChange_ID();",
"public Long getId() {\n return pid;\n }",
"public Job getJob();",
"public String getJobInfo() {\n return jobInfo;\n }",
"@DISPID(39)\r\n\t// = 0x27. The runtime will prefer the VTID if present\r\n\t@VTID(38)\r\n\tint lastInstanceJobID();",
"@DISPID(5)\r\n\t// = 0x5. The runtime will prefer the VTID if present\r\n\t@VTID(11)\r\n\tint lastInstanceJobID();",
"public JobOrder getJob() {\n\t\tif (job == null) {\n\t\t\tsetJob(findJobOrder(getPlacement().getJobOrder().getId()));\n\t\t}\n\t\treturn job;\n\t}",
"public long getId() {\n\t\t\treturn id;\n\t\t}",
"public Long getId() {\n return this.id.get();\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.282 -0400\", hash_original_method = \"2053F7A68C82ABE32C2AF1BAEC4B5064\", hash_generated_method = \"ADA06475869C2F7BC91A27631CA3BF7E\")\n \npublic PrintJobId getId() {\n return mCachedInfo.getId();\n }",
"@Schema(description = \"The ID of the worklog record.\")\n public String getId() {\n return id;\n }",
"public Job(int id) {\n this.id = id;\n }",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public long getId() {\n\t\treturn id;\n\t}",
"public String getId() {\n if (id == null)\n return \"\"; //$NON-NLS-1$\n return id;\n }",
"public final long getId() {\r\n return id;\r\n }",
"public java.lang.Long getId () {\r\n\t\treturn id;\r\n\t}",
"public java.lang.Long getId () {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\n\t\treturn getTo(true).getId();\n\t}",
"public JobID() {\n super();\n }",
"public java.lang.Long getId();",
"public int getHC_EmployeeJob_ID();"
]
| [
"0.8271749",
"0.8113195",
"0.8083047",
"0.7655221",
"0.76297927",
"0.74121207",
"0.73976314",
"0.73945946",
"0.7306599",
"0.72754025",
"0.72754025",
"0.72754025",
"0.72491413",
"0.7198242",
"0.71916103",
"0.7168785",
"0.7090967",
"0.70737475",
"0.7042661",
"0.70117766",
"0.7000196",
"0.6991345",
"0.6939044",
"0.6921199",
"0.6896482",
"0.68913203",
"0.6874767",
"0.6837755",
"0.6779732",
"0.6777744",
"0.67618734",
"0.67564005",
"0.67031056",
"0.66764015",
"0.6627286",
"0.65784496",
"0.6571931",
"0.6563361",
"0.6403848",
"0.6393531",
"0.6393531",
"0.63886374",
"0.63674116",
"0.63665515",
"0.63431036",
"0.62494385",
"0.62230825",
"0.6191563",
"0.61611915",
"0.6149586",
"0.61415184",
"0.61344945",
"0.6132351",
"0.6129535",
"0.6126014",
"0.61200047",
"0.6117524",
"0.61174405",
"0.61034966",
"0.60905844",
"0.60552365",
"0.60519236",
"0.6040864",
"0.6034318",
"0.6024213",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.6010792",
"0.60060287",
"0.600107",
"0.5990399",
"0.5990399",
"0.5990367",
"0.5990367",
"0.5990367",
"0.5990367",
"0.5990367",
"0.5990367",
"0.5976739",
"0.59724",
"0.5957998",
"0.5957916"
]
| 0.78119063 | 3 |
Returns the job name of this job. | @Override
public String getJobName() {
return model.getJobName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getJobName() {\n return this.mJob;\n }",
"public String getJobName() {\n return jobName;\n }",
"public String getJobName() {\n return jobName;\n }",
"public String getJobName() {\n return this.jobName;\n }",
"public String getFullJobName() {\n return jobGroup + \".\" + jobName;\n }",
"public String getJobName() {\n return this.JobName;\n }",
"public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n targetJobName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n targetJobName_ = s;\n }\n return s;\n }\n }",
"public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}",
"public String getJob() {\n return job;\n }",
"java.lang.String getTargetJobName();",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getTargetJobNameBytes() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetJobName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n jobId_ = s;\n }\n return s;\n }\n }",
"@Override\n public String getTypeName() {\n return job_name;\n }",
"public com.google.protobuf.ByteString\n getTargetJobNameBytes() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetJobName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.lang.String getJobNumber() {\r\n return jobNumber;\r\n }",
"java.lang.String getJobId();",
"public String getJobTitle() {\r\n\t\treturn jobTitle;\r\n\t}",
"public String getJobTitle() {\r\n return jobTitle;\r\n }",
"com.google.protobuf.ByteString\n getTargetJobNameBytes();",
"@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}",
"public String getJobID() {\n\t\t\treturn JobID;\n\t\t}",
"public String getJob_title() {\r\n return job_title;\r\n }",
"public String getSrcJobTitle() {\r\n return (String) getAttributeInternal(SRCJOBTITLE);\r\n }",
"@Override\n public String getJobName() {\n return operate_name;\n }",
"public final String get_name() {\n return scheduler_name;\n }",
"public String getJobId();",
"public String getJobId() {\n\t\treturn this.jobId;\n\t}",
"public String getWorkerName(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.NAME);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}",
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"public String getJobInfo() {\n return jobInfo;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getTaskName() {\n Object ref = taskName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }",
"public String getName() {\n\t\treturn this.toString();\n\t}",
"public String getTaskName() {\n Object ref = taskName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskName_ = s;\n return s;\n }\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"The identifier of the job\")\n\n public String getJob() {\n return job;\n }",
"public String getJobProperty() {\r\n return jobProperty;\r\n }",
"public final String getName() {\n return \"job-priority\";\n }",
"public StringFilter getCurrentJobTitle() {\n\t\treturn currentJobTitle;\n\t}",
"public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }",
"public String getJobId() {\n return jobId;\n }",
"public String getJobVertexName() {\n\t\treturn jobVertexName;\n\t}",
"public String getName() {\n\t\tfinal String submitterName = getSubmitterName();\n\t\tif (submitterName != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"submitter_name\" + TAB + submitterName;\n\t\treturn null;\n\t}",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"public int getJobNum()\n\t{\n\t\treturn jobNum;\n\t}",
"public String getName() {\n return name.get();\n }",
"public String getDisplayName() {\n return Messages.JobProfiles_displayName();\n }",
"public final String getName() {\n\t\treturn this.name;\n\t}",
"public String getName()\r\n {\r\n return taskName;\r\n }",
"public String getName() {\n if(name == null)\n return \"\"; \n return name;\n }",
"@Override\n\tpublic String getQueueName() {\n\t\treturn model.getQueueName();\n\t}",
"public void setJobName(String jobName) {\n this.jobName = jobName;\n }",
"public void setJobName(String jobName) {\n this.jobName = jobName;\n }",
"public void setJobName(String jobName) {\n this.jobName = jobName;\n }",
"public String getJobURI() {\n\t\treturn jobURI;\n\t}",
"public final String getName() {\n return this.name;\n }",
"public Long getJobID() {\n return jobID;\n }",
"public Job getJob();",
"public String getJobDescription() {\r\n return jobDescription;\r\n }",
"public String getTheName() {\n\t\treturn name.getText();\n\t}",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"public String getName() {\r\n return this.name();\r\n }",
"public String getName() {\r\n assert name != null;\r\n return name;\r\n }",
"@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}",
"public JobId job() { return Objects.requireNonNull(job, \"production revisions have no associated job\"); }",
"public final String getName() {\n\treturn name.getName();\n }",
"public String getName() {\n return (String) getValue(NAME);\n }",
"public String getName() {\n\t\t\treturn this.name;\n\t\t}",
"public static String getName() {\n return name;\n }",
"public String getName()\n\t\t{\n\t\t\treturn this.name;\n\t\t}",
"@NonNull\n public String getName() {\n return mBundle.getString(NAME_FIELD, \"\");\n }",
"public String getName()\n {\n return (this.name);\n }",
"String getTaskName();",
"String getTaskName();",
"java.lang.String getQueueName();",
"public String getName()\n\t{\n\n\t\treturn this.name;\n\t}",
"public String getName() {\n\n\t\treturn name;\n\t}",
"public String getName() {\n\n\t\treturn name;\n\t}",
"@Override\n\tpublic String getName() {\n\t\tfinal PsiElement nameIdentifier = getNameIdentifier();\n\t\treturn nameIdentifier != null ? nameIdentifier.getText() : getText();\n\t}",
"@Override\r\n\tpublic T getJob() {\n\t\treturn super.getJob();\r\n\t}",
"public String getJobDesc()\n\t{\n\t\treturn jobDesc;\n\t}",
"public String getName() {\r\n if (target != null) {\r\n return target.getName();\r\n }\r\n\r\n if (benchmark != null) {\r\n return benchmark.getName();\r\n }\r\n\r\n return \"\";\r\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public com.google.protobuf.ByteString\n getJobIdBytes() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n jobId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static String getJobTitle(final File file) throws IOException {\n final FileReader fileReader = new FileReader(file);\n final LineNumberReader lnreader = new LineNumberReader(fileReader);\n String jobTitle = file.getName();\n String line = lnreader.readLine();\n while (line != null && line.length() > 0) {\n if (line.replace(\" \", \"\").trim().startsWith(\"--partialJobStatus=\")) {\n jobTitle = line.substring(line.indexOf('=') + 1, line.length());\n break;\n }\n line = lnreader.readLine();\n }\n fileReader.close();\n lnreader.close();\n return jobTitle;\n }",
"public String getName() {\n\t\treturn(name);\n\t}",
"public Object getName() {\n\t\treturn this.name;\n\t}",
"public Object getName() {\n\t\treturn this.name;\n\t}",
"public String getCurrentPrintJob()\n {\n return printerSimulator.getCurrentPrintJob();\n }",
"public String getName() {\n\t\treturn this.name;\n\t}",
"public String getName() {\n\t\treturn this.name;\n\t}"
]
| [
"0.8460826",
"0.8334659",
"0.8334659",
"0.8331817",
"0.826576",
"0.82594377",
"0.7584036",
"0.75188726",
"0.74125636",
"0.7377845",
"0.73129517",
"0.72162914",
"0.7197899",
"0.71758336",
"0.71473867",
"0.714226",
"0.71056825",
"0.70087093",
"0.70021164",
"0.69779503",
"0.69685405",
"0.6918601",
"0.68491274",
"0.6840104",
"0.6801181",
"0.678347",
"0.67367965",
"0.6701316",
"0.6680866",
"0.66399616",
"0.66322315",
"0.6611639",
"0.65913767",
"0.6582546",
"0.6582546",
"0.6582546",
"0.6580025",
"0.6567944",
"0.65619963",
"0.65512484",
"0.65363145",
"0.6534808",
"0.65075547",
"0.650192",
"0.6467979",
"0.6428004",
"0.64235187",
"0.6399647",
"0.63839966",
"0.63759303",
"0.6361759",
"0.63498265",
"0.63214487",
"0.6301718",
"0.6276334",
"0.6268957",
"0.62520856",
"0.62520856",
"0.62520856",
"0.6246251",
"0.6239149",
"0.6238776",
"0.62363875",
"0.6234607",
"0.6214518",
"0.6209801",
"0.6207029",
"0.6202258",
"0.6184806",
"0.6183282",
"0.6177822",
"0.617488",
"0.61722815",
"0.6166429",
"0.61589175",
"0.6146941",
"0.61469024",
"0.61242676",
"0.61242676",
"0.61075413",
"0.61057687",
"0.61031276",
"0.61031276",
"0.6103121",
"0.609902",
"0.60978574",
"0.6088117",
"0.60849434",
"0.60849434",
"0.60849434",
"0.60849434",
"0.60849434",
"0.6082672",
"0.60809934",
"0.6079888",
"0.60766536",
"0.60766536",
"0.6072636",
"0.60684",
"0.60684"
]
| 0.8327268 | 4 |
Returns the job status of this job. | @Override
public int getJobStatus() {
return model.getJobStatus();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JobStatus getStatus();",
"public Integer getJobStatus() {\n return jobStatus;\n }",
"public String getJobStatus() {\n return this.jobStatus;\n }",
"public String getJobStatus() {\n return this.jobStatus;\n }",
"public StatusCheckDataObject getJob_StatusCheck() {\r\n return job_StatusCheck;\r\n }",
"public String getJobStatus(Job job) throws IOException,\n\t\t\tClassNotFoundException {\n\t\tjob = get(Job.class, job.getID());\n\t\treturn job.getStatus();\n\t}",
"public BatchStatus getStatus() {\n return this.status;\n }",
"public int getJobState() {\n return jobState;\n }",
"public JenkinsStatus getStatus() {\n return status;\n }",
"public UpdateStatus status() {\n return this.status;\n }",
"public long getStatus() {\r\n return status;\r\n }",
"public java.lang.Object getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public Status getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n return status;\n }",
"public Long getStatus() {\n return this.Status;\n }",
"public Status getStatus() {\n return result;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn _status;\n\t}",
"public String getStatus(){\n\t\t\n\t\treturn this.status;\n\t}",
"public Integer getStatus() {\n\t\treturn status;\n\t}",
"public Integer getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus () {\r\n return status;\r\n }",
"public String getStatus()\n {\n\n return status;\n }",
"public com.google.protobuf.ByteString getStatus() {\n return instance.getStatus();\n }",
"public java.lang.String getStatus () {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\n return this.Status;\n }",
"public String getStatus() {\n return this.Status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return getProperty(Property.STATUS);\n }",
"public Status getStatus()\n\t{\n\t\treturn status;\n\t}",
"public RunStatus status() {\n return this.status;\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }"
]
| [
"0.860251",
"0.8535766",
"0.8528925",
"0.8528925",
"0.76181036",
"0.7573674",
"0.7373649",
"0.73202854",
"0.72894305",
"0.72129816",
"0.7167171",
"0.71622926",
"0.71517277",
"0.71517277",
"0.7139759",
"0.7139759",
"0.7139759",
"0.7139759",
"0.7120053",
"0.7120053",
"0.7110257",
"0.7106787",
"0.7106787",
"0.7106787",
"0.7106787",
"0.7106787",
"0.71009195",
"0.70968753",
"0.7092614",
"0.70703137",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7068765",
"0.7057479",
"0.7057479",
"0.7057479",
"0.7057479",
"0.7057479",
"0.70491326",
"0.70491326",
"0.70491326",
"0.70491326",
"0.70491326",
"0.70463735",
"0.70442677",
"0.70331377",
"0.70331377",
"0.702992",
"0.7027277",
"0.70262176",
"0.702194",
"0.70180464",
"0.70180464",
"0.7010589",
"0.7010589",
"0.7010589",
"0.7010589",
"0.7010589",
"0.7010589",
"0.7010589",
"0.69970703",
"0.69964695",
"0.69961965",
"0.6993278",
"0.6993278",
"0.6980296",
"0.6980296",
"0.6980296",
"0.6980296",
"0.6980296",
"0.6980296",
"0.6980296",
"0.6980296",
"0.6980296"
]
| 0.84065837 | 4 |
Returns the log file name of this job. | @Override
public String getLogFileName() {
return model.getLogFileName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String logFile(AggregatedJob job) {\n StringBuffer sb = new StringBuffer(32);\n if (mGlobalLog) {\n // the basename of the log file is derived from the dag name\n sb.append(this.mClusteredADag.getLabel());\n } else {\n // per seqexec job name\n sb.append(job.getName());\n }\n sb.append(this.SEQEXEC_PROGRESS_REPORT_SUFFIX);\n return sb.toString();\n }",
"public String getOutputLogFilename() {\n return outputLogFilename;\n }",
"public String getLogFile() {\n return logFile;\n }",
"public String getLogName() {\n return logName;\n }",
"public String getInputLogFilename() {\n return inputLogFilename;\n }",
"abstract protected String getLogFileName();",
"@DISPID(19)\r\n\t// = 0x13. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.lang.String logFilename();",
"public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }",
"public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}",
"public String genLogFilePath() {\n\n\t\tString logFileName = generateFileName();\n\t\tString logFilePath = FileIoUtils.getLogFilePathPrefix(logFileName)\n\t\t\t\t+ \"/\" + logFileName;\n\t\treturn logFilePath;\n\n\t}",
"public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }",
"public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}",
"public String getFileName() {\n\t\treturn file.getFileName();\n\t}",
"public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}",
"public String getFileName() {\n\t\treturn file.getName();\n\t}",
"public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"public String getLogFile() {\n return agentConfig.getLogFile();\n }",
"String getFullWorkfileName();",
"public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }",
"public final String getFileName() {\n return this.fileName;\n }",
"public String getFileName()\n {\n return getString(\"FileName\");\n }",
"@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }",
"@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}",
"public final String getFileName()\r\n {\r\n return _fileName;\r\n }",
"public String getFileName()\n {\n return getJarfileName();\n }",
"public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}",
"public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}",
"private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}",
"private String generateFileName() {\n\t\t\n\t\treturn \"/tmp/logger.java_log\" + new Random().nextInt();\n\t}",
"public String getBundleFileName()\n {\n if ( bundleFileName == null )\n {\n bundleFileName = artifact.getFile().getName();\n }\n return bundleFileName;\n }",
"protected String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getOutputFileName() {\n return outputFileName.getText();\n }",
"public String getFileName() {\n return mFileNameTextField == null ? \"\" : mFileNameTextField.getText(); //$NON-NLS-1$\n }",
"public String getName() {\n return _file.getAbsolutePath();\n }",
"java.lang.String getTargetJobName();",
"public String getFileName() {\r\n\t\treturn fileName;\r\n\t}",
"public String getFileName() {\r\n\t\treturn fileName;\r\n\t}",
"public String getFileName() {\r\n\t\treturn fileName;\r\n\t}",
"public String getFullJobName() {\n return jobGroup + \".\" + jobName;\n }",
"private String setFileName() {\n Calendar c = Calendar.getInstance();\n\n String LOG = \"\";\n\n LOG += c.get(Calendar.YEAR);\n\n if (c.get(Calendar.MONTH) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MONTH) + 1;\n\n if (c.get(Calendar.DATE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.DATE);\n\n if (c.get(Calendar.HOUR_OF_DAY) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.HOUR_OF_DAY);\n\n if (c.get(Calendar.MINUTE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MINUTE);\n\n LOG += \".csv\";\n\n return LOG;\n }",
"public String getFileName() {\n return this.fileName;\n }",
"public String getFileName() {\n return this.fileName;\n }",
"public String fileName() {\n return this.fileName;\n }",
"public String fileName() {\n return this.fileName;\n }",
"public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }",
"public String getFileName() {\n return ScreenRecordService.getFileName();\n }",
"public String GetFileName() {\r\n\treturn fileName;\r\n }",
"public String getFileName() {\r\n return fileName;\r\n }",
"public String getFileName() {\r\n return fileName;\r\n }",
"public String getFileName() {\r\n return fileName;\r\n }",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String fileName () {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}",
"public String getName()\n {\n return( file );\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private String getFileName()\r\n {\r\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd__HH_mm\");\r\n \r\n String ret = new String();\r\n ret += preferences.getPreference(UserPreferences.SAVE_LOCATION_PROP);\r\n ret += format.format(new Date());\r\n \r\n String notationStr = notation.getText().trim();\r\n if (!notationStr.isEmpty()) \r\n {\r\n ret += \"__\" + notationStr.replaceAll(\" \\t/\\\\:\", \"_\");\r\n }\r\n \r\n ret += \".csv\";\r\n \r\n return ret;\r\n }",
"public String getFileName()\r\n {\r\n return fileName;\r\n }",
"public static String getLastFileName()\r\n\t{\r\n\t\treturn _outputFileName;\r\n\t}",
"public String getFileName()\n\t{\n\t\treturn fileName;\n\t}",
"public String getFileName()\n\t{\n\t\treturn fileName;\n\t}",
"public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }",
"public String getFileName(){\n\t\treturn _fileName;\n\t}",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"public String getFileName() {\n return fileName;\n }",
"protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getName() { return FilePathUtils.getFileName(getPath()); }",
"public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n targetJobName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getName() {\n\t\treturn filename;\n\t}",
"java.lang.String getFilename();",
"java.lang.String getFilename();",
"Path getLogFilePath();",
"public String getNameForFileSystem() {\r\n\t\treturn filename;\r\n\t}"
]
| [
"0.7614439",
"0.6923469",
"0.6887194",
"0.68633",
"0.6860841",
"0.68440765",
"0.6747199",
"0.668288",
"0.6664287",
"0.6656549",
"0.66547936",
"0.6579125",
"0.65735394",
"0.6533476",
"0.64789283",
"0.6477462",
"0.6447208",
"0.6447208",
"0.6447208",
"0.6447208",
"0.6447208",
"0.6447208",
"0.6447208",
"0.6447208",
"0.6447208",
"0.6444796",
"0.64123064",
"0.63734365",
"0.6371395",
"0.63422495",
"0.63360226",
"0.6332551",
"0.6311325",
"0.62944597",
"0.6269185",
"0.6265238",
"0.6234652",
"0.6234555",
"0.61769396",
"0.61747813",
"0.6167448",
"0.61672544",
"0.6165805",
"0.61594415",
"0.61593264",
"0.61593264",
"0.61593264",
"0.61539775",
"0.6144131",
"0.6139092",
"0.6139092",
"0.6137535",
"0.6137535",
"0.61306727",
"0.6122935",
"0.6115879",
"0.61156476",
"0.61156476",
"0.61156476",
"0.61027104",
"0.61027104",
"0.61027104",
"0.61027104",
"0.61027104",
"0.6094333",
"0.60879046",
"0.6081007",
"0.6073285",
"0.6073285",
"0.6073285",
"0.6073285",
"0.6073285",
"0.6073285",
"0.60708344",
"0.60673803",
"0.6066226",
"0.6065603",
"0.6065603",
"0.60578173",
"0.60575294",
"0.60509074",
"0.60509074",
"0.60509074",
"0.60509074",
"0.60509074",
"0.60509074",
"0.60509074",
"0.60509074",
"0.60509074",
"0.60509074",
"0.6050197",
"0.6036128",
"0.6036128",
"0.60170716",
"0.60100144",
"0.5993562",
"0.59915596",
"0.59915596",
"0.5989185",
"0.5986196"
]
| 0.75128746 | 1 |
Returns the modified date of this job. | @Override
public Date getModifiedDate() {
return model.getModifiedDate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getModified() {\r\n\t\treturn modified;\r\n\t}",
"public String getDatemodified() {\n return datemodified;\n }",
"public Date getModifiedDate() {\n return this.modifiedDate;\n }",
"public Date getModifiedDate() {\n return this.modifiedDate;\n }",
"public String getDatemodified() {\n\t\treturn datemodified;\n\t}",
"public Date getModifiedDate() {\n\t\treturn modifiedDate;\n\t}",
"public java.lang.String getModifiedDate() {\r\n return modifiedDate;\r\n }",
"public Date getModifiedDate() {\r\n return modifiedDate;\r\n }",
"public Date getModifiedDate() {\r\n return modifiedDate;\r\n }",
"public Date getModifiedDate() {\n return modifiedDate;\n }",
"public java.util.Date getDateModified(){\r\n\t\treturn dateModified;\r\n\t}",
"public Date getModifiedDate();",
"public Date getModifiedDate();",
"public Date getModifiedDate();",
"public Date getModifieddate() {\n return modifieddate;\n }",
"@Override\n\tpublic Date getModifiedDate() {\n\t\treturn _changesetEntry.getModifiedDate();\n\t}",
"public Date getModificationTime()\n {\n return modified;\n }",
"public Date getModifiedTime() {\n return modifiedTime;\n }",
"@Override\n\tpublic Date getModifiedDate();",
"@Override\n\tpublic Date getModifiedDate();",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _employee.getModifiedDate();\n\t}",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _dmGtStatus.getModifiedDate();\n\t}",
"public Date getDateModified();",
"public Date getMODIFIED_DATE() {\r\n return MODIFIED_DATE;\r\n }",
"public Date getModifiedDate() {\n return (Date) getAttributeInternal(MODIFIEDDATE);\n }",
"public Timestamp getModifiedDate() {\r\n return (Timestamp) getAttributeInternal(MODIFIEDDATE);\r\n }",
"public java.util.Date getModified_date() {\n\t\treturn _primarySchoolStudent.getModified_date();\n\t}",
"public final long getModifyDateTime() {\n \treturn m_modifyDate;\n }",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _candidate.getModifiedDate();\n\t}",
"public java.util.Date getModifiedDate() {\n\t\treturn _dmHistoryMaritime.getModifiedDate();\n\t}",
"public Date getDATE_MODIFIED() {\r\n return DATE_MODIFIED;\r\n }",
"public Date getDATE_MODIFIED() {\r\n return DATE_MODIFIED;\r\n }",
"public Date getDATE_MODIFIED() {\r\n return DATE_MODIFIED;\r\n }",
"public java.sql.Timestamp getModified() {\n return modified;\n }",
"public long getModificationTime()\n {\n return modDate * 1000L;\n }",
"@Override\n public java.util.Date getModifiedDate() {\n return _partido.getModifiedDate();\n }",
"public long modified() {\n return lastModified;\n }",
"@JsonProperty(\"Date Modified\")\n\tString getModified() {\n\t\treturn getDate(modified);\n\t}",
"public Calendar getModifiedTime() {\n return this.modifiedTime;\n }",
"public Date getModificationTime()\n\t{\n\t\treturn modificationTime;\n\t}",
"public Date getDateModifed(){return dateModified;}",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _locMstLocation.getModifiedDate();\n\t}",
"public String getModifiedTime() {\n return modifiedTime;\n }",
"public java.util.Date getModifyTime() {\r\n return modifyTime;\r\n }",
"public java.lang.String getModifyDate() {\n java.lang.Object ref = modifyDate_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n modifyDate_ = s;\n return s;\n }\n }",
"public Timestamp getCreateModifiedDate() {\n return createModifiedDate;\n }",
"public Timestamp getCreateModifiedDate() {\n return createModifiedDate;\n }",
"public Timestamp getCreateModifiedDate() {\n return createModifiedDate;\n }",
"public Date getModifyTime() {\r\n return modifyTime;\r\n }",
"public Date getModifyTime() {\n\t\treturn modifyTime;\n\t}",
"public Date getModifyTime() {\n\t\treturn modifyTime;\n\t}",
"public Date getModifyTime() {\n\t\treturn modifyTime;\n\t}",
"@Override\n\tpublic Date getModifiedDate() {\n\t\treturn _second.getModifiedDate();\n\t}",
"public Date getClModifyTime() {\r\n\t\treturn clModifyTime;\r\n\t}",
"public java.lang.String getModifyDate() {\n java.lang.Object ref = modifyDate_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n modifyDate_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"public Date getModifyTime() {\n return modifyTime;\n }",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _scienceApp.getModifiedDate();\n\t}",
"public Date getModifyTime() {\n return this.modifyTime;\n }",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _esfTournament.getModifiedDate();\n\t}",
"public Date getModifyDate() {\n return modifyDate;\n }",
"public Date getModifyDate() {\n return modifyDate;\n }",
"public Date getModifyDate() {\n return modifyDate;\n }",
"public Date getLastModifyTime() {\n return lastModifyTime;\n }",
"public Date getModifiedon()\n {\n return (Date)getAttributeInternal(MODIFIEDON);\n }",
"public Date getdModifyDate() {\r\n return dModifyDate;\r\n }",
"public Date getdModifyDate() {\r\n return dModifyDate;\r\n }",
"public String getModifyTime() {\n return modifyTime;\n }",
"public Date getModifytime() {\n return modifytime;\n }",
"@java.lang.Override\n public long getModifiedTimestamp() {\n return modifiedTimestamp_;\n }",
"@Override\n\tpublic Date getModifiedDate() {\n\t\treturn _paper.getModifiedDate();\n\t}",
"public Date getModificationDate() {\n return m_module.getConfiguration().getModificationDate();\n }",
"public java.sql.Timestamp getModified() {\n\treturn modified;\n}",
"public Date getLastModifyDate() {\n return lastModifyDate;\n }",
"@java.lang.Override\n public long getModifiedTimestamp() {\n return modifiedTimestamp_;\n }",
"public String getModifyEndTime() {\n return modifyEndTime;\n }",
"public String getModifyStartTime() {\n return modifyStartTime;\n }",
"@Raw @Basic\r\n public Date getModificationTime() {\r\n return modificationTime;\r\n }",
"@Override\n\tpublic Date getModifiedDate() {\n\t\treturn _userTracker.getModifiedDate();\n\t}",
"@JsonProperty(\"modified_date\")\n\tpublic Date getModified_date() {\n\t\treturn modifiedDate;\n\t}",
"public String getModifytime() {\n return modifytime;\n }",
"public String getModifyTime() {\r\n\t\treturn modifyTime;\r\n\t}",
"public String getModifyTime() {\r\n\t\treturn modifyTime;\r\n\t}",
"public String getModifyTime() {\r\n\t\treturn modifyTime;\r\n\t}",
"public String getModifyTime() {\r\n\t\treturn modifyTime;\r\n\t}",
"public DateTime modificationTime() {\n return this.modificationTime;\n }",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _dmGTShipPosition.getModifiedDate();\n\t}",
"public Date getModificationDate() {\r\n\t\treturn oModificationDate;\r\n\t}",
"Date getModifyDate();",
"public java.sql.Timestamp getModified() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Timestamp) __getCache(\"modified\")));\n }",
"public Long getLastModifiedDate()\r\n\t{\r\n\t\treturn lastModifiedDate;\r\n\t}"
]
| [
"0.7991442",
"0.7984864",
"0.79323053",
"0.79323053",
"0.791545",
"0.7899826",
"0.7883279",
"0.7855846",
"0.7855846",
"0.78488314",
"0.7844509",
"0.7828126",
"0.7828126",
"0.7828126",
"0.7812615",
"0.7751036",
"0.7741801",
"0.7692248",
"0.76777726",
"0.76777726",
"0.7667307",
"0.7663173",
"0.76521933",
"0.7638805",
"0.76323205",
"0.7630972",
"0.75755996",
"0.75182873",
"0.74792296",
"0.7474746",
"0.747303",
"0.747303",
"0.747303",
"0.7462802",
"0.74443734",
"0.7440341",
"0.7439725",
"0.741351",
"0.741005",
"0.74053454",
"0.7401928",
"0.73902583",
"0.7389842",
"0.7373718",
"0.7372653",
"0.7360541",
"0.7360541",
"0.7360541",
"0.73566014",
"0.7354519",
"0.7354519",
"0.7354519",
"0.73543286",
"0.73514134",
"0.7343663",
"0.73370224",
"0.73370224",
"0.73370224",
"0.73370224",
"0.73370224",
"0.73370224",
"0.73370224",
"0.73370224",
"0.73370224",
"0.73318595",
"0.72855836",
"0.7272834",
"0.7265603",
"0.7265603",
"0.7265603",
"0.7258628",
"0.724723",
"0.72464204",
"0.72464204",
"0.7245124",
"0.72381985",
"0.72381556",
"0.72338754",
"0.7223488",
"0.7211366",
"0.7198028",
"0.71951777",
"0.7195156",
"0.7182305",
"0.71774745",
"0.71726334",
"0.71577317",
"0.71486026",
"0.7145709",
"0.7145709",
"0.7145709",
"0.7145709",
"0.71444625",
"0.71382594",
"0.7128705",
"0.7123754",
"0.71190757",
"0.71018726"
]
| 0.7605887 | 28 |
Returns the nodes of this job. | @Override
public int getNodes() {
return model.getNodes();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Nodes nodes() {\n return this.nodes;\n }",
"public Node[] getNodes() {\n\t\treturn nodes;\n\t}",
"public Map<String, Node> nodes() {\n return this.nodes;\n }",
"public List<Node> getNodes() {\n List<Node> list = getNodes(false, false);\n return list;\n }",
"public List<Nodes> getNodes() {\n return nodes;\n }",
"public List<OSMNode> nodes() {\n return nodes;\n }",
"public List<Node> getNodes();",
"List<Node> getNodes();",
"public Vector<Node> getNodes(){\n\t\treturn this.listOfNodes;\n\t}",
"public MyArrayList<Node> getNodes() {\n return this.nodes;\n }",
"public Set<DefaultGraphCell> getNodes() {\n return nodes;\n }",
"public Nodes getNodes()\n {\n return nodes;\n }",
"java.util.List<io.netifi.proteus.admin.om.Node> \n getNodesList();",
"public HashSet<Node> getNodes(){\n\t\t\n\t\t//Return nodes hashset\n\t\treturn this.nodes;\n\t\t\n\t}",
"java.util.List<entities.Torrent.NodeId>\n getNodesList();",
"public java.util.List<entities.Torrent.NodeId> getNodesList() {\n if (nodesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(nodes_);\n } else {\n return nodesBuilder_.getMessageList();\n }\n }",
"public HashMap<Integer, Node> getNodeList()\n\t{\n\t\treturn nodeManager.getNodes();\n\t}",
"@java.lang.Override\n public java.util.List<entities.Torrent.NodeId> getNodesList() {\n return nodes_;\n }",
"private List<Node> getNodes() {\n List<Node> nodes = new ArrayList<Node>();\n NodeApi.GetConnectedNodesResult rawNodes =\n Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();\n for (Node node : rawNodes.getNodes()) {\n nodes.add(node);\n }\n return nodes;\n }",
"public LinkedList<AbstractNode> getNodes() {\n\t\treturn nodes;\n\t}",
"public Set<String> getAllNodes() {\n return this.graph.keySet();\n }",
"@Override\n\tpublic synchronized Set<PetrinetNode> getNodes() {\n\t\tSet<PetrinetNode> nodes = new HashSet<PetrinetNode>();\n\t\tnodes.addAll(this.transitions);\n\t\tnodes.addAll(this.places);\n\t\treturn nodes;\n\t}",
"@java.lang.Override\n public java.util.List<? extends entities.Torrent.NodeIdOrBuilder>\n getNodesOrBuilderList() {\n return nodes_;\n }",
"@Override\n public Set<EventNode> getNodes() {\n return nodes;\n }",
"public Node[] getNodes()\r\n {\r\n if(nodes == null)\r\n\t{\r\n\t nodes = new Node[numNodes()];\r\n\t int i = 0;\r\n\t for (final NodeTypeHolder nt : ntMap.values())\r\n\t\tfor (final Node node : nt.getNodes())\r\n\t\t nodes[i++] = node;\r\n\t}\r\n return nodes.clone();\r\n }",
"List<Node> nodes();",
"public Set<Node<E>> getNodes(){\n return nodes.keySet();\n }",
"public ArrayList<GraphNode> getNodes() {\n return selectedNodes;\n }",
"public java.util.List<? extends entities.Torrent.NodeIdOrBuilder>\n getNodesOrBuilderList() {\n if (nodesBuilder_ != null) {\n return nodesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(nodes_);\n }\n }",
"protected abstract Node[] getAllNodes();",
"public List<Node> getAllNodes() {\n return nodeRepository.findAll();\n }",
"public int getNumNodes() {\n\t\treturn nodes.size();\n\t}",
"protected ArrayList<AStarNode> getNodes() {\n return nodes;\n }",
"public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode> getNodeList() {\n if (nodeBuilder_ == null) {\n return java.util.Collections.unmodifiableList(node_);\n } else {\n return nodeBuilder_.getMessageList();\n }\n }",
"java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode> \n getNodeList();",
"java.util.List<? extends entities.Torrent.NodeIdOrBuilder>\n getNodesOrBuilderList();",
"public ArrayList<Node> getListNodes(){\r\n return listNodes;\r\n }",
"public List<INode> getAllNodes();",
"public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}",
"@Override\r\n\tpublic Iterable<Entity> getNodes()\r\n\t{\n\t\treturn null;\r\n\t}",
"public Collection<Node> getNodeList(){\r\n return nodesMap.values();\r\n }",
"public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode> getNodeList() {\n return node_;\n }",
"@java.lang.Override\n public int getNodesCount() {\n return nodes_.size();\n }",
"@Override\r\n\tpublic List<JedisPool> getNodes() {\n\t\treturn Collections.emptyList();\r\n\t}",
"public List<TbNode> getAll() {\n return qureyNodeList(new NodeParam());\n }",
"public int nodesCount() {\n return nodes.size();\n }",
"public Node[] getNodeArray() {\n return this.nodeArray;\n }",
"List<CyNode> getNodeList();",
"public String getLiveNodes()\n {\n return ssProxy.getLiveNodes();\n }",
"Collection<Node> allNodes();",
"List<String> getNodeNames()\n {\n return allNodes.values().stream().map(CommunicationLink::getName).collect(Collectors.toList());\n }",
"public ArrayList<NodeRef> getDataNodes() {\r\n\t\tArrayList<NodeRef> slaves = new ArrayList<NodeRef>();\r\n\t\tfor (NodeRef node : nodeMap.values()) {\r\n\t\t\tslaves.add(node);\r\n\t\t}\r\n\t\treturn slaves;\r\n\t}",
"@Override\n public abstract Collection<? extends GraphNode<N, E>> getNodes();",
"Iterable<Long> vertices() {\n return nodes.keySet();\n }",
"java.util.List<com.zibea.recommendations.webserver.core.dao.proto.AttributesMapProto.Map.KeyValue> \n getNodesList();",
"public Node[] getSelectedNodes() {\n return selectedNodes;\n }",
"@Override\n public Collection<? extends INode> getNodes() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.nodeMap\n .values()));\n }",
"public List<Output<TInt32>> nodeIdsList() {\n return nodeIdsList;\n }",
"public List<JobNode> getSeries() {\n\t\treturn null;\n\t}",
"public static Collection<SxpNode> getNodes() {\n return Collections.unmodifiableCollection(NODES.values());\n }",
"public static Set<Node> getCheckedoutNodes() {\n return checkedOutNodes.get();\n }",
"@Override\n\tpublic List<N> getNodeList()\n\t{\n\t\treturn new ArrayList<N>(nodeList);\n\t}",
"public List<byte[]> getAllNodeInfo() {\n // Fetch a node list with protobuf bytes format from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetAllNodeInfo(globalStateAccessorNativePointer);\n }\n }",
"public Collection<DBNode> getNodeList() {\n \n if (!isTable()) {\n // if not a table assume all until more intelligence\n // added\n return client.getSysDatabase().getDBNodeList();\n }\n return getSysTable().getNodeList();\n }",
"public Object[] getStartNodes ();",
"@Override\n\tpublic long numNodes() {\n\t\treturn numNodes;\n\t}",
"java.util.List<? extends io.netifi.proteus.admin.om.NodeOrBuilder> \n getNodesOrBuilderList();",
"public List<NodeInfo> getStoredNodes() {\n List<NodeInfo> nodes = new ArrayList<>();\n\n SearchResponse response = client.prepareSearch(\"k8s_*\").setTypes(\"node\").setSize(10000).get();\n\n SearchHit[] hits = response.getHits().getHits();\n log.info(String.format(\"The length of node search hits is [%d]\", hits.length));\n\n ObjectMapper mapper = new ObjectMapper();\n try {\n for (SearchHit hit : hits) {\n// log.info(hit.getSourceAsString());\n NodeInfo node = mapper.readValue(hit.getSourceAsString(), NodeInfo.class);\n nodes.add(node);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"private Collection<Node> getNodes()\r\n\t{\r\n\t return nodeMap.values();\r\n\t}",
"public int getNetworkNodesNumber() {\n\t\t\n\t\t//Return nodes size\n\t\treturn nodes.size();\n\t\t\n\t}",
"public int getNodesCount() {\n if (nodesBuilder_ == null) {\n return nodes_.size();\n } else {\n return nodesBuilder_.getCount();\n }\n }",
"int getNrNodes() {\n\t\treturn adjList.size();\n\t}",
"@Override\n public List<GraphNode> getNodes() {\n List<String> namesOfFiles = ProjectFileNamesUtil.getFileNamesFromProject(project.getBaseDir());\n this.relations = RelationsService.getRelations(project, namesOfFiles);\n List<GraphNode> nodes = new ArrayList<>();\n nodeHashTable = new Hashtable();\n nodeHashTable.clear();\n resultsOfRanTests = HashtableResultsUtil.copyHashtableTestResults(TestResultsCollector.getInstance().getTestResults());\n int i = 0;\n for (String nameOfFile : namesOfFiles){ //for each name of file\n String[] str = nameOfFile.split(\"/\");\n String file = str[str.length-1];\n Hashtable fileTestResults = (Hashtable) resultsOfRanTests.get(file.replace(\".py\",\"\"));\n if (nodeHashTable.get(file)!=null){ //a node with this name already exists\n file=file.concat(\" (\" + i++ + \")\");\n }\n CoverageNode node = new CoverageNode(file,nameOfFile);\n node.setCoverage(GetOnlyCoveragedFileNames.getCovForFile(file,project)); //get coverage\n node.getTypes().add(\"Coverage is: \" + node.getCoverage() + \"%.\");\n node.setColor(node.getCoverage()/10);\n if (fileTestResults != null) { //check for test changes in node\n node.setOutColorNumber(getNodeOutColor(fileTestResults));\n }\n HashMap<String, Object> properties = new HashMap<>();\n getPropertiesForNodes(properties, nameOfFile);\n ResultsPropertyContainer resultsPropertyContainer = new ResultsPropertyContainer(properties);\n node.setResultsPropertyContainer(resultsPropertyContainer);\n nodeHashTable.put(file, node);\n nodes.add(node);\n }\n if (HashtableResultsUtil.getInstance().getOnlyCoveraged()) { //this runs if we want only coveraged nodes\n nodes = doCleaning(nodes);\n }\n HashtableResultsUtil.getInstance().setNodes(nodes);\n return nodes;\n }",
"public List<Long> getSessionNodes() {\n List<Long> ret = new ArrayList<>();\n\n for (int i = 0; i < sessionsList.size(); i++) {\n ret.add(sessionsList.get(i).dhtNodes());\n }\n\n return ret;\n }",
"public NodesHistory nodesHistory() {\n return this.nodesHistory;\n }",
"public int numNodes() {\n return nodeVector.size();\n }",
"io.netifi.proteus.admin.om.Node getNodes(int index);",
"public NameNode namenodes() {\n\t\tString uri = SystemConfig.getProperty(\"hive.cube.hdfs.web\");\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tNameNode nn = new NameNode();\n\t\ttry {\n\t\t\tURL url = new URL(uri + HDFS.NAMENODE_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject obj = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONArray array = JSON.parseArray(obj.getString(\"beans\"));\n\t\t\tJSONObject tmp = (JSONObject) array.get(0);\n\t\t\tnn.setCapacity(tmp.getLong(\"Total\"));\n\t\t\tnn.setClusterStartTime(CalendarUtils.formatLocale(tmp.getString(\"NNStarted\")));\n\t\t\tnn.setDeadNodes(JSON.parseObject(tmp.getString(\"DeadNodes\")).size());\n\t\t\tnn.setDecomNodes(JSON.parseObject(tmp.getString(\"DecomNodes\")).size());\n\t\t\tnn.setDfsRemaining(tmp.getLong(\"Free\"));\n\t\t\tnn.setDfsUsed(tmp.getLong(\"Used\"));\n\t\t\tnn.setLiveNodes(JSON.parseObject(tmp.getString(\"LiveNodes\")).size());\n\t\t\tnn.setNonDFSUsed(tmp.getLong(\"NonDfsUsedSpace\"));\n\t\t\tnn.setVersion(tmp.getString(\"SoftwareVersion\"));\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Get hadoop namenode data has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn nn;\n\t}",
"public int numNodes() {\n\t\treturn numNodes;\n\t}",
"int getNodeCount() {\n\t\treturn m_list_nodes.size();\n\t}",
"public HashMap<Integer, DagNode> getDagNodes(){\n return nodes;\n }",
"public int getNodeCount() {\n return node_.size();\n }",
"public List<Node> getAll() throws SQLException {\n var nodes = new ArrayList<Node>();\n var statement = connection.createStatement();\n var result = statement.executeQuery(\"SELECT identifier, x, y, parentx, parenty, status, owner, description FROM nodes\");\n while (result.next()) {\n nodes.add(\n new Node(\n result.getInt(\"identifier\"),\n result.getInt(\"x\"),\n result.getInt(\"y\"),\n result.getInt(\"parentx\"),\n result.getInt(\"parenty\"),\n result.getString(\"status\"),\n result.getString(\"owner\"),\n result.getString(\"description\")\n )\n );\n }\n result.close();\n statement.close();\n return nodes;\n }",
"public List<LayoutNode> getNodeList() {\n\treturn nodeList;\n }",
"public java.util.List<entities.Torrent.NodeId.Builder>\n getNodesBuilderList() {\n return getNodesFieldBuilder().getBuilderList();\n }",
"int numNodes() {\n\t\treturn num_nodes;\n\t}",
"public int[] getNodeIndicesArray() {\n \t\tginy_nodes.trimToSize();\n \t\treturn giny_nodes.elements();\n \t}",
"public int[] getFinalNodes() {\n return IntStream.range(0, links.length)\n .filter(i -> getNextNodes(i).length == 0)\n .toArray();\n }",
"@Override\n public Collection<node_data> getV() {\n return this.nodes.values();\n }",
"public List<Node> getNodes()\t{return Collections.unmodifiableList(nodes);}",
"public List<List<NodeType>> getAllKCliques() {\n\t\treturn null;\t\t//TODO\n\t}",
"public List<NodeTypeDescription> nodeTypes() {\n return this.nodeTypes;\n }",
"List<CommunicationLink> getAllNodes()\n {\n return new ArrayList<>(allNodes.values());\n }",
"protected int numNodes() {\n\t\treturn nodes.size();\n\t}",
"private String[] getNodeStringArray(){\n String[] nodes = new String[truss.getNodeModel().size()];\n for(int i =0;i<truss.getNodeModel().size();i++){\n nodes[i] = \"Node\" + truss.getNodeModel().get(i).getNumber();\n }\n return nodes;\n }",
"io.netifi.proteus.admin.om.NodeOrBuilder getNodesOrBuilder(\n int index);",
"public Collection<MyNode> getNeighbors(){\r\n return new ArrayList<>(this.neighbors);\r\n }",
"public List<Imnode> getImnodes() {\n if (Imnodes == null) {\n Imnodes = new ArrayList<Imnode>();\n }\n return Imnodes;\n }",
"public ArrayList<Node> getList(){\n \treturn this.children;\n }",
"@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}"
]
| [
"0.74600387",
"0.7397489",
"0.7287216",
"0.7225193",
"0.71865404",
"0.7177226",
"0.706114",
"0.7051122",
"0.70396036",
"0.7037672",
"0.6985881",
"0.6983703",
"0.69260293",
"0.69201505",
"0.6918987",
"0.6918973",
"0.68895096",
"0.6883325",
"0.6871788",
"0.6866666",
"0.68502253",
"0.68307084",
"0.68149894",
"0.6804968",
"0.67919075",
"0.6764045",
"0.6758837",
"0.6751132",
"0.66656375",
"0.66424906",
"0.6642475",
"0.65758115",
"0.65755695",
"0.65544355",
"0.6550845",
"0.6549414",
"0.65294904",
"0.6506587",
"0.6470795",
"0.6462281",
"0.64365417",
"0.6422476",
"0.640831",
"0.64024407",
"0.6393517",
"0.63894933",
"0.6359842",
"0.63588333",
"0.63257563",
"0.63135844",
"0.63122207",
"0.6309874",
"0.6294102",
"0.6285833",
"0.6285415",
"0.62607026",
"0.62566346",
"0.62348443",
"0.6232906",
"0.62197495",
"0.6218048",
"0.6208131",
"0.6199071",
"0.6179968",
"0.6177905",
"0.6165071",
"0.61566675",
"0.6140319",
"0.61341006",
"0.6128486",
"0.61194134",
"0.6103279",
"0.6100641",
"0.60851574",
"0.6083499",
"0.60804665",
"0.60791993",
"0.60712343",
"0.6070926",
"0.60668033",
"0.6041976",
"0.60374254",
"0.6034689",
"0.602809",
"0.60009336",
"0.59919506",
"0.5984716",
"0.59804624",
"0.59773934",
"0.59738845",
"0.59732026",
"0.59722024",
"0.59567636",
"0.59308124",
"0.59085",
"0.59020984",
"0.59005487",
"0.5899301",
"0.5895359",
"0.58945453"
]
| 0.6933881 | 12 |
Returns the primary key of this job. | @Override
public long getPrimaryKey() {
return model.getPrimaryKey();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPrimaryKey() {\n if (primaryKey == null) primaryKey = \"id\";\n return primaryKey;\n }",
"public String getPrimaryKey() {\n return this.getString(R.string.primaryKey);\n }",
"PrimaryKey getPrimarykey();",
"public String getPrimaryKey() {\r\n\t\treturn primaryKey;\r\n\t}",
"public String getPrimaryKey() {\n\t\treturn primaryKey;\n\t}",
"public long getPrimaryKey() {\n return primaryKey;\n }",
"public String getPrimaryKey() {\r\n return primaryKey;\r\n }",
"Key getPrimaryKey();",
"public static String getPrimaryKeyName() {\r\n\t\t\treturn PRIMARY_KEY_ID;\r\n\t\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _employee.getPrimaryKey();\n\t}",
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"public String fetchPrimaryKey(){\n\t\treturn primaryKey;\n\t}",
"PrimaryKey getPrimaryKey();",
"public java.lang.Long _pk()\n {\n return (java.lang.Long)i_pk();\n }",
"public long getPrimaryKey() {\n return _sTransaction.getPrimaryKey();\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _state.getPrimaryKey();\n\t}",
"public PrimaryKey getPrimaryKey();",
"public long getKeyID()\n {\n return keyID;\n }",
"public long getPrimaryKey() {\n\t\treturn _tempNoTiceShipMessage.getPrimaryKey();\n\t}",
"public String getPrimaryKey() {\n return getBasicChar().getPrimaryKey();\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _candidate.getPrimaryKey();\n\t}",
"public long getClassPK() {\n return classPK;\n }",
"public String getKey() {\n\t\treturn id + \"\";\n\t}",
"public IdKey getKey() {\n return idKey;\n }",
"@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}",
"public java.lang.String getPrimaryKey() {\n\t\treturn _pnaAlerta.getPrimaryKey();\n\t}",
"public ObjectKey getPrimaryKey()\n {\n pks[0] = SimpleKey.keyFor(getMailId());\n pks[1] = SimpleKey.keyFor(getReceiverId());\n return comboPK;\n }",
"public Long getJobID() {\n return jobID;\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _changesetEntry.getPrimaryKey();\n\t}",
"public int keyId() {\n return keyId;\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _phieugiahan.getPrimaryKey();\n\t}",
"public Integer getPkId() {\n\t\treturn pkId;\n\t}",
"public String getKeyId() {\n return getProperty(KEY_ID);\n }",
"public java.lang.String getPrimaryKey() {\n\t\treturn _primarySchoolStudent.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _scienceApp.getPrimaryKey();\n\t}",
"public long getPrimaryKey() {\n\t\treturn _telefonoSolicitudProducto.getPrimaryKey();\n\t}",
"public ObjectKey getPrimaryKey()\n {\n return SimpleKey.keyFor(getNewsletterId());\n }",
"public String getJobID() {\n\t\t\treturn JobID;\n\t\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _paper.getPrimaryKey();\n\t}",
"public long getPrimaryKey() {\n\t\treturn _forumUser.getPrimaryKey();\n\t}",
"public Key getID () {\n\t\treturn id;\n\t}",
"public String getPkid() {\n return pkid;\n }",
"@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn id;\n\t}",
"public final String getRefPK() {\n\t\tString str = getRequest().getParameter(\"RefPK\");\n\t\treturn str;\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _contentupdate.getPrimaryKey();\n\t}",
"protected abstract String getJobSubmitId();",
"public long getPrimaryKey() {\n return _courseImage.getPrimaryKey();\n }",
"public String keyIdentifier() {\n return this.keyIdentifier;\n }",
"public String keyIdentifier() {\n return this.keyIdentifier;\n }",
"public String getKey() {\r\n return getAttribute(\"id\");\r\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _dlSyncEvent.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _userSync.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _second.getPrimaryKey();\n\t}",
"@Override\n public long getPrimaryKey() {\n return _partido.getPrimaryKey();\n }",
"public int getJobId() {\r\n\t\treturn jobId;\r\n\t}",
"public Long getRowKey() {\n return (Long) getAttributeInternal(ROWKEY);\n }",
"@Override\r\n\tpublic String getPrimaryKey() {\n\t\treturn \"ID\";\r\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _dictData.getPrimaryKey();\n\t}",
"public long getClassPK() {\n\t\treturn _dataset.getDatasetId();\n\t}",
"@Override\n\tpublic String getPK(){\n\t\treturn parkOpeningNo;\n\t}",
"public String getJobId() {\n\t\treturn this.jobId;\n\t}",
"Object getPrimaryKey(Object metadataID);",
"public BigDecimal getJOB_ID() {\r\n return JOB_ID;\r\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _userTracker.getPrimaryKey();\n\t}",
"public java.lang.String getPrimaryKey() {\n\t\treturn _imageCompanyAg.getPrimaryKey();\n\t}",
"public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}",
"public String naturalKeyName() {\n return idName();\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _esfTournament.getPrimaryKey();\n\t}",
"public final int getKeyId()\r\n\t{\r\n\t\treturn keyId;\r\n\t}",
"public double getPk()\n {\n return this.pk;\n }",
"@Override\n\tpublic String getKey() {\n\t\treturn getCid();\n\t}",
"public String primary() {\n return this.primary;\n }",
"public Long getId() {\n return pid;\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n jobId_ = s;\n }\n return s;\n }\n }",
"public Long getId()\n\t{\n\t\treturn (Long) this.getKeyValue(\"id\");\n\n\t}",
"public Integer getPknum() {\n return pknum;\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getKey()\n {\n return key;\n }",
"public int getKey()\n {\n return key;\n }",
"public int getKey()\n {\n return key;\n }",
"public int getKey()\n {\n return key;\n }",
"public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public IEntityPK getPK() {\r\n\treturn this.pk;\r\n }",
"public int getKey() {\n return this.key;\n }",
"@Override\n\tpublic Serializable getPrimaryKeyObj() {\n\t\treturn getElectiveId();\n\t}",
"public int getKey() {\n return key;\n }",
"public String getJobId() {\n return jobId;\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _dmGtStatus.getPrimaryKey();\n\t}",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"@DISPID(1)\r\n\t// = 0x1. The runtime will prefer the VTID if present\r\n\t@VTID(7)\r\n\tint jobID();",
"public String getKey()\n\t\t{\n\t\t\treturn key;\n\t\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic long getResourcePrimKey() {\n\t\treturn _changesetEntry.getResourcePrimKey();\n\t}",
"public String getKey()\n\t{\n\t\treturn this.key;\n\t}",
"public int getKey() {\r\n return key;\r\n }"
]
| [
"0.755475",
"0.75366694",
"0.7431203",
"0.7321873",
"0.73163563",
"0.72657144",
"0.7225043",
"0.72000957",
"0.71333987",
"0.7050444",
"0.70287853",
"0.7010795",
"0.70084256",
"0.6993079",
"0.69910014",
"0.69581324",
"0.69556516",
"0.6899508",
"0.68976885",
"0.6887469",
"0.6839293",
"0.68266404",
"0.6822438",
"0.6821463",
"0.68132263",
"0.6811145",
"0.6807532",
"0.6755112",
"0.6753723",
"0.67458594",
"0.6714178",
"0.666998",
"0.6668327",
"0.6656564",
"0.66301376",
"0.6623338",
"0.66169924",
"0.66032237",
"0.6591012",
"0.65628403",
"0.6556781",
"0.65448684",
"0.65201",
"0.65180814",
"0.65048677",
"0.64998776",
"0.64990646",
"0.6482729",
"0.6482729",
"0.6481043",
"0.6474494",
"0.64681566",
"0.64541507",
"0.644605",
"0.64364874",
"0.64311045",
"0.64252555",
"0.6406139",
"0.63866884",
"0.6383106",
"0.6368794",
"0.63631064",
"0.6353461",
"0.6322951",
"0.6317615",
"0.6312025",
"0.6296351",
"0.6288795",
"0.6279317",
"0.62790793",
"0.6255652",
"0.6250289",
"0.62489957",
"0.62407947",
"0.62397367",
"0.6238736",
"0.62329054",
"0.6224165",
"0.6224165",
"0.6224165",
"0.6224165",
"0.6212924",
"0.6201607",
"0.6196151",
"0.6192154",
"0.6182223",
"0.61754483",
"0.61693835",
"0.616901",
"0.616901",
"0.616901",
"0.6164636",
"0.615056",
"0.6150087",
"0.6150087",
"0.6143519",
"0.61431515",
"0.6129194"
]
| 0.67867494 | 29 |
Returns the processors per node of this job. | @Override
public int getProcessorsPerNode() {
return model.getProcessorsPerNode();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Processor> getProcessors() {\n return processors;\n }",
"public JobBuilder processorsPerNode(int processorsPerNode) {\r\n job.setProcessorsPerNode(processorsPerNode);\r\n return this;\r\n }",
"public static int getAvailableProcessors() {\r\n\t\treturn availableProcessors;\r\n\t}",
"@JsonProperty(\"processors\")\n\t@DsonOutput(Output.API)\n\tint getJsonProcessors() {\n\t\treturn Runtime.getRuntime().availableProcessors();\n\t}",
"public static int availableProcessors() {\n/* 98 */ return holder.availableProcessors();\n/* */ }",
"public int workers() {\n return workers_;\n }",
"String getCpusetcpus();",
"private static CellProcessor[] getProcessors() {\r\n\t \t final CellProcessor[] processors = new CellProcessor[] {\r\n\t new NotNull(new ParseInt()), // Id\r\n\t new NotNull(), // Catageory\r\n\t new NotNull(), // firstname\r\n\t new NotNull(), //lastname\r\n\t new NotNull(), //gender\r\n\t new NotNull(), //doj\r\n\t new Optional(),\t new Optional(),\r\n\t new Optional(),\t new Optional(),\r\n\t new Optional(),\t new Optional(),\r\n\t new Optional(),\t new Optional(),\r\n\t new Optional(),\t new Optional(),\r\n\t new Optional(),\t new Optional(),\r\n\t new Optional(), new Optional(), new Optional(),\t new Optional()\r\n\t \r\n\t };\r\n\t return processors;\r\n\t }",
"public int getWorkers() {\r\n return workers;\r\n }",
"@SuppressForbidden(reason = \"to obtain default number of available processors\")\n/* */ synchronized int availableProcessors() {\n/* 65 */ if (this.availableProcessors == 0) {\n/* */ \n/* 67 */ int availableProcessors = SystemPropertyUtil.getInt(\"io.netty.availableProcessors\", \n/* */ \n/* 69 */ Runtime.getRuntime().availableProcessors());\n/* 70 */ setAvailableProcessors(availableProcessors);\n/* */ } \n/* 72 */ return this.availableProcessors;\n/* */ }",
"public int getMaxTasksPerNode() {\n return maxTasksPerNode;\n }",
"@Override\n\tpublic void setProcessorsPerNode(int processorsPerNode) {\n\t\tmodel.setProcessorsPerNode(processorsPerNode);\n\t}",
"public List<UtteranceProcessorConfig> getProcessorConfigs() {\n return processorConfigs;\n }",
"Set<Object> getBeforeProcessors();",
"public int getWorkerThreads() {\n return workerThreads;\n }",
"public Set<ProcessReader> getProcesses();",
"public List<Pair<Long, Long>> getWorkers() {\n List<Pair<Long, Long>> workers = new ArrayList<>(workerSize);\n for (int i = 0; i < workerSize; i++) {\n workers.add(Pair.of(workerBits[i], workerIds[i]));\n }\n return workers;\n }",
"int getProcessorCount();",
"public int getWorkersPerServer() {\n return Integer.parseInt(getOptional(\"kylin.server.sequence-sql.workers-per-server\", \"1\"));\n }",
"private static CellProcessor[] getProcessors() {\n \t \n \t\n DecimalFormat decimalFormat = new DecimalFormat(\"#0.0000\");\n DecimalFormatSymbols simbolos = new DecimalFormatSymbols();\n \tsimbolos.setDecimalSeparator('.');\n \tdecimalFormat.setDecimalFormatSymbols(simbolos);\n \tdecimalFormat.setDecimalSeparatorAlwaysShown(true);\n\n final CellProcessor[] processors = new CellProcessor[] {\n new NotNull(), //1 C_ANDENES andenes_en_las_vias\n new Optional(), //2 C_CALIDBANIO calidad_acabados_banos\n new Optional(), //3 C_CALIDCMADER calidad_acabados_madera\n new Optional(), //4 C_CALIDCMETAL calidad_acabados_metal\n new Optional(), //5 C_CALIDCOCINA calidad_acabados_cocina\n new Optional(), //6 C_CALIDMURO calidad_acabados_muros\n new Optional(), //7 C_CALIDPISO calidad_acabados_pisos\n new Optional(), //8 C_CALIDTECHO calidad_acabados_techos\n new NotNull(), //9 C_CIUDADESCRITURA ciudad_notaria\n new Optional(), //10 C_CLASEINMUEBLE clase_inmueble\n new Optional(), //11 C_CONJAGRUPCERR conjunto_cerrado\n new Optional(), //12 C_CUBIERTA cubierta\n new NotNull(), //13 C_DEPTOESCRITURA departamento_notaria\n new Optional(), //14 C_DESCRIPLIQ1 DESCRIPCION 1\n new Optional(), //15 C_DESCRIPLIQ10 DESCRIPCION 10\n new Optional(), //16 C_DESCRIPLIQ2 DESCRIPCION 2\n new Optional(), //17 C_DESCRIPLIQ3 DESCRIPCION 3\n new Optional(), //18 C_DESCRIPLIQ4 DESCRIPCION 4\n new Optional(), //19 C_DESCRIPLIQ5 DESCRIPCION 5\n new Optional(), //20 C_DESCRIPLIQ6 DESCRIPCION 6\n new Optional(), //21 C_DESCRIPLIQ7 DESCRIPCION 7\n new Optional(), //22 C_DESCRIPLIQ8 DESCRIPCION 8\n new Optional(), //23 C_DESCRIPLIQ9 DESCRIPCION 9\n new Optional(), //24 C_ESTBANIOS estado_acabados_banos\n new Optional(), //25 C_ESTCOCINA estado_acabados_cocina\n new Optional(), //26 C_ESTCONSERVACION estado_de_conservacion\n new Optional(), //27 C_ESTMADERA estado_acabados_madera\n new Optional(), //28 C_ESTMETAL estado_acabados_metal\n new Optional(), //29 C_ESTMUROS estado_acabados_muros\n new Optional(), //30 C_ESTPISOS estado_acabados_pisos\n new NotNull(), //31 C_ESTRATO estrato\n new Optional(), //32 C_ESTRUCTURA estructura\n new Optional(), //33 C_ESTTECHOS estado_acabados_techos\n new Optional(), //34 C_ESTVIAACCESO estado_de_las_vias\n new Optional(), //35 C_FACHADA fachada\n new NotNull(), //36 C_IDCIUDAD ciudad\n new NotNull(), //37 C_IDDEPARTAMENTO departamento\n new NotNull(), //38 C_IDMETODOLOGIA metodo_de_valuacion\n new NotNull(), //39 C_IDOBJETOAVALUO objeto_del_avaluo\n new NotNull(), //40 C_IDTIPOIDENTIFICACION cliente_tipo_documento\n new Optional(), //41 C_ILUMINACION iluminacion\n new NotNull(), //42 C_LEGALIDAD barrio_legal\n new NotNull(), //43 C_PAVIMENTADA vias_pavimentadas\n new Optional(), //44 C_PISOSBODEGA pisos_bodega\n new NotNull(), //45 C_PROPHORZ sometido_a_propiedad_horizontal\n new Optional(), //46 C_SALUBRIDAD condiciones_de_salubridad\n new NotNull(), //47 C_SARDENELES sardineles_en_las_vias\n new Optional(), //48 C_TIPOFACHADA tipo_fachada\n new Optional(new Truncate(30)), //49 C_TIPOVIVIENDA tipo_de_vivienda\n new NotNull(), //50 C_TOPOGRAFIA topografia_sector\n new NotNull(), //51 C_TRANSPORTE transporte\n new Optional(), //52 C_UBICACIONINM ubicacion_del_inmueble\n new Optional(), //53 C_UBICACION2 Ubicación\n new NotNull(), //54 C_USOINMUEBLE uso_predominante_inmueble\n new Optional(), //55 C_VENTILACION ventilacion\n new FmtDate(\"dd-MM-yyyy HH:mm:ss\"), //56 F_FECHAAVALUO Fecha Avalúo\n new FmtDate(\"dd-MM-yyyy HH:mm:ss\"), //57 F_FECHAESCRITURA fecha_de_escritura\n new Optional(), //58 K_AACOND aire_acondicionado_central\n new Optional(), //59 K_ACUEDUCTOPREDIO acueducto_en_el_predio\n new Optional(), //60 K_ACUEDUCTOSECTOR acueducto_en_el_sector\n new Optional(), //61 K_AGUASHERV impacto_ambiental_aguas_servidas\n new Optional(), //62 K_ALAMEDAS alamedas\n new Optional(), //63 K_ALCANTAPREDIO alcantarillado_en_el_predio\n new Optional(), //64 K_ALCANTASECTOR alcantarillado_en_el_sector\n new Optional(), //65 K_ALUMBRADO alumbrado\n new Optional(), //66 K_AMBARBORIZA Arborización\n new Optional(), //67 K_AMBPARQUES Parques\n new Optional(), //68 K_AMBZVERDE Z. Verdes\n new Optional(), //69 K_ARBORIZACION arborizacion\n new Optional(), //70 K_ASCENSOR ascensor\n new Optional(), //71 K_BASURA impacto_ambiental_basura\n new Optional(), //72 K_BICICLETERO bicicletero\n new Optional(), //73 K_BOMBA bomba_eyectora\n new Optional(), //74 K_CANCHAMULT cancha_multiple\n new Optional(), //75 K_CICLORUTAS ciclo_rutas\n new Optional(), //76 K_CITOFONO citofono\n new Optional(), //77 K_CLUBHOUSE club_house\n new Optional(), //78 K_COMERCIO Comercio\n new Optional(), //79 K_ELECTRICAPREDIO energia_en_el_predio\n new Optional(), //80 K_ELECTRICASECTOR energia_en_el_sector\n new Optional(), //81 K_ENOBRA estado_de_obra\n new Optional(), //82 K_ESTREMODELA remodelado\n new Optional(), //83 K_ESTTERMINADA Terminada\n new Optional(), //84 K_ESTTERMINADO Terminado\n new Optional(), //85 K_GASPREDIO gas_en_el_predio\n new Optional(), //86 K_GASSECTOR gas_en_el_sector\n new Optional(), //87 K_GIMNASIO gimnasio\n new Optional(), //88 K_GJVISITA garaje_visitantes\n new Optional(), //89 K_GOLFITO golfito\n new Optional(), //90 K_INDUSTRIA Industria\n new Optional(), //91 K_INSERGURIDAD impacto_ambiental_inseguridad\n new Optional(), //92 K_JUEGONINOS juegos_ninos\n new Optional(), //93 K_OTROSUSOS Otros Usos\n new Optional(), //94 K_PARADERO paradero\n new Optional(), //95 K_PARQUES parques\n new Optional(), //96 K_PISCINA piscina\n new Optional(), //97 K_PLANTA planta_electrica\n new Optional(), //98 K_PORAIRE impacto_ambiental_aire\n new Optional(), //99 K_PORTERIA porteria\n new Optional(), //100 K_PRESION equipo_de_presion_constante\n new Optional(), //101 K_RUIDO impacto_ambiental_ruido\n new Optional(), //102 K_SALONCOMN salon_comunal\n new Optional(), //103 K_SHUT shut_basuras\n new Optional(), //104 K_SINTERMINAR Sin Terminar\n new Optional(), //105 K_SQUASH cancha_squash\n new Optional(), //106 K_TANQUEAGUA tanque_de_agua\n new Optional(), //107 K_TELPREDIO telefono_en_el_predio\n new Optional(), //108 K_TELSECTOR telefono_en_el_sector\n new Optional(), //109 K_VIVIENDA Vivienda\n new Optional(), //110 K_ZONASVERDES zonas_verdes_publicas\n new Optional(), //111 K_ZVERDES zonas_verdes_comunales\n new Optional(new FmtNumber(decimalFormat)), //112 N_AREALIQ1 Area(m2) 1\n new Optional(new FmtNumber(decimalFormat)), //113 N_AREALIQ10 Area(m2) 10\n new Optional(new FmtNumber(decimalFormat)), //114 N_AREALIQ2 Area(m2) 2\n new Optional(new FmtNumber(decimalFormat)), //115 N_AREALIQ3 Area(m2) 3\n new Optional(new FmtNumber(decimalFormat)), //116 N_AREALIQ4 Area(m2) 4\n new Optional(new FmtNumber(decimalFormat)), //117 N_AREALIQ5 Area(m2) 5\n new Optional(new FmtNumber(decimalFormat)), //118 N_AREALIQ6 Area(m2) 6\n new Optional(new FmtNumber(decimalFormat)), //119 N_AREALIQ7 Area(m2) 7\n new Optional(new FmtNumber(decimalFormat)), //120 N_AREALIQ8 Area(m2) 8\n new Optional(new FmtNumber(decimalFormat)), //121 N_AREALIQ9 Area(m2) 9\n new NotNull(new FmtNumber(decimalFormat)), //122 N_AVALUOUVR valor_avaluo_en_uvr\n new Optional(), //123 N_BAHIACOMUNAL bahia_comunal\n new Optional(), //124 N_BALCON balcon\n new Optional(), //125 N_BANIOPRIVADO bano_privado\n new Optional(), //126 N_BANIOSERVICIO bano_servicio\n new Optional(), //127 N_BANIOSOCIAL bano_social\n new Optional(), //128 N_BODEGA bodega\n new Optional(), //129 N_COCINA cocina\n new Optional(), //130 N_COMEDOR comedor\n new NotNull(), //131 AVALUO_ID avaluoId\n new Optional(), //132 N_CUARTOSERV cuarto_servicio\n new Optional(), //133 N_CUBIERTO Cubierto\n new Optional(), //134 N_DEPOSITO Depósito\n new Optional(), //135 N_DESCUBIERTO Descubierto\n new Optional(), //136 N_DOBLE Doble\n new Optional(), //137 N_ESTARHAB Estar Hab.\n new Optional(), //138 N_ESTUDIO estudio\n new Optional(), //139 N_HABITACIONES habitaciones\n new NotNull(), //140 N_IDENTIFICACION cliente_numero_documento\n new Optional(), //141 N_JARDIN jardin\n new Optional(), //142 N_LOCAL local\n new Optional(), //143 N_NUMASCENSORES numero_de_ascensores\n new NotNull(new Truncate(2)), //144 N_NUMEDIF numero_de_edificios\n new Optional(), //145 N_OFICINA oficina\n new Optional(), //146 N_PATIOINT patio_interior\n new Optional(), //147 N_PISOS numero_de_pisos\n new Optional(), //148 N_PRIVADO Privado\n new Optional(), //149 N_SALA sala\n new Optional(), //150 N_SENCILLO Sencillo\n new Optional(), //151 N_SERVIDUMBRE Servidumbre\n new Optional(), //152 N_SOTANOS numero_sotanos\n new Optional(), //153 N_TERRAZA terraza\n new NotNull(), //154 N_TIPOCOMERCIALIZA tiempo_esperado_de_comercializacion\n new NotNull(new FmtNumber(decimalFormat)), //155 N_TOTALAVALUO valor_total_avaluo\n new Optional(), //156 N_TOTALGARAJES numero_total_de_garajes\n new Optional(), //157 N_TOTALUND total_unidades\n new Optional(), //158 N_UNDPISO unidades_por_piso\n new Optional(), //159 N_USOEXCLUSIVO Uso Exclusivo\n new Optional(new FmtNumber(decimalFormat)), //160 N_VALORASEGURABLE valor_asegurable\n new Optional(new FmtNumber(decimalFormat)), //161 N_VALTOT1 Valor Total 1\n new Optional(new FmtNumber(decimalFormat)), //162 N_VALTOT10 Valor Total 10\n new Optional(new FmtNumber(decimalFormat)), //163 N_VALTOT2 Valor Total 2\n new Optional(new FmtNumber(decimalFormat)), //164 N_VALTOT3 Valor Total 3\n new Optional(new FmtNumber(decimalFormat)), //165 N_VALTOT4 Valor Total 4\n new Optional(new FmtNumber(decimalFormat)), //166 N_VALTOT5 Valor Total 5\n new Optional(new FmtNumber(decimalFormat)), //167 N_VALTOT6 Valor Total 6\n new Optional(new FmtNumber(decimalFormat)), //168 N_VALTOT7 Valor Total 7\n new Optional(new FmtNumber(decimalFormat)), //169 N_VALTOT8 Valor Total 8\n new Optional(new FmtNumber(decimalFormat)), //170 N_VALTOT9 Valor Total 9\n new NotNull(new FmtNumber(decimalFormat)), //171 N_VALUVRDIA valor_uvr\n new Optional(new FmtNumber(decimalFormat)), //172 N_VAL1 Valor unitario 1\n new Optional(new FmtNumber(decimalFormat)), //173 N_VAL10 Valor unitario 10\n new Optional(new FmtNumber(decimalFormat)), //174 N_VAL2 Valor unitario 2\n new Optional(new FmtNumber(decimalFormat)), //175 N_VAL3 Valor unitario 3\n new Optional(new FmtNumber(decimalFormat)), //176 N_VAL4 Valor unitario 4\n new Optional(new FmtNumber(decimalFormat)), //177 N_VAL5 Valor unitario 5\n new Optional(new FmtNumber(decimalFormat)), //178 N_VAL6 Valor unitario 6\n new Optional(new FmtNumber(decimalFormat)), //179 N_VAL7 Valor unitario 7\n new Optional(new FmtNumber(decimalFormat)), //180 N_VAL8 Valor unitario 8\n new Optional(new FmtNumber(decimalFormat)), //181 N_VAL9 Valor unitario 9\n new Optional(new FmtNumber(decimalFormat)), //182 N_VETUSTEZ vetustez\n new Optional(), //183 N_ZVERDEPRIV zona_verde_privada\n new NotNull(), //184 R_CALIFICACION calificacion_garantia\n new Optional(), //185 R_ESTCONS estado_de_construccion\n new NotNull(new Truncate(500)), //186 T_ACTEDIFICADORA actualidad_edificadora\n new Optional(new Truncate(100)), //187 T_AMBNEGOTRO impacto_ambiental_otro\n new Optional(new Truncate(100)), //188 T_AMBOTRO Otro\n new Optional(), //189 T_AVANCEOBRA porcentaje_avance\n new NotNull(new Truncate(30)), //190 T_BARRIO barrio\n new Optional(new Truncate(20)), //191 T_CHIP chip\n new NotNull(new Truncate(500)), //192 T_COMPORTAOD comportamiento_oferta_demanda\n new Optional(new Truncate(30)), //193 T_CUBIERTA Cubierta\n new Optional(new Truncate(100)), //194 T_DIRANEXOS direccion_anexos\n new Optional(new Truncate(100)), //195 T_DIRINMUEBLE direccion_inmueble\n new Optional(new Truncate(30)), //196 T_ESTRUCTURA Estructura\n new Optional(), //197 T_FACHADA Fachada\n new NotNull(new Truncate(500)), //198 T_JUSTIFICACION justificacion_de_metodologia\n new NotNull(new Truncate(20)), //199 T_MINMBPPAL1 matricula_inmobiliaria_principal_1\n new Optional(new Truncate(20)), //200 T_MINMBPPAL2 matricula_inmobiliaria_principal_2\n new Optional(new Truncate(20)), //201 T_MINMOBDP1 matricula_inmobiliaria_deposito_1\n new Optional(new Truncate(20)), //202 T_MINMOBDP2 matricula_inmobiliaria_deposito_2\n new Optional(new Truncate(20)), //203 T_MINMOBGJ1 matricula_inmobiliaria_garaje_1\n new Optional(new Truncate(20)), //204 T_MINMOBGJ2 matricula_inmobiliaria_garaje_2\n new Optional(new Truncate(20)), //205 T_MINMOBGJ3 matricula_inmobiliaria_garaje_3\n new Optional(new Truncate(20)), //206 T_MINMOBGJ4 matricula_inmobiliaria_garaje_4\n new Optional(new Truncate(20)), //207 T_MINMOBGJ5 matricula_inmobiliaria_garaje_5\n new Optional(new Truncate(30)), //208 T_NOMBCONJEDIF nombre_del_conjunto\n new Optional(), //209 T_NOMBRESOLICITANTE entidad_id\n new NotNull(new Truncate(5)), //210 T_NOTARIA numero_notaria_de_escritura\n new NotNull(new Truncate(5)), //211 T_NUMESCRITURA numero_de_escritura\n new NotNull(new Truncate(2000)), //212 T_OBSERVAVALUO observaciones\n new Optional(new Truncate(100)), //213 T_OTRASDIR otras_direcciones\n new Optional(new Truncate(30)), //214 T_DESCRIPCION_CLASE_INMUEBLE\n new Optional(new Truncate(30)), //215 T_OTROSDOTACION Otros Dotacion\n new Optional(new Truncate(30)), //216 T_OTROSDOTACION2 Otros Dotacion 2\n new Optional(), //217 T_OTROSUSOS Otros Usos\n new Optional(new Truncate(30)), //218 T_DESCRIPCIONOTROUSOINM descripcion_otros_uso_inmueble\n new NotNull(new Truncate(500)), //219 T_PERSPECTIVAS perspectivas_de_valorizacion\n new Optional(), //220 C_ALTURA Altura\n new Optional(), //221 C_UBICACION3 Ubicación Local\n new Optional(new Truncate(20)), //222 T_SISTEMA Otro Sistema de Coordenadas\n new Optional(), //223 C_REPARADOS Reparados\n new Optional(), //224 C_IRRALTURA Irregularidad Altura\n new Optional(), //225 C_IRRPLANTA Irregularidad Planta\n new Optional(), //226 C_ESTRUCTURAREFORZADA estructura_reforzada\n new Equals(3), //227 C_SISTEMA Sistema de Coordenadas\n new Optional(), //228 C_DANOPREVIO Daños Previos\n new Optional(), //229 T_LATITUD latitud\n new Optional(), //230 N_ANOCONSTRUCCION ano_de_construccion\n new Optional(), //231 C_MATERIAL Material de Construcción\n new Optional(), //232 T_LONGITUD longitud\n new Optional(), //233 C_DETALLEMATERIAL ESTRUCTURA\n new NotNull(new Truncate(30)), //234 IDCATEGORIA CATEGORIA (Tipo de inmueble)\n new Equals(\"830006973\") //235 T_USUARIO Usuario Avalúo\n };\n return processors;\n }",
"java.util.List<java.lang.String>\n getProcessorList();",
"public Object getNumExecutors() {\n return this.numExecutors;\n }",
"public Collection<Node> getTasks(Processor p) {\n return p.getScheduledTasks();\n }",
"public int getExecutors() {\r\n return executors;\r\n }",
"public int getNumberOfCores();",
"Collection<? extends ReflexDevice> getDevices() {\n return processors.values();\n }",
"public static List<String> getGlobalAllProcessorsPropertyConfigNames(NifiProperty property) {\n return getConfigPropertyKeysForNiFi(property).stream().map(k ->\"nifi.all_processors.\" + toPropertyName(k)).collect(Collectors.toList());\n }",
"public ImmutableMap<String, Integer> getProcessorParametres() {\n return processorParametres;\n }",
"public CasProcessor[] getCasProcessors() {\n if (casprocessorList != null) {\n return casprocessorList;\n }\n // If CasProcessors have not yet been classified into AEs and CCs use the\n // initial_cp_list. This list is populated early, right after the CPE\n // descriptor is parsed. It is a list of lists, containing as many\n // instances of each Cas Processor as defined in the CPE descriptor.\n // The number of instances is determined based on number of processing\n // threads and CP property setting that determines if the CP is able\n // to run in parallel.\n if (casProcessorsDeployed == false) {\n CasProcessor[] casprocessorList = new CasProcessor[initial_cp_list.size()];\n ArrayList list;\n for (int i = 0; i < initial_cp_list.size(); i++) {\n list = (ArrayList) initial_cp_list.get(i);\n for (int j = 0; j < list.size(); j++) {\n casprocessorList[i] = (CasProcessor) list.get(j);\n }\n }\n return casprocessorList;\n }\n // CasProcessors have been classified into AEs and CCs, so merge the two lists\n ArrayList aList = new ArrayList();\n Iterator keyIt = analysisEngines.keySet().iterator();\n while (keyIt.hasNext()) {\n String keyName = (String) keyIt.next();\n List kList = (List) analysisEngines.get(keyName);\n if (kList != null) {\n for (int i = 0; i < kList.size(); i++) {\n aList.add(kList.get(i));\n }\n }\n }\n keyIt = consumers.keySet().iterator();\n while (keyIt.hasNext()) {\n String keyName = (String) keyIt.next();\n List kList = (List) consumers.get(keyName);\n if (kList != null) {\n for (int i = 0; i < kList.size(); i++) {\n aList.add(kList.get(i));\n }\n }\n }\n\n if (aList.size() == 0) {\n return null;\n }\n casprocessorList = new CasProcessor[aList.size()];\n for (int j = 0; j < aList.size(); j++) {\n casprocessorList[j] = (CasProcessor) aList.get(j);\n }\n return casprocessorList;\n }",
"public QueryNodeProcessor getQueryNodeProcessor() {\n return processor;\n }",
"public long getThreads() { return threads; }",
"public Integer getCpus() {\n return cpus;\n }",
"Set<Object> getAfterProcessors();",
"public Integer getCpus() {\n return cpus;\n }",
"int getProcessorpathCount();",
"public Long getPartitions() {\n return this.Partitions;\n }",
"public static int getNumberOfCpuThreads() {\n\t\treturn Runtime.getRuntime().availableProcessors();\n\t}",
"public List getUtteranceProcessors() {\n return utteranceProcessors;\n }",
"public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}",
"public long getNClusters() {\n return cGetNClusters(this.cObject);\n }",
"public int getNumPartitions() {\n return numPartitions;\n }",
"public int numPartitions() {\n return (11);\n }",
"public Map<String, Node> nodes() {\n return this.nodes;\n }",
"public synchronized AbstractProcess[] getProcesses() {\n\t\tAbstractProcess[] result = new AbstractProcess[processes.size()];\n\t\tIterator<ProcessEntry> iter = processes.values().iterator();\n\t\tfor (int i = 0; iter.hasNext(); i++) {\n\t\t\tresult[i] = iter.next().process;\n\t\t}\n\t\treturn result;\n\t}",
"public int[] innermost_cores() throws InterruptedException {\n /* Find the innermost core of the input graph \n * Input : graph g\n * Output : array showing the nodes belonging to the innermost core \n */\n \n // extract innermost cores\n Core c = CoreDecomposition.getInnerMostCore(g, worker);\n \n //number of nodes in the innermost cores \n int n_nodes = c.seq.length; \n \n // initialize array to store nodes in the core \n int[] core_nodes = new int[n_nodes]; \n \n // fill the array @core_nodes\n System.arraycopy(c.seq, 0, core_nodes, 0, n_nodes);\n \n //returns all the nodes in the innermost core \n return core_nodes;\n }",
"public List<AProcess> getProcesses() {\n return processes;\n }",
"public int getMaxPartitionsRunInParallel() {\n return maxThreads;\n }",
"public SortedSet<ActivityProcessor> getActivityProcessors();",
"public int getNumberOfNodesEvaluated();",
"public Map<String, Integer> getAllReadyTasks() {\n if (!regCenter.isExisted(ReadyNode.ROOT)) {\n return Collections.emptyMap();\n }\n List<String> jobNames = regCenter.getChildrenKeys(ReadyNode.ROOT);\n Map<String, Integer> result = new HashMap<>(jobNames.size(), 1);\n for (String each : jobNames) {\n String times = regCenter.get(ReadyNode.getReadyJobNodePath(each));\n if (!Strings.isNullOrEmpty(times)) {\n result.put(each, Integer.parseInt(times));\n }\n }\n return result;\n }",
"public int getChildThreads() {\n\t\tfinal String key = ConfigNames.CHILD_THREADS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn getJson().getInt(key);\n\t}",
"public Queue<PCB> getProcesses() {\r\n\t\ttry {\r\n\t\t\treturn this.loadToJobQueue();\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\tSystem.err.println(\"File not found!!\");\r\n\t\t}\r\n\t\treturn JobQueue;\r\n\t}",
"public Set<DefaultGraphCell> getNodes() {\n return nodes;\n }",
"public int getNumberConcurrentEmulators() {\n\t\treturn (numberConcurrentEmulators);\n\t}",
"public int getNumOfThreads() {\n return numOfThreads;\n }",
"public Collection getThreads();",
"public abstract Parts getProcessor();",
"public int getCapacity() {\n\t\tfinal String key = ConfigNames.CHILD_THREADS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn getJson().getInt(key);\n\t}",
"public HashMap<Integer, Node> getNodeList()\n\t{\n\t\treturn nodeManager.getNodes();\n\t}",
"public long getRepairSessions() {\n long repairSessions = 0;\n\n Iterator<Map.Entry<String, JMXEnabledThreadPoolExecutorMBean>> threads = nodeProbe.getThreadPoolMBeanProxies();\n while (threads.hasNext()) {\n Map.Entry<String, JMXEnabledThreadPoolExecutorMBean> thread = threads.next();\n\n if (thread.getKey().equals(REPAIR_THREAD_POOL_NAME)) {\n JMXEnabledThreadPoolExecutorMBean threadPoolProxy = thread.getValue();\n repairSessions = threadPoolProxy.getPendingTasks() + threadPoolProxy.getActiveCount();\n }\n }\n\n return repairSessions;\n }",
"public Long getParallelism() {\n return parallelism;\n }",
"public int getNumThreads() {\n return numThreads;\n }",
"public int getNumCores() {\n\t\tclass CpuFilter implements FileFilter {\n\n\t\t\t@Override\n\t\t\tpublic boolean accept(File pathname) {\n\t\t\t\t// Check if filename is \"cpu\", followed by a single digit number\n\t\t\t\tif (Pattern.matches(\"cpu[0-9]+\", pathname.getName())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\n\t\ttry {\n\t\t\t// Get directory containing CPU info\n\t\t\tFile dir = new File(\"/sys/devices/system/cpu/\");\n\t\t\t// Filter to only list the devices we care about\n\t\t\tFile[] files = dir.listFiles(new CpuFilter());\n\t\t\t// Return the number of cores (virtual CPU devices)\n\t\t\treturn files.length;\n\t\t} catch (Exception e) {\n\t\t\t// Default to return 1 core\n\t\t\treturn 1;\n\t\t}\n\t}",
"public List<JobNode> getSeries() {\n\t\treturn null;\n\t}",
"public int[] getPrimes() {\n\t\treturn primes;\n\t}",
"public List<Partition> getPartitions() {\n return partitions;\n }",
"java.util.List<java.lang.String>\n getProcessorpathList();",
"public ParallelismConfiguration getParallelismConfiguration() {\n return this.parallelismConfiguration;\n }",
"@Override\n\tpublic long numNodes() {\n\t\treturn numNodes;\n\t}",
"public Integer minNumberOfCores() {\n return this.minNumberOfCores;\n }",
"@Override\r\n\tpublic List<JedisPool> getNodes() {\n\t\treturn Collections.emptyList();\r\n\t}",
"public List<List<NodeType>> getAllKCliques() {\n\t\treturn null;\t\t//TODO\n\t}",
"public Processor getProcessor(Node node) throws ScheduleException {\n if (!scheduledTasks.containsKey(node)) {\n throw new ScheduleException(\"Processor not defined for task: \" + node);\n }\n return scheduledTasks.get(node);\n }",
"public HashMap<String, Integer> getClassCMCScores() {\n return classCMCScores;\n }",
"public LinkedList getAllProcessingContainers() {\n LinkedList all = new LinkedList();\n all.addAll(annotatorList);\n all.addAll(consumerList);\n return all;\n }",
"public int numNodes() {\n\t\treturn numNodes;\n\t}",
"public Node[] getNodes() {\n\t\treturn nodes;\n\t}",
"public BigDecimal getProcChrgs() {\n return (BigDecimal) getAttributeInternal(PROCCHRGS);\n }",
"private int getNumCores() {\n\t\t// Private Class to display only CPU devices in the directory listing\n\t\tclass CpuFilter implements FileFilter {\n\t\t\t@Override\n\t\t\tpublic boolean accept(File pathname) {\n\t\t\t\t// Check if filename is \"cpu\", followed by a single digit number\n\t\t\t\tif (Pattern.matches(\"cpu[0-9]+\", pathname.getName())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Get directory containing CPU info\n\t\t\tFile dir = new File(\"/sys/devices/system/cpu/\");\n\t\t\t// Filter to only list the devices we care about\n\t\t\tFile[] files = dir.listFiles(new CpuFilter());\n\t\t\t// Return the number of cores (virtual CPU devices)\n\t\t\treturn files.length;\n\t\t} catch (Exception e) {\n\t\t\t// Default to return 1 core\n\t\t\treturn 1;\n\t\t}\n\t}",
"public com.sforce.soap.enterprise.QueryResult getProcessInstances() {\r\n return processInstances;\r\n }",
"public static Map<String, ProcessEngine> getProcessEngines() {\n return processEngines;\n }",
"public CPU getCPU() {\r\n\t\treturn cpu;\r\n\t}",
"public int getNumberOfNodesEvaluated() {\r\n\t\treturn this.evaluatedNodes;\r\n\t}",
"public int getNumeroParcelas() {\n return numeroParcelas;\n }",
"@Override\n\tpublic int getNodes() {\n\t\treturn model.getNodes();\n\t}",
"java.util.List<io.netifi.proteus.admin.om.Node> \n getNodesList();",
"public int getNumNodes() {\n\t\treturn nodes.size();\n\t}",
"public String getNode_pid() {\r\n\t\treturn node_pid;\r\n\t}",
"public Nodes nodes() {\n return this.nodes;\n }",
"int numNodes() {\n\t\treturn num_nodes;\n\t}",
"private List<Node> getNodes() {\n List<Node> nodes = new ArrayList<Node>();\n NodeApi.GetConnectedNodesResult rawNodes =\n Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();\n for (Node node : rawNodes.getNodes()) {\n nodes.add(node);\n }\n return nodes;\n }",
"public double getOccupiedCpus () { return getCpuBaseResource().getOccupiedCapacity(); }",
"public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }",
"public List<Integer> getPrimesList() {\n return primes;\n }",
"private int getPoolSize() {\n\t\tint numberOfTasks = SpectralDescriptionType.values().length;\n\t\tint procs = Runtime.getRuntime().availableProcessors();\n\t\treturn numberOfTasks < procs ? numberOfTasks : procs > 1 ? procs - 1\n\t\t\t\t: 1;\n\t}",
"public long getAllContextNodeCount();",
"public Map<UUID, IExecutorDescriptor> getConnectedExecutors() throws RemoteException;",
"private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}",
"public com.vmware.converter.HostCpuIdInfo[] getSupportedCpuFeature() {\r\n return supportedCpuFeature;\r\n }",
"public List<OSMNode> nodes() {\n return nodes;\n }"
]
| [
"0.6825687",
"0.6677605",
"0.64474136",
"0.63211846",
"0.607132",
"0.5852816",
"0.5768319",
"0.5755844",
"0.5736484",
"0.5705986",
"0.5686567",
"0.5666889",
"0.5659365",
"0.5620586",
"0.5571075",
"0.55599385",
"0.5557573",
"0.5535997",
"0.5532196",
"0.55283946",
"0.548876",
"0.5488707",
"0.5483214",
"0.5477905",
"0.5470134",
"0.54472053",
"0.54349816",
"0.54111075",
"0.533274",
"0.5315688",
"0.5268421",
"0.52543825",
"0.52274966",
"0.52205426",
"0.52174187",
"0.5205115",
"0.51604754",
"0.5155467",
"0.5110544",
"0.51087487",
"0.5108513",
"0.5097987",
"0.50928473",
"0.5087094",
"0.5081266",
"0.50717837",
"0.5063433",
"0.50550973",
"0.5052108",
"0.5032117",
"0.50290525",
"0.5019842",
"0.49892303",
"0.4981388",
"0.49469283",
"0.49165908",
"0.49071884",
"0.4899776",
"0.48887497",
"0.48786223",
"0.48749962",
"0.48721758",
"0.48646334",
"0.48630697",
"0.48623708",
"0.48574382",
"0.48425823",
"0.48414677",
"0.4839528",
"0.4833153",
"0.48330685",
"0.48309729",
"0.4825225",
"0.4785523",
"0.47757742",
"0.47750002",
"0.4767687",
"0.47676268",
"0.47603783",
"0.4758364",
"0.47459513",
"0.47431633",
"0.47430688",
"0.47421363",
"0.47335607",
"0.47322372",
"0.47274137",
"0.47268397",
"0.472423",
"0.4718688",
"0.47184655",
"0.4709376",
"0.47070098",
"0.47031534",
"0.46950853",
"0.46835196",
"0.46767366",
"0.46764007",
"0.4675746",
"0.4670576"
]
| 0.791717 | 0 |
Returns the queued date of this job. | @Override
public Date getQueuedDate() {
return model.getQueuedDate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UUID getQueuedMessageId() {\n\t\treturn queuedMessageId;\n\t}",
"@Override\n\tpublic void setQueuedDate(Date queuedDate) {\n\t\tmodel.setQueuedDate(queuedDate);\n\t}",
"public java.util.Date getRequestedDate() {\n\t\treturn _dmHistoryMaritime.getRequestedDate();\n\t}",
"public OffsetDateTime scheduledPurgeDate() {\n return this.scheduledPurgeDate;\n }",
"@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGtStatus.getRequestedDate();\n\t}",
"public Date getWaitDate() {\r\n return waitDate;\r\n }",
"public Date getScheduleDate(){\r\n\t\treturn this.scheduleDate;\r\n\t}",
"public Date getFinishedAt() {\n\t\treturn finishedAt;\n\t}",
"@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGTShipPosition.getRequestedDate();\n\t}",
"public String get_task_due_date()\n {\n return task_due_date.toString();\n }",
"public Date getHdrq() {\n\t\treturn hdrq;\n\t}",
"public Date getDateExecution() {\r\n return dateExecution;\r\n }",
"public Date getProcessedDate() {\n return this.processedDate;\n }",
"public org.apache.xmlbeans.XmlDate xgetJobStartDate()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDate target = null;\r\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n return target;\r\n }\r\n }",
"public Date getExecutionDate()\n {\n return executionDate;\n }",
"@Override\n\tpublic Date getSubmitDate() {\n\t\treturn model.getSubmitDate();\n\t}",
"public Date getSubmitTime() {\n return submitTime;\n }",
"public Date getCompletedDate() {\n return this.completedDate;\n }",
"public Date getDoneDate() {\n return doneDate;\n }",
"public Date getDoneDate() {\n return doneDate;\n }",
"public Date getDoneDate() {\n return doneDate;\n }",
"public Date getDoneDate() {\n return doneDate;\n }",
"public java.lang.String getBegDate() {\n return begDate;\n }",
"public Date getDate()\n\t\t{\n\t\t\treturn this.timeSlot;\n\t\t}",
"public java.util.Date getFinishedTime () {\r\n\t\treturn finishedTime;\r\n\t}",
"public java.lang.String getSchedule_date() {\r\n return schedule_date;\r\n }",
"public Date getScheduleTime() {\n return this.scheduleTime;\n }",
"public java.lang.String getBegDate() {\n return begDate;\n }",
"public java.util.Date getExpectedDateOfDelivery() {\r\n return expectedDateOfDelivery;\r\n }",
"@Override\n\tpublic String getQueueName() {\n\t\treturn model.getQueueName();\n\t}",
"public double getScheduledTime() {\n return scheduledTime;\n }",
"public java.util.Calendar getJobStartDate()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getCalendarValue();\r\n }\r\n }",
"public Date getStartedDate() {\n return this.startedDate;\n }",
"public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}",
"public Date getSubmittime() {\n return submittime;\n }",
"@Override\n\tpublic Date getCompleteDate() {\n\t\treturn model.getCompleteDate();\n\t}",
"public java.lang.Object getQueueID() {\n return queueID;\n }",
"public Date getCcrq() {\n return ccrq;\n }",
"Collection<QueuedPrintJob> getQueue();",
"public Date getTime() {\n return new Date(currentTime.getTime());\n }",
"public Timestamp getDateFinishSchedule() {\n\t\treturn (Timestamp) get_Value(\"DateFinishSchedule\");\n\t}",
"@ApiModelProperty(value = \"The number of flowfiles queued in the NiFi.\")\r\n public String getQueued() {\r\n return queued;\r\n }",
"public java.lang.String getQueueName() {\n return queueName;\n }",
"public Date getExecuteTime() {\n return executeTime;\n }",
"public Long getRequestDate() {\n return requestDate;\n }",
"public Date getScheduletime() {\r\n return scheduletime;\r\n }",
"public Date getDate() {\n return this.currentDate;\n }",
"public Date getCHEQUE_DATE() {\r\n return CHEQUE_DATE;\r\n }",
"public java.util.Date getStartTime() {\n return startTime;\n }",
"public static String getBuildDate() {\n return mBuildDate;\n }",
"public DateTime getBilledAt() {\n return this.billedAt;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"@Override\n\tpublic Date getStartTime() {\n\t\treturn promotionLineItem.getStartTime();\n\t}",
"public Date getSendingTime() {\n return sendingTime;\n }",
"public long getBeginDate() {\n return beginDate_;\n }",
"public Date getReqDate() {\r\n\t\treturn reqDate;\r\n\t}",
"public long getBeginDate() {\n return beginDate_;\n }",
"public Timestamp getDateStartSchedule() {\n\t\treturn (Timestamp) get_Value(\"DateStartSchedule\");\n\t}",
"public String queueName();",
"public String getRequisitionCreateDate() {\r\n return requisitionCreateDate;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getFreezeTimestamp();",
"public Date getStartWorkTime() {\n return startWorkTime;\n }",
"public Date getActualBuyingTime() {\n return actualBuyingTime;\n }",
"public Date getSendEmailTime() {\n return sendEmailTime;\n }",
"public boolean wasQueued() {\r\n\t\tif (wasQueued == true) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public java.sql.Date getREQ_START_DATE()\n {\n \n return __REQ_START_DATE;\n }",
"public String getCurrentDate() {\n return currentDate;\n }",
"public OffsetDateTime submittedTime() {\n return this.submittedTime;\n }",
"long getBeginDate();",
"public static final Date getBuildDate() { return buildDate; }",
"public static final Date getBuildDate() { return buildDate; }",
"public java.lang.String getQueueStatus() {\n return queueStatus;\n }",
"public String getCompletedDate(int position) {\n HashMap<String, String> map = list.get(position);\n return map.get(COMPLETED_DATE_COLUMN);\n }",
"public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}",
"public Date getQuestionCreateTime() {\n return questionCreateTime;\n }",
"public Date getBudgetDate() {\n return (Date) getAttributeInternal(BUDGETDATE);\n }",
"public Date getRequiredTime() {\n return requiredTime;\n }",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getPublishtime() {\n return publishtime;\n }",
"public Date getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"public Date getDate() {\n return order.getDate();\n }",
"public int getEventTime() {\n\t\treturn scheduledTime;\n\t}",
"public Date getDueDate() {\n\t\treturn dueDate;\n\t}",
"public Date getTimeSend() {\n return timeSend;\n }",
"public Date getStartTime() {\r\n return this.startTime;\r\n }",
"public Date getCompleteTime() {\n return completeTime;\n }",
"public Date getLastSendRequestTime()\r\n {\r\n return lastSendRequestTime;\r\n }",
"public Date getDueDate() {\n\t\treturn date; //changed DaTe to date\r\n\t}",
"public Date getDueDate() {\r\n\t\treturn dueDate;\r\n\t}",
"public Date getProcessDt() {\n return _processDt;\n }",
"public Date getStartTime() {\n return this.startTime;\n }",
"public Date getStartTimeDate() {\n return startTimeDate;\n }",
"public Date date() {\n return new Date(this.msec);\n }",
"public String getCurrentDate() {\n return createdDate;\n }",
"java.lang.String getOrderDate();"
]
| [
"0.6152741",
"0.612767",
"0.6123551",
"0.6006367",
"0.5974806",
"0.5802598",
"0.5718983",
"0.5687144",
"0.5680982",
"0.56797695",
"0.5671131",
"0.56487167",
"0.5627684",
"0.56228226",
"0.5591612",
"0.55702555",
"0.5561924",
"0.55581623",
"0.5554293",
"0.5554293",
"0.5554293",
"0.5554293",
"0.555351",
"0.5542491",
"0.5532882",
"0.5525972",
"0.552141",
"0.5499228",
"0.5496378",
"0.5495229",
"0.5478878",
"0.5471333",
"0.54693556",
"0.54567415",
"0.544163",
"0.5440849",
"0.54278517",
"0.5422743",
"0.5389951",
"0.5381244",
"0.53808504",
"0.5368724",
"0.5363693",
"0.5361924",
"0.5356778",
"0.53491455",
"0.53468424",
"0.5338492",
"0.5337816",
"0.53366524",
"0.53360903",
"0.5325474",
"0.5325474",
"0.5325474",
"0.53178215",
"0.5317453",
"0.5301097",
"0.5299043",
"0.5286477",
"0.5286061",
"0.5282702",
"0.5282152",
"0.528106",
"0.52730805",
"0.52717465",
"0.527038",
"0.5268055",
"0.5266234",
"0.5265607",
"0.5255178",
"0.5254131",
"0.5250989",
"0.5250989",
"0.52472943",
"0.5244022",
"0.52438295",
"0.5242722",
"0.5240382",
"0.52384955",
"0.5234539",
"0.5234539",
"0.5234539",
"0.5234539",
"0.52318275",
"0.523112",
"0.5229343",
"0.5228933",
"0.5216533",
"0.52147037",
"0.52141917",
"0.52118033",
"0.52113706",
"0.52107316",
"0.52058023",
"0.5199581",
"0.5198346",
"0.5197614",
"0.5194355",
"0.51934546",
"0.51890814"
]
| 0.8208635 | 0 |
Returns the queue name of this job. | @Override
public String getQueueName() {
return model.getQueueName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getQueueName();",
"public java.lang.String getQueueName() {\n return queueName;\n }",
"public String queueName();",
"@DISPID(7)\r\n\t// = 0x7. The runtime will prefer the VTID if present\r\n\t@VTID(13)\r\n\tjava.lang.String queueName();",
"com.google.protobuf.ByteString\n getQueueNameBytes();",
"String getBaseQueueName();",
"@Override\n protected String getQueueName() {return _queueName;}",
"public abstract String getQueueDisplayName();",
"public String getJobName() {\n return this.mJob;\n }",
"public String getFullJobName() {\n return jobGroup + \".\" + jobName;\n }",
"String getBaseQueueManagerName();",
"public String getJobName() {\n return jobName;\n }",
"public String getJobName() {\n return jobName;\n }",
"public String getJobName() {\n return this.jobName;\n }",
"public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n targetJobName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getJobName() {\n return this.JobName;\n }",
"public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n targetJobName_ = s;\n }\n return s;\n }\n }",
"@Override\n\tpublic String getJobName() {\n\t\treturn model.getJobName();\n\t}",
"public @Nullable CharSequence getQueueTitle() {\n try {\n return mSessionBinder.getQueueTitle();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getQueueTitle\", e);\n }\n return null;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"support\", value = \"The name of the queue\")\n @JsonProperty(JSON_PROPERTY_QUEUE)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getQueue() {\n return queue;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"support\", value = \"The name of the queue\")\n @JsonProperty(JSON_PROPERTY_QUEUE)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getQueue() {\n return queue;\n }",
"java.lang.String getTargetJobName();",
"public java.lang.Object getQueueID() {\n return queueID;\n }",
"public com.google.protobuf.ByteString\n getTargetJobNameBytes() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetJobName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getTargetJobNameBytes() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetJobName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getJobId();",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n jobId_ = s;\n }\n return s;\n }\n }",
"com.google.protobuf.ByteString\n getTargetJobNameBytes();",
"@DISPID(26)\r\n\t// = 0x1a. The runtime will prefer the VTID if present\r\n\t@VTID(31)\r\n\tjava.lang.String submissionQueue();",
"public String getProcessCompleteQueueName()\n {\n return DONE; \n }",
"@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(32)\r\n\tjava.lang.String submissionQueue();",
"String nameOfListenQueue();",
"@DISPID(112)\r\n\t// = 0x70. The runtime will prefer the VTID if present\r\n\t@VTID(107)\r\n\tjava.lang.String queue();",
"public java.lang.String getQueueStatus() {\n return queueStatus;\n }",
"public String getTaskName() {\n Object ref = taskName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}",
"public final String get_name() {\n return scheduler_name;\n }",
"public String getTaskName() {\n Object ref = taskName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskName_ = s;\n return s;\n }\n }",
"public String getJob() {\n return job;\n }",
"Queue getQueue() throws NamingException;",
"@DISPID(62)\r\n\t// = 0x3e. The runtime will prefer the VTID if present\r\n\t@VTID(67)\r\n\tint queueId();",
"public String getWorkerName(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.NAME);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n public String getTypeName() {\n return job_name;\n }",
"@DISPID(113)\r\n\t// = 0x71. The runtime will prefer the VTID if present\r\n\t@VTID(108)\r\n\tint queueId();",
"default String replyQueue() {\n return (String) metadata().get(\"x-reply-queue\");\n }",
"public Queue<JobInProgress> findQueue(String name) {\n return queues.get(name);\n }",
"public final String getName() {\n return \"job-priority\";\n }",
"public String getJobId();",
"public String getQueueBand() {\n return _queueBand;\n }",
"public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }",
"public String getBucketName() {\n return getProperty(BUCKET_NAME);\n }",
"public String getExchangeCaseMgrQueue() {\n\t\treturn exchangeCaseMgrQueue;\n\t}",
"Collection<QueuedPrintJob> getQueue();",
"public java.lang.String getQueryName() {\n java.lang.Object ref = queryName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n queryName_ = s;\n }\n return s;\n }\n }",
"public String getName() {\n\t\treturn this.toString();\n\t}",
"public String getName()\r\n {\r\n return taskName;\r\n }",
"public java.lang.String getQueryName() {\n java.lang.Object ref = queryName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n queryName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getQ() {\n java.lang.Object ref = q_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n q_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(60)\r\n\tjava.lang.String lastInstanceQueue();",
"public void setQueueName(java.lang.String queueName) {\n this.queueName = queueName;\n }",
"public String getJobId() {\n\t\treturn this.jobId;\n\t}",
"public String getJobVertexName() {\n\t\treturn jobVertexName;\n\t}",
"public String getName() {\n\t\tfinal String submitterName = getSubmitterName();\n\t\tif (submitterName != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"submitter_name\" + TAB + submitterName;\n\t\treturn null;\n\t}",
"public java.lang.String getCurrentName() {\n java.lang.Object ref = currentName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public UUID getQueuedMessageId() {\n\t\treturn queuedMessageId;\n\t}",
"public String getJobId() {\n return jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public java.lang.String getJobNumber() {\r\n return jobNumber;\r\n }",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"public Queue getQueueDir() {\n Queue result;\n synchronized (this.queueDir) {\n result = this.queueDir;\n }\n return result;\n }",
"public String getThreadName() {\n return threadName;\n }",
"public StringFilter getCurrentJobTitle() {\n\t\treturn currentJobTitle;\n\t}",
"public java.lang.String getCurrentName() {\n java.lang.Object ref = currentName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentName_ = s;\n return s;\n }\n }",
"public com.google.protobuf.ByteString\n getTaskNameBytes() {\n Object ref = taskName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n taskName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String gotoQueue() {\n\t\tselectedPlaylist = PlaylistMng.QUEUE_NAME;\n\t\tpassivePlaylist = playlistMng.getPlaylist(PlaylistMng.QUEUE_NAME);\n\t\treturn \"queue\";\n\t}",
"public com.google.protobuf.ByteString\n getTaskNameBytes() {\n Object ref = taskName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n taskName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}",
"public String taskName() {\n return this.taskName;\n }",
"public String getCurrentPrintJob()\n {\n return printerSimulator.getCurrentPrintJob();\n }",
"@java.lang.Override\n public java.lang.String getQ() {\n java.lang.Object ref = q_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n q_ = s;\n return s;\n }\n }",
"public String getName() {\r\n assert name != null;\r\n return name;\r\n }",
"public String toString()\n\t{\n\t\treturn threadName;\n\t}",
"com.google.protobuf.ByteString\n getTaskNameBytes();",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"public final synchronized String mo47204a() {\n return this.f49750a.getString(\"topic_operaion_queue\", \"\");\n }",
"public String getName() {\n if(name == null)\n return \"\"; \n return name;\n }",
"public String getName() {\n return name.get();\n }",
"public String getJobID() {\n\t\t\treturn JobID;\n\t\t}",
"public String getBucketName() {\n return bucketName;\n }",
"public String getBucketName() {\n return bucketName;\n }",
"public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }",
"public String getReplCMQueue() {\n\t\treturn replCaseManagerQueue;\n\t}",
"@Override\n\tpublic String getWaitingJobId() {\n\t\treturn null;\n\t}",
"public final String toString() {\n return scheduler_name;\n }",
"String getTaskName();",
"String getTaskName();",
"public String getName() {\r\n if (target != null) {\r\n return target.getName();\r\n }\r\n\r\n if (benchmark != null) {\r\n return benchmark.getName();\r\n }\r\n\r\n return \"\";\r\n }"
]
| [
"0.83155704",
"0.80426437",
"0.7902995",
"0.75370604",
"0.751052",
"0.74628395",
"0.7061537",
"0.691543",
"0.6889738",
"0.67703766",
"0.6727524",
"0.67271835",
"0.67271835",
"0.6724155",
"0.6715331",
"0.6686704",
"0.6680659",
"0.6655199",
"0.66494644",
"0.6596158",
"0.6596158",
"0.6537545",
"0.64488333",
"0.6427402",
"0.6406908",
"0.6328016",
"0.62616163",
"0.62560284",
"0.6244864",
"0.6222656",
"0.6218685",
"0.62073356",
"0.61811274",
"0.61463004",
"0.6144876",
"0.6110621",
"0.609507",
"0.60896885",
"0.6074075",
"0.60610855",
"0.60523707",
"0.60497516",
"0.60150725",
"0.60105836",
"0.60066116",
"0.5986352",
"0.5948969",
"0.5910529",
"0.5895127",
"0.58724827",
"0.58699965",
"0.5866242",
"0.5857652",
"0.58499604",
"0.5809621",
"0.5802823",
"0.5799698",
"0.57991683",
"0.57957244",
"0.5778484",
"0.57730997",
"0.57596236",
"0.57400566",
"0.5739114",
"0.5693467",
"0.5690667",
"0.5684236",
"0.56762636",
"0.56762636",
"0.56762636",
"0.56744164",
"0.567307",
"0.5661599",
"0.5656747",
"0.5654348",
"0.56439084",
"0.56404716",
"0.56215525",
"0.561057",
"0.5600687",
"0.55746853",
"0.5570757",
"0.55527127",
"0.5538485",
"0.5537863",
"0.5528521",
"0.5523975",
"0.5519141",
"0.55038357",
"0.550326",
"0.54931915",
"0.5492178",
"0.5492178",
"0.54780465",
"0.54758584",
"0.54728156",
"0.5471186",
"0.54674584",
"0.54674584",
"0.5451082"
]
| 0.8118305 | 1 |
Returns the reference files of this job. | @Override
public String getReferenceFiles() {
return model.getReferenceFiles();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Collection<LocalFile> referencedLocalFiles() {\n return ImmutableList.of(new LocalFile(queryOutputFilePath, LocalFileType.OUTPUT));\n }",
"public Collection<File> getRetrievedFiles() {\n Collection<File> result = new ArrayList<>(upToDateFiles.size() + copiedFiles.size());\n result.addAll(upToDateFiles);\n result.addAll(copiedFiles);\n return result;\n }",
"public List getAssociatedFiles()\n {\n return m_files;\n }",
"public List<FileObjects> getFiles() {\n\n\t\t\treturn files;\n\t\t}",
"public Set<FileRef> getSourceFiles() {\r\n return sourceFiles;\r\n }",
"List<Path> getFiles();",
"public File[] getFiles() {\n waitPainted(-1);\n Component list = getFileList();\n if(list instanceof JList) {\n ListModel<?> listModel = ((JList)list).getModel();\n File[] result = new File[listModel.getSize()];\n for (int i = 0; i < listModel.getSize(); i++) {\n result[i] = (File) listModel.getElementAt(i);\n }\n return result;\n } else if(list instanceof JTable){\n TableModel listModel = ((JTable)list).getModel();\n File[] result = new File[listModel.getRowCount()];\n for (int i = 0; i < listModel.getRowCount(); i++) {\n result[i] = (File) listModel.getValueAt(i, 0);\n }\n return result;\n } else\n throw new IllegalStateException(\"Wrong component type\");\n }",
"public ArrayList<BatchFileModel> getFiles() {\n return this.files;\n }",
"@Override\n public GitFile[] getFiles()\n {\n if(_files==null) try { _files = getFilesImpl(); } catch(Exception e) { throw new RuntimeException(e); }\n return _files;\n }",
"public String[] getListOfFiles() {\n\t\treturn listOfFiles;\n\t}",
"public List<Resource> getFileLocations() throws IOException;",
"public List<String> getDownloadableFiles() throws IOException {\n List<String> fileNameList = new ArrayList<>();\n Files.walk(Paths.get(this.sharedFolder)).forEach(ruta -> {\n if (Files.isRegularFile(ruta)) {\n fileNameList.add(ruta.getFileName().toString());\n }\n });\n return fileNameList;\n }",
"public List<String> getFiles();",
"public Files getFiles() {\n\t\treturn this.files;\n\t}",
"public List<File> getFiles();",
"protected File[] getFiles() {\r\n DirectoryScanner scanner = new DirectoryScanner(rootDir,true,\"*.xml\");\r\n List<File> files = scanner.list();\r\n return files.toArray(new File[files.size()]);\r\n }",
"public synchronized ArrayList<String> getFastaFiles(){\n\t\treturn fastaFiles;\n\t}",
"public org.hpccsystems.ws.filespray.PhysicalFileStruct[] getFiles() {\n\t\t return files;\n\t }",
"public File[] getRPFiles()\n\t{\n\t\treturn files;\n\t}",
"public List<String> getPaths() {\n List<String> result;\n synchronized (this.paths) {\n result = this.paths;\n }\n return result;\n }",
"@java.lang.Override\n public java.util.List<entities.Torrent.FileInfo> getFilesList() {\n return files_;\n }",
"public java.util.List<entities.Torrent.FileInfo> getFilesList() {\n if (filesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(files_);\n } else {\n return filesBuilder_.getMessageList();\n }\n }",
"public List<DataFile> getJobDataFiles(Job job) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn getJobDataFiles(job.getID());\n\t}",
"public ArrayList<String> getFiles() {\n\n\t\tif (m_db == null)\n\t\t\treturn new ArrayList<String>();\n\n\t\t//\n\t\t// query database\n\t\t//\n\t\tCursor cursor = m_db.query(FILE_TABLE_NAME,\n\t\t\t\tnew String[] { FILE_FIELD_PATH }, null, null, null, null, null);\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\t}",
"public List<RAFFileEntry> getFileEntries() {\n\t\treturn fileEntries;\n\t}",
"java.util.List<ds.hdfs.generated.FileMetadata> \n getFilesList();",
"GitFile[] getFilesImpl() throws Exception\n {\n TreeWalk twalk = new TreeWalk(getRepo()); twalk.addTree(_rev);\n List <GitFile> files = new ArrayList();\n while(twalk.next()) {\n ObjectId id = twalk.getObjectId(0);\n RevObject rid = getRevObject(id);\n String path = _path + (_path.length()>1? \"/\" : \"\") + twalk.getNameString();\n GitFile child = rid instanceof RevTree? new GitTree((RevTree)rid, path) : new GitBlob((RevBlob)rid, path);\n files.add(child);\n }\n return files.toArray(new GitFile[files.size()]);\n }",
"public GitFile[] getFiles() { return null; }",
"public String getRef(){\n return this.filenameWithoutExtension + \".\" + this.index;\n }",
"public File[] listFiles() {\n\n\t\tFileFilter Ff = f -> true;\n\t\treturn this.listFiles(Ff);\n\t}",
"@Override\n\tpublic String[] query() {\n\t\t// Return an array of (decoded) filenames\n\t\tif (!serviceDir.exists()) {\n\t\t\treturn new String[0];\n\t\t}\n\t\tFile[] files = serviceDir.listFiles();\n\t\tString[] addrs = new String[files.length];\n\t\tfor (int i = 0; i < addrs.length; ++i) {\n\t\t\taddrs[i] = decode(files[i].getName());\n\t\t}\n\t\treturn addrs;\n\t}",
"public String getLocationOfFiles() {\n\t\ttry {\n\t\t\tFile f = new File(\n\t\t\t\t\tgetRepositoryManager().getMetadataRecordsLocation() + \"/\" + getFormatOfRecords() + \"/\" + getKey());\n\t\t\treturn f.getAbsolutePath();\n\t\t} catch (Throwable e) {\n\t\t\tprtlnErr(\"Unable to get location of files: \" + e);\n\t\t\treturn \"\";\n\t\t}\n\t}",
"@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }",
"@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }",
"private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }",
"public List< IJob > getJobs( int maxAmount )\n {\n String fileName;\n String refFileName;\n URI fileURI;\n byte[] referenceData = null;\n InputStream ISrefData = null;\n DocumentBuilderFactory docBuilderFactory;\n DocumentBuilder docBuilder = null;\n Document doc;\n \n docBuilderFactory = DocumentBuilderFactory.newInstance();\n try\n {\n docBuilder = docBuilderFactory.newDocumentBuilder();\n }\n catch( ParserConfigurationException pce )\n {\n log.error( pce.getMessage() );\n }\n doc = docBuilder.newDocument();\n \n List<IJob> list = new ArrayList<IJob>();\n for( int i = 0; i < maxAmount && iter.hasNext() ; i++ )\n {\n fileName = (String)iter.next();\n refFileName = fileName.substring( 0, fileName.lastIndexOf( \".\" ) ) + \".ref\";\n //System.out.println( String.format( \"created ref name %s for file %s\", refFileName, fileName ) );\n File refFile = FileHandler.getFile( refFileName );\n if ( refFile.exists() )\n {\n try\n {\n ISrefData = FileHandler.readFile( refFileName );\n }\n catch( FileNotFoundException fnfe )\n {\n log.error( String.format( \"File for path: %s couldnt be read\", refFileName ) );\n }\n try\n {\n doc = XMLUtils.getDocument( new InputSource( ISrefData ) );\n }\n catch( ParserConfigurationException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( SAXException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( IOException ex )\n {\n log.error( ex.getMessage() );\n }\n \n File theFile = FileHandler.getFile( fileName );\n \n list.add( (IJob) new Job( new FileIdentifier( theFile.toURI() ), doc ) );\n }\n else\n {\n log.warn( String.format( \"the file: %s has no .ref file\", fileName ) );\n i--;\n }\n }\n return list;\n \n }",
"public LinkedList<ApfsFile> getFiles() {\n LinkedList<ApfsFile> files = new LinkedList<ApfsFile>();\n for(ApfsElement apfse: children) {\n if(apfse.isFile())\n files.add((ApfsFile) apfse);\n }\n return files;\n }",
"public List<IFile> getAllChildFiles() {\n return this.childFiles;\n }",
"java.util.List<entities.Torrent.FileInfo>\n getFilesList();",
"public ArrayList<String> getFiles() {\n\t\t// Sort list\n\t\tCollections.sort(this.files);\n\t\t\n\t\treturn this.files;\n\t}",
"public HashMap<String,File> getFile(){\r\n\t\treturn files;\r\n\t}",
"public List<File> findAll() {\n\t\treturn files;\n\t}",
"public List<String> blobPathList() {\n return this.blobPathList;\n }",
"public String[] getFiles() throws Exception\n {\n if (dir == null)\n {\n throw new Exception(\"No directory specified for filelist.\");\n }\n\n if (filenames.size() == 0)\n {\n throw new Exception(\"No files specified for filelist.\");\n }\n\n String[] result = new String[filenames.size()];\n filenames.copyInto(result);\n return result;\n }",
"@java.lang.Override\n public java.util.List<? extends entities.Torrent.FileInfoOrBuilder>\n getFilesOrBuilderList() {\n return files_;\n }",
"public Collection<File> getCopiedFiles() {\n return new ArrayList<>(copiedFiles);\n }",
"public java.util.List<? extends entities.Torrent.FileInfoOrBuilder>\n getFilesOrBuilderList() {\n if (filesBuilder_ != null) {\n return filesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(files_);\n }\n }",
"public static String[] getCacheFileList(Context context) {\n return context.fileList();\n }",
"public ClassFile[] getClassFiles() {\n\t\treturn getResult().getClassFiles();\n\t}",
"private String[] getFileNames() {\n\t\tFile directory = new File(this.getClass().getClassLoader()\n\t\t\t\t.getResource(\"data\").getFile());\n\t\tList<String> fileNames = new ArrayList<String>();\n\n\t\tfor (File file : directory.listFiles())\n\t\t\tfileNames.add(file.getName());\n\n\t\treturn fileNames.toArray(new String[fileNames.size()]);\n\t}",
"protected ArrayList<String> getCheckedFiles()\n {\n SparseBooleanArray items = fileList.getCheckedItemPositions();\n ArrayList<String> files = new ArrayList<String>();\n \n for (int i = 0; i < items.size(); i++)\n {\n if (items.valueAt(i))\n {\n files\n .add(fileList.getItemAtPosition(items.keyAt(i)).toString());\n }\n }\n \n return files;\n }",
"public java.util.List<entities.Torrent.FileInfo.Builder>\n getFilesBuilderList() {\n return getFilesFieldBuilder().getBuilderList();\n }",
"public List<FileWithFaultLocations> getFaultyFiles();",
"public List<TbomFile> getFileList() {\n\t\treturn fileList;\n\t}",
"public Map<String,List<RevisionFile>> getSourceFiles();",
"public abstract List<String> getFiles( );",
"public CopyFile[] getFilesToCopy()\n\t{\n\t\treturn filesToCopy;\n\t}",
"public abstract List<LocalFile> getAllFiles();",
"public List<UpdateFile> getClientFileList() {\n List<UpdateFile> clientFileList = new ArrayList<>();\n listFilesFromDirectory(Paths.get(userLocalDirectory), clientFileList);\n return clientFileList;\n }",
"public Collection<Reference> getReferences();",
"public final List<Element> getReferences() {\r\n return this.getReferences(true, true);\r\n }",
"protected final List<FileObjectView> computeInvokableFiles() {\n if (currentFiles == null || currentFiles.length == 0) {\n return Collections.EMPTY_LIST;\n }\n final List<FileObjectView> r = new ArrayList();\n for (int i = 0; i < currentFiles.length; i++) {\n if (invokable(currentFiles[i])) {\n r.add(currentFiles[i]);\n }\n }\n return r;\n }",
"public List<GitFileSystemEntry> getWorkingDirFiles() {\n return null;\n }",
"public synchronized ResultSet getFileList() {\n try {\n return statement.executeQuery(\"select * from FileManager\");\n } catch (SQLException ex) {\n Logger.getLogger(DataManager.class.getName()).log(Level.SEVERE,\n null, ex);\n }\n\n return null;\n }",
"public LinkedList<File> getCodebookFiles() {\n\t\treturn codebookFile;\n\t}",
"public String getPathToDefinitionFiles() {\n\treturn msPathToDefinitionFiles;\n }",
"public Table getOutputFiles() {\n\treturn _outputFiles;\n }",
"public String[] listFilesString() {\n\t\tFile[] FL = listFiles();\n\t\treturn FU.listFilesString(FL);\n\t}",
"public java.lang.String[] getDeletedFiles(){\r\n return localDeletedFiles;\r\n }",
"public Vector<String> listFiles()\n {\n Vector<String> fileNames = new Vector<String>();\n\n File[] files = fileLocation.listFiles();\n\n for (File file : files)\n {\n fileNames.add(file.getName());\n }\n\n return fileNames;\n }",
"public Cluster[] getReferences () {\n return references;\n }",
"public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}",
"public List<Path> getPaths() {\n return _thePaths;\n }",
"public List<File> getListing(){\n\t return getFileList(new File(defaultPath));\n }",
"public HashMap<String, String> getAllFiles() {\n return _allFiles;\n }",
"public File getObject() {\n return _objects;\n }",
"public File[] getScriptFiles() {\n\t\treturn new File[] { scriptFile };\n\t}",
"public Map<String, TranslationFile> getFiles() {\n\t\treturn files;\n\t}",
"public List<String> openFileHandles() {\n return this.openFileHandles;\n }",
"public String[] getFilesOnServer() {\n Log.i(\"getFilesFor\", \"Getting all files on server available to \"\n + new KeyGenerator(context).getPublicKeyAsString());\n Cursor resultSet = database.rawQuery(\n \"SELECT DISTINCT File FROM FileKeys WHERE UserPublicKey = \" +\n \"'\" + new KeyGenerator(context).getPublicKeyAsString() + \"'\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }",
"public String[] GetAllFileNames() {\n \tFile dir = new File(fileStorageLocation.toString());\n \tString[] matchingFiles = dir.list(new FilenameFilter() {\n \t public boolean accept(File dir, String name) {\n \t return name.startsWith(\"1_\");\n \t }\n \t});\n \t\n \tfor (int i=0; i < matchingFiles.length; i++)\n \t{\n \t\tmatchingFiles[i] = matchingFiles[i].replaceFirst(\"1_\", \"\");\n \t}\n \t\n return matchingFiles;\n }",
"public Collection<UniqueID> getReferenceList() {\n return ObjectGraph.getReferenceList(this.id);\n }",
"public List<AssetRef> retrieveAllRefs(Date cutoffDate) throws IOException, SQLException {\n List<AssetRef> assetRefList = null;\n String select = \"select definition_id, name, ref from ASSET_REF \";\n if (cutoffDate != null)\n select += \"where ARCHIVE_DT >= ? \";\n select += \"order by ARCHIVE_DT desc\";\n try (Connection conn = getDbConnection();\n PreparedStatement stmt = conn.prepareStatement(select)) {\n if (cutoffDate != null)\n stmt.setTimestamp(1, new Timestamp(cutoffDate.getTime()));\n try (ResultSet rs = stmt.executeQuery()) {\n assetRefList = new ArrayList<AssetRef>();\n while (rs.next()) {\n String name = rs.getString(\"name\");\n if (name != null && !name.endsWith(\"v0\")) // Ignore version 0 assets\n assetRefList.add(new AssetRef(rs.getString(\"name\"), rs.getLong(\"definition_id\"), rs.getString(\"ref\")));\n }\n }\n }\n return assetRefList;\n }",
"public DBCursor getFileList() {\n\treturn getFileList(new BasicDBObject());\n }",
"public java.util.List getImportedJarPaths() {\n \t\treturn importedJarPaths;\n \t}",
"private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }",
"public List<FileManagerFile> getFiles() throws Exception {\n\n if (files == null) { // defer loading files list until requested.\n cacheFoldersFiles();\n }\n return files;\n }",
"public List<String> getAllNotComputedFilesPath() throws TBException {\r\n\t\treturn getNotComputedFilesPath(new File(rootTBFolder).getAbsolutePath());\r\n\t\t\r\n\t}",
"public ReferenceList getRefList( )\n {\n return _refList;\n }",
"public NestedSet<Artifact> getInstrumentedFiles() {\n return instrumentedFiles;\n }",
"public ArrayList<String> getPendingFiles() {\n\n\t\tif (m_db == null) {\n\t\t\t//\n\t\t\t// database not yet initialized\n\t\t\t//\n\t\t\treturn null;\n\t\t}\n\n\t\tCursor cursor = m_db.query(PENDING_FILE_TABLE_NAME,\n\t\t\t\tnew String[] { PENDING_FIELD_PATH }, null, null, null, null,\n\t\t\t\tPENDING_FIELD_PATH + \" DESC\");\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\n\t}",
"public List<String> getListFilePath() throws AncestryException {\n\t\tList<String> listFormKey = new ArrayList<String>();\n\t\tConnection con = null;\n\t\tString sql = \"\";\n\t\ttry {\n\t\t\tsql = \"SELECT filepath FROM \" + management + \" WHERE step =4 GROUP BY filepath ORDER BY filepath\";\n\t\t\tcon = db.getConnectByProject(project);\n\t\t\tlistFormKey = JdbcHelper.queryToSingleList(con, sql , true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new AncestryException(\"getListFilePath : \" + e.toString() ,e);\n\t\t}\n\t\tfinally {\n\t\t\tJdbcHelper.close(con);\n\t\t}\n\t\treturn listFormKey;\n\t}",
"@Override\r\n\tpublic List<FileMetaDataEntity> getAllFiles() {\n\t\treturn null;\r\n\t}",
"private List<File> getSearchFiles() {\n\t\tif (searchDirs == null || searchDirs.size() <= 0) {\n\n\t\t\tsearchDirs = new ArrayList<File>();\n\t\t\t\n\t\t\tsearchDirs.add(StorageUtils.getLocalCacheDir(this));\n//\t\t\tsearchDirs.add(StorageUtils.getExternalCacheDir(this));\n\t\t\tsearchDirs.add(StorageUtils.getFavorDir(this));\n\t\t}\n\t\treturn searchDirs;\n\t}",
"public java.util.List<ReferenceLine> getReferenceLines() {\n return referenceLines;\n }",
"public File[] getLocalFiles() {\n\t\tFile[] filesArray = new File(this.fileStorage.toString()).listFiles(\n\t\t\t\tnew FileFilter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean accept(File file) {\n\t\t\t\t\t\treturn !file.isHidden();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\treturn filesArray;\n\t}",
"public HashMap<String, InputStream> getPlaceFiles() {\n\t\treturn getFilesByPath(PLACES_PATH);\n\t}",
"IIndexFragmentFile[] getFiles(IIndexFileLocation location) throws CoreException;",
"@Override\n public List<RefsetEntry> getRefsetEntries() {\n return refsetEntries;\n }",
"private LinkedList<String> getFileURIs(IResource[] members, String fileExtension) throws CoreException {\r\n\t\tLinkedList<String> uriList = new LinkedList<String>();\r\n\r\n\t\tIFile tmpFile;\r\n\t\tIFolder tmpFolder;\r\n\r\n\t\tfor (IResource resource : members) {\r\n\t\t\tif (resource.getType() == IResource.FOLDER) {\r\n\t\t\t\ttmpFolder = (IFolder) resource;\r\n\t\t\t\turiList.addAll(getFileURIs(tmpFolder.members(), fileExtension));\r\n\t\t\t}\r\n\r\n\t\t\tif (resource.getType() == IResource.FILE) {\r\n\t\t\t\ttmpFile = (IFile) resource;\r\n\t\t\t\tif (tmpFile.getFileExtension().equals(fileExtension)) {\r\n\t\t\t\t\turiList.add(tmpFile.getLocationURI().toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn uriList;\r\n\t}"
]
| [
"0.6611204",
"0.6503567",
"0.62992936",
"0.6217827",
"0.61817324",
"0.613476",
"0.608591",
"0.6085515",
"0.60813445",
"0.6078413",
"0.5971642",
"0.5934963",
"0.59326977",
"0.59305584",
"0.58817494",
"0.58489776",
"0.5836431",
"0.5798586",
"0.5792963",
"0.5789573",
"0.5756564",
"0.57429874",
"0.5740872",
"0.5739111",
"0.57047457",
"0.57020605",
"0.5701352",
"0.56868637",
"0.56638575",
"0.56523347",
"0.5652059",
"0.5640561",
"0.5634557",
"0.5634557",
"0.562935",
"0.5627665",
"0.56262463",
"0.56190705",
"0.5601821",
"0.557562",
"0.5571927",
"0.55684716",
"0.55598694",
"0.55526495",
"0.554913",
"0.55482054",
"0.5547785",
"0.55382216",
"0.5530624",
"0.5514562",
"0.55137515",
"0.54952097",
"0.548621",
"0.54836863",
"0.54831576",
"0.5466373",
"0.5462475",
"0.54469573",
"0.5438807",
"0.54350233",
"0.54332304",
"0.5433005",
"0.5429604",
"0.5428969",
"0.5428761",
"0.54114735",
"0.5405872",
"0.5383843",
"0.53837556",
"0.5379349",
"0.53774595",
"0.53774303",
"0.53722113",
"0.53700334",
"0.53660965",
"0.536357",
"0.5361505",
"0.535705",
"0.5355811",
"0.5354297",
"0.53486276",
"0.5346842",
"0.53388685",
"0.5338129",
"0.53354365",
"0.5326468",
"0.532593",
"0.53231186",
"0.53068686",
"0.53041595",
"0.5303532",
"0.53030646",
"0.52977896",
"0.52930546",
"0.52889043",
"0.5288466",
"0.52789557",
"0.5275808",
"0.52729315",
"0.52701515"
]
| 0.7879155 | 0 |
Returns the reserve results of this job. | @Override
public boolean getReserveResults() {
return model.getReserveResults();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Reserve getReserve() {\n return reserve;\n }",
"@Override\n\tpublic boolean isReserveResults() {\n\t\treturn model.isReserveResults();\n\t}",
"public String getReserve() {\n return reserve;\n }",
"public List reserveAll() {\n \n final List result;\n final List reserveList;\n \n synchronized (m_reservableListMutex) {\n purgeZombieResources();\n \n result = new ArrayList(m_reservables.size());\n reserveList = new ArrayList(m_reservables);\n }\n \n while (reserveList.size() > 0) {\n // Iterate backwards so remove is cheap.\n final ListIterator iterator =\n reserveList.listIterator(reserveList.size());\n \n while (iterator.hasPrevious()) {\n final Reservable reservable = (Reservable)iterator.previous();\n \n if (reservable.isSentinel()) {\n iterator.remove();\n }\n else if (reservable.reserve()) {\n result.add(reservable);\n iterator.remove();\n }\n else if (reservable.isClosed()) {\n iterator.remove();\n }\n }\n \n if (reserveList.size() > 0) {\n // Block until more resources are freed.\n synchronized (m_reservableMutex) {\n try {\n // Don't block for ever because the outstanding\n // resources might have already been freed.\n m_reservableMutex.wait(1000);\n }\n catch (InterruptedException e) {\n throw new UncheckedInterruptedException(e);\n }\n }\n }\n }\n \n return result;\n }",
"@java.lang.Override\n public java.util.List<POGOProtos.Rpc.CombatProto.CombatPokemonProto> getReservePokemonList() {\n return reservePokemon_;\n }",
"@Override\n\tpublic void setReserveResults(boolean reserveResults) {\n\t\tmodel.setReserveResults(reserveResults);\n\t}",
"public java.util.List<POGOProtos.Rpc.CombatProto.CombatPokemonProto> getReservePokemonList() {\n if (reservePokemonBuilder_ == null) {\n return java.util.Collections.unmodifiableList(reservePokemon_);\n } else {\n return reservePokemonBuilder_.getMessageList();\n }\n }",
"public String[] getJobsWaiting();",
"java.util.List<POGOProtos.Rpc.CombatProto.CombatPokemonProto> \n getReservePokemonList();",
"@Override\n\tpublic int selectReserveCount() {\n\t\treturn dgCallServiceMapper.selectReserveCount();\n\t}",
"public List<Transaction> getAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"@java.lang.Override\n public int getReservePokemonCount() {\n return reservePokemon_.size();\n }",
"@DOpt(type=DOpt.Type.DerivedAttributeUpdater)\n @AttrRef(value=\"reservations\")\n public void doReportQuery() throws NotPossibleException, DataSourceException {\n\n QRM qrm = QRM.getInstance();\n\n // create a query to look up Reservation from the data source\n // and then populate the output attribute (reservations) with the result\n DSMBasic dsm = qrm.getDsm();\n\n //TODO: to conserve memory cache the query and only change the query parameter value(s)\n Query q = QueryToolKit.createSearchQuery(dsm, Reservation.class,\n new String[]{Reservation.AttributeName_Status},\n new Expression.Op[]{Expression.Op.MATCH},\n new Object[]{status});\n\n Map<Oid, Reservation> result = qrm.getDom().retrieveObjects(Reservation.class, q);\n\n if (result != null) {\n // update the main output data\n reservations = result.values();\n\n // update other output (if any)\n numReservations = reservations.size();\n } else {\n // no data found: reset output\n resetOutput();\n }\n }",
"public Collection<Long> getAvailableItems();",
"@java.lang.Override\n public java.util.List<? extends POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder> \n getReservePokemonOrBuilderList() {\n return reservePokemon_;\n }",
"@Override\n\tpublic List<AvailableSlot> getAvailableSlots() {\n\t\tList<AvailableSlot> slots = (List<AvailableSlot>) availableSlotRepository.findAll();\n\t\treturn slots;\n\t}",
"public List<TransactionReportRow> generateReportOnAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;",
"public List<ReservaEntity> getReservas() {\n LOGGER.log(Level.INFO, \"Inicia proceso de consultar todas las reservas\");\n // Note que, por medio de la inyección de dependencias se llama al método \"findAll()\" que se encuentra en la persistencia.\n List<ReservaEntity> reservas = persistence.findAllReservas();\n LOGGER.log(Level.INFO, \"Termina proceso de consultar todas las reservas\");\n return reservas;\n }",
"List<Reservierung> selectAll() throws ReservierungException;",
"public long countAllReserveTransactions() throws MiddlewareQueryException;",
"public Iterator <R> getAllReservations(){\n IterR iter = new IterR();\n return iter;\n }",
"public ArrayList<Reservation> getReservation() {\n return reservations;\n }",
"protected void showReservations() {\n storageDao.findAllRented()\n .forEach(System.out::println);\n }",
"public Map<String, Integer> getAllReadyTasks() {\n if (!regCenter.isExisted(ReadyNode.ROOT)) {\n return Collections.emptyMap();\n }\n List<String> jobNames = regCenter.getChildrenKeys(ReadyNode.ROOT);\n Map<String, Integer> result = new HashMap<>(jobNames.size(), 1);\n for (String each : jobNames) {\n String times = regCenter.get(ReadyNode.getReadyJobNodePath(each));\n if (!Strings.isNullOrEmpty(times)) {\n result.put(each, Integer.parseInt(times));\n }\n }\n return result;\n }",
"public List<Point> getReservedSpace(){\n\t\treturn reservedSpace;\n\t}",
"public List<TransactionOutput> calculateAllSpendCandidates() {\n return calculateAllSpendCandidates(true, true);\n }",
"@SuppressWarnings(\"unchecked\")\n @Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_COMMITTED)\n public List<Reservations> getAll() {\n Session s = sessionFactory.getCurrentSession();\n Query hql = s.createQuery(\"From Reservations\");\n return hql.list();\n }",
"@Override\n\tpublic List<Parking> employeeavailableParking() {\n\t\treturn parkingRepository.employeeavailableParking();\n\t}",
"public java.util.List<String> getReservedInstancesIds() {\n if (reservedInstancesIds == null) {\n reservedInstancesIds = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n reservedInstancesIds.setAutoConstruct(true);\n }\n return reservedInstancesIds;\n }",
"private Integer[] getAbandonedJobs() {\r\n\t\tlog.info(\"Searching for abandoned jobs ...\");\r\n\t\tlog.info(\" \");\r\n\r\n\t\tList<Integer> jobs = new ArrayList<Integer>();\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tString qs = \"select id from batchjobinstance where status = 'Running' and startDateTime < now() + interval -1 day\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(qs);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tjobs.add(rs.getInt(\"id\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlog.error(\"Exception encountered while attempting to retrieve abandoned jobs: \" + e.toString() + \"; \" + e.getMessage(), e);\r\n\t\t\tlog.error(\"SQL statement: \" + qs);\r\n\t\t} finally {\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on rs.close(): \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\trs = null;\r\n\t\t\t}\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on stmt.close(): \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\tstmt = null;\r\n\t\t\t}\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on conn.close(): : \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\tconn = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlog.info(jobs.size() + \" abandoned job(s) found\");\r\n\t\tlog.info(\" \");\r\n\r\n\t\treturn jobs.toArray(new Integer[0]);\r\n\t}",
"public Vector getResultObjects() {\n\treturn _vcResults;\n }",
"public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }",
"public java.util.List<? extends POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder> \n getReservePokemonOrBuilderList() {\n if (reservePokemonBuilder_ != null) {\n return reservePokemonBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(reservePokemon_);\n }\n }",
"@Override\n\tpublic List<Parking> availableParking() {\n\t\treturn parkingRepository.availableParking();\n\t}",
"public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProto getReservePokemon(int index) {\n return reservePokemon_.get(index);\n }",
"@RequestMapping(value = \"/Reservation\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic List<Reservation> listReservations() {\n\t\treturn new java.util.ArrayList<Reservation>(reservationService.loadReservations());\n\t}",
"public java.lang.String getReserve10() {\n return reserve10;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getReservePokemonOrBuilder(\n int index) {\n return reservePokemon_.get(index);\n }",
"public final Map<Agent, ReplicationResult> getResults() {\n return this.results;\n }",
"public static ArrayList<Request> loadRequests() {\n ArrayList<Request> requests = new ArrayList<Request>();\n try {\n Connection connection = DBHelper.getConnection();\n PreparedStatement statement = connection.prepareStatement(\"SELECT * \" + \n \"FROM requestsToApprove\");\n ResultSet results = statement.executeQuery();\n while (results.next()) {\n\n Resource tempResource = Resource.getResource(results.getInt(\"rID\"));\n if (tempResource != null) {\n // resource exits\n requests.add(new Request(results.getString(\"username\"),\n tempResource));\n } // otherwise do nothing. Should warn user\n\n }\n return requests;\n\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Object getResults() throws InterruptedException, ExecutionException {\n\t\t\treturn result.get();\n\t}",
"public synchronized double getReservePrice(){\n \treturn reserve_price;\n }",
"protected synchronized ArrayList<Person> getResources(Job job) {\n\n // Declarations\n ResourcePool skillGroup;\n ArrayList<Person> candidates;\n boolean areAllRequirementsMet;\n String workerLogLine;\n Person worker;\n HashMap<String, Integer> mapOfNeededSkills;\n\n // Definitions\n candidates = new ArrayList<>();\n areAllRequirementsMet = true;\n workerLogLine = \"\";\n mapOfNeededSkills = new HashMap<>();\n\n /**\n * Implementation suggested <a href=\"https://stackoverflow.com/questions/81346\">here</a> as\n * an ideal Java 8 solution. Basically, to more easily keep track of duplicate skills needed\n * (i.e. two cooks for a job), we create a <code>HashMap</code> entry of that skill to\n * <code>mapOfNeededSkills</code> where the value is the number of workers with that skill\n * that are required to complete the job.\n */\n job.getRequirements().forEach((String skill) -> {\n mapOfNeededSkills.merge(skill, 1, Integer::sum);\n });\n\n outerLoop:\n for (String skill : job.getRequirements()) {\n\n // Grab the resource pool possessing all the workers who have this skill in the port\n skillGroup = this.getResourcePools().get(skill);\n\n // If no workers exist in the port with this specific skill...\n if (skillGroup == null) {\n job.getStatusLog().append(\"No qualified workers found for \" + job.getName()\n + \" (\" + job.getParentShip().getName() + \")\\n\");\n\n // Release the chopstick, Socrates\n this.returnResources(candidates);\n job.endJob();\n return new ArrayList<>();\n\n // If the total number of people with this skill is smaller than the needed number...\n } else if (skillGroup.getPersonsInPool().size() < mapOfNeededSkills.get(skill)) {\n job.getStatusLog().append(\"Not enough qualified workers found for \" + job.getName()\n + \" (\" + job.getParentShip().getName() + \")\\n\");\n\n // Gimme the fork, Epicurus\n this.returnResources(candidates);\n job.endJob();\n return new ArrayList<>();\n\n // Otherwise...\n } else {\n\n // For all workers with the required skill\n for (Person person : skillGroup.getPersonsInPool()) {\n\n // If this individual is not employed\n if (!person.getIsWorking()) {\n skillGroup.reservePerson(person);\n candidates.add(person);\n continue outerLoop;\n }\n }\n\n // If no available workers are present, we have to keep waiting\n areAllRequirementsMet = false;\n break;\n }\n } // end outerLoop\n\n // Basically a case of logical conjunction; we only return workers if all cases are true\n if (areAllRequirementsMet) {\n workerLogLine += job.getName() + \" (\" + job.getParentShip().getName() + \") reserving\";\n\n for (int i = 0; i < candidates.size(); i++) {\n worker = candidates.get(i);\n\n if (i == 0) {\n workerLogLine += \" \";\n } else if (i < candidates.size() - 1) {\n workerLogLine += \", \";\n } else {\n workerLogLine += \" & \";\n }\n\n workerLogLine += worker.getName();\n }\n job.getStatusLog().append(workerLogLine + \"\\n\");\n\n return candidates;\n } else {\n\n this.returnResources(candidates);\n return null;\n }\n }",
"public String[] getAllJobs();",
"public double getCellReservePrice() {\r\n\t\treturn CellReservePrice;\r\n\t}",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getReservePokemon(int index);",
"public Long getWaiting_query_rows_examined() {\n return waiting_query_rows_examined;\n }",
"public Reservation reserveNext() {\n synchronized (m_reservableListMutex) {\n purgeZombieResources();\n \n while (true) {\n if (++m_lastReservable >= m_reservables.size()) {\n m_lastReservable = 0;\n }\n \n final Reservable reservable =\n (Reservable)m_reservables.get(m_lastReservable);\n \n if (reservable.reserve()) {\n return reservable;\n }\n }\n }\n }",
"@GetMapping(\"/table/checkAvailabilityList\")\n\tpublic List<TableRestaurant> getAvailabilityList()\n\t{\n\t\tList<TableRestaurant> availableTime = tableRepo.checkTableAvailabilityList();\n\t\tif(availableTime.equals(null))\n\t\t{\n\t\t\tthrow new UniquoNotFoundException(\"The waiting time cannot be calculated\");\n\t\t}\n\t\treturn availableTime;\n\t}",
"public ArrayList<Point> getAvailableSlots ()\n {\n return availableSlots;\n }",
"@Override\n\tpublic List<ParkingOrder> getParkingRequests() {\n\t\treturn parkingRepository.getParkingRequests();\n\t}",
"@Override\n @XmlElement(name = \"result\", required = true)\n public Collection<Result> getResults() {\n return results = nonNullCollection(results, Result.class);\n }",
"public List<String> query1(){\n List<String> list = this.stats.bus_non_available(this.mR.clone(), this.mB.clone());\n return list;\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getReservePokemonOrBuilder(\n int index);",
"private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * pickedduration;\n if (pickedAccount.getBalance() >= amount) {\n currentReservation = new Reservation(pickedparkingspot, pickedAccount, pickedtime, pickedduration);\n validateReservation(currentReservation);\n } else {\n System.out.println(\"Insufficient balance\");\n }\n }",
"public Map<String, Result> getResults() {\n return results;\n }",
"public List<Transaction> getAllReserveTransactionsByRequestor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;",
"private String jobs() {\r\n\t\tint[] j=tile.getJobs();\r\n\t\tString out = \"Jobs Are: \";\r\n\t\tfor(int i=0; i<j.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+(j[i])+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}",
"@Override\r\n\tpublic List<ReserveDto> selectAdminNoMem() {\n\t\treturn null;\r\n\t}",
"public java.util.List<POGOProtos.Rpc.CombatProto.CombatPokemonProto.Builder> \n getReservePokemonBuilderList() {\n return getReservePokemonFieldBuilder().getBuilderList();\n }",
"public static List<ReserveTime> getServiceNotYetReserveTime(Services service) {\n\t\tConnection conn = DBConnection.getConnection();\n\t\tList<ReserveTime> reserveTimes = new ArrayList<>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tString command = \"SELECT\" +\n\t\t\t\t\t\" rt.ID,\" +\n\t\t\t\t\t\" rt.DAY_ID,\" +\n\t\t\t\t\t\" rt.RES_CODE_ID,\" +\n\t\t\t\t\t\" rt.ST_TIME\" +\n\t\t\t\t\t\" FROM\" +\n\t\t\t\t\t\" reservetimes rt,\" +\n\t\t\t\t\t\" reservetimeservices rts\" +\n\t\t\t\t\t\" WHERE\" +\n\t\t\t\t\t\" rt.ID = rts.RES_TIME_ID\" +\n\t\t\t\t\t\" AND rt.STATUS = \" + ReserveTimeStatus.RESERVED.getValue() +\n\t\t\t\t\t\" AND rts.SERVICE_ID = \" + service.getID() +\n\t\t\t\t\t\" AND rt.RESERVE_GR_TIME > NOW()\" +\n\t\t\t\t\t\" ORDER BY rt.ID DESC;\";\n\t\t\tResultSet rs = stmt.executeQuery(command);\n\t\t\tfillBriefServerTimes(rs, reserveTimes);\n\t\t}catch(SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn reserveTimes;\n\t}",
"public ExecutionResults getExecutionResults() {\n\t\treturn results ;\n\t}",
"public int getReservePokemonCount() {\n if (reservePokemonBuilder_ == null) {\n return reservePokemon_.size();\n } else {\n return reservePokemonBuilder_.getCount();\n }\n }",
"public BulkItemResponse getExecutionResult() {\n assert assertInvariants(ItemProcessingState.EXECUTED);\n return executionResult;\n }",
"public String getResults() {\r\n return returnObject.getResults();\r\n }",
"public BulkShardResponse buildShardResponse() {\n assert hasMoreOperationsToExecute() == false;\n return new BulkShardResponse(\n request.shardId(),\n Arrays.stream(request.items()).map(BulkItemRequest::getPrimaryResponse).toArray(BulkItemResponse[]::new)\n );\n }",
"public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}",
"public ArrayList<Integer> getResults(){\n return results;\n }",
"public static ArrayList<ArrayList<String>> getFullWaitlist() {\r\n con = DBConnection.getConnection();\r\n waitlist.clear();\r\n try {\r\n PreparedStatement getAll = con.prepareStatement(\"Select * from Waitlist order by DATE, TIMESTAMP\");\r\n ResultSet res = getAll.executeQuery();\r\n\r\n WaitlistQueries.getArrayListResult(res);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return waitlist;\r\n }",
"public Collection<T> getDownsampledContents() {\n return reservoir;\n }",
"public List<BenchmarkResultSet> getResults() {\n return results;\n }",
"public Integer getFreeSlots() {\n return AvailableSlots.size();\n }",
"public Collection<BatchJobParameters> getCurrentJobs() {\n return runningJobs.values();\n }",
"Collection<Reservation> getReservations() throws DataAccessException;",
"int getReservePokemonCount();",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto getReservePokemon(int index) {\n if (reservePokemonBuilder_ == null) {\n return reservePokemon_.get(index);\n } else {\n return reservePokemonBuilder_.getMessage(index);\n }\n }",
"public LinkedBlockingQueue<Run> getCompletedRuns() {\n\t\treturn new LinkedBlockingQueue<Run>(completedRuns);\n\t}",
"DataResult<List<Job>> getAll();",
"public void cacheResult(\n\t\tjava.util.List<suiluppo_equip_allocation> suiluppo_equip_allocations);",
"public synchronized long getSlots() {\n return slots;\n }",
"public java.lang.String getReserve1() {\n return reserve1;\n }",
"public Queue<Student> getWaitlist(){\n return waitlist;\n }",
"public Result getResults()\r\n {\r\n return result;\r\n }",
"public ArrayList<R> getResults() {\n return results;\n }",
"private String getSeatsAvailable(){\n int Available= CourseCapacity - RegisteredStudents.size();\n return Available+\"/\"+ CourseCapacity;\n }",
"public java.util.List<suiluppo_equip_allocation> findAll();",
"private static ArrayList<Map> checkAvailability(ArrayList<Map> res) {\n\t\tArrayList<Map> availableSlot = new ArrayList<Map>();\r\n\t\tfor (Map center : res) {\r\n\t\t\tint age = (int) center.get(\"min_age_limit\");\r\n\t\t\tif(age == AGE) {\r\n\t\t\t\tint dose1 = (int) center.get(\"available_capacity_dose1\");\r\n\t\t\t\tif(dose1>0) {\r\n\t\t\t\t\tSystem.out.println(\"available for 45+ :\" + center);\r\n\t\t\t\t\tavailableSlot.add(center);\r\n\t\t\t\t\t//END = true;\r\n\t\t\t\t}\r\n\t\t\t}else if( age == 18) {\r\n\t\t\t\tint dose1 = (int) center.get(\"available_capacity_dose1\");\r\n\t\t\t\tif(dose1>0) {\r\n\t\t\t\t\tSystem.out.println(\"available for 18+ :\" +center);\r\n\t\t\t\t\tavailableSlot.add(center);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn availableSlot;\r\n\t}",
"public void getBookAvailability() {\n getBookReservationEligibility();\n }",
"public ArrayOfFindResult getResults() {\n return results;\n }",
"@Override\n\tpublic Reserve getReserveById(int rid) {\n\t\treturn reserveDao.getReserveById(rid);\n\t}",
"public List<Item> getAllItemsAvailable();",
"static boolean RequestResourse(int Available[], int Allocation[][], int Need[][], int Request[], int ProcessNumber,\n\t\t\tint Processes, int Resourses) {\n\t\tint n = Processes;\n\t\tint m = Resourses;\n\t\tint[] AvailableTemp = new int[m];\n\t\tint[][] AllocationTemp = new int[n][m];\n\t\tint[][] NeedTemp = new int[n][m];\n\t\tint[] Req = new int[m];\n\t\tint Pro_Number = ProcessNumber;\n///////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tAvailableTemp[i] = Available[i];\n\t\t}\n//////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tReq[i] = Request[i];\n\t\t}\n//////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tAllocationTemp[i][j] = Allocation[i][j];\n\t\t\t}\n\t\t}\n/////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tNeedTemp[i][j] = Need[i][j];\n\t\t\t}\n\t\t}\n////////////////////////////////////////////////////////////////\t\t\n\t\tboolean Check = true;\n\t\t// For first Check\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tif (NeedTemp[Pro_Number][i] < Req[i]) {\n\t\t\t\tCheck = false; // error condition\n\t\t\t}\n\n\t\t}\n\t\tif (Check) {\n\t\t\tfor (int i = 0; i < m; i++) \n\t\t\t\tif (AvailableTemp[i] < Req[i]) \n\t\t\t\t\tCheck = false; // must be wait .\n\t\t\t\t\n\t\t\t\n\t\t\t// if en all check is true .\n\t\t\t// Step Three .\n\t\t\tif (Check) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tAvailableTemp[i] = AvailableTemp[i] - Req[i];\n\t\t\t\t\tAllocationTemp[Pro_Number][i] = AllocationTemp[Pro_Number][i] + Req[i];\n\t\t\t\t\tNeedTemp[Pro_Number][i] = NeedTemp[Pro_Number][i] - Req[i];\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"No Of processes : \" + n + \"No Of Resources : \" + m +\"\\n\");\n\t\t\t\tSystem.out.println(\"Allocation Before Safe Algorthim : \" + \"\\n\") ;\n\t\t\t\tfor (int i = 0 ; i < n ; i++ )\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0 ; j < m ; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(AllocationTemp[i][j] + \" \") ; \n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tSystem.out.println(\"Available Before Safe Algorithm : \") ;\n\t\t\t\tfor (int i =0 ; i < m; i++ )\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(AvailableTemp[i]+\" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tSystem.out.println(\"Need Before Safe Algorithm :\");\n\t\t\t\tfor (int i = 0 ; i < n ; i++ )\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0 ; j < m ; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(NeedTemp[i][j] + \" \") ; \n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tif (Safe(n, m, AllocationTemp, NeedTemp, AvailableTemp)) \n\t\t\t\t{\tSystem.out.println(\"testing.\") ; \n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse { \n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"this request cant be granted . \") ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t else \n\t\t\t {\n\t\t\t\tSystem.out.println(\"P\" + Pro_Number + \"this process must be wait in request algorthim . \");\n\t\t\t }\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Raise error condition , since process has exceeded its maximum claim. \");\n\t\treturn false;\n\n\t}",
"private void getResults(GetResultRequestEvent e){\n\t\ttable.generateTable(tf.getItemIDList(),\n\t\t\t\te.getBuySystem(), e.getBuyType(),\n\t\t\t\te.getSellSystem(), e.getSellType(),\n\t\t\t\te.getMinimumMargin());\n\t}",
"@Override\n\tpublic List<ReservationDetails> getMyReservations(User user) {\n\t\t\n\t\t\n\t\treturn rdDAO.getMyReservations(user);\n\t}",
"public List<Resource> getAvailableResources();",
"public IScapSyncSearchResult[] getResults();",
"@Override\n\tpublic List<Parking> vIPavailableParking() {\n\t\treturn parkingRepository.vIPavailableParking();\n\t}",
"@Override\n\tpublic List<DisplayResult> getResults(ReferencedEnvelope bounds) {\n\t\t\n\t\tString whereClause = bounds != null ? \"WHERE ST_Transform(geom, 4326) && ST_MakeEnvelope(\"+bounds.getMinX()+\",\"+bounds.getMinY()+\",\"+bounds.getMaxX()+\",\"+bounds.getMaxY()+\") \" : \"\";\n\t\t\n\t\t//Only latest results\n\t\tString query = \"SELECT DISTINCT ON (meshblock_id) id, meshblock_id, operat_score, date_entered, ST_AsText(ST_Transform(centroid,4326)), ST_AsText(ST_Transform(geom,4326)), \"\n\t\t\t\t+ \"natural_elements_score, incivilities_and_nuisance_score, navigation_and_mobility_score, territorial_score \"\n\t\t\t\t+ \"FROM result \"\n\t\t\t\t+ whereClause\n\t\t\t\t+ \"ORDER BY meshblock_id, date_entered DESC;\";\n\n\t\tSystem.out.println(query);\n\t GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n\n\t WKTReader reader = new WKTReader(geometryFactory);\n\t \n\t\tRowMapper<DisplayResult> rowMapper = (rs, rowNum) -> {\n\t\t\t\n\t\t\tDisplayResult result = new DisplayResult();\n\t\t\tresult.setResultId(rs.getInt(1));\n\t\t\tresult.setMeshblockId(rs.getInt(2));\n\t\t\tresult.setOperatScore(rs.getDouble(3));\n\t\t\t\t\n\t\t\tresult.setNaturalElementsScore(rs.getDouble(7));\n\t\t\tresult.setIncivilitiesScore(rs.getDouble(8));\n\t\t\tresult.setNavigationScore(rs.getDouble(9));\n\t\t\tresult.setTerritorialScore(rs.getDouble(10));\n\t\t\tPoint point;\n\t\t\ttry {\n\t\t\t\tpoint = (Point) reader.read(rs.getString(5));\n\t\t\t\tresult.setCentroid(point.toString());\n\t\t\t\tresult.setLat(point.getCoordinate().y);\n\t\t\t\tresult.setLng(point.getCoordinate().x);\n\t\t\t\t\t\n\t\t\t\tresult.setGeom(rs.getString(6));\n\t\t\t\t\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\treturn jdbcTemplate.query(query, rowMapper);\n\t\t\n\t}",
"public static List<ReserveTime> getUnitNotYetReservedTime(int unitID) {\n\t\tConnection conn = DBConnection.getConnection();\n\t\tList<ReserveTime> reserveTimes = new ArrayList<>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tString command = \"SELECT\" +\n\t\t\t\t\t\" rt.ID,\" +\n\t\t\t\t\t\" rt.DAY_ID,\" +\n\t\t\t\t\t\" rt.RES_CODE_ID,\" +\n\t\t\t\t\t\" rt.ST_TIME\" +\n\t\t\t\t\t\" FROM\" +\n\t\t\t\t\t\" RESERVETIMES rt\" +\n\t\t\t\t\t\" WHERE\" +\n\t\t\t\t\t\" STATUS = \" + ReserveTimeStatus.RESERVED.getValue() +\n\t\t\t\t\t\" AND UNIT_ID = \" + unitID +\n\t\t\t\t\t\" AND RESERVE_GR_TIME >= NOW()\" +\n\t\t\t\t\t\" ORDER BY ID DESC\";\n\t\t\tResultSet rs = stmt.executeQuery(command);\n\t\t\tfillBriefServerTimes(rs, reserveTimes);\n\t\t}catch(SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn reserveTimes;\n\t}"
]
| [
"0.5972948",
"0.59029526",
"0.5841124",
"0.5779348",
"0.56768805",
"0.55222666",
"0.55222553",
"0.54840165",
"0.5471212",
"0.5340386",
"0.531312",
"0.5251117",
"0.521947",
"0.51915",
"0.5152588",
"0.5136321",
"0.50870246",
"0.50860316",
"0.5083571",
"0.5083183",
"0.5072218",
"0.5054019",
"0.503919",
"0.50127023",
"0.5012147",
"0.5007079",
"0.497799",
"0.49706692",
"0.4947107",
"0.4940541",
"0.4925099",
"0.49213156",
"0.4918248",
"0.4901065",
"0.48946312",
"0.488479",
"0.48793772",
"0.48660877",
"0.48584145",
"0.48405194",
"0.48383588",
"0.48361802",
"0.48353857",
"0.48285046",
"0.4826039",
"0.48223144",
"0.48133165",
"0.4806936",
"0.47985715",
"0.47891676",
"0.4773806",
"0.4770388",
"0.47628874",
"0.47596794",
"0.4751895",
"0.47464788",
"0.4743473",
"0.47188446",
"0.4718079",
"0.47161976",
"0.4706992",
"0.4706625",
"0.4692699",
"0.46803707",
"0.4679043",
"0.4678552",
"0.4677442",
"0.46708292",
"0.46619892",
"0.4653978",
"0.46529093",
"0.46526965",
"0.4651169",
"0.4649258",
"0.46479663",
"0.46452916",
"0.46447533",
"0.46446127",
"0.46441606",
"0.46333385",
"0.46324325",
"0.46323055",
"0.46295398",
"0.46291128",
"0.46279356",
"0.46211293",
"0.46152398",
"0.45989966",
"0.4590096",
"0.45829672",
"0.45710412",
"0.456725",
"0.45656762",
"0.45656127",
"0.45598698",
"0.4556392",
"0.45562163",
"0.45543492",
"0.45527428",
"0.45491618"
]
| 0.69909495 | 0 |
Returns the run type of this job. | @Override
public String getRunType() {
return model.getRunType();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RunType runType() {\n return this.runType;\n }",
"@Override\n\tpublic java.lang.String getRunType() {\n\t\treturn _scienceApp.getRunType();\n\t}",
"public JobType getType() { return type; }",
"@Override\n public String getType() {\n return Const.JOB;\n }",
"public int getJobType() {\n return jobType;\n }",
"public String getType() {\n return theTaskType ;\n }",
"public TaskType getTaskType() {\n return (TaskType) commandData.get(CommandProperties.TASK_TYPE);\n }",
"public String getExecutionType() {\n\t\treturn executionType;\n\t}",
"@Override\n public String getTypeName() {\n return job_name;\n }",
"public Class getRunTimeType() {\n return lho.getRuntimeType();\n }",
"public final String getType() {\n return this.getClass().getName();\n }",
"public String getType() {\r\n return this.getClass().getName();\r\n }",
"@Override\n public String getTypeID() {\n return job_id;\n }",
"public String getType() {\n return \"Task\";\n }",
"public String getLaunchType() {\n return this.launchType;\n }",
"public String getLaunchType() {\n return this.launchType;\n }",
"@DISPID(47)\r\n\t// = 0x2f. The runtime will prefer the VTID if present\r\n\t@VTID(52)\r\n\tasci.activebatch.enumJobTypeEx type();",
"public int getExecutionType() {\n\t\treturn 0;\n\t}",
"public String getTaskType() {\n return taskType;\n }",
"@ApiModelProperty(value = \"The canonical name for the job followed by phase in brackets, ie. 'AVscan[1]', etc...\")\n public String getJobType() {\n return jobType;\n }",
"public ExecutionType executionType() {\n return this.executionType;\n }",
"public static String getType() {\n\t\treturn type;\n\t}",
"public String getSubmissionType() {\n\t\tif (submissionType != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"submission_type\" + TAB + submissionType.toString();\n\t\treturn null;\n\t}",
"public String getType () {\n // Will resolve to specific subclass\n return this.getClass().getSimpleName();\n }",
"@Override\n public String getTaskType() {\n return this.taskType;\n }",
"public BatchType getType() {\n return this.type;\n }",
"public int getTaskType() {\n\t\treturn fieldTaskType;\n\t}",
"public String getType() {\n return (String) getObject(\"type\");\n }",
"public int getType()\n {\n return pref.getInt(KEY_TYPE, 0);\n }",
"public final String getType() {\n return this.type;\n }",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public String getType() {\n\t\treturn this.type;\n\t}",
"public ProcessType getType() {\n\t\treturn this.type;\n\t}",
"public int getType() {\r\n\t\treturn (type);\r\n\t}",
"public String getType() {\r\n\t\treturn this.type;\r\n\t}",
"public final String type() {\n return type;\n }",
"public String getType() {\n\t\treturn TYPE_NAME;\n\t}",
"public String jobRunResourceId() {\n return this.jobRunResourceId;\n }",
"public String getType() {\r\n\t\treturn type_;\r\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\r\r\n\t\treturn type;\r\r\n\t}",
"public String getType() {\n\t\treturn _type;\n\t}",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public synchronized String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }"
]
| [
"0.7892275",
"0.74457794",
"0.71801484",
"0.70954096",
"0.69079363",
"0.68719757",
"0.67349726",
"0.6669888",
"0.66151696",
"0.6609737",
"0.64555097",
"0.6450622",
"0.64240646",
"0.6384448",
"0.6325456",
"0.6325456",
"0.62803686",
"0.6249799",
"0.6247733",
"0.622989",
"0.6202419",
"0.6188824",
"0.6168281",
"0.61543554",
"0.6149042",
"0.61321664",
"0.61009854",
"0.60911447",
"0.6085908",
"0.60848665",
"0.60848016",
"0.60848016",
"0.60848016",
"0.60848016",
"0.60848016",
"0.60848016",
"0.60848016",
"0.60848016",
"0.6084358",
"0.607482",
"0.6073223",
"0.606683",
"0.60623574",
"0.60501826",
"0.60497385",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047829",
"0.6047694",
"0.6045674",
"0.6045528",
"0.6045528",
"0.6045528",
"0.60420835",
"0.60420835",
"0.60314",
"0.6029282",
"0.6029282",
"0.6029282",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931",
"0.6021931"
]
| 0.7988132 | 0 |
Returns the solver exe of this job. | @Override
public String getSolverExe() {
return model.getSolverExe();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSimulatorExecutable() {\n return simSpec.getSimExecutable();\n }",
"@Override\n\tpublic String getSolution() {\n\t\t// COMPLETE THIS\n\t\tString sol = solutions.first();\n\t\treturn sol;\n\t}",
"public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"public String getSolveMethod() {\n return solveMethod;\n }",
"String getExecutable();",
"@Override\n\tpublic java.lang.String getExeFileName() {\n\t\treturn _scienceApp.getExeFileName();\n\t}",
"private String getSolverDirName() {\n\t\tString solverName = \"yksuh\";\n\t\treturn solverName;\n\t}",
"public String getSolution() {\n\t\treturn solution;\n\t}",
"public String getExecutable();",
"public String getWorker() {\r\n\t\treturn \"\" + name + \" : \" + execAction();\t\t\t // a worker operates\r\n\t}",
"public static String getExecutable() {\n \texecutable = getProperty(\"executable\");\n \tif (executable == null) executable = \"dot\";\n \treturn executable;\n }",
"public SolverType getSolverType() {\n\t\tsynchronized(this) {\n\t\t\treturn solver.getType();\n\t\t}\n\t}",
"public String getExecutable(final Launcher launcher) throws IOException, InterruptedException {\n return launcher.getChannel().call(new Callable<String, IOException>() {\n private static final long serialVersionUID = 2373163112639943768L;\n\n @Override\n public String call() throws IOException {\n String nsisHome = Util.replaceMacro(getHome(), EnvVars.masterEnvVars);\n File exe = new File(nsisHome, \"makensis.exe\");\n\n return exe.exists() ? exe.getPath() : null;\n }\n });\n }",
"public Solver getSolver() {\n\t\tsynchronized(this) {\n\t\t\tswitch (solver.getType()) {\n\t\t\tcase ACO:\n\t\t\t\treturn new SolverACO((SolverACO)solver);\n\t\t\tcase GA:\n\t\t\t\treturn new SolverGA((SolverGA)solver);\n\t\t\tdefault:\n\t\t\t\treturn new SolverGA(distanceMatrix, vehicleCapacity);\n\t\t\t}\n\t\t}\n\t}",
"public String getEquation() {\n this.polySolve();\n return this.equation;\n }",
"public String getSolStr() {\n this.tanSolve();\n return \"x = \" + this.x;\n }",
"File getExecutable();",
"public Object getSolution() {\n\t\treturn solution;\n\t}",
"public String getClusterExecutableBasename() {\n return SeqExec.EXECUTABLE_BASENAME;\n }",
"public Assignment getSolverAssignment_0() { return cSolverAssignment_0; }",
"public String getDotExeName()\n\t{\n\t\treturn dotExeName;\n\t}",
"public File getExecutableWorkFile(CommonjWork work) {\r\n\t\tFile workExecutableFile = new File(getExecutableWorkDir(work), work.getWorkName());\t\r\n\t\treturn workExecutableFile;\r\n\t}",
"@Override\n\tpublic void setSolverExe(String solverExe) {\n\t\tmodel.setSolverExe(solverExe);\n\t}",
"public String getSolverType() {\n\t\treturn type;\n\t}",
"public final TrajectoryInfo getSolution() { \n\t\treturn solution; \n\t}",
"public String get_worker() {\n return this._worker;\n }",
"public String\n getProgram() \n {\n if(PackageInfo.sOsType == OsType.Windows) \n return (\"winimage.exe\");\n return super.getProgram();\n }",
"public String getName() {\n return \"Parallel Optimization Problem\";\n }",
"public String getExecId() {\n Object ref = execId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getProgram() {\n return program;\n }",
"@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}",
"public String getExecId() {\n Object ref = execId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execId_ = s;\n }\n return s;\n }\n }",
"public String getBkExe() {\r\n if(bkExe==null) return \"bk\";\r\n return bkExe;\r\n }",
"public String getProgramId() {\n return pathsProvider.getProgramId();\n }",
"String getProgram()\n\t\t{\n\t\t\treturn mProgram;\n\t\t}",
"@Override\n\tpublic String getJobName() {\n\t\treturn model.getJobName();\n\t}",
"protected abstract Executable getExecutable();",
"SolutionRef getCurrentSolution();",
"public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}",
"com.google.ortools.linearsolver.MPModelRequest.SolverType getSolverType();",
"protected Program getProgram() {\n final Holder<Program> holder = Holder.of( null );\n Hook.PROGRAM.run( holder );\n if ( holder.get() != null ) {\n return holder.get();\n }\n\n return Programs.standard();\n }",
"public String getJVMExecutablePath();",
"public String getExecUnit() {\n return execUnit;\n }",
"public double getSol() {\n this.tanSolve();\n return this.x;\n }",
"public int getCurrentSolution() {\n return currentSolution;\n }",
"public String getEquation() {\n this.tanSolve();\n return this.equation;\n }",
"public Program getProgram() {\n return this.program;\n }",
"public abstract OptimisationSolution getBestSolution();",
"@Override\n\tpublic long getExecute() {\n\t\treturn _scienceApp.getExecute();\n\t}",
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"public String getExecBroker() {\n Object ref = execBroker_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execBroker_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"public Executable.ExecKind getExecKind() {\n\t\t\treturn (Executable.ExecKind)this.getData(Index_ExecKind);\n\t\t}",
"public String getStrPipelineExeURL() {\n return strPipelineExeURL;\n }",
"String getExecId();",
"protected String getSquawkExecutable() {\n return \"squawk\" + env.getPlatform().getExecutableExtension();\n }",
"public String getExecBroker() {\n Object ref = execBroker_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execBroker_ = s;\n }\n return s;\n }\n }",
"public String getExecRefId() {\n Object ref = execRefId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execRefId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getPrimaryExec() {\n return primaryExec;\n }",
"public String getJob() {\n return job;\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n jobId_ = s;\n }\n return s;\n }\n }",
"private String inferRPath()\n {\n String path;\n\n //preferentially use R config setup in scripting props. only works if running locally.\n if (PipelineJobService.get().getLocationType() == PipelineJobService.LocationType.WebServer)\n {\n LabKeyScriptEngineManager svc = LabKeyScriptEngineManager.get();\n for (ExternalScriptEngineDefinition def : svc.getEngineDefinitions())\n {\n if (RScriptEngineFactory.isRScriptEngine(def.getExtensions()))\n {\n path = new File(def.getExePath()).getParent();\n getJob().getLogger().info(\"Using RSciptEngine path: \" + path);\n return path;\n }\n }\n }\n\n //then pipeline config\n String packagePath = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath(\"R\");\n if (StringUtils.trimToNull(packagePath) != null)\n {\n getJob().getLogger().info(\"Using path from pipeline config: \" + packagePath);\n return packagePath;\n }\n\n //then RHOME\n Map<String, String> env = System.getenv();\n if (env.containsKey(\"RHOME\"))\n {\n getJob().getLogger().info(\"Using path from RHOME: \" + env.get(\"RHOME\"));\n return env.get(\"RHOME\");\n }\n\n //else assume it's in the PATH\n getJob().getLogger().info(\"Unable to infer R path, using null\");\n\n return null;\n }",
"java.lang.String getJobId();",
"private static PHPexeItem getDefaultPHPExe(IProject project) {\n\t\tPHPexeItem defaultItem = PHPDebugPlugin.getPHPexeItem(project);\n\t\tif (defaultItem != null) {\n\t\t\treturn defaultItem;\n\t\t}\n\t\treturn PHPDebugPlugin.getWorkspaceDefaultExe();\n\t}",
"SolutionRef getStartSolution();",
"public java.lang.String getEXECUTION()\n {\n \n return __EXECUTION;\n }",
"public TaskSolution getSolution(){\n return new TaskSolution(this.moveStack);\n }",
"public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }",
"public java.lang.String getBugEngine() {\n return bugQuery.getBugEngine();\n }",
"public Executable.ExecKind getExecKind() {\n\t\t\treturn ((TSExecutable)this.getTypeSpec()).getExecKind();\n\t\t}",
"public NlsString getConstraint() {\n\tString syntax = getPnlEditor().getText();\n\n\tif ((syntax != null) && (syntax.length() > 0)) {\n\t\t// replace current value\n\t\tif (((ConstraintExpression)constraint.getBody()).getSyntax() == null) {\n\t\t\treturn new ch.ehi.basics.types.NlsString(syntax);\n\t\t} else {\n\t\t\treturn new ch.ehi.basics.types.NlsString(((ConstraintExpression)constraint.getBody()).getSyntax(), syntax);\n\t\t}\n\t} else {\n\t\treturn null;\n\t}\n}",
"public SolverDescription getSolverDescription() {\n\t\treturn fieldSolverDescription;\n\t}",
"public String getExecRefId() {\n Object ref = execRefId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execRefId_ = s;\n }\n return s;\n }\n }",
"java.lang.String getTargetJobName();",
"@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}",
"@Override\n\tpublic String getExecutingProgramName() throws RemoteException {\n\t return null;\n\t}",
"public SolutionType getBestSolution();",
"private Job findLaunchClientJob() {\n Job[] jobs = Job.getJobManager().find(null);\n for (Job job : jobs) {\n if (job instanceof LaunchClientJob) {\n if (((LaunchClientJob) job).getServer().getId().equals(environment.getServer().getId())) {\n trace(\"Identified LaunchClientJob: \" + job);\n return job;\n }\n }\n }\n\n trace(\"Unable to find LaunchClientJob!\");\n return null;\n }",
"@Nullable\n public static String getExecutionRoot(BuildInvoker invoker, BlazeContext context)\n throws GetArtifactsException {\n try {\n return invoker.getBlazeInfo().getExecutionRoot().getAbsolutePath();\n } catch (SyncFailedException e) {\n IssueOutput.error(\"Could not obtain exec root from blaze info: \" + e.getMessage())\n .submit(context);\n context.setHasError();\n return null;\n }\n }",
"public Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}",
"cn.infinivision.dataforce.busybee.pb.meta.Execution getExecution();",
"public String getEquationString()\r\n\t{\r\n\t\tcheckInitialization();\r\n\t\treturn equationString;\r\n\t}",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public final int solveIt() {\n return -1;\n }",
"public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}",
"public int getSolutionCost(){\r\n if (this.path_solution.size()==0)\r\n return 0;\r\n return this.path_solution.get(this.path_solution.size()-1).getCost();\r\n }",
"public Executor getExecutor() {\n Object o = getReference(\"ant.executor\");\n if (o == null) {\n String classname = getProperty(\"ant.executor.class\");\n if (classname == null) {\n classname = DefaultExecutor.class.getName();\n }\n log(\"Attempting to create object of type \" + classname, MSG_DEBUG);\n try {\n o = Class.forName(classname, true, coreLoader).newInstance();\n } catch (ClassNotFoundException seaEnEfEx) {\n //try the current classloader\n try {\n o = Class.forName(classname).newInstance();\n } catch (Exception ex) {\n log(ex.toString(), MSG_ERR);\n }\n } catch (Exception ex) {\n log(ex.toString(), MSG_ERR);\n }\n if (o == null) {\n throw new BuildException(\n \"Unable to obtain a Target Executor instance.\");\n }\n setExecutor((Executor) o);\n }\n return (Executor) o;\n }",
"public String _getProcReturnString() throws Open4GLException\n {\n return (m_QuarixProgressOOConnectorImpl._getProcReturnString());\n }",
"@Basic\n\tpublic Program getProgram() {\n\t\treturn this.program;\n\t}",
"String getExternalToolName();",
"public int getJobNum()\n\t{\n\t\treturn jobNum;\n\t}",
"String getExecRefId();",
"protected String getIntermediateFormula() {\n if ( isGlobal() ) {\n return globalConstraint;\n } else if ( isRoleBased() ) {\n return roleMapToFormula();\n } else {\n // rls is disabled\n return EMPTY_STRING;\n }\n }",
"public JobId job() { return Objects.requireNonNull(job, \"production revisions have no associated job\"); }",
"public JobOrder getJob() {\n\t\tif (job == null) {\n\t\t\tsetJob(findJobOrder(getPlacement().getJobOrder().getId()));\n\t\t}\n\t\treturn job;\n\t}",
"java.lang.String getExecutionStageName();",
"public String getConstraintInstance() {\n\t\treturn getAttribute(\"ConstraintInstance\", \"\");\n\t}",
"public final Object evaluateCurrent() {\n RolapCalculation maxSolveMember;\n switch (calculationCount) {\n case 0:\n final Object o = cellReader.get(this);\n if (o == Util.nullValue) {\n return null;\n }\n return o;\n\n case 1:\n maxSolveMember = calculations[0];\n break;\n\n default:\n switch (root.solveOrderMode) {\n case ABSOLUTE:\n maxSolveMember = getAbsoluteMaxSolveOrder();\n break;\n case SCOPED:\n maxSolveMember = getScopedMaxSolveOrder();\n break;\n default:\n throw Util.unexpected(root.solveOrderMode);\n }\n }\n final int savepoint = savepoint();\n maxSolveMember.setContextIn(this);\n final Calc calc = maxSolveMember.getCompiledExpression(root);\n final Object o;\n try {\n o = calc.evaluate(this);\n } finally {\n restore(savepoint);\n }\n if (o == Util.nullValue) {\n return null;\n }\n return o;\n }",
"public String getJobId();",
"public Job getJob();",
"public File getJRELocation() {\n \t\tif (executableLocation == null)\n \t\t\treturn null;\n \t\treturn new File(executableLocation.getParentFile(), \"jre\"); //$NON-NLS-1$\n \t}"
]
| [
"0.60999674",
"0.5950363",
"0.5898018",
"0.58877146",
"0.5786596",
"0.57730895",
"0.57014436",
"0.56933236",
"0.5692058",
"0.56143653",
"0.55352664",
"0.55236",
"0.5446892",
"0.5440876",
"0.54188275",
"0.53719896",
"0.5339701",
"0.52854294",
"0.5264785",
"0.5230099",
"0.5221872",
"0.5199543",
"0.51877666",
"0.5182926",
"0.51818466",
"0.51811594",
"0.5180985",
"0.5169518",
"0.5147723",
"0.5147132",
"0.5139889",
"0.5138343",
"0.51367986",
"0.51341194",
"0.5119765",
"0.50913453",
"0.508531",
"0.50785327",
"0.5069355",
"0.5052483",
"0.50516355",
"0.5048583",
"0.5044157",
"0.5005026",
"0.50038916",
"0.5003536",
"0.50016505",
"0.49955234",
"0.49802557",
"0.49664626",
"0.49608275",
"0.4958052",
"0.49557588",
"0.49512324",
"0.49336398",
"0.4932411",
"0.49084786",
"0.49081558",
"0.4901894",
"0.48880902",
"0.48870075",
"0.48822063",
"0.48815665",
"0.4880639",
"0.4877495",
"0.48626295",
"0.4855398",
"0.4852776",
"0.48482236",
"0.4836336",
"0.48360032",
"0.4828466",
"0.4823247",
"0.48199347",
"0.48197836",
"0.4811029",
"0.47959027",
"0.47858804",
"0.47832075",
"0.47741643",
"0.47381428",
"0.4728046",
"0.47181684",
"0.47044936",
"0.46978527",
"0.46914873",
"0.46897367",
"0.46890348",
"0.46870512",
"0.4682031",
"0.4673879",
"0.4671382",
"0.46684915",
"0.46681327",
"0.46673864",
"0.46602634",
"0.46566516",
"0.46491322",
"0.4647848",
"0.46393138"
]
| 0.825413 | 0 |
Returns the start date of this job. | @Override
public Date getStartDate() {
return model.getStartDate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getStartDate() {\n return startDate_;\n }",
"public Date getStart() {\n return start;\n }",
"public Date getStartDate()\r\n {\r\n Date result = m_startDate;\r\n if (result == null)\r\n {\r\n result = getParentFile().getStartDate();\r\n }\r\n return (result);\r\n }",
"public Date getStartDate() {\n\t\treturn this.startDate;\n\t}",
"public Date getStartDate() {\n\t\treturn startDate;\n\t}",
"public Date getStartDate() {\n\t\treturn startDate;\n\t}",
"public final DtStart getStartDate() {\n return getProperty(Property.DTSTART);\n }",
"public long getStartDate() {\n return startDate_;\n }",
"public Date getStart() {\n return (Date) _start.clone();\n }",
"public java.util.Calendar getJobStartDate()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getCalendarValue();\r\n }\r\n }",
"public String getStartDate() {\n\t\treturn startDate.getText();\n\t}",
"public Date getStartDate() {\r\n\t\treturn new Date(startDateText.getDay(), startDateText.getMonth()+1, startDateText.getYear());\r\n\t}",
"public org.apache.xmlbeans.XmlDate xgetJobStartDate()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDate target = null;\r\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n return target;\r\n }\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartDate();",
"public Date getDtStart() {\r\n return dtStart;\r\n }",
"public java.util.Date getStartDateTime() {\n return this.startDateTime;\n }",
"public java.util.Calendar getStartDate() {\n return startDate;\n }",
"public Timestamp getDateStart() {\n\t\treturn (Timestamp) get_Value(\"DateStart\");\n\t}",
"public DateTime getStartDateTime() {\r\n\t\treturn start;\r\n\t}",
"public Date getStart() throws ServiceLocalException {\n\t\treturn (Date) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.Start);\n\t}",
"public Date getStartedDate() {\n return this.startedDate;\n }",
"public Date getStartDate() {\r\n return startDate;\r\n }",
"public Date getStartDate() {\r\n return startDate;\r\n }",
"@NotNull\r\n public DateWithOffset getStartDate() {\r\n checkStartDate();\r\n return startDate;\r\n }",
"public long getBeginDate() {\n return beginDate_;\n }",
"public long getBeginDate() {\n return beginDate_;\n }",
"public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}",
"@Override\n\tpublic java.util.Date getStartDate() {\n\t\treturn _esfTournament.getStartDate();\n\t}",
"public Date getStartDate() {\n return startDate;\n }",
"public Date getStartDate() {\n return startDate;\n }",
"public Date getStartDate() {\n return startDate;\n }",
"public java.sql.Date getREQ_START_DATE()\n {\n \n return __REQ_START_DATE;\n }",
"public Date getStartedAt() {\n\t\treturn startedAt;\n\t}",
"public long getStartTimestamp() {\n\t\treturn this.startTimestamp;\n\t}",
"public Date getTimeEntryStartDate()\n throws RedmineException\n {\n // update number of time entries, start date\n updateTimeEntryData();\n\n return timeEntryStartDate;\n }",
"public Date getStartDate()\r\n {\r\n return this.startDate;\r\n }",
"public String getStartDate() {\n return startDate;\n }",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"public long getStartTimestamp() {\n return startTimestamp;\n }",
"public String getStartDate(){\n\t\treturn this.startDate;\n\t}",
"Date getStartDate();",
"Date getStartDate();",
"Date getStartDate();",
"public Date getStartDate()\n {\n return (Date)getAttributeInternal(STARTDATE);\n }",
"public Timestamp getDateStartSchedule() {\n\t\treturn (Timestamp) get_Value(\"DateStartSchedule\");\n\t}",
"public Date getStartDate();",
"public Date getStartDate();",
"public Date getStartServiceDate() {\n return (Date) getAttributeInternal(STARTSERVICEDATE);\n }",
"public java.util.Date getStartTime() {\n return startTime;\n }",
"java.lang.String getStartDate();",
"public String getStartDate() {\n return startDate;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public Calendar getStartDate() {\n \t\tCalendar cal = Calendar.getInstance();\n \t\tcal.setTimeInMillis(startTime);\n \t\t\n\t\treturn cal;\n\t}",
"public Date getStartTimeDate() {\n return startTimeDate;\n }",
"public Date getStarttime() {\n return starttime;\n }",
"public Date getStarttime() {\n return starttime;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"public Timestamp getDateStart();",
"public Date getBeginnDate() {\n\t\treturn beginnDate;\n\t}",
"public Date getStartWorkTime() {\n return startWorkTime;\n }",
"public DateTime getStart() {\r\n return new DateTime(getStartMillis(), getChronology());\r\n }",
"public Date getStartTime() {\n return this.startTime;\n }",
"public java.sql.Date getStartDate() {\n\treturn startDate;\n}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"public Date getStartTime() {\r\n return this.startTime;\r\n }",
"public TimeDateComponents getEventStartDate() {\n return getEventDates().getStartDate();\n }",
"public java.lang.Long getStartTime() {\n return start_time;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public java.util.Calendar getStartExecDate()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STARTEXECDATE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }",
"String getStartDate();",
"public long getTimeStart()\n {\n return this.timeStart;\n }",
"public Calendar getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"long getStartDate();",
"public java.lang.String getStartDay() {\r\n return localStartDay;\r\n }",
"public java.lang.Long getStartTime() {\n return start_time;\n }",
"public String getStartDate();",
"public Date getBEGIN_DATE() {\n return BEGIN_DATE;\n }",
"public long getStartTimestamp();",
"long getStartTimestamp();",
"public java.util.Date startSnap()\n\t{\n\t\treturn _dtBegin;\n\t}",
"public static Date todayStart() {\n return dayStart(new Date());\n }",
"public Date getDefaultStartTime()\r\n {\r\n return (m_defaultStartTime);\r\n }",
"public java.lang.String getTime_start() {\r\n return time_start;\r\n }",
"public long getStart() {\n return start;\n }",
"long getBeginDate();",
"public long getStartTime() {\n\t\treturn startTime;\n\t}",
"public String getStartDateTimeString() {\n return startDateTimeString;\n }",
"public long getStart_time() {\n return start_time;\n }",
"protected AbsoluteDate getStartDate() {\n return startDate;\n }",
"public Optional<Date> getStartDate() {\n return Optional.ofNullable(createdDate);\n }"
]
| [
"0.75585604",
"0.75538856",
"0.75449044",
"0.7531699",
"0.75294304",
"0.75294304",
"0.7527235",
"0.75081784",
"0.74790806",
"0.7454533",
"0.73730683",
"0.73590726",
"0.7350044",
"0.73419553",
"0.7303214",
"0.72865576",
"0.72745574",
"0.726662",
"0.725932",
"0.72482973",
"0.72430176",
"0.7237673",
"0.7237673",
"0.72308266",
"0.7205958",
"0.71889246",
"0.7186475",
"0.7177806",
"0.71662885",
"0.71662885",
"0.71662885",
"0.71632606",
"0.7138974",
"0.71327674",
"0.71198136",
"0.7106785",
"0.7102562",
"0.70884484",
"0.70884484",
"0.70884484",
"0.70884484",
"0.70802814",
"0.7071728",
"0.70475066",
"0.7044979",
"0.7044979",
"0.7044979",
"0.7020093",
"0.7014888",
"0.7012517",
"0.7012517",
"0.70105165",
"0.69854105",
"0.6958497",
"0.69439346",
"0.69429517",
"0.69429517",
"0.69429517",
"0.6917055",
"0.69164735",
"0.69126385",
"0.69126385",
"0.69046885",
"0.69046885",
"0.689293",
"0.68830717",
"0.6876775",
"0.6865951",
"0.6848646",
"0.68462396",
"0.6844641",
"0.6844641",
"0.6836704",
"0.68300605",
"0.6793322",
"0.6790723",
"0.6790723",
"0.6790723",
"0.6781894",
"0.6768019",
"0.67623544",
"0.67363197",
"0.67251635",
"0.670533",
"0.6704913",
"0.6690296",
"0.66794354",
"0.66481227",
"0.6644761",
"0.6635156",
"0.6632035",
"0.6631198",
"0.6606152",
"0.66051745",
"0.65932137",
"0.65922093",
"0.6588846",
"0.6582144",
"0.6575713",
"0.65556633"
]
| 0.7463454 | 9 |
Returns the status of this job. | @Override
public int getStatus() {
return model.getStatus();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JobStatus getStatus();",
"public String getJobStatus() {\n return this.jobStatus;\n }",
"public String getJobStatus() {\n return this.jobStatus;\n }",
"public Integer getJobStatus() {\n return jobStatus;\n }",
"@Override\n\tpublic int getJobStatus() {\n\t\treturn model.getJobStatus();\n\t}",
"public long getStatus() {\r\n return status;\r\n }",
"public UpdateStatus status() {\n return this.status;\n }",
"public java.lang.Object getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public BatchStatus getStatus() {\n return this.status;\n }",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public JenkinsStatus getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public Status getStatus() {\n\t\treturn status;\n\t}",
"public Status getStatus() {\n return result;\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus () {\r\n return status;\r\n }",
"public com.google.protobuf.ByteString getStatus() {\n return instance.getStatus();\n }",
"public int status() {\n return status;\n }",
"public Long getStatus() {\n return this.Status;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public String getStatus()\n {\n\n return status;\n }",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public RunStatus status() {\n return this.status;\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public java.lang.String getStatus () {\r\n\t\treturn status;\r\n\t}",
"public Integer getStatus() {\n\t\treturn status;\n\t}",
"public Integer getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn _status;\n\t}",
"public String getStatus(){\n\t\t\n\t\treturn this.status;\n\t}",
"public Status getStatus()\n\t{\n\t\treturn status;\n\t}",
"public String getStatus() {\n return this.Status;\n }",
"public String getStatus() {\n return this.Status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public ExecutionStatus status() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }"
]
| [
"0.8581455",
"0.84946126",
"0.84946126",
"0.84730345",
"0.84420323",
"0.77294314",
"0.771956",
"0.7662224",
"0.7648386",
"0.7648386",
"0.7640638",
"0.7633579",
"0.7633579",
"0.7633579",
"0.7633579",
"0.76335734",
"0.7620747",
"0.76180285",
"0.7615594",
"0.7615594",
"0.7615594",
"0.7615594",
"0.7615594",
"0.76106125",
"0.76013994",
"0.7593793",
"0.7593793",
"0.7593793",
"0.7593793",
"0.7593793",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.7592945",
"0.75928754",
"0.75928754",
"0.7582143",
"0.7581185",
"0.75745434",
"0.75703675",
"0.75487375",
"0.75487375",
"0.75487375",
"0.75487375",
"0.75487375",
"0.75487375",
"0.75487375",
"0.75487375",
"0.75487375",
"0.7541687",
"0.7537156",
"0.7537156",
"0.7537156",
"0.7537156",
"0.7537156",
"0.75354844",
"0.7532436",
"0.7532436",
"0.7520588",
"0.7519062",
"0.7519062",
"0.7517526",
"0.7515434",
"0.7513815",
"0.75124675",
"0.75124675",
"0.7505169",
"0.7505169",
"0.7505169",
"0.7505169",
"0.7505169",
"0.74972004",
"0.7495561",
"0.7495561",
"0.7495561",
"0.7495561"
]
| 0.0 | -1 |
Returns the submit args of this job. | @Override
public String getSubmitArgs() {
return model.getSubmitArgs();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.Object[] getArgs() {\n return args;\n }",
"public @NonNull List<@NonNull String> getArgs()\n {\n return input.getArgs();\n }",
"public java.lang.String getArgs() {\n return args;\n }",
"public java.lang.String getArgs() {\n return args;\n }",
"private String[] getArgs()\n {\n return cmd.getArgs();\n }",
"public String[] getArguments(){\r\n\t\treturn args.toArray(new String[args.size()]);\r\n\t}",
"public LinkedList<String> getActionArgs() {\n\t\treturn actionArgs;\n\t}",
"public Object[] getArguments() { return args;}",
"public java.util.List<java.lang.String>\n getArgsList() {\n return args_;\n }",
"public KeyValuePair[] getSubmitKeyValuePairs() {\n return new KeyValuePair[]{new KeyValuePair( getNameAttribute(), getValueAttribute() )};\n }",
"public com.google.protobuf.ProtocolStringList\n\t\tgetArgsList() {\n\t\t\treturn args_;\n\t\t}",
"public com.google.protobuf.ProtocolStringList\n getArgsList() {\n return args_;\n }",
"@java.lang.Override\n public java.util.List<? extends godot.wire.Wire.ValueOrBuilder> \n getArgsOrBuilderList() {\n return args_;\n }",
"@java.lang.Override\n public java.util.List<godot.wire.Wire.Value> getArgsList() {\n return args_;\n }",
"public List<String> getArguments()\n\t{\n\t\treturn mArgs;\n\t}",
"public String getExecutionArgs() {\n\t\treturn null;\n\t}",
"public Object getArguments() {\n return m_args;\n }",
"public List<Expression> getArgs()\n {\n return args;\n }",
"final String[] args() {\n return args;\n }",
"public String getBwaArgs() {\n\t\treturn bwaArgs;\n\t}",
"public java.util.List<java.lang.String>\n getArgsList() {\n return java.util.Collections.unmodifiableList(args_);\n }",
"public String[] getArguments() {\n return this.arguments;\n }",
"public Map<String, Object> getRunParams() {\n return this.runParams;\n }",
"public Object[] getArguments() {\n return arguments;\n }",
"public java.util.List<godot.wire.Wire.Value> getArgsList() {\n if (argsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(args_);\n } else {\n return argsBuilder_.getMessageList();\n }\n }",
"public String getArguments() {\r\n return key.getArguments();\r\n }",
"public Map<String, String> getArgList() {\n return argMap;\n }",
"public java.util.List<? extends godot.wire.Wire.ValueOrBuilder> \n getArgsOrBuilderList() {\n if (argsBuilder_ != null) {\n return argsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(args_);\n }\n }",
"java.util.List<java.lang.String>\n getArgsList();",
"public java.util.List<com.google.protobuf.ByteString>\n getArgumentsList() {\n return arguments_;\n }",
"public Object[] getArguments() {\n if (args.length == 0) {\n return args;\n }\n Object[] copy = new Object[args.length];\n System.arraycopy(args, 0, copy, 0, args.length);\n return copy;\n }",
"public List<String> getArguments() {\n return arguments;\n }",
"public com.google.protobuf.ByteString\n getArgsBytes(int index) {\n return args_.getByteString(index);\n }",
"public com.google.protobuf.ByteString\n getArgsBytes(int index) {\n return args_.getByteString(index);\n }",
"String getArguments();",
"public com.google.protobuf.ProtocolStringList\n\t\t\tgetArgsList() {\n\t\t\t\treturn args_.getUnmodifiableView();\n\t\t\t}",
"public com.google.protobuf.ByteString\n getArgsBytes(int index) {\n return args_.getByteString(index);\n }",
"public com.google.protobuf.ByteString\n getArgsBytes(int index) {\n return args_.getByteString(index);\n }",
"public com.google.protobuf.ByteString\n\t\t\tgetArgsBytes(int index) {\n\t\t\t\treturn args_.getByteString(index);\n\t\t\t}",
"public static Sequence<? extends String> getArguments() {\n return Entry.getArguments();\n }",
"Object[] getArguments();",
"Object[] getArguments();",
"public java.util.List<com.google.protobuf.ByteString>\n getArgumentsList() {\n return java.util.Collections.unmodifiableList(arguments_);\n }",
"public com.google.protobuf.ProtocolStringList\n getArgsList() {\n return args_.getUnmodifiableView();\n }",
"public com.google.protobuf.ByteString getArguments(int index) {\n return arguments_.get(index);\n }",
"java.util.List<com.google.protobuf.ByteString> getArgumentsList();",
"public com.google.protobuf.ByteString getArguments(int index) {\n return arguments_.get(index);\n }",
"public com.google.protobuf.ByteString\n\t\tgetArgsBytes(int index) {\n\t\t\treturn args_.getByteString(index);\n\t\t}",
"private List<String> GetParams(){\n\n ArrayList<String> params = new ArrayList<String>();\n\n // java executable binary\n params.add(_javaConfig.getJava());\n\n params.add(\"-Xms\".concat(_javaConfig.getXms()));\n params.add(\"-Xmx\".concat(_javaConfig.getXmx()));\n params.add(\"-Djava.library.path=\".concat(_javaConfig.getJava_library_path()));\n\n params.add(\"-cp\");\n params.add(_javaConfig.getClasspath());\n\n params.add(\"net.minecraft.client.main.Main\");\n\n params.add(\"--username\");\n params.add(_gameConfig.getUserName());\n\n params.add(\"--session\");\n params.add(_gameConfig.getSession());\n\n params.add(\"--gameDir\");\n params.add(_gameConfig.getGameDir());\n\n params.add(\"--assetsDir\");\n params.add(_gameConfig.getAssetsDir());\n\n params.add(\"--version\");\n params.add(_gameConfig.getVersion());\n\n return params;\n }",
"java.util.List<java.lang.String>\n\t\tgetArgsList();",
"public List<ModuleArgumentItem> getParams() {\n return params;\n }",
"@Override\n public String[] getOptions() {\n List<String> options = new ArrayList<String>();\n\n for (String opt : getJobOptionsOnly()) {\n options.add(opt);\n }\n\n return options.toArray(new String[options.size()]);\n }",
"@java.lang.Override\n public godot.wire.Wire.ValueOrBuilder getArgsOrBuilder(\n int index) {\n return args_.get(index);\n }",
"com.google.protobuf.ByteString\n\t\tgetArgsBytes(int index);",
"public String[] getParameters() {\r\n return parameters;\r\n }",
"public ArrayList<LogVar> getArgs() {\n\t\treturn this.args;\n\t}",
"public String[] getParameters() {\n return parameters;\n }",
"public String[] getParameters() {\n\t\treturn parameters;\n\t}",
"Collection<String> submitJob(Job job) throws JobExecutionException;",
"public List<Object> getArguments() {\n return this.arguments;\n }",
"public Object[] getArguments()\n {\n return __m_Arguments;\n }",
"@java.lang.Override\n public godot.wire.Wire.Value getArgs(int index) {\n return args_.get(index);\n }",
"public HashMap<String, String> getArgsDict() {\n return argsDict;\n }",
"@Override\n\tpublic void setSubmitArgs(String submitArgs) {\n\t\tmodel.setSubmitArgs(submitArgs);\n\t}",
"com.google.protobuf.ByteString\n getArgsBytes(int index);",
"com.google.protobuf.ByteString\n getArgsBytes(int index);",
"com.google.protobuf.ByteString\n getJobIdBytes();",
"public String getParams() {\r\n\t\treturn this.params;\r\n\t}",
"public java.lang.String getArgs(int index) {\n return args_.get(index);\n }",
"public java.lang.String getArgs(int index) {\n return args_.get(index);\n }",
"public int getArgsCount() {\n return args_.size();\n }",
"public int getArgsCount() {\n return args_.size();\n }",
"com.google.protobuf.ByteString getArguments(int index);",
"com.google.protobuf.ByteString\n\t\tgetArgBytes();",
"public Date getSubmitTime() {\n return submitTime;\n }",
"public java.lang.String getArgs(int index) {\n\t\t\t\treturn args_.get(index);\n\t\t\t}",
"public java.lang.String getArgs(int index) {\n\t\t\treturn args_.get(index);\n\t\t}",
"public int getArgsCount() {\n return args_.size();\n }",
"public int getArgsCount() {\n return args_.size();\n }",
"public java.lang.String getArgs(int index) {\n return args_.get(index);\n }",
"public java.lang.String getArgs(int index) {\n return args_.get(index);\n }",
"public List<Argument> getArguments() {\n return arguments;\n }",
"public List<JParameter> getParams() {\n return params;\n }",
"@Override\n\tpublic List<NameValuePair> getParams() {\n\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\tparams.add(new BasicNameValuePair(KEY_ID, Integer.toString(id)));\n params.add(new BasicNameValuePair(KEY_VEHICLE_IDVEHICLE, Integer.toString(idVehicle)));\n params.add(new BasicNameValuePair(KEY_ITEMS_IDITEMS, Integer.toString(idItem)));\n params.add(new BasicNameValuePair(KEY_RECEIPT_IDRECEIPT, Integer.toString(idReceipt)));\n params.add(new BasicNameValuePair(KEY_WORKMILEAGE, Integer.toString(WorkMileage)));\n params.add(new BasicNameValuePair(KEY_WORKNOTES, WorkNotes));\n\t\t\n\t\treturn params;\n\t}",
"public Map<String, Class<?>> getArgumentTypes() {\n return argumentTypes;\n }",
"public Properties getCommandLineArgs()\n {\n return this.commandLineArgs;\n }",
"public List<ModuleArgumentItem> getBodyParams() {\n return bodyParams;\n }",
"public int getArgsCount() {\n\t\t\t\treturn args_.size();\n\t\t\t}",
"public int getArgsCount() {\n\t\t\treturn args_.size();\n\t\t}",
"java.util.List<java.lang.String>\n getArgsList();",
"@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}",
"public String[] getOptions() {\n return argv;\n }",
"@Override\n\tpublic String getSubmitId() {\n\t\treturn model.getSubmitId();\n\t}",
"java.util.List<godot.wire.Wire.Value> \n getArgsList();",
"public Object parameters() {\n return this.parameters;\n }",
"public List<Element> getArguments()\n {\n List<Element> args = new ArrayList<>(getSigChildren());\n\n // remove the \"use\", \"no\", or \"require\"\n args.remove(0);\n\n // remove the terminator - ha! - he'll be back!\n if (ElementUtils.isSemiColonToken(args.get(args.size() - 1)))\n {\n args.remove(args.size() - 1);\n }\n\n // remove the module name or version dependency\n args.remove(0);\n\n if (args.isEmpty())\n {\n return Collections.emptyList();\n }\n\n // do we have a required version...\n if (args.get(0) instanceof NumberToken)\n {\n // yup, and that's it...\n if (args.size() == 1)\n {\n return Collections.emptyList();\n }\n\n // yes, and additional arguments\n if (!(args.get(1) instanceof OperatorToken))\n {\n args.remove(0);\n }\n }\n\n return args;\n }",
"public Date getSubmittime() {\n return submittime;\n }",
"public com.google.protobuf.ByteString\n\t\t\tgetArgBytes() {\n\t\t\t\tjava.lang.Object ref = arg_;\n\t\t\t\tif (ref instanceof String) {\n\t\t\t\t\tcom.google.protobuf.ByteString b =\n\t\t\t\t\t\t\tcom.google.protobuf.ByteString.copyFromUtf8(\n\t\t\t\t\t\t\t\t\t(java.lang.String) ref);\n\t\t\t\t\targ_ = b;\n\t\t\t\t\treturn b;\n\t\t\t\t} else {\n\t\t\t\t\treturn (com.google.protobuf.ByteString) ref;\n\t\t\t\t}\n\t\t\t}",
"@Override\n\tpublic Object[] getGUIParameters() {\n\t\treturn null;\n\t}",
"public cto.framework.web.action.plugin.schema.Parameter[] getParameter() {\r\n cto.framework.web.action.plugin.schema.Parameter[] array = new cto.framework.web.action.plugin.schema.Parameter[0];\r\n return this._parameterList.toArray(array);\r\n }"
]
| [
"0.62407106",
"0.6207127",
"0.6106971",
"0.60972875",
"0.59749264",
"0.5853906",
"0.583409",
"0.57638294",
"0.5711004",
"0.5705568",
"0.5698267",
"0.56372005",
"0.56135684",
"0.5596177",
"0.5536425",
"0.552954",
"0.552177",
"0.5519763",
"0.55190414",
"0.55185676",
"0.5504197",
"0.54913896",
"0.54829216",
"0.5453408",
"0.5452009",
"0.5450546",
"0.5438295",
"0.5409025",
"0.5405096",
"0.5398512",
"0.53936344",
"0.53902596",
"0.5388719",
"0.5388719",
"0.53846514",
"0.53724176",
"0.5365409",
"0.5365409",
"0.5351113",
"0.5314085",
"0.53126436",
"0.53126436",
"0.5310509",
"0.53055733",
"0.5293768",
"0.5287061",
"0.52869153",
"0.5284397",
"0.526487",
"0.5258707",
"0.5253192",
"0.5227054",
"0.520851",
"0.52034324",
"0.519707",
"0.5191339",
"0.5187133",
"0.51539254",
"0.5118326",
"0.51180077",
"0.51148534",
"0.51045376",
"0.5094344",
"0.5076059",
"0.50729996",
"0.50729996",
"0.5057422",
"0.50556004",
"0.5052117",
"0.5052117",
"0.50479037",
"0.50479037",
"0.5045897",
"0.5036474",
"0.5030815",
"0.5027032",
"0.5006504",
"0.500263",
"0.500263",
"0.5002233",
"0.5002233",
"0.5000375",
"0.49921525",
"0.49889302",
"0.4978188",
"0.4976363",
"0.4969053",
"0.49655902",
"0.49557835",
"0.49552757",
"0.49496868",
"0.49493912",
"0.49451265",
"0.49364394",
"0.49330422",
"0.49044403",
"0.48991755",
"0.4894971",
"0.48898786",
"0.48854968"
]
| 0.7960438 | 0 |
Returns the submit ID of this job. | @Override
public String getSubmitId() {
return model.getSubmitId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract String getJobSubmitId();",
"public Integer getSubmit_user_id() {\n return submit_user_id;\n }",
"public long getSubmissionId() {\r\n return submissionId;\r\n }",
"@Override\n\tpublic long getSubmissionId() {\n\t\treturn model.getSubmissionId();\n\t}",
"@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n jobId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"public int getJobId() {\r\n\t\treturn jobId;\r\n\t}",
"public String getJobID() {\n\t\t\treturn JobID;\n\t\t}",
"public String getJobId();",
"@DISPID(1)\r\n\t// = 0x1. The runtime will prefer the VTID if present\r\n\t@VTID(7)\r\n\tint jobID();",
"java.lang.String getJobId();",
"public Long getJobID() {\n return jobID;\n }",
"public Date getSubmitTime() {\n return submitTime;\n }",
"public String getJobId() {\n\t\treturn this.jobId;\n\t}",
"public int getJobNum()\n\t{\n\t\treturn jobNum;\n\t}",
"public String getJobId() {\n return jobId;\n }",
"public String jobRunResourceId() {\n return this.jobRunResourceId;\n }",
"public String getSubmitmsgid() {\n return submitmsgid;\n }",
"public String getSubmitted() {\n return submitted;\n }",
"public Date getSubmittime() {\n return submittime;\n }",
"public BigDecimal getJOB_ID() {\r\n return JOB_ID;\r\n }",
"public int getJobId() ;",
"String fetchSubmitTarget() {\n return PageFlowContext.getOperationParameters().getProperty(\"submitTarget\");\n }",
"public String getJobReqID() {\n\t\treturn jobReqID;\n\t}",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"public String getJobId() {\n return this.jobId;\n }",
"@Override\n public String getTypeID() {\n return job_id;\n }",
"public long getJobIDTarget() {\n return jobIDTarget_;\n }",
"public long getJobIDTarget() {\n return jobIDTarget_;\n }",
"com.google.protobuf.Timestamp getSubmitTime();",
"java.lang.String getWorkerId();",
"long getJobIDTarget();",
"long getWorkflowID();",
"public long threadId();",
"public String getTaskId() {\n Object ref = taskId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskId_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"@DISPID(26)\r\n\t// = 0x1a. The runtime will prefer the VTID if present\r\n\t@VTID(31)\r\n\tjava.lang.String submissionQueue();",
"public String getTaskId() {\n Object ref = taskId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskId_ = s;\n return s;\n }\n }",
"public Long getExecutorId() {\n return executorId;\n }",
"public Long getExecutorId() {\n return executorId;\n }",
"public int getThreadId() {\n\n return threadId.get();\n\n }",
"public String getExecId() {\n Object ref = execId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execId_ = s;\n }\n return s;\n }\n }",
"public String getExecId() {\n Object ref = execId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(32)\r\n\tjava.lang.String submissionQueue();",
"public Long getWorkRequestId() {\n return this.workRequestId;\n }",
"com.google.protobuf.ByteString\n getJobIdBytes();",
"public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}",
"public String getJob() {\n return job;\n }",
"@DISPID(39)\r\n\t// = 0x27. The runtime will prefer the VTID if present\r\n\t@VTID(38)\r\n\tint lastInstanceJobID();",
"public JobId job() { return Objects.requireNonNull(job, \"production revisions have no associated job\"); }",
"public byte[] getNextJobID() {\n // Get next job id from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetNextJobID(globalStateAccessorNativePointer);\n }\n }",
"public com.google.protobuf.ByteString\n getJobIdBytes() {\n java.lang.Object ref = jobId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n jobId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getJobIdBytes() {\n java.lang.Object ref = jobId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n jobId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String runId() {\n return this.runId;\n }",
"@DISPID(5)\r\n\t// = 0x5. The runtime will prefer the VTID if present\r\n\t@VTID(11)\r\n\tint lastInstanceJobID();",
"java.lang.String getFormId();",
"public java.lang.String getJobNumber() {\r\n return jobNumber;\r\n }",
"public Integer getThreadPostId() {\n\t\treturn threadPostId;\n\t}",
"public final String getRefPK() {\n\t\tString str = getRequest().getParameter(\"RefPK\");\n\t\treturn str;\n\t}",
"protected String getTaskId() {\n\t\tDisplay.debug(\"getTaskId() devuelve %s\", taskId);\n\t\treturn taskId;\n\t}",
"public String getSubmissionType() {\n\t\tif (submissionType != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"submission_type\" + TAB + submissionType.toString();\n\t\treturn null;\n\t}",
"String getExecId();",
"public String getExecRefId() {\n Object ref = execRefId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execRefId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"public long getThreadId() {\n return threadId;\n }",
"public int getJobType() {\n return jobType;\n }",
"@Override\n\tpublic String getSubmitArgs() {\n\t\treturn model.getSubmitArgs();\n\t}",
"@Override\n\tpublic long getWorkflowId() {\n\t\treturn _scienceApp.getWorkflowId();\n\t}",
"private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}",
"public String getThreadKey() {\n\t\treturn Integer.toString(this.hashCode());\n\t}",
"String submitJob(JPPFJob job);",
"public String getExecRefId() {\n Object ref = execRefId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execRefId_ = s;\n }\n return s;\n }\n }",
"@Schema(description = \"The ID of the worklog record.\")\n public String getId() {\n return id;\n }",
"public Long getThreadId() {\n return threadId;\n }",
"public String submittedBy() {\n return this.submittedBy;\n }",
"public int getTaskIndex() {\n return (Integer) commandData.get(CommandProperties.TASK_ID);\n }",
"public long getThreadId() {\n return threadId_;\n }",
"public String getWork_id(){\r\n\t\treturn this.work_id ;\r\n\t}",
"public long getThreadId() {\n return threadId_;\n }",
"public java.lang.Object getTaskID() {\n return taskID;\n }",
"public Integer getThreadId() {\n\t\treturn threadId;\n\t}",
"@ApiModelProperty(required = true, value = \"JobId of associated job\")\n public String getJobId() {\n return jobId;\n }",
"public static String getPid() {\n\t\tString name = ManagementFactory.getRuntimeMXBean().getName(); \n\t\t// get pid \n\t\treturn name.split(\"@\")[0];\n\t}",
"com.google.protobuf.ByteString getWorkerIdBytes();",
"public int getId() {\n return parameter.getId();\n }",
"@Override\n public String getType() {\n return Const.JOB;\n }",
"@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}",
"@Override\n\tpublic void setSubmitId(String submitId) {\n\t\tmodel.setSubmitId(submitId);\n\t}",
"@Override\n\tpublic String getSubmissionText() {\n\t\treturn model.getSubmissionText();\n\t}",
"public String getId() {\n return (String) getValue(ACTION_ID);\n }",
"public String toString() {\n return \"submission\";\n }",
"com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"The identifier of the job\")\n\n public String getJob() {\n return job;\n }",
"public int getTaskID() {\n\t\treturn taskID;\n\t}",
"public int getIdRpcAttempt() {\n\t\t\treturn idRpcAttempt;\n\t\t}",
"public OffsetDateTime submittedTime() {\n return this.submittedTime;\n }",
"public Long getWorkflowId() {\n return this.workflowId;\n }",
"public static JobID generate() {\n return new JobID();\n }",
"public int getTaskId() {\n return taskId;\n }"
]
| [
"0.7686191",
"0.70232856",
"0.70177764",
"0.6978357",
"0.64296657",
"0.63751894",
"0.63298374",
"0.62968075",
"0.61651945",
"0.6134814",
"0.60872096",
"0.6085444",
"0.5998783",
"0.59952396",
"0.5972367",
"0.595563",
"0.59195375",
"0.5915391",
"0.59105927",
"0.59005725",
"0.58925277",
"0.5887944",
"0.5872943",
"0.5861473",
"0.5838281",
"0.5835227",
"0.58241993",
"0.58241993",
"0.58241993",
"0.581251",
"0.5784206",
"0.5745703",
"0.5744827",
"0.570854",
"0.56678146",
"0.5666798",
"0.5659874",
"0.56579083",
"0.5648362",
"0.5647199",
"0.56314296",
"0.56314296",
"0.56217027",
"0.56125003",
"0.5605269",
"0.5601462",
"0.55775595",
"0.55709845",
"0.55610746",
"0.5556824",
"0.55265224",
"0.55182904",
"0.54956526",
"0.54832387",
"0.54735446",
"0.5472091",
"0.5458097",
"0.5437298",
"0.54296017",
"0.54257554",
"0.5423486",
"0.5399254",
"0.5390935",
"0.5386123",
"0.53778064",
"0.5372081",
"0.5363424",
"0.5353606",
"0.5347637",
"0.5346406",
"0.53328806",
"0.53305954",
"0.5328662",
"0.53168786",
"0.53152466",
"0.5313986",
"0.5275831",
"0.525149",
"0.5247388",
"0.52232116",
"0.5200585",
"0.5195651",
"0.5190378",
"0.51889205",
"0.5180536",
"0.5173966",
"0.5166357",
"0.5153226",
"0.51525927",
"0.51525867",
"0.51400656",
"0.5135207",
"0.5114294",
"0.5103774",
"0.5091886",
"0.50865406",
"0.5079098",
"0.5079009",
"0.5071",
"0.50706667"
]
| 0.7918613 | 0 |
Returns the title of this job. | @Override
public String getTitle() {
return model.getTitle();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getJobTitle() {\r\n\t\treturn jobTitle;\r\n\t}",
"public String getJobTitle() {\r\n return jobTitle;\r\n }",
"public String getJob_title() {\r\n return job_title;\r\n }",
"public String getTitle() {\n return getString(CommandProperties.TASK_TITLE);\n }",
"public String getSrcJobTitle() {\r\n return (String) getAttributeInternal(SRCJOBTITLE);\r\n }",
"@Override\n\tpublic String getJobName() {\n\t\treturn model.getJobName();\n\t}",
"@ObjectSupport public final String title() {\n return title==null\n ? title = createTitle()\n : title;\n }",
"public String getName() {\r\n\t\treturn this.title;\r\n\t}",
"public String title() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n addParameter(\"title.number\" , iBundle.getString(\"reminderreport.title.date\") );\n\n return iBundle.getString(\"reminderreport.title\");\n }",
"public String getJobName() {\n return this.mJob;\n }",
"public String getTitle() {\n return titleName;\n }",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn title;\n\t}",
"public String title()\n\t{\n\t\treturn title;\n\t}",
"public String getTitle(){\n\n\t\treturn title;\n\t}",
"public String getTitle() {\n\t\treturn this.title;\n\t}",
"public String getTitle() {\n\t\treturn this.title;\n\t}",
"public String getTitle() {\n\t\treturn this.title;\n\t}",
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public String getTitle() {\n Object ref = title_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getTitle()\n {\n return (this.title);\n }",
"public StringFilter getCurrentJobTitle() {\n\t\treturn currentJobTitle;\n\t}",
"public String getTaskTitle() {\n return String.valueOf(comboBox.getSelectedItem());\n }",
"public String getTitle()\n\t{\n\t\treturn title;\n\t}",
"public String getTitle()\n\t{\n\t\treturn title;\n\t}",
"public String getJobName() {\n return jobName;\n }",
"public String getJobName() {\n return jobName;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n\t\treturn this.Title; \n\t}",
"public java.lang.String getTitle() {\n return title;\n }",
"public String getTitle() \r\n\t{\r\n\t\treturn this.title;\r\n\t}",
"public String getTitle() {\n \t\treturn title;\n \t}",
"public String getTitle() {\r\n return title;\r\n }",
"public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getTitle() {\n Object ref = title_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n title_ = s;\n return s;\n }\n }",
"public String getTitle() {\n return getProperty(Property.TITLE);\n }",
"public String getJobName() {\n return this.JobName;\n }",
"@Override\r\n\tpublic String getName() {\r\n\t\treturn this.title;\r\n\t}",
"public @Nullable CharSequence getQueueTitle() {\n try {\n return mSessionBinder.getQueueTitle();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getQueueTitle\", e);\n }\n return null;\n }",
"public String getJobName() {\n return this.jobName;\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\n\t\treturn fTitle;\n\t}",
"public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getTitle() {\n return this.title;\n }",
"public String getTitle() {\n return this.title;\n }",
"public String getTitle() {\n return this.title;\n }",
"public String getTitle() {\n return this.title;\n }",
"public String getTitle() {\n return this.title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }"
]
| [
"0.83264035",
"0.82750565",
"0.81098753",
"0.7679682",
"0.766957",
"0.73901284",
"0.73434657",
"0.72696126",
"0.7259677",
"0.72523475",
"0.7242372",
"0.7240842",
"0.72259635",
"0.72259635",
"0.72259635",
"0.72259635",
"0.72259635",
"0.72259635",
"0.72259635",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.7211412",
"0.71942776",
"0.7194146",
"0.7192699",
"0.7192699",
"0.7192699",
"0.7180744",
"0.7170305",
"0.7170305",
"0.7170305",
"0.7167583",
"0.7162808",
"0.71568686",
"0.71408504",
"0.7140298",
"0.7140298",
"0.7136494",
"0.7136494",
"0.71352494",
"0.71352494",
"0.7125196",
"0.71206474",
"0.7119892",
"0.71028304",
"0.7093853",
"0.7091213",
"0.7091213",
"0.7091148",
"0.70860374",
"0.7077898",
"0.70761293",
"0.70700294",
"0.70679134",
"0.7054542",
"0.7054542",
"0.7054542",
"0.7054542",
"0.7054542",
"0.7054542",
"0.7054542",
"0.70446426",
"0.70298225",
"0.70223224",
"0.702047",
"0.7013623",
"0.7013623",
"0.7013623",
"0.7013623",
"0.7013623",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046",
"0.70061046"
]
| 0.0 | -1 |
Returns the used cpu time of this job. | @Override
public String getUsedCpuTime() {
return model.getUsedCpuTime();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private long getCpuTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : 0L;\n }",
"public long getCpuTime() {\n\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\treturn bean.isCurrentThreadCpuTimeSupported() ?\n\t\t\tbean.getCurrentThreadCpuTime() : 0L;\n\t\n}",
"public static long getCpuTime(){\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ?\n bean.getCurrentThreadCpuTime() : 0L;\n }",
"public static long getCpuTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadCpuTime(): 0L;\n }",
"public static long getCpuTime( ) {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n\n bean.getCurrentThreadCpuTime( ) : 0L;\n\n }",
"public static long getCpuTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadCpuTime( ) : 0L;\n }",
"public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}",
"public long getCurrentThreadCpuTime() {\t\t\t\t\t\t//Total CPU time usage\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : -1L;\n\t}",
"public long getStartCpuTime() {\r\n return startCpuTime;\r\n }",
"public String totalProcessorTime() {\n return this.totalProcessorTime;\n }",
"public long getCpuTimeNanos() {\n return cpuTimeToNanos(cpu.getTime());\n }",
"private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }",
"Optional<Duration> totalCpuTime();",
"int getCPU_time();",
"public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }",
"public long getJVMCpuTime( ) {\n OperatingSystemMXBean bean =\n ManagementFactory.getOperatingSystemMXBean( );\n if ( ! (bean instanceof\n com.sun.management.OperatingSystemMXBean) )\n return 0L;\n return ((com.sun.management.OperatingSystemMXBean)bean)\n .getProcessCpuTime( );\n}",
"public long elapsedTime(){\n\n // calculate elapsed time by getting current CPU time and substracting the CPU time from when we started the stopwatch\n\n // this does not stop the stopwatch\n\n return (magicBean.getCurrentThreadCpuTime() - stopWatchStartTimeNanoSecs);\n\n }",
"public Float getUsedtime() {\n return usedtime;\n }",
"public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }",
"private float getCpuUsage() {\n\t\tString processName = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString processId = processName.split(\"@\")[0];\n\n\t\tlong utimeBefore, utimeAfter, totalBefore, totalAfter;\n\t\tfloat usage = 0;\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tString line = br.readLine();\n\t\t\tutimeBefore = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalBefore = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalBefore += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tThread.sleep(1000);\n\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tline = br.readLine();\n\t\t\tutimeAfter = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalAfter = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalAfter += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tusage = 100f * (utimeAfter - utimeBefore) / (totalAfter - totalBefore);\n\t\t} catch (Exception e) {}\n\t\treturn usage;\n\t}",
"public int getWorkRequired() {\n return time;\n }",
"public long cpuMicros() {\n return this.cpuNanos / 1000;\n }",
"public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }",
"private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\n }",
"public static double doCPU_usage() {\n double totalProgramRunTime = endProgramTime - startProgramTime;\n return (processingTimeTotal / totalProgramRunTime) * 100;\n }",
"public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }",
"@DISPID(21)\r\n\t// = 0x15. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String actualCPUTime();",
"public long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n}",
"public Long getCpu() {\n return this.Cpu;\n }",
"public String elapsedTime() {\n return totalWatch.toString();\n }",
"public float getCPUCost() {\n return this.cpuCost;\n }",
"public String userProcessorTime() {\n return this.userProcessorTime;\n }",
"public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }",
"@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(53)\r\n\tint actualCPUTime_Seconds();",
"public double getCpuUsage() {\n \t\tif (cpuUsage > 100) {\n \t\t\treturn 100;\n \t\t}\n \t\treturn cpuUsage;\n \t}",
"public long getThreadCpuTime(long tid) {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isCurrentThreadCpuTimeSupported())\n\t\t\tSystem.out.println(\"current thread doesn't support cpu time\");\n\t\treturn bean.isThreadCpuTimeSupported() ? bean.getThreadCpuTime(tid) : -1L;\n\t}",
"public long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n}",
"public long getCurrentThreadUserTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : -1L;\n\t}",
"public float getCpuUsage() {\n try {\n mReader = new BufferedReader(new FileReader(mCpuUsageFilePath));\n mSa = mReader.readLine().split(\"[ ]+\", 9);\n\n mWork = Long.parseLong(mSa[1]) + Long.parseLong(mSa[2]) + Long.parseLong(mSa[3]);\n mTotal = mWork + Long.parseLong(mSa[4]) + Long.parseLong(mSa[5]) + Long.parseLong(mSa[6]) + Long.parseLong(mSa[7]);\n\n if (mTotalBefore != 0) {\n mTotalT = mTotal - mTotalBefore;\n mWorkT = mWork - mWorkBefore;\n mCpuTotal = restrictPercentage(mWorkT * 100 / (float) mTotalT);\n //Log.d(TAG, \"CPU Usage: \" + restrictPercentage(mWorkT * 100 / (float) mTotalT) + \"%\");\n }\n mTotalBefore = mTotal;\n mWorkBefore = mWork;\n\n mReader.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return mCpuTotal;\n }",
"@ApiModelProperty(required = true, value = \"The number (across all cores) of micro-seconds per second.\")\n public BigDecimal getCpu() {\n return cpu;\n }",
"public long getCurrentThreadKernelTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime() : -1L;\n\t}",
"@Override\n\tpublic String getUsedWalltime() {\n\t\treturn model.getUsedWalltime();\n\t}",
"public long getProccesTime() {\n\t\tlong processTime = 0;\n\t\tfor (Client client : queue) {\n\t\t\tprocessTime += client.getProcessedTime();\n\t\t}\n\t\treturn processTime;\n\t}",
"@DISPID(56)\r\n\t// = 0x38. The runtime will prefer the VTID if present\r\n\t@VTID(54)\r\n\tint actualCPUTime_Milliseconds();",
"public double CPUServiceTime()\r\n\t{\r\n\t\treturn Math.random()* (30.0 - 10.0) + 10.0;\r\n\t}",
"public int getIdleTime() {\n int[] processorFinishTimes = new int[AlgorithmConfig.getNumOfProcessors()];\n int[] processorWeights = new int[AlgorithmConfig.getNumOfProcessors()];\n int processor;\n // Find the end time and weight of each processor\n for (ScheduledTask task : this) {\n processor = task.getProcessorNum() - 1;\n if (task.getFinishTime() > processorFinishTimes[processor]) {\n processorFinishTimes[processor] = task.getFinishTime();\n }\n processorWeights[processor] += task.getNode().getWeight();\n }\n // Calculate the idle time\n int idleTime = 0;\n for (int i = 0; i < AlgorithmConfig.getNumOfProcessors(); i++) {\n idleTime += processorFinishTimes[i] - processorWeights[i];\n }\n\n return idleTime;\n }",
"protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}",
"BigInteger getLeftoverCPU() {\n return pm.getCPU().subtract(used_cpu);\n }",
"@Override\n\tpublic String getCPU() {\n\t\treturn null;\n\t}",
"public CPU getCPU() {\r\n\t\treturn cpu;\r\n\t}",
"@DISPID(54)\r\n\t// = 0x36. The runtime will prefer the VTID if present\r\n\t@VTID(52)\r\n\tint actualCPUTime_Minutes();",
"public long getElapsedTime() {\n\t\treturn this.getTime();\n\t}",
"public int getCpuLoad() { return cpuLoad; }",
"public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }",
"public String getCurrentThreadTimeInfo() {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isCurrentThreadCpuTimeSupported())\n\t\t\treturn timeInfo;\n\t\tlong userTime = bean.getCurrentThreadUserTime();\n\t\tlong cpuTime = bean.getCurrentThreadCpuTime();\n\n\t\tsb.append(userTime).append(\"#\").append(cpuTime);\n\t\ttimeInfo = sb.toString();\n//\t\tSystem.out.println(\"lib: \" + timeInfo);\n\t\treturn timeInfo;\n\t}",
"public long getTimeTaken();",
"@DISPID(70)\r\n\t// = 0x46. The runtime will prefer the VTID if present\r\n\t@VTID(68)\r\n\tint averageCPUTime_Seconds();",
"public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }",
"public long getOccupiedSeconds(){\n \t\treturn occupiedSeconds;\n \t}",
"public int getTimeTaken() {\n return this.getTreeNode().getBuilding().getTotalTimeTaken();\n }",
"public String getPerformanceTime()\r\n {\r\n return performanceTime;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"public static long getElapsedTime() {\n long time = System.currentTimeMillis() - START_TIME;\n // long time = System.nanoTime() / 1000000;\n return time;\n }",
"public int getSystemTime() {\n\t\treturn this.systemTime;\n\t}",
"public int getTotalTime();",
"public double getElapsedTime()\n\t{\n\t\treturn elapsedTime;\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }",
"public long getElapsedTime()\r\n {\r\n if(isRunning)\r\n {\r\n long endTime = System.currentTimeMillis();\r\n return elapsedTime=endTime-startTime;\r\n }\r\n else\r\n {\r\n return elapsedTime;\r\n }\r\n }",
"public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}",
"public long totalTime() {\n\t\tlong ret = 0;\n\t\tfor (Task l : plan) {\n\t\t\tret += l.getTaskLength();\n\t\t}\n\n\t\treturn ret;\n\t}",
"@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(51)\r\n\tint actualCPUTime_Hours();",
"public long getSystemStartTime() {\n return (this.systemStartTime);\n }",
"public long getUptime() {\n\t\treturn System.currentTimeMillis()-uptime;\n\t}",
"public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }",
"public native int getCpuUsage();",
"public double computeElapsedTime() {\r\n\r\n long now = System.currentTimeMillis();\r\n\r\n elapsedTime = (double) (now - startTime);\r\n\r\n // if elasedTime is invalid, then set it to 0\r\n if (elapsedTime <= 0) {\r\n elapsedTime = (double) 0.0;\r\n }\r\n\r\n return (double) (elapsedTime / 1000.0); // return in seconds!!\r\n }",
"public Integer getGameUseTime() {\n return gameUseTime;\n }",
"public Long getFastestTime()\r\n {\r\n return this.fastestTime;\r\n }",
"public int getTotalRunTime() {\n return totalRunTime;\n }",
"public double getElapsedTime() {\r\n return (double) (elapsedTime / 1000.0); // convert from milliseconds to seconds\r\n }",
"public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}",
"@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public int getThreadUsed();",
"@DISPID(71)\r\n\t// = 0x47. The runtime will prefer the VTID if present\r\n\t@VTID(69)\r\n\tint averageCPUTime_Milliseconds();",
"public final com.francetelecom.admindm.model.Parameter getParamCPUTime() {\n\t\treturn paramCPUTime;\n\t}",
"public static void getCpuUsage(){\r\n CPUmeasurement currentCpuUsage = new CPUmeasurement();\r\n cpuUsageList.add(currentCpuUsage);\r\n //CPUmeasurement.printCpuUsage(currentCpuUsage);\r\n }",
"public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }",
"public long getElapsedTicks() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerTick;\n\t}",
"public void setCPUTime() {\r\n\t\t\tthis.CPUTime = 0;\r\n\t\t}",
"public long getCurrentSystemTime() {\n return getSystemTime() - startSystemTimeNano;\n }",
"long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}",
"private long getCurrentTimeInMillionSeconds(){\n Date currentData = new Date();\n return currentData.getTime();\n }",
"public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}",
"public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }",
"public long getElapsedSeconds() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerSs;\n\t}",
"long getElapsedTime();"
]
| [
"0.79082066",
"0.7836816",
"0.7786548",
"0.7770976",
"0.7738879",
"0.77088547",
"0.76628387",
"0.74837327",
"0.7454206",
"0.7409873",
"0.7368139",
"0.73532593",
"0.73386604",
"0.7333972",
"0.7313266",
"0.7255685",
"0.7228315",
"0.7209338",
"0.72034734",
"0.71482205",
"0.71332955",
"0.7095216",
"0.7066178",
"0.7052434",
"0.7049587",
"0.7005176",
"0.70049",
"0.6974854",
"0.6939855",
"0.6935986",
"0.69012785",
"0.6821543",
"0.68103945",
"0.6807496",
"0.6747353",
"0.6734582",
"0.67343366",
"0.6721785",
"0.6704088",
"0.66992784",
"0.66788125",
"0.6678169",
"0.6656307",
"0.66056925",
"0.6589209",
"0.65721965",
"0.65646774",
"0.65633446",
"0.6546089",
"0.65438807",
"0.6539101",
"0.6535866",
"0.6515015",
"0.65011925",
"0.64833546",
"0.64732426",
"0.6467553",
"0.6455581",
"0.6434862",
"0.6427783",
"0.64105445",
"0.6407736",
"0.6395517",
"0.6389841",
"0.6384497",
"0.6382948",
"0.6366261",
"0.6358217",
"0.6355318",
"0.6332507",
"0.6321234",
"0.63124394",
"0.63062626",
"0.63058543",
"0.62951475",
"0.62899905",
"0.6272478",
"0.6271562",
"0.6269945",
"0.62559396",
"0.6252792",
"0.62370133",
"0.62327814",
"0.62317735",
"0.62317735",
"0.62297493",
"0.6229174",
"0.62181115",
"0.6193053",
"0.6190722",
"0.61878496",
"0.6187468",
"0.61789733",
"0.61783385",
"0.61772776",
"0.616873",
"0.616184",
"0.615666",
"0.61440736",
"0.6142485"
]
| 0.86415744 | 0 |
Returns the used memory of this job. | @Override
public String getUsedMemory() {
return model.getUsedMemory();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long getUsedHeapMemory() {\n\t\tMemoryMXBean memBean = ManagementFactory.getMemoryMXBean();\n\t\tMemoryUsage heap = memBean.getHeapMemoryUsage();\n\n\t\treturn heap.getUsed();\n\t}",
"public static long getUsedNonHeapMemory() {\n\t\tMemoryMXBean memBean = ManagementFactory.getMemoryMXBean();\n\t\tMemoryUsage nonHeap = memBean.getNonHeapMemoryUsage();\n\n\t\treturn nonHeap.getUsed();\n\t}",
"public Long getUsedSpace() {\n return usedSpace;\n }",
"long memoryUsed();",
"private long getSystemMemoryInGB() {\n long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory\n .getOperatingSystemMXBean()).getTotalPhysicalMemorySize();\n return memorySize / ONE_BILLION;\n }",
"public static double getUsedMemory()\n {\n\t\tMemoryUsage heapMemoryUsage = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();\n \t//return (double) (Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory()) / 1024/1024;\n \treturn (double) (heapMemoryUsage.getUsed()) / 1024/1024;\n }",
"public Long get_cacheutilizedmemorykb() throws Exception {\n\t\treturn this.cacheutilizedmemorykb;\n\t}",
"public static long getMemoryUsed() throws IOException, InterruptedException {\n \treturn pi4jSystemInfoConnector.getMemoryUsed();\r\n }",
"public static long totalMemory() {\n return Native.totalMemory(false);\n }",
"private float getMemoryUsage() {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tlong allocatedMemory = runtime.totalMemory();\n\t\tlong freeMemory = runtime.freeMemory();\n\t\treturn (allocatedMemory - freeMemory);\n\t}",
"@Override\n public long ramBytesUsed() {\n ensureOpen();\n return sizeInBytes.get();\n }",
"public int getMemory()\n\t{\n\t\treturn memorySize;\n\t}",
"public double getOccupiedRamGB () { return getRamBaseResource().getOccupiedCapacity(); }",
"public long getUsedBufferSpace() {\n return usedBufferSpace.get();\n }",
"long getMemory();",
"long getMemory();",
"public static long getFreeMemory() {\r\n\t\tfreeMemory = Runtime.getRuntime().freeMemory();\r\n\t\treturn freeMemory;\r\n\t}",
"public long getMemoryInternalAvail() {\n StatFs stat = new StatFs(Environment.getDataDirectory().getPath());\n long blockSize = stat.getBlockSize();\n long availableBlocks = stat.getAvailableBlocks();\n return availableBlocks * blockSize;\n }",
"default long getUnusedMemory() {\n return getMaxMemory() - getMemory();\n }",
"public Integer getMemorySize() {\n return this.memorySize;\n }",
"long getUsedSpace() throws IOException;",
"public long getTotalFreeSpaceInBytes() {\n return totalFreeSpaceInBytes_;\n }",
"public long getTotalFreeSpaceInBytes() {\n return totalFreeSpaceInBytes_;\n }",
"BigInteger getLeftoverMemory() {\n return pm.getMemory().subtract(used_mem);\n }",
"public static long getTotalMemory() {\r\n\t\ttotalMemory = Runtime.getRuntime().totalMemory();\r\n\t\treturn totalMemory;\r\n\t}",
"public long getFreeSpace(){\n return freeSpace;\n }",
"public long getTotalFreeSpaceInBytes() {\n return totalFreeSpaceInBytes_;\n }",
"public long getTotalFreeSpaceInBytes() {\n return totalFreeSpaceInBytes_;\n }",
"@Override\n\tpublic long getUsedSpace()\n\t{\n\t\treturn 0;\n\t}",
"long getTotalFreeSpaceInBytes();",
"long getTotalFreeSpaceInBytes();",
"@Nullable\n BigInteger getMemoryMb();",
"protected long calculateLiveMemoryUsage() {\n // NOTE: MemoryUsageGaugeSet provides memory usage statistics but we do not use them\n // here since it will require extra allocations and incur cost, hence it is cheaper to use\n // MemoryMXBean directly. Ideally, this call should not add noticeable\n // latency to a query -- but if it does, please signify on SOLR-14588\n return MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed();\n }",
"public native int getUsedMemory();",
"public int getMemoryUsedForBlocks() {\r\n return memoryUsedForBlocks;\r\n }",
"public long memory() {\n\treturn 0;\n }",
"@Override\n public long ramBytesUsed() {\n return BASE_RAM_BYTES_USED;\n }",
"public Integer getMemoryMb() {\n return memoryMb;\n }",
"public static long getMemoryFree() throws IOException, InterruptedException {\n \treturn pi4jSystemInfoConnector.getMemoryFree();\r\n }",
"public static long getMemoryTotal() throws IOException, InterruptedException {\n \treturn pi4jSystemInfoConnector.getMemoryTotal();\r\n }",
"public int getMemoryUsage() {\n\t\ttry {\n\t\t\treturn super.getProperty(\"MemoryUsage\", Integer.class);\n\t\t} catch (Exception e) {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public long getMemUsedMax() {\n return memUsedMax;\n }",
"long getMemorySize() {\n return MemoryBudget.DELTAINFO_OVERHEAD +\n MemoryBudget.byteArraySize(key.length);\n }",
"public long getTotalSpace(){\n return totalSpace;\n }",
"public static long getMemoryCached() throws IOException, InterruptedException {\n \treturn pi4jSystemInfoConnector.getMemoryCached();\r\n }",
"public static long getAvailableUnusedMemory() {\n Runtime r = Runtime.getRuntime();\n return r.maxMemory() // how large the JVM heap can get\n - r.totalMemory() // current size of heap (<= r.maxMemory())\n + r.freeMemory(); // how much of currently allocated heap is unused\n }",
"public long memoriaRamDisponivel(){\n return hardware.getMemory().getAvailable();\n }",
"public static long getAvailableInternalMemorySize() {\r\n File path = Environment.getDataDirectory();\r\n StatFs stat = new StatFs(path.getPath());\r\n long blockSize = stat.getBlockSize();\r\n long availableBlocks = stat.getAvailableBlocks();\r\n return availableBlocks * blockSize;\r\n }",
"public double getTotalRamGB () { return n.getResources(RESOURCETYPE_RAM).stream().mapToDouble(r->r.getCapacity()).sum (); }",
"public long getBytesUsed(){\r\n\t\treturn bytesUsed;\r\n\t}",
"public int getSize() {\n return memory.length;\n }",
"public int getFreeSpace() {\n return capacity - storage;\n }",
"@Override\n public int getUsedSize() {\n return usedSize;\n }",
"public abstract long estimateMemorySize();",
"public static long getTotalInternalMemorySize() {\r\n File path = Environment.getDataDirectory();\r\n StatFs stat = new StatFs(path.getPath());\r\n long blockSize = stat.getBlockSize();\r\n long totalBlocks = stat.getBlockCount();\r\n return totalBlocks * blockSize;\r\n }",
"public long getCurrent() {\n m_Runtime = Runtime.getRuntime();\n m_Total = m_Runtime.totalMemory();\n\n return m_Total;\n }",
"public long getUsedStorage() {\n return usedStorage;\n }",
"public long getMemUsedAvg() {\n return memUsedAvg;\n }",
"long getLocalOffHeapSizeInBytes();",
"public native long memoryConsumed();",
"private long getMemoryFootprint() {\n Runtime runtime = Runtime.getRuntime();\n long memAfter = runtime.totalMemory() - runtime.freeMemory();\n long memBefore = memAfter + 1;\n while (memBefore != memAfter) {\n memBefore = memAfter;\n System.gc();\n memAfter = runtime.totalMemory() - runtime.freeMemory();\n }\n return memAfter;\n }",
"public Long getUsed() {\r\n return used;\r\n }",
"public native int getTotalMemory();",
"public Double minMemory() {\n return this.minMemory;\n }",
"int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }",
"long getLocalOnHeapSizeInBytes();",
"public double getMaxMemUsage() {\n return maxMemory;\n }",
"public double getOccupiedCpus () { return getCpuBaseResource().getOccupiedCapacity(); }",
"long getMemLimit();",
"public int ProgramMemorySize() { return PROGRAM_MEMORY_SIZE; }",
"public Long sizeInKB() {\n return this.sizeInKB;\n }",
"public abstract long getTotalMemoryBytes(int minibatchSize, @NonNull MemoryUseMode memoryUseMode,\n @NonNull CacheMode cacheMode, @NonNull DataType dataType);",
"public int getMpUsed() {\n if (getLastStep() != null) {\n return getLastStep().getMpUsed();\n }\n return 0;\n }",
"long getOccupiedSize();",
"static long getPresumableFreeMemory() {\n System.gc();\n final long allocatedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n return Runtime.getRuntime().maxMemory() - allocatedMemory;\n }",
"int getLocalOffHeapSize();",
"int memSize() {\r\n\t\treturn BASE_NODE_SIZE + 5 * 4;\r\n\t}",
"public long getMinFree() {\n return params.getMinimumFree() * 1024 * 1024;\n }",
"protected long getBytesFree()\r\n {\r\n return this.bytesFree.get();\r\n }",
"long getMaxMemory();",
"public native int getFreeMemory();",
"public final int getOutputMemorySize() {\n return this.outputMemorySize;\n }",
"public static String getMemoryInfo() {\r\n\t\tRuntime rt = Runtime.getRuntime();\r\n\t\tint maxMemory = (int)(rt.maxMemory() / (1024 * 1024)); // Max memory in MB\r\n\t\tint currentTotalMemory = (int)(rt.totalMemory() / (1024 * 1024)); // Total memory in MB\r\n\t\tdouble freeMemory = (double)(((int)rt.freeMemory()) / (1024.0 * 1024.0)); // Free memory in MB with decimal places\r\n\t\treturn \"Current Memory (Heap) Size: \" + currentTotalMemory + \" MB\" + \r\n\t\t\t\t\"\\nMaximum Memory Size: \" + maxMemory + \" MB\" +\r\n\t\t\t\t\"\\nMemory Free: \" + String.format(\"%.1f\", freeMemory) + \" MB\" +\r\n\t\t\t\t\"\\n\\n(Reserved areas not included)\";\r\n\t}",
"public double getQueueFree(){\n\t\treturn unitSpaceAvailable;\n\t}",
"public long getTotalStorage() {\n return totalStorage;\n }",
"public Long getProcessedSizeBytes() {\n return this.processedSizeBytes;\n }",
"public Long used() {\n return this.used;\n }",
"int getLocalOnHeapSize();",
"long getAvailableSpace() throws IOException;",
"public static long freeMemory() {\n return Native.freeMemory(false);\n }",
"long getOwnedEntryMemoryCost();",
"public static long getAvailableDiskSpace() {\r\n\t\treturn availableDiskSpace;\r\n\t}",
"public static long getMemoryShared() throws IOException, InterruptedException {\n \treturn pi4jSystemInfoConnector.getMemoryShared();\r\n }",
"public final long getAllocationSize() {\n return m_allocSize;\n }",
"public int getFreeSpace() throws YAPI_Exception\n {\n return get_freeSpace();\n }",
"@JsonProperty(value = \"MemorySize\")\n public Integer getMemorySize() {\n return this.MemorySize;\n }",
"public long memoriaDisponível() {\n int numeroDeParticoes = numeroDeParticoesDeDisco();\n long memoriaDisponivel = 0;\n for (int i = 0; i < numeroDeParticoes; i++) {\n memoriaDisponivel += operatingSystem.getFileSystem().getFileStores()[i].getUsableSpace();\n }\n return memoriaDisponivel;\n }",
"public long getTotalSize() {\n return totalSize;\n }",
"public static void getMemoryUsage(){\r\n MemoryMeasurement actMemoryStatus = new MemoryMeasurement();\r\n //MemoryMeasurement.printMemoryUsage(actMemoryStatus);\r\n memoryUsageList.add(actMemoryStatus);\r\n }",
"public long getSize() {\n return size.get();\n }"
]
| [
"0.7688891",
"0.7602283",
"0.7558063",
"0.75108904",
"0.74282646",
"0.7332011",
"0.7329076",
"0.7314206",
"0.73134124",
"0.7301795",
"0.72901124",
"0.72681415",
"0.72322935",
"0.72230166",
"0.7183968",
"0.7183968",
"0.70971155",
"0.7097022",
"0.70788294",
"0.7069363",
"0.705984",
"0.7048726",
"0.7048726",
"0.70404375",
"0.70245135",
"0.7019612",
"0.70142055",
"0.70142055",
"0.70123917",
"0.6979995",
"0.6979995",
"0.6974884",
"0.69720364",
"0.69622886",
"0.69491446",
"0.6914722",
"0.69073135",
"0.69054544",
"0.69007206",
"0.6867118",
"0.6863656",
"0.68574154",
"0.68531245",
"0.6833007",
"0.6817876",
"0.6801953",
"0.6772407",
"0.67722446",
"0.6770135",
"0.6759192",
"0.67458326",
"0.6742945",
"0.6728918",
"0.67117155",
"0.66960615",
"0.6663091",
"0.6642676",
"0.6631734",
"0.6596187",
"0.65813196",
"0.65811986",
"0.6581022",
"0.65695155",
"0.65693915",
"0.6555891",
"0.6544902",
"0.6526124",
"0.65070176",
"0.6484503",
"0.6484263",
"0.64831984",
"0.64728755",
"0.64680463",
"0.64640635",
"0.64522636",
"0.6447599",
"0.64290166",
"0.6423644",
"0.64205694",
"0.64138424",
"0.6396624",
"0.6392687",
"0.6382308",
"0.63758045",
"0.63577175",
"0.63545305",
"0.63362855",
"0.63280946",
"0.63172144",
"0.6311095",
"0.63011867",
"0.62950283",
"0.6289282",
"0.62842506",
"0.62793374",
"0.62720245",
"0.627193",
"0.6271305",
"0.6264091",
"0.6246764"
]
| 0.7490382 | 4 |
Returns the used walltime of this job. | @Override
public String getUsedWalltime() {
return model.getUsedWalltime();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getWallTime() {\n\t\treturn model.getWallTime();\n\t}",
"public long getCurrentWallClockTime() {\n return System.currentTimeMillis() - startWallClockTime;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"@Override\n\tpublic String getUsedCpuTime() {\n\t\treturn model.getUsedCpuTime();\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"public long wallMicros() {\n return this.wallNanos / 1000;\n }",
"public long getEndWallClockTime() {\n return endWallClockTime;\n }",
"private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }",
"public int getWorkRequired() {\n return time;\n }",
"public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }",
"public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }",
"private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\n }",
"public Float getUsedtime() {\n return usedtime;\n }",
"public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }",
"public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }",
"public String getShRunAtTime() {\n\n\t\treturn shRunAtTime;\n\n\t}",
"public long getThinkTime() {\n\t\treturn (thinkTime);\n\t}",
"public String elapsedTime() {\n return totalWatch.toString();\n }",
"public long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n}",
"public long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n}",
"public Integer getGameUseTime() {\n return gameUseTime;\n }",
"public long elapsedTime(){\n\n // calculate elapsed time by getting current CPU time and substracting the CPU time from when we started the stopwatch\n\n // this does not stop the stopwatch\n\n return (magicBean.getCurrentThreadCpuTime() - stopWatchStartTimeNanoSecs);\n\n }",
"public long getCurrentThreadUserTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : -1L;\n\t}",
"private long getCpuTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : 0L;\n }",
"public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public long getSystemStartTime() {\n return (this.systemStartTime);\n }",
"public long getCpuTime() {\n\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\treturn bean.isCurrentThreadCpuTimeSupported() ?\n\t\t\tbean.getCurrentThreadCpuTime() : 0L;\n\t\n}",
"public int getTimeTaken() {\n return this.getTreeNode().getBuilding().getTotalTimeTaken();\n }",
"public int getSystemTime() {\n\t\treturn this.systemTime;\n\t}",
"long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}",
"public long getTimeTaken();",
"public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}",
"public long getUptime() {\n\t\treturn System.currentTimeMillis()-uptime;\n\t}",
"public long getSysUpTime() {\n return sysUpTime;\n }",
"public long sinceStart() {\n return System.currentTimeMillis() - lastStart;\n }",
"final public long getSysUpTime() {\n return sysUpTime ;\n }",
"public static long getCpuTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadCpuTime(): 0L;\n }",
"public static long getCpuTime( ) {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n\n bean.getCurrentThreadCpuTime( ) : 0L;\n\n }",
"public static long getCpuTime(){\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ?\n bean.getCurrentThreadCpuTime() : 0L;\n }",
"public long getCurrentTimeMillis() {\n return System.currentTimeMillis();\n }",
"public long getRunLastMillis()\n {\n return 0L;\n }",
"public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }",
"public static long getStartTime() {\n return startTime;\n }",
"public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }",
"long getMostSleepyMinuteSleepTime() {\n return getMinuteTotalSleepTime(getMostSleepyMinute());\n }",
"public static long getCpuTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadCpuTime( ) : 0L;\n }",
"public long getTime() {\r\n\t\treturn time;\r\n\t}",
"public static long getTime() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}",
"public int getTotalTime();",
"public long getCurrentSystemTime() {\n return getSystemTime() - startSystemTimeNano;\n }",
"public double getWorkTime()\n {\n if (cFixedServiceTimed)\n {\n return (mServerConfig.mServiceTime);\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n return (cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n return (tBase + cRandom.negexp(tDelta));\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n return (tBase + cRandom.poisson(tDelta));\n\n case cHoldUniform:\n return (cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n }\n return 0.0;\n }",
"public long getTime(){\r\n\t\treturn world.getWorldTime();\r\n\t}",
"public long getCurrentThreadKernelTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime() : -1L;\n\t}",
"public long getElapsedTimeHour() {\n return running ? ((((System.currentTimeMillis() - startTime) / 1000) / 60 ) / 60) : 0;\n }",
"public static long time() {\n return date().getTime();\n }",
"public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }",
"public String userProcessorTime() {\n return this.userProcessorTime;\n }",
"long getCurrentTime() {\n if (dm == null) {\n return -1;\n }\n return DLockService.getLockTimeStamp(dm);\n }",
"long getCurrentTimeMs();",
"public String totalProcessorTime() {\n return this.totalProcessorTime;\n }",
"public long getTimeLimit() {\n\t\treturn timeLimit;\n\t}",
"public String getCurrentThreadTimeInfo() {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isCurrentThreadCpuTimeSupported())\n\t\t\treturn timeInfo;\n\t\tlong userTime = bean.getCurrentThreadUserTime();\n\t\tlong cpuTime = bean.getCurrentThreadCpuTime();\n\n\t\tsb.append(userTime).append(\"#\").append(cpuTime);\n\t\ttimeInfo = sb.toString();\n//\t\tSystem.out.println(\"lib: \" + timeInfo);\n\t\treturn timeInfo;\n\t}",
"long getExecutionTime();",
"public long getStartSystemTime() {\r\n return startSystemTime;\r\n }",
"public long getTime() {\r\n \treturn time;\r\n }",
"public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }",
"public long getElapsedTime() {\n\t\treturn this.getTime();\n\t}",
"public long getTime() {\n return instance.getTime();\n }",
"public long getTime() {\n return instance.getTime();\n }",
"public long getTime() {\n return instance.getTime();\n }",
"public String getRunningTimeStr() {\n if (this.runningTime == null)\n return null;\n else\n return CommonRunService.getTimeStr(this.runningTime);\n }",
"public long getTime() {\n return instance.getTime();\n }",
"public long getTime() {\n return instance.getTime();\n }",
"public long getTime() {\n return instance.getTime();\n }",
"public long getTime() {\n return instance.getTime();\n }",
"public int getUserTime() {\n\t\treturn this.userTime;\n\t}",
"private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }",
"public Long getChecktime() {\n return checktime;\n }",
"public long getIntegrationTime() {\n\t\treturn updateTimeStamp - startTime;\n\t}",
"@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}",
"public final long getTime () {\n return time;\n }",
"public long getTime() {\n return time;\n }",
"public int getIdleTime() {\n int[] processorFinishTimes = new int[AlgorithmConfig.getNumOfProcessors()];\n int[] processorWeights = new int[AlgorithmConfig.getNumOfProcessors()];\n int processor;\n // Find the end time and weight of each processor\n for (ScheduledTask task : this) {\n processor = task.getProcessorNum() - 1;\n if (task.getFinishTime() > processorFinishTimes[processor]) {\n processorFinishTimes[processor] = task.getFinishTime();\n }\n processorWeights[processor] += task.getNode().getWeight();\n }\n // Calculate the idle time\n int idleTime = 0;\n for (int i = 0; i < AlgorithmConfig.getNumOfProcessors(); i++) {\n idleTime += processorFinishTimes[i] - processorWeights[i];\n }\n\n return idleTime;\n }",
"long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getTime() {\n return time_;\n }",
"public long getLastUsed() {\n \t\treturn this.lastUsed;\n \t}",
"public long getStartTime ()\r\n {\r\n return startTime;\r\n }",
"public static int getWatcherWaitingTime() {\r\n return watcherWaitingTime.getValue(); \r\n }",
"public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }",
"public long getLastTouchMillis()\n {\n return m_dtLastUse;\n }",
"public long getCpuTimeNanos() {\n return cpuTimeToNanos(cpu.getTime());\n }"
]
| [
"0.7150553",
"0.7143694",
"0.6864202",
"0.6858364",
"0.6842052",
"0.6835515",
"0.68239033",
"0.67382485",
"0.6719494",
"0.66381484",
"0.66167504",
"0.6600215",
"0.658417",
"0.6568796",
"0.656251",
"0.6506349",
"0.6493026",
"0.6457231",
"0.64241767",
"0.6393406",
"0.638726",
"0.63507754",
"0.6318645",
"0.6284818",
"0.627579",
"0.6265663",
"0.6229737",
"0.61981505",
"0.6190635",
"0.6188689",
"0.6150936",
"0.614204",
"0.6141715",
"0.61282355",
"0.61259246",
"0.6110471",
"0.6101116",
"0.60990924",
"0.608869",
"0.6086389",
"0.6083734",
"0.6082984",
"0.60785264",
"0.6078253",
"0.6077058",
"0.60732853",
"0.60719365",
"0.6068311",
"0.60644925",
"0.6058315",
"0.6057252",
"0.60526556",
"0.60506624",
"0.60476434",
"0.6046725",
"0.6042909",
"0.6041132",
"0.60372627",
"0.60225403",
"0.60216284",
"0.60079247",
"0.6007253",
"0.5989569",
"0.59880203",
"0.59860486",
"0.5985132",
"0.5983343",
"0.5982299",
"0.5978199",
"0.5978199",
"0.5978199",
"0.5972998",
"0.5969581",
"0.5969581",
"0.5969581",
"0.5969581",
"0.5969118",
"0.59630126",
"0.59614855",
"0.59521496",
"0.59504217",
"0.59458697",
"0.59458697",
"0.59377754",
"0.5936249",
"0.5932658",
"0.59279484",
"0.5926079",
"0.5925876",
"0.5925876",
"0.5925876",
"0.5925876",
"0.5925876",
"0.5925876",
"0.59243596",
"0.5922857",
"0.59209615",
"0.5894299",
"0.58923465",
"0.5886071"
]
| 0.81445795 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.