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
Shows a progress Dialog to inform the user, that the data is loading
protected void onPreExecute() { super.onPreExecute(); mProgressDialogTeacher = new ProgressDialog(getActivity()); mProgressDialogTeacher.setTitle(getResources().getString(R.string.please_wait)); mProgressDialogTeacher.setMessage(getResources().getText(R.string.loading)); mProgressDialogTeacher.setIndeterminate(false); mProgressDialogTeacher.setCanceledOnTouchOutside(false); mProgressDialogTeacher.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayLoader() {\n pDialog = new ProgressDialog(AddReviewActivity.this);\n pDialog.setMessage(\"Adding Review...Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "protected void showLoading()\n {\n progressBar = new ProgressDialog(this);\n progressBar.setTitle(\"Loading\");\n progressBar.setMessage(\"Wait while loading...\");\n progressBar.setCancelable(false); // disable dismiss by tapping outside of the dialog\n progressBar.show();\n }", "protected final void showLoadingDialog() {\n }", "public void showProgressDialog() {\r\n progressDialog.setMessage(getResources().getString(R.string.text_loading));\r\n progressDialog.setCancelable(false);\r\n progressDialog.show();\r\n }", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(DangKyActivity.this);\n pDialog.setMessage(\"Vui lòng đợi trong giây lát...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showProgressIndication() {\n Log.i(TAG, \"loading contacts... \");\n // TODO: make this be a no-op if the progress indication is\n // already visible with the exact same title and message.\n\n dismissProgressIndication(); // Clean up any prior progress indication\n\n mProgressDialog = new ProgressDialog(this);\n mProgressDialog.setMessage(this.getResources().getString(R.string.contact_list_loading));\t\n mProgressDialog.setIndeterminate(true);\n mProgressDialog.setCancelable(false);\n mProgressDialog.show();\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(context);\n dialog.setTitle(\"Loading Contents\");\n dialog.setMessage(\"Doing something interesting ...\");\n dialog.setIndeterminate(true);\n dialog.setCancelable(false);\n dialog.show();\n }", "@Override\n protected void onPreExecute() {\n progress = new ProgressDialog(hostContext);\n progress.setMessage(\"Wait while books are being downloaded...\");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.show();\n }", "public void showProgressDialog() {\n pd = new ProgressDialog(this);\n pd.setMessage(\"Renting film...\");\n pd.show();\n }", "@Override\r\n\t protected void onPreExecute() {\n\t super.onPreExecute();\r\n\t progressDialog = new ProgressDialog(UDMap.this);\r\n\t progressDialog.setMessage(\"Loading the best way...\");\r\n\t progressDialog.setIndeterminate(true);\r\n\t progressDialog.show();\r\n\t }", "private void showDialog(){\n progress = new ProgressDialog(this);\n progress.setTitle(getString(R.string.progress_dialog_loading));\n progress.setMessage(getString(R.string.progress_dialog_authenticating_with_firebase));\n progress.setCancelable(false);\n progress.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n loading = ProgressDialog.show(this.context, \"Fetching Data\",\"Please Wait...\",true,true);\n }", "protected void onPreExecute() {\r\n \tdialog = new ProgressDialog(context);\r\n \t\tdialog.setMessage(\"Loading...\");\r\n \t\tdialog.show();\r\n }", "@Override\n protected void onPreExecute() {\n\n\n dialog = new ProgressDialog(MainArea.this);\n dialog.setTitle(\"Loading Results\");\n dialog.setMessage(\"Please Wait Results Are Loading For You....\");\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n progressDialog = new ProgressDialog(getActivity());\n progressDialog.setTitle(getResources().getString(R.string.please_wait));\n progressDialog.setMessage(getResources().getString(R.string.fetching_data));\n progressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog1 = new ProgressDialog(Doctorslist.this);\n\t\t\tpDialog1.setMessage(\"Loading ...\");\n\t\t\tpDialog1.setIndeterminate(false);\n\t\t\tpDialog1.setCancelable(false);\n\t\t\tpDialog1.show();\n\t\t}", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dialog.setMessage(getText(R.string.dialog_loading));\n dialog.setIndeterminate(true);\n dialog.setCancelable(false);\n return dialog;\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(activity);\n\t\t\tpDialog.setMessage(\"Loading...\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}", "@Override\r\n\tprotected void onPreExecute()\r\n\t{\r\n\t\tprogress = new ProgressDialog(ctx);\r\n\t\tprogress.setTitle(\"Retrieving Parking Information\");\r\n\t\tprogress.setMessage(\"Please wait.\");\r\n\t\tprogress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\r\n\t\tprogress.show();\r\n\t\tsuper.onPreExecute();\r\n\t}", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "void showProgress();", "public void showProgressDialog() {\n if (mProgressDialog == null) {\n mProgressDialog = new ProgressDialog(this);\n mProgressDialog.setCancelable(false);\n mProgressDialog.setCanceledOnTouchOutside(false);\n mProgressDialog.setMessage(getString(R.string.msg_loading));\n mProgressDialog.setIndeterminate(true);\n }\n mProgressDialog.show();\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(RegisterActivity.this);\n pDialog.setMessage(\"Signing Up.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = new ProgressDialog(ListActivity.this);\n\t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\n\t\t\tprogressDialog.setMessage(\"Loading Programs. .\");\n\t\t\tprogressDialog.setCancelable(false);\n\n\t\t\tprogressDialog.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tpdia = new ProgressDialog(mContext);\n\t\t\tpdia.setMessage(\"Loading...\");\n\t\t\tpdia.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "void showProgressDialog();", "void showProgressDialog();", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t\t\n\t\t\tdialog = new ProgressDialog(AddFoodAdvActivity.this);\n\t\t\tdialog.setMessage(\"Loading...\");\n\t\t\tdialog.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n protected void onPreExecute() {\n pd = ProgressDialog.show(Events_and_Festivals.this, \"One Moment\", \"Loading Events and Festivals in the Toronto Area ...\", true, false);\n }", "public void showProgressDialog() {\n showProgressDialog(null);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n // Show the progress in load\n pDialog = new ProgressDialog(UpdateTimeTable.this);\n pDialog.setMessage(\"Please wait...\");\n pDialog.setCancelable(false);\n pDialog.show();\n \n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tshowLoadingProgressDialog();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\n\t\t\tsuper.onPreExecute();\n\t\t\td = new ProgressDialog(SensorActivity.this);\n\t\t\td.setTitle(\"Loading\");\n\t\t\td.show();\n\t\t}", "@Override\n public void showLoading() {\n setRefresh(true);\n }", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(MainActivity.this);\n\t\t\tpDialog.setMessage(\"Loading....\");\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\r\n\t\t\tsuper.onPreExecute();\r\n\t\t\tpDialog = new ProgressDialog(getActivity());\r\n\t\t\tpDialog.setMessage(\"Loading...\");\r\n\t\t\tpDialog.setIndeterminate(false);\r\n\t\t\tpDialog.setCancelable(false);\r\n\t\t\tpDialog.show();\r\n\t\t}", "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging In.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "private void showProgressDialog() {\n if (progressDialog == null) {\n progressDialog = new ProgressDialog(getContext());\n }\n\n progressDialog.setTitle(R.string.dialog_title);\n progressDialog.setMessage(getResources().getString(R.string.dialog_message));\n progressDialog.setCancelable(false);\n progressDialog.show();\n }", "public void showLoading() {\n }", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Retrieving workouts list...\");\n this.progressDialog.show();\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}", "private void showLoadingDialogue(final String loadingMessage) {\n progressDialog.setMessage(loadingMessage);\n progressDialog.setCancelable(false);\n progressDialog.setIndeterminate(false);\n progressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tmyDialog = ProgressDialog.show\n\t\t\t\t\t(\n\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\t\"Loading...\",\n\t\t\t\t\t\t\t\"Please Wait\",\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"\",\n\t\t\t\t\t\"Loading...\");\n\t\t}", "private void showSpinerProgress() {\n dialog.setMessage(\"Loading\");\n//\n// dialog.setButton(ProgressDialog.BUTTON_POSITIVE, \"YES\", new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n//\n// }\n// });\n\n //thiet lap k the huy - co the huy\n dialog.setCancelable(false);\n\n //show dialog\n dialog.show();\n Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n dialog.dismiss();\n }\n }, 20000000);\n }", "@Override\n protected void onPreExecute()\n {\n // Create a new progress dialog\n progressDialog = new ProgressDialog(MainActivity.this);\n // Set the progress dialog spinner progress bar\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n // Set the dialog title to 'Loading...'\n progressDialog.setTitle(\"Loading...\");\n // Set the dialog message to 'Loading application View, please wait...'\n progressDialog.setMessage(\"Loading application, please wait...\");\n // This dialog can't be canceled by pressing the back key\n progressDialog.setCancelable(false);\n // This dialog isn't indeterminate\n progressDialog.setIndeterminate(false);\n // The maximum number of items is 100\n progressDialog.setMax(100);\n // Set the current progress to zero\n progressDialog.setProgress(0);\n // Display the progress dialog\n progressDialog.show();\n }", "@Override\n\t\t \tprotected void onPreExecute() {\n\t\t try {\n\t\t\t \tpd=new ProgressDialog(Styles_Dialog.this);\n\t\t\t \tpd.setMessage(\"Loading\");\n\t\t\t \tpd.show();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \t\n\t\t \t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = new ProgressDialog(MyMap.this);\n\t\t\tprogressDialog.setMessage(\"Fetching route, Please wait...\");\n\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\tprogressDialog.setCancelable(true);\n\t\t\tprogressDialog.show();\n\t\t}", "@Override\n protected void onPreExecute() {\n pDialog = new ProgressDialog(homeActivity);\n pDialog.setMessage(\"Retrieving Details... \");\n // pDialog.setMax(16);\n pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\n pDialog.setCancelable(false);\n pDialog.show();\n\n\n }", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "private void showLoadingDialog() {\n mDefaultLoadingDialogFragment = new DefaultLoadingDialogFragment();\n mDefaultLoadingDialogFragment.show(getChildFragmentManager(), \"loadingDialog\");\n }", "@Override\n public void showloading(String message) {\n progressDialog = new ProgressDialog(getActivity());\n progressDialog.setMessage(message);\n progressDialog.setIndeterminate(true);\n progressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tdl = ProgressDialog.show(getActivity(), \"Thông báo\", \"Loading...\",\n\t\t\t\t\ttrue, false);\n\t\t\tdl.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progressDialog = ProgressDialog.show(ShowMap.this, \"Message\", \"Fetching Details...\");\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tsuper.onPreExecute();\n\t\t\tpd = ProgressDialogUtil.createDialogNoTitle(context, \"loading...\");\n\t\t\tpd.show();\n\t\t}", "@Override\r\n protected void onPreExecute() {\r\n super.onPreExecute();\r\n this.progressDialog = ProgressDialog.show(SelectFBForDGPSActivity.this, \"\", \"Please wait...Your CMV data is downloading\", false);\r\n this.progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\r\n this.progressDialog.setCancelable(false);\r\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pd = new ProgressDialog(activity);\n pd.setMessage(\"Loading, Please Wait.....\");\n pd.setCancelable(false);\n pd.show();\n }", "@Override\r\n\t\t protected void onPreExecute() {\n \t\tprogress= ProgressDialog.show(\r\n \t\t\t\tDetailProgramActivity.this, \r\n \t\t\t\t\"\", \r\n \t\t\t\tgetString(R.string.loading_data), \r\n \t\t\t\ttrue);\r\n \t}", "@Override\n protected void onPreExecute() {\n progressDialog= new ProgressDialog(getActivity());\n progressDialog.setMessage(\"loading..\");\n progressDialog.setIndeterminate(false);\n progressDialog.show();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(Integrationforkhalti.this);\n pDialog.setMessage(\"Loading Please wait...\");\n pDialog.setIndeterminate(true);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = new ProgressDialog(ListActivity.this);\n\t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\n\t\t\tprogressDialog.setMessage(\"Loading Topics. .\");\n\t\t\tprogressDialog.setCancelable(false);\n\n\t\t\tprogressDialog.show();\n\t\t}", "void showModalProgress();", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tpdia = new ProgressDialog(mContext);\n\t\t\tpdia.setMessage(\"Loading Circles...\");\n\t\t\tpdia.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "void showProgressLoading(Context context, boolean isCancelable) {\n\n progressDialog = new ProgressDialog(context);\n progressDialog.setIndeterminate(true);\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.setMessage(\"Loading...\");\n progressDialog.setCancelable(isCancelable);\n progressDialog.setCanceledOnTouchOutside(false);\n\n progressDialog.show();\n\n }", "private void showProgressDialog() {\n mProgressDialog = AppDialog.showProgressDialog(this);\n mProgressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.setMessage(\"Please wait. Loading...\");\n progressDialog.setCanceledOnTouchOutside(false);\n progressDialog.show();\n }", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tpDialog = new ProgressDialog(SingleRecord.this);\r\n\t\t\tpDialog.setMessage(\"downloading...\");\r\n\t\t\tpDialog.setIndeterminate(false);\r\n\t\t\tpDialog.setCancelable(true);\r\n\t\t\r\n\t\t\tpDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\r\n\t\t\tpDialog.show();\r\n\t\t\tpDialog.getWindow().setGravity(Gravity.BOTTOM);\r\n\t\t}", "void onShowProgress();", "public void showProgressDialog() {\n try {\n if (progressDialog == null) {\n try {\n progressDialog = new ProgressDialog(self);\n progressDialog.show();\n progressDialog.setCancelable(false);\n } catch (Exception e) {\n progressDialog = new ProgressDialog(self.getParent());\n progressDialog.show();\n progressDialog.setCancelable(false);\n e.printStackTrace();\n }\n } else {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }\n } catch (Exception e) {\n progressDialog = new ProgressDialog(self);\n progressDialog.show();\n progressDialog.setCancelable(false);\n e.printStackTrace();\n }\n }", "@Override\n protected void onPreExecute() {\n\n dialog.setCancelable(true);\n dialog.setMessage(\"Fetching...\");\n\n dialog.show();\n\n }", "@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }", "protected void onPreExecute() {\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "@Override\n public void showProgress() {\n\n }", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n pDialog = new ProgressDialog(Activity_List.this);\n pDialog.setMessage(\"Loading spots. Please wait...\");\n\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = new ProgressDialog(MapActivity.this);\n\t\t\tprogressDialog.setMessage(\"Fetching route, Please wait...\");\n\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\tprogressDialog.show();\n\t\t}", "@Override\n protected void onPreExecute() {\n asyncDialog.setMessage(\"Loading...\");\n //show dialog\n asyncDialog.show();\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(AddFoodAdvActivity.this);\n dialog.setMessage(\"Please Wait...!\");\n dialog.show();\n super.onPreExecute();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(Tracking.this);\n\t\t\tpDialog.setMessage(\"Mencari History Proses ... !\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t \n\t progressDialog= new Dialog(ListKotaActivity.this);\n\t progressDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n\t progressDialog.setContentView(R.layout.progress);\n\t progressDialog.setCancelable(false);\n\t progressDialog.show();\t \n\t }", "public void onPreExecute() {\n progressDialog.show();\n }", "@Override\n \t\tprotected void onPreExecute() \n \t\t{\n \t\t\t//Create a new progress dialog\n \t\t\tprogressDialog = new ProgressDialog(MainActivity.this);\n \t\t\t//Set the progress dialog to display a horizontal progress bar \n \t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n \t\t\t//Set the dialog title to 'Loading...'\n \t\t\tprogressDialog.setTitle(\"Loading Game...\");\n \t\t\t//Set the dialog message to 'Loading application View, please wait...'\n \t\t\tprogressDialog.setMessage(\"Please wait...\");\n \t\t\t//This dialog can't be canceled by pressing the back key\n \t\t\tprogressDialog.setCancelable(false);\n \t\t\t//This dialog isn't indeterminate\n \t\t\tprogressDialog.setIndeterminate(false);\n \t\t\t//The maximum number of items is 100\n \t\t\tprogressDialog.setMax(100);\n \t\t\t//Set the current progress to zero\n \t\t\tprogressDialog.setProgress(0);\n \t\t\t//Display the progress dialog\n \t\t\tprogressDialog.show();\n \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 initProgressLoader() {\n progressDialog = new ProgressDialog(this);\n progressDialog.setIndeterminate(true);\n progressDialog.setCancelable(false);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(SearchView.this, \"Espere...\", \"Recebendo dados\", true, true);\n\t\t\tprogressDialog.setOnCancelListener(new CancelTaskOnCancelListener(this));\n\t\t}", "public void showLoadingError() {\n showError(MESSAGE_LOADING_ERROR);\n }" ]
[ "0.78476673", "0.77792794", "0.7770803", "0.77284616", "0.77174586", "0.77064145", "0.75953937", "0.74246234", "0.7343368", "0.73152", "0.73025316", "0.7265254", "0.72640884", "0.72310704", "0.72310704", "0.7229667", "0.7212157", "0.7194204", "0.718282", "0.7150399", "0.7141893", "0.7131138", "0.7128261", "0.7125374", "0.7118423", "0.7106029", "0.7105282", "0.7097949", "0.70959836", "0.706637", "0.706637", "0.7050081", "0.70480907", "0.70422363", "0.7031511", "0.7028034", "0.7013095", "0.7012404", "0.7011308", "0.70028377", "0.69910264", "0.6989421", "0.6986957", "0.6984851", "0.69741434", "0.6972554", "0.69721603", "0.6971682", "0.6968395", "0.6966424", "0.6964545", "0.6954105", "0.6941344", "0.6924168", "0.692201", "0.6910368", "0.69025373", "0.69025373", "0.68757266", "0.68642247", "0.68623567", "0.6860433", "0.68551075", "0.68508583", "0.6835431", "0.68302137", "0.6828049", "0.6804803", "0.67841053", "0.67777526", "0.67737895", "0.67590785", "0.6756912", "0.6755108", "0.6755108", "0.674656", "0.67445636", "0.6742959", "0.6732224", "0.6731548", "0.67263746", "0.67263746", "0.6715588", "0.67028934", "0.67006755", "0.6694611", "0.6686698", "0.667892", "0.667892", "0.667892", "0.6674681", "0.6666226", "0.66612905", "0.66406536", "0.66369355", "0.66345674", "0.6624167", "0.6606935", "0.659387", "0.6593603", "0.6583338" ]
0.0
-1
Connects the Adapter with the available Times and setup for the ItemClickListener
@Override protected void onPostExecute(Void result) { mProgressDialogTeacher.dismiss(); listAdapter = new TimeListViewAdapter(getActivity(),timesList); listView.setAdapter(listAdapter); listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id){ ConfirmDialogFragment confirm = new ConfirmDialogFragment(); confirm.show(getFragmentManager(), "Dialog"); confirmedTime = timesList.get(position); } }); mProgressDialogTeacher.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initScheduleList(){\n final ListView schedView = (ListView) findViewById(R.id.schedule_list);\n schedView.setDivider(new ColorDrawable(getResources().getColor(R.color.DarkGray)));\n schedView.setDividerHeight(1);\n schedView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\n final ArrayAdapter<String> schedAdapter = new CustomAdapter(this,R.layout.schedule_list_slider,schedList);\n schedView.setAdapter(schedAdapter);\n schedView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> adapter, View v, int position,\n long id) {\n switch (position) {\n case 0:\n break;\n case 1:\n onDay = true;\n timeLayout.setVisibility(View.VISIBLE);\n timePicker.setCurrentHour(schedTime.get(Calendar.HOUR_OF_DAY));\n timePicker.setCurrentMinute(schedTime.get(Calendar.MINUTE));\n SimpleDateFormat formatter;\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"HH:mm\");\n }else{\n formatter = new SimpleDateFormat(\"HH:mm\");\n }\n serverStartDay = formatter.format(schedTime.getTime());\n break;\n case 2:\n onDay = false;\n timeLayout.setVisibility(View.VISIBLE);\n timePicker.setCurrentHour(schedTime2.get(Calendar.HOUR_OF_DAY));\n timePicker.setCurrentMinute(schedTime2.get(Calendar.MINUTE));\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"HH:mm\");\n }else{\n formatter = new SimpleDateFormat(\"HH:mm\");\n }\n serverStartNight = formatter.format(schedTime2.getTime());\n break;\n case 3:\n break;\n default:\n break;\n }\n }\n\n });\n\n TextView timeCancel = (TextView) findViewById(R.id.time_cancel);\n TextView timeDone = (TextView) findViewById(R.id.time_done);\n\n timeCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n timeLayout.setVisibility(View.INVISIBLE);\n }\n });\n\n timeDone.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //set the time to the values selected\n if (onDay){\n schedTime.set(Calendar.HOUR_OF_DAY,timePicker.getCurrentHour());\n schedTime.set(Calendar.MINUTE, timePicker.getCurrentMinute());\n }else{\n schedTime2.set(Calendar.HOUR_OF_DAY, timePicker.getCurrentHour());\n schedTime2.set(Calendar.MINUTE, timePicker.getCurrentMinute());\n }\n \n if (Math.abs(schedTime.get(Calendar.HOUR_OF_DAY) - schedTime2.get(Calendar.HOUR_OF_DAY)) >= 1){\n if (onDay){\n SimpleDateFormat formatter;\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"h:mm aa\");\n }else{\n formatter = new SimpleDateFormat(\"k:mm\");\n }\n String dayTime = formatter.format(schedTime.getTime());\n startDay.setText(dayTime);\n formatter = new SimpleDateFormat(\"KK:mm\");\n serverStartDay = formatter.format(schedTime.getTime());\n }else{\n SimpleDateFormat formatter;\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"h:mm aa\");\n }else{\n formatter = new SimpleDateFormat(\"k:mm\");\n }\n String nightTime = formatter.format(schedTime2.getTime());\n startNight.setText(nightTime);\n formatter = new SimpleDateFormat(\"KK:mm\");\n serverStartNight = formatter.format(schedTime2.getTime());\n }\n timeLayout.setVisibility(View.INVISIBLE);\n schedAdapter.notifyDataSetChanged();\n }else{\n AlertDialog.Builder myAlert = new AlertDialog.Builder(ScheduleParamsView.this)\n .setMessage(R.string.wrong_start_time_msg)\n .setTitle(R.string.wrong_start_time_title)\n .setNegativeButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n myAlert.show();\n //set the time back to the default on failure of following the rules!\n switch(schedIndex){\n case 0:\n schedTime.set(Calendar.HOUR_OF_DAY,9);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,21);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 1:\n schedTime.set(Calendar.HOUR_OF_DAY,9);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,21);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 2:\n schedTime.set(Calendar.HOUR_OF_DAY,9);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,21);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 3:\n schedTime.set(Calendar.HOUR_OF_DAY,7);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,18);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 4:\n schedTime.set(Calendar.HOUR_OF_DAY,6);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,19);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 5:\n schedTime.set(Calendar.HOUR_OF_DAY,6);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,19);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n }\n //set text of views back to default\n SimpleDateFormat formatter;\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"h:mm aa\");\n }else{\n formatter = new SimpleDateFormat(\"k:mm\");\n }\n String dayTime = formatter.format(schedTime.getTime());\n startDay.setText(dayTime);\n String nightTime = formatter.format(schedTime2.getTime());\n startNight.setText(nightTime);\n schedAdapter.notifyDataSetChanged();\n }\n }\n });\n }", "private void populateTimes() {\n\n int trackID = preferences.getInt(\"Track\", -1);\n int reverse = preferences.getInt(\"Reverse\", -1);\n Cursor topTimes = DBQueries.getTopTimes(trackID, reverse, \"liststring\", 3, database);\n Cursor latestTimes = DBQueries.getLatestTimes(trackID, reverse, \"liststring\", 3, database);\n\n ListView latestTimeList = (ListView) findViewById(R.id.latestTimes);\n ListView topTimesList = (ListView) findViewById(R.id.topTimes);\n\n ListAdapter topTimesAdapter = new SimpleCursorAdapter(\n this,\n R.layout.custom_listview_item,\n topTimes,\n new String[]{topTimes.getColumnName(topTimes.getColumnIndex(\"liststring\"))},\n new int[]{android.R.id.text1},\n 0);\n ListAdapter latestTimesAdapter = new SimpleCursorAdapter(\n this,\n R.layout.custom_listview_item,\n latestTimes,\n new String[]{latestTimes.getColumnName(latestTimes.getColumnIndex(\"liststring\"))},\n new int[]{android.R.id.text1},\n 0);\n\n topTimesList.setAdapter(topTimesAdapter);\n latestTimeList.setAdapter(latestTimesAdapter);\n\n Utilities.setListViewHeightFromContent(topTimesList);\n Utilities.setListViewHeightFromContent(latestTimeList);\n }", "@Override\n public void onClick(View v) {\n TimeList.add(timer.getText().toString());\n\n adapter.notifyDataSetChanged();\n }", "private void setupListView() {\n viewModel.getPeriodString().observe(this, (string) -> {\n if(string != null) {\n TextView periodTextView = findViewById(R.id.tvTimeFrame);\n periodTextView.setText(string);\n }\n });\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n int size = prefs.getInt(\"hourSize\", getResources().getInteger(R.integer.hourSizeDefault));\n viewModel.getAppointments().observe(this, (appointments) -> {\n if(appointments != null) {\n for(int day = 0; day < appointments.size(); day++) {\n AppointmentAdapter adapter = new AppointmentAdapter(this, size, popup, viewModel);\n adapter.setList(appointments.get(day));\n listViews.get(day).setAdapter(adapter);\n }\n }\n });\n HourAdapter adapter = new HourAdapter(this, this, size);\n viewModel.getTimeSlots().observe(this, adapter::setList);\n timeSlotView.setAdapter(adapter);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n adapter.notifyDataSetChanged();\n handler.postDelayed(this, 60*1000);\n }\n }, 60*1000);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n TransitDataModel model = mData[position];\n holder.binding.name.setText(model.name);\n holder.binding.stop.setText(model.stop);\n\n\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\n Date parse = null;\n try {\n parse = simpleDateFormat.parse(model.time);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n Date now = new Date();\n\n if (parse != null) {\n SimpleDateFormat timeformat = new SimpleDateFormat(\"hh:mm a\");\n holder.binding.timeClock.setText(timeformat.format(parse));\n }\n\n\n Boolean delayed = model.delayed;\n if (delayed) {\n holder.binding.timeUntil.setText(\"Delayed\");\n holder.binding.timeUntil.setTextColor(ContextCompat.getColor(context, R.color.red));\n } else if (model.minutesUntil != null) {\n holder.binding.timeUntil.setTextColor(ContextCompat.getColor(context, R.color.green));\n holder.binding.timeUntil.setText(model.minutesUntil + \"min\");\n } else {\n holder.binding.timeUntil.setTextColor(ContextCompat.getColor(context, R.color.green));\n if (parse != null) {\n long diff = parse.getTime() - now.getTime();\n long minutes = diff / 60000;\n holder.binding.timeUntil.setText(minutes + \"min\");\n }\n }\n\n holder.binding.getRoot().setOnClickListener(view -> {\n if (model.minutesUntil == null) {\n Toast.makeText(context, \"Cannot track light rail\", Toast.LENGTH_LONG).show();\n } else {\n ServiceSingleton.getInstance().start(model, endpoint, context);\n }\n\n });\n\n\n// holder.myTextView.setText(animal);\n }", "@Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n if (position == 0) {\n p1Time.setText(getResources().getString(R.string.p1Time));\n p2Time.setText(getResources().getString(R.string.p2Time));\n p3Time.setText(getResources().getString(R.string.p3Time));\n p4Time.setText(getResources().getString(R.string.p4Time));\n p5Time.setText(getResources().getString(R.string.p5Time));\n p6Time.setText(getResources().getString(R.string.p6Time));\n p7Time.setText(getResources().getString(R.string.p7Time));\n p8Time.setText(getResources().getString(R.string.p8Time));\n p9Time.setText(getResources().getString(R.string.p9Time));\n } else {\n p1Time.setText(getResources().getString(R.string.p1Time2));\n p2Time.setText(getResources().getString(R.string.p2Time2));\n p3Time.setText(getResources().getString(R.string.p3Time2));\n p4Time.setText(getResources().getString(R.string.p4Time2));\n p5Time.setText(getResources().getString(R.string.p5Time2));\n p6Time.setText(getResources().getString(R.string.p6Time2));\n p7Time.setText(getResources().getString(R.string.p7Time2));\n p8Time.setText(getResources().getString(R.string.p8Time2));\n p9Time.setText(getResources().getString(R.string.p9Time2));\n }\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n mPostion = i;\n Cursor cursor = mForecastAdapter.getCursor();\n if (cursor != null && cursor.moveToPosition(i)) {\n String dateString = cursor.getString(COL_WEATHER_DATE);\n ((Callback) getActivity()).onItemSelected(dateString);\n\n\n }\n }", "private static void setupTimePicker(LoopView timeHours, LoopView timeMins, LoopView timeTime) {\n timeHours.setItemsVisibleCount(5);\n timeHours.setNotLoop();\n //timeMins.setItems(timeMinsList);\n timeMins.setItemsVisibleCount(5);\n timeMins.setNotLoop();\n //timeTime.setItems(timeTimeList);\n timeTime.setItemsVisibleCount(5);\n timeTime.setNotLoop();\n }", "@Override\n public void onBindViewHolder(final RecyclerViewHolder holder, int position) {\n\n Reminder current = reminderList.get(holder.getAdapterPosition());\n holder.cardView.setTitle(current.getTitle());\n holder.cardView.setImageResource(R.drawable.reminder_default_icon);\n holder.cardView.setNormalButtonText(context.getString(R.string.card_view_btn_edit));\n\n if (current.isWithLocation()) { // has location\n holder.cardView.setDescription(context.getString(R.string.card_view_txt_location_name) + current.getRemindLocation().getName());\n holder.cardView.setHighlightButtonText(context.getString(R.string.card_view_btn_map));\n } else { // has a time\n if (current.isWithTime()) {\n// if (current.getEndTime() != null)\n// holder.cardView.setDescription(context.getString(R.string.card_view_txt_date) + \" \" + current.getEndDate());\n// else\n// holder.cardView.setDescription(context.getString(R.string.card_view_txt_date) + \" \" + current.getStartDate());\n Calendar startCalendar = Calendar.getInstance();\n startCalendar.setTimeInMillis(current.getStartTime());\n holder.cardView.setDescription(context.getString(R.string.card_view_txt_date) + \" \" + startCalendar.getTime());\n } else {\n// holder.cardView.setDescription(context.getString(R.string.card_view_txt_no_hurry));\n holder.cardView.setDescription(reminderList.get(position).getDescription());\n }\n\n holder.cardView.setHighlightButtonText(null);\n }\n\n holder.cardView.setRadius(8);\n\n// Log.d(\"CardView\", \"Height: \" + holder.itemView.getHeight() + \" Width: \" + holder.itemView.getWidth());\n\n if(itemClickListener != null){\n holder.cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n itemClickListener.onItemClick(holder.cardView, holder.getAdapterPosition());\n }\n });\n\n holder.cardView.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n itemClickListener.onItemLongClick(holder.cardView, holder.getAdapterPosition());\n return false;\n }\n });\n }\n }", "private void setupListeners(){\n stopBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n /*setContentView(R.layout.route_content);\n ListView mainListView = (ListView) findViewById( R.id.mainListView );\n String[] times = new String[]{};//from method\n ArrayList<String> busTimes = new ArrayList<String>();\n busTimes.addAll( Arrays.asList(times));\n ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_list_item_1, busTimes);\n mainListView.setAdapter( listAdapter );*/\n\n\t String stopId = stopInput.getText().toString();\n\n\t if(stopId.length() < 4){\n\t\t Toast.makeText(MainActivity.this, \"Invalid stop\", Toast.LENGTH_SHORT).show();\n\t\t return;\n\t }\n\n\t Intent i = new Intent(getApplicationContext(), StopTimesActivity.class);\n\t startActivity(i);\n }\n });\n\n //Button for when selecting route from drop down\n routeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n /*setContentView(R.layout.route_content);\n ListView mainListView = (ListView) findViewById( R.id.mainListView );\n String[] times = new String[]{};//from method\n ArrayList<String> busTimes = new ArrayList<String>();\n busTimes.addAll( Arrays.asList(times));\n ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_list_item_1, busTimes);\n mainListView.setAdapter( listAdapter );*/\n\n\t String route = routeSpinner.getSelectedItem().toString();\n\n\t if(route.equals(\"Jupiter\")){\n\t\t Toast.makeText(MainActivity.this, \"Invalid route\", Toast.LENGTH_SHORT).show();\n\t\t return;\n\t }\n\n\t Intent i = new Intent(getApplicationContext(), RoutesActivity.class);\n\t startActivity(i);\n }\n });\n\n // Spinner click listener\n routeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\n String items=routeSpinner.getSelectedItem().toString();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n\n }\n\n });\n\n // Spinner Drop down elements (Routes on start up)\n List<String> routes = getRoutes();\n\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, routes);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n routeSpinner.setAdapter(dataAdapter);\n\n //update database\n //DataController dataController = new DataController();\n //dataController.updateDatabase(getAssets());\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n selectPostion = position;\n dateAdapter.setSeclection(position);\n dateAdapter.notifyDataSetChanged();\n//\t\t\t\ttvDate.setText(dateAdapter.getCurrentYear(selectPostion) + \"年\"\n//\t\t\t\t\t\t+ dateAdapter.getCurrentMonth(selectPostion) + \"月\"\n//\t\t\t\t\t\t+ dayNumbers[position] + \"日\");\n }", "public void setTime() {\r\n\t\tArrayList<String> slots = new ArrayList<String>();\r\n\t\tString inSched = getWorkHours();\r\n\t\tswitch(inSched) {\r\n\t\tcase \"6AM-3PM\":\r\n\t\t\tArrayList<String> sched1 = new ArrayList<String>(Arrays.asList(\"06AM\",\"07AM\",\"08AM\",\"09AM\",\"10AM\",\"12PM\",\"1PM\",\"2PM\"));\r\n\t\t\tslots = sched1;\r\n\t\t\tbreak;\r\n\t\tcase \"7AM-4PM\":\r\n\t\t\tArrayList<String> sched2 = new ArrayList<String>(Arrays.asList(\"07AM\",\"08AM\",\"09AM\",\"10AM\",\"11AM\",\"1PM\",\"2PM\",\"3PM\"));\r\n\t\t\tslots = sched2;\r\n\t\t\tbreak;\r\n\t\tcase \"8AM-5PM\":\r\n\t\t\tArrayList<String> sched3 = new ArrayList<String>(Arrays.asList(\"08AM\",\"09AM\",\"10AM\",\"11AM\",\"12PM\",\"2PM\",\"3PM\",\"4PM\"));\r\n\t\t\tslots = sched3;\r\n\t\t\tbreak;\r\n\t\tcase \"9AM-6PM\":\r\n\t\t\tArrayList<String> sched4 = new ArrayList<String>(Arrays.asList(\"09AM\",\"10AM\",\"11AM\",\"12PM\",\"1PM\",\"3PM\",\"4PM\",\"5PM\"));\r\n\t\t\tslots = sched4;\r\n\t\t\tbreak;\r\n\t\tcase \"10AM-7PM\":\r\n\t\t\tArrayList<String> sched5 = new ArrayList<String>(Arrays.asList(\"10AM\",\"11AM\",\"12PM\",\"1PM\",\"2PM\",\"4PM\",\"5PM\",\"6PM\"));\r\n\t\t\tslots = sched5;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tslots.add(\"No appointments available for this date.\");\r\n\t\t}\r\n\t\tthis.timeAvailable = slots;\r\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif(doorType.trim().equals(\"2\")){\n\t\t\t\t\t\tif(addrAata==null||addrAata.size()==0){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tfor (int k = 0; k < addrAata.size(); k++) {\n\t\t\t\t\t\t\t\tif(l1ZoneId.equals(addrAata.get(k))){\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < isChekble.size(); i++) {\n\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j < isChekble.get(i).size(); j++) {\n\t\t\t\t\t\t\t\t\t\t\tisChekble.get(i).set(j, false);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tisChekble.get(groupPosition).set(childPosition, true);\n\t\t\t\t\t\t\t\t\tend_time.setText(\"无时间限制\");\n\t\t\t\t\t\t\t\t\tisCarDoor = true;\n\t\t\t\t\t\t\t\t\tnotifyDataSetChanged();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor (int i = 0; i < isChekble.size(); i++) {\n\t\t\t\t\t\t\tfor (int j = 0; j < isChekble.get(i).size(); j++) {\n\t\t\t\t\t\t\t\tisChekble.get(i).set(j, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisCarDoor = false;\n\t\t\t\t\t\tisChekble.get(groupPosition).set(childPosition, true);\n\t\t\t\t\t\tString startTime = start_time.getText().toString();\n\t\t\t\t\t\tString endTime = startTime.split(\" \")[0]+\" 23:59\";\n\t\t\t\t\t\tend_time.setText(endTime);\n\t\t\t\t\t\tnotifyDataSetChanged();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n d(TAG, \"getview called\" + position);\n View view = getLayoutInflater().inflate(R.layout.time_slot_layout, parent, false);\n TextView gendername = (TextView) view.findViewById(R.id.time_slot_range);\n gendername.setText(timeList.get(position).getTimeName());\n\n // ... Fill in other views ...\n return view;\n }", "@Override\n public void onItemClick(final View itemView, final ServResrouce info, int position)\n {\n TrafficToolsPickedDialog dialog =\n new TrafficToolsPickedDialog(ConfirmOrderActivity.this, info, new ChoseTimeListener()\n {\n @Override\n public void onResult(String startTime, String endTime)\n {\n // TODO Auto-generated method stub\n TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);\n useTime.setText(\"预订时间:\" + startTime + \"-\" + endTime);\n addResourceIdPrice(info.getServId());\n mHotelAdapter.notifyDataSetChanged();\n }\n });\n dialog.show();\n }", "public void setAdapter() {\n\t\tactivityAdapter = new ActivitiesAdapter(getActivity(), List,\n\t\t\t\ttotalmintxt);\n\t\tSystem.out.println(\"listsize=\" + List.size());\n\t\tif (List.size() > 0) {\n\t\t\tint totalmin = 0, totalcal = 0;\n\t\t\tfor (int i = 0; i < List.size(); i++) {\n\t\t\t\ttotalmin += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.total_time_minutes));\n\t\t\t\ttotalcal += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.calories_burned));\n\n\t\t\t}\n\t\t\ttotalmintxt.setText(\"\" + totalmin + \" min\");// calories_burned\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calories_burned\n\t\t\ttotalcaltxt.setText(\"\" + totalcal + \" cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\n\t\t\tcom.fitmi.utils.Constants.totalcal = totalcal;\n\n\t\t\tHomeFragment tosetCalory = new HomeFragment();\n\t\t\tNotificationCaloryBurn callBack = (NotificationCaloryBurn) tosetCalory;\n\n\t\t\tcallBack.setTotalCaloryBurn(com.fitmi.utils.Constants.totalcal);\n\t\t} else {\n\n\t\t\ttotalcaltxt.setText(\"0 cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\t\t}\n\n\t\tsetActivitySpinner();\n\t}", "@Override\n public void onItemClick(final View itemView, final ServResrouce info, int position)\n {\n TrafficToolsPickedDialog dialog =\n new TrafficToolsPickedDialog(ConfirmOrderActivity.this, info, new ChoseTimeListener()\n {\n @Override\n public void onResult(String startTime, String endTime)\n {\n // TODO Auto-generated method stub\n TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);\n useTime.setText(\"预订时间:\" + startTime + \"-\" + endTime);\n addResourceIdPrice(info.getServId());\n mNoAirAdapter.notifyDataSetChanged();\n }\n });\n dialog.show();\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView row = convertView;\n\n\t\tfinal ToDoItem currentItem = getItem(position);\n\n\t\tif (row == null) {\n\t\t\tLayoutInflater inflater = ((Activity) mContext).getLayoutInflater();\n\t\t\trow = inflater.inflate(mLayoutResourceId, parent, false);\n\t\t}\n\n\t\trow.setTag(currentItem);\n\t\tfinal CheckBox checkBox = (CheckBox) row.findViewById(R.id.checkToDoItem);\n\n final Button button= (Button)row.findViewById(R.id.btnwatch);\n button.setEnabled(true);\n button.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View arg0) {\n if (mContext instanceof MainActivity) {\n MainActivity activity = (MainActivity) mContext;\n activity.watch(currentItem);\n }\n }\n });\n\n DateFormat utcdf = new SimpleDateFormat(\"yy-MM-dd'T'HH:mm:ss.SSS\");\n DateFormat dallasdf=new SimpleDateFormat(\"yy-MM-dd HH:mm\");\n\n TimeZone utctz=TimeZone.getTimeZone(\"UTC\");\n TimeZone dallastz = TimeZone.getTimeZone(\"America/Chicago\");\n\n String dallasDate=\"\";\n\n utcdf.setTimeZone(utctz);\n dallasdf.setTimeZone(dallastz);\n\n try {\n Date myDate = utcdf.parse(currentItem.GetTs());\n dallasDate = dallasdf.format(myDate).toString();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n\n checkBox.setText(dallasDate);\n\t\tcheckBox.setChecked(false);\n\t\tcheckBox.setEnabled(true);\n\n\t\tcheckBox.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif (checkBox.isChecked()) {\n\t\t\t\t\tcheckBox.setEnabled(false);\n\t\t\t\t\tif (mContext instanceof MainActivity) {\n\t\t\t\t\t\tMainActivity activity = (MainActivity) mContext;\n\t\t\t\t\t\tactivity.checkItem(currentItem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn row;\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.petdateserviceseleter);\n\t\tinitView();\n\t\tgetIntentFrom();\n\t\tint defaultsize = (int) tvTitle.getTextSize();\n\t\twv_month.setDefTextSize(defaultsize);\n//\t\ttry {\n//\t\t\tfor (int i = 0; i < months.length; i++) {\n//\t\t\t\tcurrentDay = months[0];\n//\t\t\t\tmonths[0]=\"今天\";\n//\t\t\t\tif (i!=0) {\n//\t\t\t\t\tmonths[i] = months[i].substring(5, 10);\n//\t\t\t\t}\n//\t\t\t}\n//\t\t} catch (Exception e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t}\n\t\tmonthAdapter = new ArrayWheelAdapter<String>(months);\n\t\twv_month.setAdapter(monthAdapter);\n\t\twv_time.setDefTextSize(defaultsize);\n\t\ttimeAdapter = new ArrayWheelAdapter<String>(WeekShow);\n\t\twv_time.setAdapter(timeAdapter);\n\t\t\n\t\tGregorianCalendar ca = new GregorianCalendar(); \n\t\tkey = ca.get(GregorianCalendar.AM_PM);\n\t\tUtils.mLogError(\"==-->AM_PM \"+key);\n\t\twv_day_time.setDefTextSize(defaultsize);\n\t\tif (wv_month.getCurrentItem()==0) {\n\t\t\tif (key==1) {\n\t\t\t\tdayTimeAdapter = new ArrayWheelAdapter<String>(dayTodayTime);\n\t\t\t\twv_day_time.setAdapter(dayTimeAdapter);\n\t\t\t}else if (key==0) {\n\t\t\t\tdayTimeAdapter = new ArrayWheelAdapter<String>(dayTime);\n\t\t\t\twv_day_time.setAdapter(dayTimeAdapter);\n\t\t\t}\n\t\t}else {\n\t\t\tdayTimeAdapter = new ArrayWheelAdapter<String>(dayTime);\n\t\t\twv_day_time.setAdapter(dayTimeAdapter);\n\t\t}\n\t\twv_month.addChangingListener(new OnWheelChangedListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onChanged(WheelView wheel, int oldValue, int newValue) {\n\t\t\t\tcurrent = wv_month.getCurrentItem();\n\t\t\t\twv_time.setCurrentItem(current);\n\t\t\t\tif (wv_month.getCurrentItem()==0) {\n\t\t\t\t\tif (key==1) {\n\t\t\t\t\t\tdayTimeAdapter = new ArrayWheelAdapter<String>(dayTodayTime);\n\t\t\t\t\t\twv_day_time.setAdapter(dayTimeAdapter);\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tdayTimeAdapter = new ArrayWheelAdapter<String>(dayTime);\n\t\t\t\t\twv_day_time.setAdapter(dayTimeAdapter);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\twv_time.addChangingListener(new OnWheelChangedListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onChanged(WheelView wheel, int oldValue, int newValue) {\n\t\t\t\tcurrent = wv_time.getCurrentItem();\n\t\t\t\twv_month.setCurrentItem(current);\n\t\t\t}\n\t\t});\n//\t\twv_day_time.addChangingListener(new OnWheelChangedListener() {\n//\t\t\t\n//\t\t\t@Override\n//\t\t\tpublic void onChanged(WheelView wheel, int oldValue, int newValue) {\n//\t\t\t\t\n//\t\t\t}\n//\t\t});\n\t\tshow_top.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\tchoose_sure.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry {\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setAction(\"android.intent.action.SwimDetailActivity\");\n\t\t\t\t\tintent.putExtra(\"index\", 2);\n\t\t\t\t\tintent.putExtra(\"monthEvery\", monthAdapter.getItem(wv_month.getCurrentItem()));\n\t\t\t\t\tintent.putExtra(\"weekEveryShow\", timeAdapter.getItem(wv_time.getCurrentItem()));\n\t\t\t\t\tintent.putExtra(\"AMORPM\", dayTimeAdapter.getItem(wv_day_time.getCurrentItem()));\n\t\t\t\t\tintent.putExtra(\"current\", current);\n\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\tToastUtil.showToastShortCenter(mContext,getResources().getString(R.string.errornotice));\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onClick(View v) {\n mSec = 0;\n mins = 0;\n seconds = 0;\n updateTime = 0L;\n timeBuff = 0L;\n startTime = 0L;\n mSecTime = 0L;\n\n timer.setText(\"00:00:00\");\n\n //this clears the list view\n TimeList.clear();\n\n //notifyDataSetChanged method notifies the adapter that the data\n // has been changed and it needs to do a refresh\n adapter.notifyDataSetChanged();\n }", "@Override\n public void onListItemClick(ListView l, View v, int position, long id) {\n getListView().setSelection(position);\n ((AlarmsListActivity) getActivity()).showTimePicker(mAdapter.getItem(position));\n }", "private void setupOpenHoursListView() {\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n\n final ViewHolder holder;\n View itemView = convertView;\n if (itemView == null) {\n itemView = getActivity().getLayoutInflater().inflate(R.layout.item_views_list, parent, false);\n holder = new ViewHolder();\n\n holder.imageView = (ImageView) itemView.findViewById(R.id.imgview);\n holder.event_name_Text = (TextView) itemView.findViewById(R.id.evntname);\n holder.event_date = (TextView)itemView.findViewById(R.id.date);\n holder.event_category = (TextView)itemView.findViewById(R.id.category);\n holder.event_dedc_Text = (TextView) itemView.findViewById(R.id.evntdesc);\n itemView.setTag(holder);\n }else {\n\n holder = (ViewHolder)itemView.getTag();\n }\n //Find the car to work with.\n\n final Event currentevent = t_events.get(position);\n //Fill the View\n \n\n holder.imageView.setImageResource(currentevent.getImage_id());\n holder.event_date.setText(currentevent.getDate().toString());\n\n\n// holder.imageView.setImageResource(currentevent.getImage_id());\n holder.imageView.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View arg0) {\n Toast.makeText(getActivity(), \"Event of \" + currentevent.getEvent_name() + \" Clicked\", Toast.LENGTH_SHORT).show();\n\n }\n });\n //Make\n\n holder.event_name_Text.setText(currentevent.getEvent_name());\n\n\n holder.event_date.setText(currentevent.getDate());\n\n //TextView event_category = (TextView)itemView.findViewById(R.id.category);\n holder.event_category.setText(currentevent.getCategory());\n //Year\n //TextView event_dedc_Text = (TextView) itemView.findViewById(R.id.evntdesc);\n holder.event_dedc_Text.setText(currentevent.getEvent_desc());\n\n /*//Condition\n TextView conditionText = (TextView)itemView.findViewById(R.id.item_txtCondition);\n conditionText.setText(currentCar.getCondition());*/\n /*Animation animation = AnimationUtils.loadAnimation(getContext(), (position > lastPosition) ? R.anim.up_from_bottom : R.anim.down_from_top);\n itemView.startAnimation(animation);\n lastPosition = position;*/\n return itemView;\n\n //return super.getView(position, convertView, parent);\n }", "public void setMyPrayerList(double latitude, double longitude,String[] prayerNamez, String[] prayerTimez){\n\n double timezone = (Calendar.getInstance().getTimeZone()\n .getOffset(Calendar.getInstance().getTimeInMillis()))\n / (1000 * 60 * 60);\n PrayTime prayers = new PrayTime();\n\n\n\n prayers.setTimeFormat(appController.timeFormat);\n prayers.setCalcMethod(appController.calculationMethod);\n prayers.setAsrJuristic(appController.juristicMethod);\n prayers.setAdjustHighLats(appController.adjustMethodForHigherLat);\n\n\n\n int[] offsets = { 0, 0, 0, 0, 0, 0, 0 }; // {Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha}\n prayers.tune(offsets);\n\n Date now = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(now);\n\n ArrayList prayerTimes = prayers.getPrayerTimes(cal, latitude,\n longitude, timezone);\n ArrayList prayerNames = prayers.getTimeNames();\n\n /* **********ListView********** */\n// prayerNamez = new String[5];\n// prayerTimez = new String[5];\n\n for (int i = 0,j = 0;(i+j) < prayerNames.size();i++){\n if ((i + j) == 1 || (i + j) == 4)\n j++;\n prayerNamez[i] = (String) prayerNames.get(i+j);\n prayerTimez[i] = (String) prayerTimes.get(i+j);\n }\n ///ADAPTER\n ItemAdapter itemAdapter = new ItemAdapter(getActivity(),prayerNamez,prayerTimez);\n myPrayerList.setAdapter(itemAdapter);\n\n }", "@Override\n protected void populateViewHolder(DateViewHolder viewHolder, final Date model, int position) {\n\n viewHolder.setDate(model.getDate());\n\n viewHolder.mView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n Intent x = new Intent(ManageDate.this, ManageFlight2.class);\n x.putExtra(\"date\",model.getDate());\n x.putExtra(\"gateID\",model.getGateID());\n startActivity(x);\n\n }\n });\n\n }", "@Override\n public void onDayBarClick(DayBarItem choosedItem) {\n ModelTask.getInstance().setChoosedDate(choosedItem.getDayItem());\n setmViewPager();\n\n }", "public void ShowSchedule(ArrayList<TimeSlot> f_timeSlots)\n {\n this.timeSlots = f_timeSlots;\n\n LinearLayout scheduleLayout = (LinearLayout) findViewById(R.id.scheduleLayout);\n //Remove previous schedule, if any\n scheduleLayout.removeAllViews();\n\n for(int i = 0; i<48; i++)\n {\n final Button slot = new Button(this);\n\n slot.setTextAppearance(this, R.style.TimeTableStyle);\n slot.setText(((timeSlots.get(i).getStartsOn().split(\"T\"))[1]));\n\n if(timeSlots.get(i).isEmpty()) {\n slot.setBackgroundColor(getResources().getColor(R.color.mainGreenLight));\n }\n else\n {\n slot.setBackgroundColor(getResources().getColor(R.color.declinedColor));\n }\n\n final TimeSlot currentTimeSlot = timeSlots.get(i);\n final TimeSlot nextTimeSlot;\n\n if(i<47) { nextTimeSlot= timeSlots.get(i+1); }\n else {\n nextTimeSlot=null;\n }\n\n final TimeSlot prevTimeSlot;\n if(i>0){ prevTimeSlot= timeSlots.get(i-1);}\n else { prevTimeSlot = null;}\n slot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(!currentTimeSlot.isEmpty())\n {\n if(!getSharedPreferences(\"venAdminPrefs\",MODE_PRIVATE).getString(\"token\",\"\").equals(\"\")) {\n showTimeSlotDetails(currentTimeSlot.getUsername(), currentTimeSlot.getPhoneNumber());\n }\n return;\n }\n\n //Check if there are no selected slots, then initialize the reservations start and end\n if(reservationStartsOn==null)\n {\n reservationStartsOn=currentTimeSlot.getStartsOn();\n reservationEndsOn = currentTimeSlot.getEndsOn();\n slot.setBackgroundColor(getResources().getColor(R.color.selectedcolor));\n currentTimeSlot.setSelected(true);\n return;\n }\n\n //Here means the user has selected a time slot on this session\n\n //Check if select or deselect\n if(!currentTimeSlot.isSelected()) {\n\n if (reservationStartsOn.equals(currentTimeSlot.getEndsOn())) {\n reservationStartsOn = currentTimeSlot.getStartsOn();\n slot.setBackgroundColor(getResources().getColor(R.color.selectedcolor));\n currentTimeSlot.setSelected(true);\n\n } else if (reservationEndsOn.equals(currentTimeSlot.getStartsOn())) {\n reservationEndsOn = currentTimeSlot.getEndsOn();\n slot.setBackgroundColor(getResources().getColor(R.color.selectedcolor));\n currentTimeSlot.setSelected(true);\n\n } else {\n //This slot is not valid to choose\n showToastMessage(getResources().getString(R.string.invalidSlotSTring));\n\n }\n }\n else\n {\n //Deselect logic\n if (reservationEndsOn.equals(currentTimeSlot.getEndsOn()) )\n {\n currentTimeSlot.setSelected(false);\n slot.setBackgroundColor(getResources().getColor(R.color.mainGreenLight));\n if(reservationStartsOn.equals(currentTimeSlot.getStartsOn()))\n {\n reservationStartsOn = null;\n reservationEndsOn = null;\n }\n else {\n reservationEndsOn = currentTimeSlot.getStartsOn();\n }\n }\n else if (reservationStartsOn.equals(currentTimeSlot.getStartsOn()))\n {\n currentTimeSlot.setSelected(false);\n slot.setBackgroundColor(getResources().getColor(R.color.mainGreenLight));\n if(reservationEndsOn.equals(currentTimeSlot.getEndsOn()))\n {\n reservationStartsOn = null;\n reservationEndsOn = null;\n }\n else {\n reservationStartsOn = currentTimeSlot.getEndsOn();\n }\n\n }\n else\n {\n showToastMessage(getResources().getString(R.string.invalidSlotSTring));\n }\n\n }\n return;\n\n\n }\n });\n\n\n // LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\n scheduleLayout.addView(slot);\n\n\n }\n dismissLoading();\n\n\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\tCursor cursor = adapter.getCursor();\n\t\t\t\tcursor.moveToPosition(position);\n\t\t\t\t/*Intent i = new Intent(SessionListActivity.this,\tCheckinHistory.class);\n\t\t\t\ti.putExtra(Util.TICKET_ID, c1\n\t\t\t\t\t\t.getString(c1\n\t\t\t\t\t\t\t\t.getColumnIndex(DBFeilds.SESSION_ATTENDEE_TICKET_ID)));\n\t\t\t\ti.putExtra(\n\t\t\t\t\t\tUtil.ATTENDEE_NAME,\n\t\t\t\t\t\tc1.getString(c1\n\t\t\t\t\t\t\t\t.getColumnIndex(DBFeilds.SESSION_ATTENDEE_FIRST_NAME))\n\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t+ c1.getString(c1\n\t\t\t\t\t\t\t\t\t\t.getColumnIndex(DBFeilds.SESSION_ATTENDEE_LAST_NAME)));\n\t\t\t\ti.putExtra(Util.INTENT_KEY_1, c1.getString(c1.getColumnIndex(DBFeilds.SESSION_ITEM_POOL_ID)));\n\t\t\t\tstartActivity(i);*/\n\t\t\t\tif(!NullChecker(cursor.getString(cursor.getColumnIndex(DBFeilds.SESSION_ATTENDEE_COMPANY))).equalsIgnoreCase(DBFeilds.STATUS_OFFLINE)\n\t\t\t\t\t\t&& !NullChecker(cursor.getString(cursor.getColumnIndex(DBFeilds.SESSION_ATTENDEE_COMPANY))).equalsIgnoreCase(DBFeilds.STATUS_INVALID)){\n\t\t\t\t\tIntent i = new Intent(SessionListActivity.this, SessionAttendeeDetailActivity.class);\n\t\t\t\t\ti.putExtra(DBFeilds.SESSION_ATTENDEE_TICKET_ID, cursor.getString(cursor.getColumnIndex(DBFeilds.SESSION_ATTENDEE_TICKET_ID)));\n\t\t\t\t\ti.putExtra(DBFeilds.SESSION_GROUP_ID, cursor.getString(cursor.getColumnIndex(DBFeilds.SESSION_GROUP_ID)));\n\t\t\t\t\tstartActivityForResult(i,2018);\n\t\t\t\t}\n\n\n\t\t\t}", "private void initDate() {\n\t\t\n mlistview.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tChemicals chemicals=mDatas.get(arg2);\n\t\t\t\t\tif(chemicals!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tBundle bundle = new Bundle(); \n\t\t\t\t\t\tbundle.putSerializable(\"Chemicals\", chemicals); \n\t\t\t\t\t\tIntent intent=new Intent(ChemicalsDirectoryActivity.this, ChemicalsDatilShowActivity.class);\n\t\t\t \t\tintent.putExtras(bundle);\n\t\t\t \t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n \n mlistview.setIClickLoadListListener(new IClickLoadListListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onLoad(Handler handler) {\n\t\t\t\tSqlOperate<Chemicals> opetaterChemicals=new SqlOperate<Chemicals>(ChemicalsDirectoryActivity.this, Chemicals.class);\n\t\t\t\tfinal List<Chemicals> data=opetaterChemicals.SelectOffsetEntitysBySqlCondition(mSqlStr, pangSize, pageCount);\n\t\t\t\tpageCount++;\n\t\t opetaterChemicals.close();\n\t\t\t\t\n\t\t\t\tif(data!=null&&data.size()>0)\n\t\t {\n\t\t\t\t\thandler.post(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tmDatas.addAll(data);\n\t\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\tif(data.size()<pangSize)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmlistview.hindLoadView(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t }\n\t\t else\n\t\t {\n\t\t \tmlistview.hindLoadView(true);\n\t\t }\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onClick(View adapterView) {\n calendar = Calendar.getInstance(Locale.ENGLISH); // mandatory\n SetUpCalendar();\n //\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setCancelable(true);\n final View addView = LayoutInflater.from(adapterView.getContext())\n .inflate(R.layout.add_newevent_layout,null);\n final EditText eventName = addView.findViewById(R.id.eventname);\n final TextView EventTime = addView.findViewById(R.id.eventtime);\n final MaskEditText duration = addView.findViewById(R.id.edittime);\n final EditText eventdistance = addView.findViewById(R.id.eventdistance);\n final Spinner spinnerType = addView.findViewById(R.id.eventtype);\n final SeekBar seekBarFeel = addView.findViewById(R.id.SeekbarFeel);\n Calendar calendar = Calendar.getInstance();\n final SimpleDateFormat hformat = new SimpleDateFormat(timePartern);\n String event_Time = hformat.format(calendar.getTime());\n EventTime.setText(event_Time);\n final String[] eventFeel = new String[1];\n eventFeel[0] = FEEL_EXCELLENT;\n final String[] eventType = new String[1];\n seekBarFeel.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int i, boolean b) {\n setFeel(i,eventFeel,seekBar);\n }\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n }\n });\n\n spinnerType.setAdapter(arrayAdapter1);\n spinnerType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n eventType[0] = type.get(i);\n }\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }\n });\n ImageButton setTime = addView.findViewById(R.id.seteventtime);\n //Alarm button\n final CheckBox alarmMe = addView.findViewById(R.id.alarmMe);\n calendar.setTime(calendar.getTime());\n alarmYear = calendar.get(Calendar.YEAR);\n alarmMonth = calendar.get(Calendar.MONTH);\n alarmDay = calendar.get(Calendar.DAY_OF_MONTH);\n alarmHour = calendar.get(Calendar.HOUR_OF_DAY);\n alarmMinute = calendar.get(Calendar.MINUTE);\n Button AddEvent = addView.findViewById(R.id.addevent);\n setTime.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n Calendar calendar1 = Calendar.getInstance();\n int hours = calendar1.get(Calendar.HOUR_OF_DAY);\n int minutes = calendar1.get(Calendar.MINUTE);\n TimePickerDialog timePickerDialog = new TimePickerDialog(addView.getContext(), R.style.Theme_AppCompat_Dialog,\n new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n Calendar c = Calendar.getInstance();\n c.set(Calendar.HOUR_OF_DAY,i);\n c.set(Calendar.MINUTE,i1);\n c.setTimeZone(TimeZone.getDefault());\n String event_Time = hformat.format(c.getTime());\n EventTime.setText(event_Time);\n alarmHour = c.get(Calendar.HOUR_OF_DAY);\n alarmMinute = c.get(Calendar.MINUTE);\n }\n },hours,minutes,false);\n timePickerDialog.show();\n }\n });\n final String date = eventDateFormat.format(calendar.getTime());\n final String month = monthFormat.format(calendar.getTime());\n final String year = yearFormat.format(calendar.getTime());\n AddEvent.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n if (alarmMe.isChecked()){\n if (eventdistance.getText().toString().equals(\"\")) {\n Toast.makeText(context, R.string.alert1, Toast.LENGTH_SHORT).show();\n } else if (duration.getRawText().equals(\"\")) {\n Toast.makeText(context, R.string.alert2, Toast.LENGTH_SHORT).show();\n } else {\n Calendar calendar1 = Calendar.getInstance();\n// calendar1.setTime(calendar.getTime());\n String week = calendar1.get(Calendar.WEEK_OF_YEAR) + \"\";\n SaveEvent(eventName.getText().toString(), EventTime.getText().toString(), date, month, year,\n eventdistance.getText().toString(), duration.getRawText(), eventType[0],\n eventFeel[0], week, NOTI_ON);\n SetUpCalendar();\n //set alarm\n Calendar _calendar = Calendar.getInstance();\n _calendar.set(alarmYear, alarmMonth, alarmDay, alarmHour, alarmMinute);\n setAlarm(_calendar, eventName.getText().toString(),EventTime.getText().toString(),\n getRequestCode(date, eventName.getText().toString(),EventTime.getText().toString()));\n //\n Toast.makeText(context, R.string.confirm_alarm, Toast.LENGTH_SHORT).show();\n alertDialog.dismiss();\n }\n } else {\n if (eventdistance.getText().toString().equals(\"\")) {\n Toast.makeText(context, R.string.alert1, Toast.LENGTH_SHORT).show();\n } else if (duration.getRawText().equals(\"\")) {\n Toast.makeText(context, R.string.alert2, Toast.LENGTH_SHORT).show();\n } else {\n Calendar calendar1 = Calendar.getInstance();\n// calendar1.setTime(calendar.getTime());\n String week = calendar1.get(Calendar.WEEK_OF_YEAR) + \"\";\n SaveEvent(eventName.getText().toString(), EventTime.getText().toString(), date, month, year,\n eventdistance.getText().toString(), duration.getRawText(), eventType[0],\n eventFeel[0], week, NOTI_OFF);\n SetUpCalendar();\n alertDialog.dismiss();\n }\n }\n }\n });\n builder.setView(addView);\n alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tposition--;\n\t\t\t\tIntent intent = new Intent(T4_cwActivity.this, T4_cwxqActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"gold\", T4_cw_netitems.get(position).getGold());\n\t\t\t\tbundle.putString(\"time\", T4_cw_netitems.get(position).getCreate_time());\n\t\t\t\tbundle.putString(\"desc\", T4_cw_netitems.get(position).getDesc());\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onItemClick(View view, int position) {\n if (((TextView) view.findViewById(R.id.txto)).getVisibility() == View.VISIBLE) {\n xs = ((TextView) view.findViewById(R.id.txto)).getText().toString();\n\n int mnxd = 0;\n new Thread(new Runnable() {\n public void run() {\n mListView.post(new Runnable() {\n public void run() {\n Log.d(\"xd\", xs);\n int uiX = 0;\n\n for (int u = 0; u < al.size(); u++) {\n Log.d(\"al\", al.get(u).toString());\n if (xs.equalsIgnoreCase(al.get(u).toString())) {\n\n\n mListAdapter = new ListmenuAdapter(HomeScreen.this, al, u);\n mListView.setAdapter(mListAdapter);\n // layoutManager.scrollToPosition(u);\n if (Utils.TtlItem.get(al.get(u)) != null)\n mAdapter = new GridAdapter(HomeScreen.this, Utils.TtlItem.get(al.get(u)), xMain);\n\n txMng(xs);\n\n mRecyclerView.setAdapter(mAdapter);\n Utils.txt(HomeScreen.this, mRecyclerView);\n\n break;\n }\n\n }\n\n }\n });\n }\n }).start();\n }\n xx = ((EditText) view.findViewById(R.id.qty));\n subPo = position;\n\n\n final Button xyBtn = ((Button) view.findViewById(R.id.addiy));\n xyBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Log.i(\"getcount\", xx);\n xyBtn.setBackground(getResources().getDrawable(R.drawable.r_corner_red));\n xyBtn.setTextColor(getResources().getColor(R.color.white));\n xyBtn.setText(\"Added!\");\n new CountDownTimer(1300, 1300) {\n public void onTick(long ms) {\n }\n\n public void onFinish() {\n ScaleAnimation scale = new ScaleAnimation(0, 1, 0, 1, ScaleAnimation.RELATIVE_TO_SELF, .5f, ScaleAnimation.RELATIVE_TO_SELF, .5f);\n scale.setDuration(500);\n scale.setInterpolator(new OvershootInterpolator());\n xyBtn.setTextColor(getResources().getColor(R.color.primary));\n// xyBtn.setTextColor(getResources().getColor(R.color.white));\n xyBtn.setBackground(getResources().getDrawable(R.drawable.rounded_corner));\n xyBtn.setText(\"ADD\");\n }\n }.start();\n\n try {\n JSONObject js = new JSONObject();\n js.put(Utils.mPar, \"\" + xMain);\n js.put(Utils.subPar, \"\" + subPo);\n js.put(Utils.qtyPar, \"\" + xx.getText().toString());\n js.put(Utils.remPar, \"\");\n addJsn(js);\n xx.setText(\"\" + Utils.cusOn);\n } catch (Exception e) {\n\n }\n\n\n\n }\n });\n\n\n }", "@Override\n public void onResult(String startTime, String endTime)\n {\n TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);\n useTime.setText(\"预订时间:\" + startTime + \"-\" + endTime);\n addResourceIdPrice(info.getServId());\n mHotelAdapter.notifyDataSetChanged();\n }", "@Override\n\t\t\tpublic boolean onItemLongClick(AdapterView<?> parent, View v,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tTextView date = (TextView) v.findViewById(R.id.date);\n\n\t\t\t\tday = date.getText().toString();\n\t\t\t\tif (day.length() == 1) {\n\t\t\t\t\tday = \"0\" + day;\n\t\t\t\t}\n\n\t\t\t\tweek_position = position;\n\n\t\t\t\treturn false;\n\t\t\t}", "public void setupArrivals() {\n \t\tmRdsArray = Data.getAllRdsWithStopTitle(mStopTitle, mRouteTag,\n \t\t\t\tmDirectionTag);\n \n \t\tarrivalList.setAdapter(new ArrivalAdapter(getApplicationContext(),\n \t\t\t\tmRdsArray));\n \n \t\tarrivalList.setOnItemClickListener(null);\n \t\t/*\n \t\t * Listener for arrival drawer thing. If a cell is clicked, open the\n \t\t * stop for that route\n \t\t */\n \t\tarrivalList.setOnItemClickListener(new OnItemClickListener() {\n \t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n \t\t\t\t\tint position, long id) {\n \t\t\t\tif (!mArrivalsArray[0].equals(\"No other arrivals\")) {\n \t\t\t\t\tRouteDirectionStop rds = mRdsArray[position];\n \t\t\t\t\tIntent intent = StopViewActivity.createIntent(\n \t\t\t\t\t\t\tgetApplicationContext(), rds.route.tag,\n \t\t\t\t\t\t\trds.direction, rds.stop);\n \t\t\t\t\tstartActivity(intent);\n \t\t\t\t}\n \t\t\t}\n \t\t});\n \n \t}", "@Override\n public void onResult(String startTime, String endTime)\n {\n TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);\n useTime.setText(\"预订时间:\" + startTime + \"-\" + endTime);\n addResourceIdPrice(info.getServId());\n mNoAirAdapter.notifyDataSetChanged();\n }", "private void getSchedual() {\n final Thread thread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n try {\n //Your code goes here\n String userid = UserID;\n JSONArray ja = API.API(userid, \"\", \"\", \"\", Constants.testSchedual_URL);\n Log.e(\"ngocle\", ja.toString());\n\n for (int i=0; i < ja.length(); i++) {\n item_testSchedual item1 = new item_testSchedual();\n JSONObject jo = ja.getJSONObject(i);\n int Ca = Integer.parseInt(jo.getString(\"Ca\"));\n\n item1.setID(jo.getString(\"MaLH\"));\n item1.setName(jo.getString(\"TenLop\"));\n String time = jo.getString(\"Ngay\")+\"/\"+jo.getString(\"Thang\")+\"/\"+jo.getString(\"Nam\");\n item1.setDay(time);\n String Phong = \"P.\" + jo.getString(\"Phong\");\n item1.setRoom(Phong);\n String Gio = null;\n switch (Ca){\n case 1: Gio = \" 7h30\";\n break;\n case 2: Gio = \" 9h30\";\n break;\n case 3: Gio = \" 13h30\";\n break;\n case 4: Gio = \" 15h30\";\n break;\n }\n String ca = \"Ca: \" + jo.getString(\"Ca\") + Gio;\n item1.setTime(ca);\n item.add(item1);\n\n }\n adapter.notifyDataSetChanged();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n }", "private void setOnClickListeners(){\n mDueDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pickDate(mDueDateCalendar);\n }\n });\n mDueTime.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pickTime(mDueDateCalendar);\n }\n });\n }", "@Override\n public void onClick(View v) {\n Calendar calendar = Calendar.getInstance();\n Date now = calendar.getTime();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n Alarm alarm = new Alarm();\n alarm.setHour(hour);\n alarm.setMinute(minute);\n\n mAlarmClockViewModel.insertNewAlarmClock(alarm);\n AlarmClock currentClock = (AlarmClock) mRecyclerView.findViewById(R.id.alarm_clock_item);\n currentClock.setDate(now);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tgetTimeView();\n\t\t\t\t}", "@Override\n\tprotected void setListener() {\n\t\tsw_lv_searchschedule.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t\tif (BIntentObj.isGetClass == 1) {// 不能查看项目课表查询的数据\n\n\t\t\t\t} else {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif (list.get(arg2 - 1).get(\"TYPE\").equals(\"2\")) {//\n\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\tintent.putExtra(\"projectid\",\n\t\t\t\t\t\t\t\tlist.get(arg2 - 1).get(\"Id\"));\n\t\t\t\t\t\tintent.setClass(SearchScheduleActivity.this,\n\t\t\t\t\t\t\t\tSearchScheduleDetailActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}", "public Adapter() {\n super();\n this.listItemsBT = new ArrayList<>();\n /*Random random = new Random();\n for(int i = 0; i<50;i++){\n listItemsBT.add(new ItemBT(\"El vic xd\" + i, \"10:12:... NUMBER: \"+i, random.nextBoolean()));\n }*/\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n SubsequentVisitBean bean = mDatas.get(position);\n ViewHolder viewHolder = ViewHolder.getViewHolder(mContext, convertView, parent,\n R.layout.item_subsequent_visit, position);\n ((TextView) viewHolder.getView(R.id.item_sus_serial_number)).setText(position + 1 + \"\");\n ((TextView) viewHolder.getView(R.id.item_sus_reserve_time)).setText(bean.getSetting_date());\n\n /* if ((TimeUtils.getDateLong(bean.getSetting_date()) - TimeUtils.getCurTime()) < (time * 2.5)) {\n if ((TimeUtils.getDateLong(bean.getActually_time()) - TimeUtils.getCurTime()) < time)\n }*/\n ((TextView) viewHolder.getView(R.id.item_sus_realty_time)).setText(TimeUtils.getDate(bean.getSetting_date()));\n\n return viewHolder.getConvertView();\n }", "@OnClick(R.id.calendar_icon)\n public void onClickDateRange() {\n if (getAdapterPosition() >= 0)\n listener.onClickDateRange();\n }", "private void showView() {\n SQLiteDatabase sqLiteDatabase = openOrCreateDatabase(MyOpenHelper.database_name,\n MODE_PRIVATE, null);\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM mytourTABLE\", null);\n cursor.moveToFirst();\n\n final int intCount = cursor.getCount();\n final String[] MyTourNameStrings = new String[intCount];\n final String[] MyTimeUseStrings = new String[intCount];\n final String[] DateStartStrings = new String[intCount];\n final String[] HrStartStrings = new String[intCount];\n final String[] HrEndStrings = new String[intCount];\n\n for (int i = 0; i < intCount; i++) {\n\n MyTourNameStrings[i] = cursor.getString(cursor.getColumnIndex(MyManageTable.column_name));\n MyTimeUseStrings[i] = cursor.getString(cursor.getColumnIndex(MyManageTable.column_TimeUse));\n DateStartStrings[i] = cursor.getString(cursor.getColumnIndex(MyManageTable.column_DateStart));\n HrStartStrings[i] = cursor.getString(cursor.getColumnIndex(MyManageTable.column_HrStart));\n HrEndStrings[i] = cursor.getString(cursor.getColumnIndex(MyManageTable.column_HrEnd));\n\n cursor.moveToNext(); // ขยับ cursor เป็นค่าถัดไป\n }\n cursor.close();\n\n MytourAdaptor mytourAdapter = new MytourAdaptor(ShowMyTourActivity.this,\n DateStartStrings, HrStartStrings, MyTourNameStrings);\n myourListViewListView.setAdapter(mytourAdapter);\n\n // tourListViewListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n// @Override\n// public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n//\n// Intent intent = new Intent(ShowMyTourActivity.this, showDetailTourActivity.class );//โยนค่าไปหน้าใหม่\n// intent.putExtra(\"Name\", nameStrings[i]);\n// intent.putExtra(\"Province\", provinceStrings[i]);\n// intent.putExtra(\"Type\", typeStrings[i]);\n// intent.putExtra(\"TimeUse\", timeUseStrings[i]);\n// intent.putExtra(\"Descrip\", descripStrings[i]);\n// startActivity(intent);\n//\n// }//on item\n// });\n\n }", "private void setEventTypeList() {\n EventTypeAdapter listAdapter = new EventTypeAdapter(this, R.layout.spinner_item, getResources().getStringArray(R.array.event_type_list));\n listAdapter.setDropDownViewResource(R.layout.spinner_list_item);\n listEventType.setAdapter(listAdapter);\n listEventType.setSelection(listAdapter.getCount());\n listEventType.setOnItemSelectedListener(this);\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n\n //get the property we are displaying\n Alarm alarm = alarmProperties.get(position);\n\n //get the inflater and inflate the XML layout for each item\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);\n View view = inflater.inflate(R.layout.layout_alarms, null);\n\n TextView name = (TextView) view.findViewById(R.id.name);\n TextView time = (TextView) view.findViewById(R.id.time);\n ImageView image = (ImageView) view.findViewById(R.id.image);\n\n name.setText(String.valueOf(alarm.getName()));\n //name.\n //time.setText(String.valueOf(alarm.getTime()));\n if(alarm.getActive()==1){\n String timeStr=String.valueOf(alarm.getTime());\n System.out.println(timeStr);\n if(timeStr.equals(\"NA\")){\n time.setText(\"Alarm Not Set\");\n }else{\n time.setText(\"Alarm Time: \"+timeStr);\n }\n }else{\n time.setText(\"Alarm Not Active\");\n }\n\n /* TextView bedroom = (TextView) view.findViewById(R.id.bedroom);\n TextView bathroom = (TextView) view.findViewById(R.id.bathroom);\n TextView carspot = (TextView) view.findViewById(R.id.carspot);\n TextView price = (TextView) view.findViewById(R.id.price);*/\n\n\n/* //set address and description\n String completeAddress = property.getStreetNumber() + \" \" + property.getStreetName() + \", \" + property.getSuburb() + \", \" + property.getState();\n address.setText(completeAddress);\n\n //display trimmed excerpt for description\n int descriptionLength = property.getDescription().length();\n if(descriptionLength >= 100){\n String descriptionTrim = property.getDescription().substring(0, 100) + \"...\";\n description.setText(descriptionTrim);\n }else{\n description.setText(property.getDescription());\n }\n\n //set price and rental attributes\n price.setText(\"$\" + String.valueOf(property.getPrice()));\n bedroom.setText(\"Bed: \" + String.valueOf(property.getBedrooms()));\n bathroom.setText(\"Bath: \" + String.valueOf(property.getBathrooms()));\n carspot.setText(\"Car: \" + String.valueOf(property.getCarspots()));*/\n\n //get the image associated with this property\n int imageID = context.getResources().getIdentifier(alarm.getImage(), \"drawable\", context.getPackageName());\n image.setImageResource(imageID);\n\n return view;\n }", "private void initAdapter() {\n GridLayoutManager layoutManager = new GridLayoutManager(this, 3);\n //设置布局管理器\n rv.setLayoutManager(layoutManager);\n //设置为垂直布局,这也是默认的\n layoutManager.setOrientation(OrientationHelper.VERTICAL);\n\n adapter1 = new CommomRecyclerAdapter(ChoiceCityActivity.this, stringList, R.layout.recy_country, new CommomRecyclerAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(CommonRecyclerViewHolder holder, int postion) {\n //热门城市点击\n Map map = new HashMap();\n map.put(\"p1\",stringList.get(postion).getHotCity() );\n StatisticsManager.getInstance(mContext).addEventAidl(1812,map);\n\n Intent intent = new Intent(ChoiceCityActivity.this, MainActivity.class);\n intent.putExtra(\"country\", stringList.get(postion).getHotCountry());\n intent.putExtra(\"city\", stringList.get(postion).getHotCity());\n Constans.CITY = stringList.get(postion).getHotCity();\n Constans.COUNTRY = stringList.get(postion).getHotCountry();\n if (isFirst == 1) {\n isFirst=0;\n startActivity(intent);\n } else {\n setResult(RESULT_OK, intent);\n }\n finish();\n }\n }, null) {\n @Override\n public void convert(CommonRecyclerViewHolder holder, Object o, int position) {\n TextView tv_country_name = holder.getView(R.id.tv);\n tv_country_name.setText(stringList.get(position).getHotCity());\n }\n };\n rv.setAdapter(adapter1);\n\n\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tListView detaillv=(ListView)findViewById(R.id.ListView01);\r\n\t\t\t\tswitch(arg2){\r\n\t\t \tcase 0:\r\n\t\t \tbl=DBUtil.getTodayDetails(tableName,dateStr);\r\n\t\t \tsetListAdapter(detaillv,bl);\r\n\t\t \tbreak;\r\n\t\t \tcase 1:\r\n\t\t \tbl=DBUtil.getMonthYearDetails(tableName, monthStr);\r\n\t\t \tsetListAdapter(detaillv,bl);\r\n\t\t \tbreak;\r\n\t\t \tcase 2:\r\n\t\t \tbl=DBUtil.getMonthYearDetails(tableName, lastmonthStr);\r\n\t\t\t setListAdapter(detaillv,bl);\r\n\t\t\t break;\r\n\t\t \tcase 3:\r\n\t\t bl=DBUtil.getLastThreeMonthDetails(tableName, lastthreemonthStr,lastmonthdayStr);\r\n\t\t\t\tsetListAdapter(detaillv,bl);\r\n\t\t\t\tbreak;\r\n\t\t \tcase 4:\r\n\t\t \tbl=DBUtil.getMonthYearDetails(tableName, yearStr);\r\n\t\t\t setListAdapter(detaillv,bl);\r\n\t\t\t break;\r\n\t\t \tcase 5:\r\n\t\t\t bl=DBUtil.getMonthYearDetails(tableName, lastyearStr);\r\n\t\t\t\tsetListAdapter(detaillv,bl);\r\n\t\t\t\tbreak;\r\n\t\t \tcase 6:\r\n\t\t \tbl=DBUtil.getAllDetails(tableName);\r\n\t\t \tsetListAdapter(detaillv,bl);\r\n\t\t \tbreak;\r\n\t\t\t}\r\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n }", "public void makeFrequencyLists() {\n\n //times spinner\n Spinner spinner_times = (Spinner) findViewById(R.id.times_id);\n// Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<CharSequence> adapter_times = ArrayAdapter.createFromResource(this,\n R.array.times_array, android.R.layout.simple_spinner_item);\n// Specify the layout to use when the list of choices appears\n adapter_times.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n spinner_times.setAdapter(adapter_times);\n\n //over time spinner\n Spinner spinner_over_time = (Spinner) findViewById(R.id.over_time_id);\n// Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<CharSequence> adapter_over_time = ArrayAdapter.createFromResource(this,\n R.array.over_time_array, android.R.layout.simple_spinner_item);\n// Specify the layout to use when the list of choices appears\n adapter_over_time.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n spinner_over_time.setAdapter(adapter_over_time);\n }", "@NonNull\n @Override\n //called when adapter created, initialises the viewholder\n public HourlyAddapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n binding = DataBindingUtil.\n inflate(LayoutInflater.from(parent.getContext()), R.layout.hourly_list_item, parent, false);\n\n return new ViewHolder(binding);\n }", "@Override\n\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\t\tString item = parent.getItemAtPosition(position).toString();\n\t\tString set_day=\"\";\n\n\t\tSimpleDateFormat dateTimeFormat = new SimpleDateFormat(DATE_TIME_FORMAT);\n\t\tString reminderDateTime = dateTimeFormat.format(mCalendar.getTime());\n\t\t//mCalendar.set(Calendar.DAY_OF_WEEK_IN_MONTH, 1);\n\t\tmCalendar.setTimeInMillis(System.currentTimeMillis());\n\t\tLog.e(\"test\",\"inti ==========>>>\"+reminderDateTime);\n\t\tswitch (position){\n\t\t\tcase 0:\n\t\t\t\tmCalendar.set(Calendar.DAY_OF_WEEK,Calendar.MONDAY);\n\t\t\t\tmCalendar.set(Calendar.HOUR_OF_DAY,0);\n\t\t\t\tset_day=\"MONDAY\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tmCalendar.set(Calendar.DAY_OF_WEEK,Calendar.TUESDAY);\n\t\t\t\tmCalendar.set(Calendar.HOUR_OF_DAY,0);\n\t\t\t\tset_day=\"TUESDAY\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tmCalendar.set(Calendar.DAY_OF_WEEK,Calendar.WEDNESDAY);\n\t\t\t\tmCalendar.set(Calendar.HOUR_OF_DAY,0);\n\t\t\t\tset_day=\"WEDNESDAY\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tmCalendar.set(Calendar.DAY_OF_WEEK,Calendar.THURSDAY);\n\t\t\t\tmCalendar.set(Calendar.HOUR_OF_DAY,0);\n\t\t\t\tset_day=\"THURSDAY\";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tmCalendar.set(Calendar.DAY_OF_WEEK,Calendar.FRIDAY);\n\t\t\t\tmCalendar.set(Calendar.HOUR_OF_DAY,0);\n\t\t\t\tset_day=\"FRIDAY\";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tmCalendar.set(Calendar.DAY_OF_WEEK,Calendar.SATURDAY);\n\t\t\t\tmCalendar.set(Calendar.HOUR_OF_DAY,0);\n\t\t\t\tset_day=\"SATURDAY\";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tmCalendar.set(Calendar.DAY_OF_WEEK,Calendar.SUNDAY);\n\t\t\t\tmCalendar.set(Calendar.HOUR_OF_DAY,0);\n\t\t\t\tset_day=\"SUNDAY\";\n\t\t\t\tbreak;\n\t\t}\n\t\tString current_Time = dateTimeFormat.format(Calendar.getInstance().getTime());\n\n\t\t//Log.e(\"test\",\" current_Time ==========>>>\"+current_Time);\n\n\t\tmCalendar.set(Calendar.HOUR_OF_DAY,HOUR);\n\t\tmCalendar.set(Calendar.MINUTE,MIN);\n\t\tmCalendar.set(Calendar.SECOND, 0);\n\n\t\tString calnder = dateTimeFormat.format(mCalendar.getTime());\n\t\t//Log.e(\"test\",\" calnder ==========>>>\"+calnder);\n\t\tif (mCalendar.before(Calendar.getInstance())) {\n\t\t\tmCalendar.add(Calendar.DATE,7);\n\t\t}else {\n\n\t\t}\n\t\treminderDateTime = dateTimeFormat.format(mCalendar.getTime());\n\t\tmTitleText.setText(\"Every \"+set_day+\" \"+reminderDateTime);\n\n\t\tLog.e(\"test\",\" set alarm time ==========>>>\"+reminderDateTime);\n\t\t// Showing selected spinner item\n\t\tToast.makeText(parent.getContext(), \"Selected: \" + set_day, Toast.LENGTH_LONG).show();\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tCursor cursor = (Cursor) parent.getItemAtPosition(position);\n\n\t\t\t\tif (cursor != null) {\n\n\t\t\t\t\tString locationSetting = Utility.getPreferredLocation(getActivity());\n\t\t\t\t\tlong theDate = cursor.getLong(COL_WEATHER_DATE);\n\t\t\t\t\t\n\t\t\t\t\t// Prepare URI to send to Activity or ultimately send to DetailFragment\n\t\t\t\t\tUri toSendUri = WeatherContract.WeatherEntry\n\t\t\t\t\t\t\t.buildWeatherLocationWithDate(locationSetting\n\t\t\t\t\t\t\t\t\t, theDate);\n\t\t\t\t\t\n\t\t\t\t\t((Callback) getActivity()).onItemSelected(toSendUri);\n\n\t\t\t\t}\n\t\t\t\tmPosition = position;\n\t\t\t}", "@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n Log.e(\"Error \", \"This is the number \"+position);\n Hour hour = hours.get(position);\n if(holder == null){\n Log.e(\"HOLDER IS NULL\", \"HOLDER IS NULL\");\n }\n if(hour==null){\n Log.e(\"HOUR IS NULL\", \"HOUR IS NULL\");\n }\n if(holder.hourlyListItemBinding == null){\n Log.e(\"ITEM BINDING IS EMPTY\", \"ITEM BINDING EMPTY\");\n\n }\n\n holder.hourlyListItemBinding.setHour(hour);\n }", "@Override\n public void onClick(View v) {\n int adapterPosition = getAdapterPosition();\n // String weatherForDay = dir.getTitle();\n mClickHandler.onClick(dirItems.get(adapterPosition));\n }", "@NonNull\n @Override\n public View getView(int position, View convertView, @NonNull ViewGroup parent) {\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_item_alarm, parent, false);\n }\n\n final RepeatingAlarm alarm = getItem(position);\n\n TextView alarmTitleTV = convertView.findViewById(R.id.alarm_title);\n TextView alarmDescriptionTV = convertView.findViewById(R.id.alarm_description);\n TextView startTimeTV = convertView.findViewById(R.id.start_time);\n TextView intervalTV = convertView.findViewById(R.id.interval);\n CheckBox enableDisableCB = convertView.findViewById(R.id.enable_disable);\n View removeBTN = convertView.findViewById(R.id.alarm_remove);\n\n alarmTitleTV.setText(alarm.getTitle());\n alarmDescriptionTV.setText(alarm.getDescription());\n startTimeTV.setText(alarm.getHumanReadableTime());\n if (TimeUnit.MILLISECONDS.toMinutes(alarm.getInterval()) < 60) {\n intervalTV.setText(TimeUnit.MILLISECONDS.toMinutes(alarm.getInterval()) + \"m\");\n } else if (TimeUnit.MILLISECONDS.toHours(alarm.getInterval()) <= 24) {\n intervalTV.setText(TimeUnit.MILLISECONDS.toHours(alarm.getInterval()) + \"h\");\n } else {\n intervalTV.setText(TimeUnit.MILLISECONDS.toDays(alarm.getInterval()) + \"d\");\n }\n\n enableDisableCB.setChecked(alarm.isActive());\n enableDisableCB.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n if (b) {\n RepeatingAlarmManager.getInstance().activateAlarm(MainActivity.this, alarm.getId());\n } else {\n RepeatingAlarmManager.getInstance().deactivateAlarm(MainActivity.this, alarm.getId());\n }\n refreshData();\n }\n });\n\n removeBTN.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n RepeatingAlarmManager.getInstance().removeAlarm(MainActivity.this, alarm.getId());\n refreshData();\n }\n });\n\n convertView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(MainActivity.this, \"alarm id:\" + alarm.getId(), Toast.LENGTH_SHORT).show();\n }\n });\n\n return convertView;\n }", "@Override\n public void onClick(View v) {\n if (onDay){\n schedTime.set(Calendar.HOUR_OF_DAY,timePicker.getCurrentHour());\n schedTime.set(Calendar.MINUTE, timePicker.getCurrentMinute());\n }else{\n schedTime2.set(Calendar.HOUR_OF_DAY, timePicker.getCurrentHour());\n schedTime2.set(Calendar.MINUTE, timePicker.getCurrentMinute());\n }\n \n if (Math.abs(schedTime.get(Calendar.HOUR_OF_DAY) - schedTime2.get(Calendar.HOUR_OF_DAY)) >= 1){\n if (onDay){\n SimpleDateFormat formatter;\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"h:mm aa\");\n }else{\n formatter = new SimpleDateFormat(\"k:mm\");\n }\n String dayTime = formatter.format(schedTime.getTime());\n startDay.setText(dayTime);\n formatter = new SimpleDateFormat(\"KK:mm\");\n serverStartDay = formatter.format(schedTime.getTime());\n }else{\n SimpleDateFormat formatter;\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"h:mm aa\");\n }else{\n formatter = new SimpleDateFormat(\"k:mm\");\n }\n String nightTime = formatter.format(schedTime2.getTime());\n startNight.setText(nightTime);\n formatter = new SimpleDateFormat(\"KK:mm\");\n serverStartNight = formatter.format(schedTime2.getTime());\n }\n timeLayout.setVisibility(View.INVISIBLE);\n schedAdapter.notifyDataSetChanged();\n }else{\n AlertDialog.Builder myAlert = new AlertDialog.Builder(ScheduleParamsView.this)\n .setMessage(R.string.wrong_start_time_msg)\n .setTitle(R.string.wrong_start_time_title)\n .setNegativeButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n myAlert.show();\n //set the time back to the default on failure of following the rules!\n switch(schedIndex){\n case 0:\n schedTime.set(Calendar.HOUR_OF_DAY,9);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,21);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 1:\n schedTime.set(Calendar.HOUR_OF_DAY,9);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,21);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 2:\n schedTime.set(Calendar.HOUR_OF_DAY,9);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,21);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 3:\n schedTime.set(Calendar.HOUR_OF_DAY,7);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,18);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 4:\n schedTime.set(Calendar.HOUR_OF_DAY,6);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,19);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n case 5:\n schedTime.set(Calendar.HOUR_OF_DAY,6);\n schedTime.set(Calendar.MINUTE,0);\n schedTime2.set(Calendar.HOUR_OF_DAY,19);\n schedTime2.set(Calendar.MINUTE,0);\n break;\n }\n //set text of views back to default\n SimpleDateFormat formatter;\n if (Locale.getDefault().toString().equalsIgnoreCase(\"en_US\")){\n formatter = new SimpleDateFormat(\"h:mm aa\");\n }else{\n formatter = new SimpleDateFormat(\"k:mm\");\n }\n String dayTime = formatter.format(schedTime.getTime());\n startDay.setText(dayTime);\n String nightTime = formatter.format(schedTime2.getTime());\n startNight.setText(nightTime);\n schedAdapter.notifyDataSetChanged();\n }\n }", "@Override\n public void whenCinemaSuccess(CinemawhentimeBean cinemawhentimeBean) {\n recyclerWhenplay.setLayoutManager(new LinearLayoutManager(CinemaDetailActivity.this,LinearLayoutManager.VERTICAL,false));\n WhenTimeAdapter whenTimeAdapter = new WhenTimeAdapter(CinemaDetailActivity.this,cinemawhentimeBean.getResult());\n recyclerWhenplay.setAdapter(whenTimeAdapter);\n whenTimeAdapter.setOnItemClickListener(new WhenTimeAdapter.OnItemClickListener() {\n @Override\n public void OnItemClick(int position) {\n Intent intent=new Intent(CinemaDetailActivity.this,BuyTicketActivity.class);\n startActivity(intent);\n }\n });\n }", "@Override\n public void onClick(View view) {\n String weekd = dateFormat3.format(calendar.getTime());\n\n String day = intentDate.substring(6, 8);\n datetext.setText(day+\"일 \"+weekd+\"요일\");\n Log.d(\"VIVIEIW\", view.toString());\n if(intentDate.equals(colorList.get(0).get(0))){\n Log.d(\"date\", intentDate);\n }else{\n Log.d(\"trnas\", colorList.get(0).get(0)+\" \"+intentDate);\n }\n// isRecyclerViewVisible = !isRecyclerViewVisible;\n// if(isRecyclerViewVisible) {\n// recyclerView2.setVisibility(View.VISIBLE);\n// } else {\n// recyclerView2.setVisibility(View.INVISIBLE);\n// }\n\n\n\n ArrayList<ArrayList<String>> lists = new ArrayList<>();\n int temp = 0;\n for (ArrayList<String> list : colorList) {\n ArrayList<String> tdata = new ArrayList<>();\n if (intentDate.equals(list.get(0))) {\n tdata.add(list.get(0));\n String time = list.get(1);\n String timef = time.substring(0, 2) + \":\" + time.substring(2, 4);\n tdata.add(timef);\n tdata.add(list.get(2));\n tdata.add(list.get(3));\n tdata.add(list.get(4));\n tdata.add(list.get(5));\n tdata.add(list.get(6));\n tdata.add(list.get(7));\n lists.add(tdata);\n\n int rcvmoney = Integer.parseInt(list.get(2));\n int paymoney = Integer.parseInt(list.get(3));\n if(rcvmoney > paymoney){\n temp += rcvmoney;\n } else {\n temp -=paymoney;\n }\n\n }\n }\n//\n\n\n CalendarRecylerAdapter adapter = new CalendarRecylerAdapter(lists, popupAsk) ;\n recyclerView2.setAdapter(adapter);\n\n\n datecount.setText(\"총 \"+toString().valueOf(lists.size())+\"건\");\n DecimalFormat myFormatter = new DecimalFormat(\"###,###\");\n String formattedStringPrice = myFormatter.format(temp) + \"원\";\n datesum.setText(formattedStringPrice);\n\n CalendarAdapter.setRecyler(recyclerView2);\n\n\n if (imgColor.getColorFilter() == null) {\n// Intent intent = new Intent(parent.getContext(), addDiary.class);\n// intent.putExtra(\"datekey\", intentDate);\n// parent.getContext().startActivity(intent);\n } else {\n// Intent intent = new Intent(parent.getContext(), ActivityD.class);\n// intent.putExtra(\"sendDate\", intentDate);\n// parent.getContext().startActivity(intent);\n }\n }", "private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}", "@Override\n public void onBindViewHolder(OpenNotifyDataViewHolder holder, int position) {\n\n if(position==0){\n\n // Giving tiles for the Open Notify API Network Response\n holder.time.setText(\"Time and Date\");\n\n holder.duration.setText(\"Duration\");\n\n }else {\n position-=1;\n Log.e(\"###\", \"size \" + responseList.get(position).getDuration() + \"/n\" + responseList.get(position).getRisetime() +\n new Date(responseList.get(position).getRisetime()));\n\n\n\n\n holder.time.setText(getFormattedDate(responseList.get(position).getRisetime()));\n\n holder.duration.setText(responseList.get(position).getDuration().toString());\n\n\n }\n\n }", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\n\t\t\t\tIntent i = new Intent(getActivity(), TzIn.class);\r\n\t\t\t\tSystem.out.println(position);\r\n\t\t\t\tif (position != 0 && position != tz.size() + 1) {\r\n\t\t\t\t\ti.putExtra(\"tzid\", tz.get(position - 1).getId());\r\n\t\t\t\t\ti.putExtra(\"bkid\", tz.get(position - 1).getBkid());\r\n\t\t\t\t\tstartActivityForResult(i, 0);\r\n\t\t\t\t\tgetActivity().overridePendingTransition(R.anim.push_left_in,\r\n\t\t\t\t\t\t\tR.anim.push_left_out);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onChanged(@Nullable final List<Task> words) {\n adapter.setTasks(words);\n\n int startTime = 0;\n int endTime = 24;\n if (betweenTwoTimes(startTime, endTime) && adapter.getItemCount() != 0)\n {\n Intent intent_service = new Intent(getApplicationContext(), TimerService.class);\n intent_service.setFlags(FLAG_ACTIVITY_NEW_TASK);\n startService(intent_service);\n }\n else\n {\n Intent intent_service = new Intent(getApplicationContext(), TimerService.class);\n intent_service.setFlags(FLAG_ACTIVITY_NEW_TASK);\n stopService(intent_service);\n }\n\n }", "@Override\n public void onClick(String date, String time) {\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n _too = String.valueOf(too.getSelectedItemId());\n Log.d(\"From City:%n %s\", _from);\n\n app.set_Twoway_Travel_too(_too);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n Task task = tasks.get(position);\n holder.tvTaskName.setText(task.getName());\n holder.tvTaskDescription.setText(task.getDescription());\n switch (position){\n case 0:\n holder.tvDistance.setText(\"0.4 mi\");\n break;\n case 1:\n holder.tvDistance.setText(\"3.7 mi\");\n break;\n case 2:\n holder.tvDistance.setText(\"8.2 mi\");\n }\n\n\n holder.tvDateTime.setText(simpleDateFormat.format(task.getPostedTime()));\n\n\n }", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\n\t\t\t\tString itemid = data.get(position).getItemid();\r\n\t\t\t\tString itemname = data.get(position).getItemname();\r\n\t\t\t\tIntent intent = new Intent(MRPingguActivity.this,\r\n\t\t\t\t\t\tPinguUPActivity.class);\r\n\t\t\t\tintent.putExtra(\"itemid\", itemid);\r\n\t\t\t\tintent.putExtra(\"itemname\", itemname);\r\n\t\t\t\tintent.putExtra(\"date\", date);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "private void setUpList() {\n\t\tRoomItemAdapter adapter = new RoomItemAdapter(getApplicationContext(),\n\t\t\t\trName, rRate);\n\t\tlistView.setAdapter(adapter);\n\n\t\tlistView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\thandleClick(position);\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void onBindViewHolder(ViewHolder holder, int position) {\n\t\t// - get element from your dataset at this position\n\t\t// - replace the contents of the view with that element\n\t\tfinal Event name = mDataset.get(position);\n\t\tholder.txtEvent.setText(name.getEvent());\n holder.txtDate.setText(\"Dates: \" + name.getStartdate() + \" - \" + name.getEnddate());\n holder.txtDescr.setText(\"Description: \" + name.getDescription());\n// holder.buttonOne.setOnClickListener(new Button.OnClickListener() {\n// public void onClick(View v){Calendar beginTime = Calendar.getInstance();\n// beginTime.set(2015, 12, 12);\n// Calendar endTime = Calendar.getInstance();\n// endTime.set(2015, 12, 12);\n// Intent intent = new Intent(Intent.ACTION_INSERT)\n// .setData(CalendarContract.Events.CONTENT_URI)\n// .putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, name.getStartTime())\n// .putExtra(CalendarContract.EXTRA_EVENT_END_TIME, name.getEndTime())\n// .putExtra(CalendarContract.Events.TITLE, name.getEventName())\n// .putExtra(CalendarContract.Events.DESCRIPTION, name.getDescription())\n// .putExtra(CalendarContract.Events.EVENT_LOCATION, name.getEventLocation())\n// .putExtra(CalendarContract.Events.AVAILABILITY, name.getAvailability());\n// ;}\n// });\n\n\t}", "@Override\n public void onBindViewHolder(ElementsViewHolder holder, final int position) {\n elements dayIngr =eleList.get(position);\n\n //binding the data with the viewholder views\n // Log.d(\"test\",\"this is ingrType\"+dayIngr.getType());\n\n holder.textViewTitle.setText(dayIngr.getAmount());\n holder.textViewShortDesc.setText(dayIngr.getName());\n\n// holder.itemView.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// Intent intent= new Intent(mContext, MealIngrActivity.class);\n// intent.putExtra(\"DayMeals\",ingrList.get(position).getQuantity());\n// v.getContext().startActivity(intent);\n// }\n// });\n\n// holder.imageView.setImageDrawable(mContext.getResources().getDrawable(dayMeals.getImg()));\n\n\n\n }", "public void bind(Expense expense) {\n tvItemLocation.setText(expense.getLocation());\n tvItemType.setText(expense.getItemType());\n tvItemAmount.setText(expense.getAmount());\n\n\n\n tvDatePlaced.setText(expense.getDate());\n // tvUsername.setText(expense.getUser().getUsername());\n\n //event listeners\n itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (mListener != null) {\n int position = getAdapterPosition();\n if (position != RecyclerView.NO_POSITION) {\n mListener.onItemClick(position);\n }\n }\n }\n });\n itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (mListener != null) {\n int position = getAdapterPosition();\n if (position != RecyclerView.NO_POSITION) {\n mListener.onItemLongClicked(position);\n }\n }\n\n }\n });\n\n\n\n }", "private void populate() {\n\n adapter = new DashboardRecyclerAdapter(getActivity(), getData());\n dashboardRecyclerView.setAdapter(adapter);\n dashboardRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n\n /*GridAdapter adapter = new GridAdapter(getActivity(), options);\n gridView.setAdapter(adapter);*/\n\n //setting up on click listener in gridview\n /*gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n switch (options[position]) {\n case \"Appliances\":\n startActivity(new Intent(getActivity(), AppliancesActivity.class));\n break;\n *//*case \"Electrical\":\n startActivity(new Intent(getActivity(), ElectricalActivity.class));\n break;*//*\n case \"Wiring\":\n startActivity(new Intent(getActivity(), WiringActivity.class));\n break;\n case \"Plumbing\":\n startActivity(new Intent(getActivity(), PlumbingActivity.class));\n break;\n }\n }\n\n });*/\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_second);\n\n setTitle(getTitle().toString() + \"~\" + getResources().getText(R.string.title_activity_second));\n\n lv = (ListView) this.findViewById(R.id.lv);\n btn5Stars = (Button) this.findViewById(R.id.btnShow5Stars);\n btnShowAll = (Button) this.findViewById(R.id.btnShowAll);\n btnInsert = (Button) this.findViewById(R.id.btnInsert);\n //spnStars = findViewById(R.id.spnStars);\n\n DBHelper dbh = new DBHelper(this);\n animeList = dbh.getAllAnimes();\n //alStars = dbh.getStars();\n dbh.close();\n\n /*aaSpn = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, alStars);\n spnStars.setAdapter(aaSpn);\n\n spnStars.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n DBHelper dbh = new DBHelper(SecondActivity.this);\n animeList.clear();\n animeList.addAll(dbh.getAllanimesByStars(Integer.valueOf(alStars.get(position))));\n aaSpn.notifyDataSetChanged();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });*/\n\n caAnime = new CustomAdapter(this, R.layout.row, animeList);\n lv.setAdapter(caAnime);\n\n btn5Stars.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n DBHelper dbh = new DBHelper(SecondActivity.this);\n animeList.clear();\n animeList.addAll(dbh.getAllanimesByStars(5));\n caAnime.notifyDataSetChanged();\n }\n });\n\n btnShowAll.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n DBHelper dbh = new DBHelper(SecondActivity.this);\n animeList.clear();\n animeList.addAll(dbh.getAllAnimes());\n caAnime.notifyDataSetChanged();\n }\n });\n\n btnInsert.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View viewDialog = inflater.inflate(R.layout.insert_anime,null);\n\n final EditText etTitle = viewDialog.findViewById(R.id.etTitle);\n final EditText etDesc = viewDialog.findViewById(R.id.etDesc);\n final EditText etSeason = viewDialog.findViewById(R.id.etSeason);\n final RatingBar rbStar = viewDialog.findViewById(R.id.rbStars);\n\n AlertDialog.Builder myBuilder = new AlertDialog.Builder(SecondActivity.this);\n myBuilder.setView(viewDialog);\n myBuilder.setTitle(\"Insert New Anime\");\n myBuilder.setPositiveButton(\"Insert\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n String title = etTitle.getText().toString().trim();\n String desc = etDesc.getText().toString().trim();\n String season = etSeason.getText().toString().trim();\n int seasons = Integer.valueOf(season);\n int rating = (int) rbStar.getRating();\n\n DBHelper dbh = new DBHelper(SecondActivity.this);\n dbh.insertAnime(title, desc, seasons, rating);\n caAnime.notifyDataSetChanged();\n animeList = dbh.getAllAnimes();\n dbh.close();\n\n caAnime=new CustomAdapter(SecondActivity.this, R.layout.row, animeList);\n lv.setAdapter(caAnime);\n }\n });\n\n myBuilder.setNegativeButton(\"CANCEL\", null);\n AlertDialog myDialog = myBuilder.create();\n myDialog.show();\n }\n });\n\n lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent i = new Intent(SecondActivity.this, ThirdActivity.class);\n i.putExtra(\"anime\", animeList.get(position));\n startActivity(i);\n }\n });\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n if (!((MainActivity) getActivity()).loadInterstitial()) {\n if (!AskRate()) {\n System.out.println(\"click: \" + places.get(i).id + \" \" + places.get(i).name);\n Intent intent = new Intent(context, SinglePlaceActivity.class);\n intent.putExtra(ITEM_KEY, places.get(i).id);\n startActivity(intent);\n }\n }\n }", "private void getTravelItems() {\n String[] columns = Columns.getTravelColumnNames();\n Cursor travelCursor = database.query(TABLE_NAME, columns, null, null, null, null, Columns.KEY_TRAVEL_ID.getColumnName());\n travelCursor.moveToFirst();\n while (!travelCursor.isAfterLast()) {\n cursorToTravel(travelCursor);\n travelCursor.moveToNext();\n }\n travelCursor.close();\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> adapterView, View view, int position,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tIntent intent = new Intent(DeliveryNoteQueryActivity.this, DeliveryNoteDetailActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDeliveryNote deliveryNote = (DeliveryNote) adapterView.getItemAtPosition(position);\n\t\t\t\tbundle.putString(\"currenttime\",currenttime);\n\t\t\t\tbundle.putSerializable(\"deliveryNote\", deliveryNote);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(String date, String time) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n _from = String.valueOf(from.getSelectedItemId());\n Log.d(\"From City:%n %s\", _from);\n\n app.set_Twoway_Travel_from(_from);\n }", "@Override\n public void onClick(View v) {\n\n title = mTitle.getText().toString();\n details = mDetails.getText().toString();\n repeats = 0;\n date.setHours(hour);\n date.setMinutes(minute);\n try {\n repeats = Integer.parseInt(mRepeats.getText().toString());\n } catch (NumberFormatException io){\n\n }\n if (mSpinner.getSelectedItem().toString().equals(\"Days\")) {\n repeats = repeats*24*60;\n }\n else if (mSpinner.getSelectedItem().toString().equals(\"Hours\")) {\n repeats = repeats*60;\n }\n Assignment newAssignment = new Assignment(title, details, repeats, date);\n AssignmentList.get(getActivity()).addAssignment(newAssignment);\n //Calendar c = Calendar.getInstance();\n //c.setTime(date);\n mScheduleClient.setAlarmForNotification(newAssignment); // tell service to set alarm for this date\n // (talks to client which then talks to service)\n if (mScheduleClient!=null) {\n mScheduleClient.doUnbindService();\n }\n getActivity().finish();\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlan = 1;\r\n\t\t\t\tCalendar dar = Calendar.getInstance();\r\n\t\t\t\tngayChonDatePicker = dar.getTime();\r\n\t\t\t\t\r\n\t\t\t\tint index = expandableList.getFirstVisiblePosition();\r\n\t\t\t\tView viewLV = expandableList.getChildAt(0);\r\n\t\t\t\tint top = (viewLV == null) ? 0 : (viewLV.getTop() - expandableList.getPaddingTop());\r\n\t\t\t\t\r\n\t\t\t\tsetinItialize(view, l, c);\r\n\t\t\t\t\r\n\t\t\t\texpandableList.setSelectionFromTop(index, top);\r\n\t\t\t}", "public void displayThisDayReminder(String date){\n\n\t\t \tCursor cursor = dataBase.fetchAllReminderByDate(date);\n\t\t \tString[] columns = new String[] {\"title\", \"time\", \"description\",\"_id\",\"date\"};\n\t\t \t\n\t\t int[] to = new int[] { R.id.Title, R.id.Time, R.id.editDesc };\n \n\t\t \tthisDayReminderList = (ListView) findViewById(R.id.thisDayReminder);\n\t\t \t\n\t\t \tthisDayReminderList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t \t\t \n\t\t \t @Override\n\t\t \t public void onItemClick(AdapterView<?> arg0, View arg1,int position, long arg3) {\n\t\t \t // TODO Auto-generated method stub\n\t\t \t \n\t\t \t Toast.makeText(getApplicationContext(), \"Clicked at Position\"+position, Toast.LENGTH_SHORT).show();\n\t\t \t }\n\t\t \t});\n\t\t \t\n\t\t \tstartManagingCursor(cursor);\n\t\t \n\t\t \t\tif (cursor!=null){\n\t\t \t\t\tstartManagingCursor(cursor);\n\t\t \t\t\tfinal SimpleCursorAdapter newAdapter = new SimpleCursorAdapter(MainActivity.this, R.layout.thisdayreminder_row, cursor, columns, to);\n\t\t \t\t\tthisDayReminderList.setAdapter(newAdapter);\n\t\t \t\t}\n\t\t \t\t\n\t\t \t\t//String t = cursor.getString(cursor.getColumnIndex(\"title\"));\n\t\t \t\t//Toast.makeText(getApplicationContext(), \"Clicked at Position\"+t, Toast.LENGTH_SHORT).show();\n\t\t \t\t\n\t\t \t\tif(cursor.getCount() > 0){\n\t\t \t\t\t//AlertDialog dateR = dialog.create();\n\t\t \t\t\t//WindowManager.LayoutParams wmlp = dateR.getWindow().getAttributes();\n\t\t \t\t\t\n\t\t\t\t \t//wmlp.gravity = Gravity.TOP;\n\t\t \t\t\t//dateR.show();\n\t\t\t\t \t \n\t\t \t\t}else{\n\t\t \t\t\tToast.makeText(getApplicationContext(), \"No reminders for this day.\", Toast.LENGTH_SHORT).show();\n\t\t \t\t}\t\n\t\t \t\t\n\t\t \t\tthisDayReminderList.setOnItemClickListener(new OnItemClickListener() {\n\t\t \t\t\tpublic void onItemClick(AdapterView<?> parent, View view,int position, final long mid) \n\t\t \t\t\t {\n\t\t \t\t\t\t\t\n\t\t \t\t\t \tString selectedFromList = (thisDayReminderList.getItemAtPosition(position).toString());\n\t\t \t\t\t \t\n\t\t \t\t\t \tfinal AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\t\t \t\t\t\t\t \n \n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\tCursor rcursor = dataBase.getSingleEntry((int) mid);\n\t\t \t\t\t\t\trcursor.moveToFirst();\n\t\t \t\t\t\t\tfinal String ftitle = rcursor.getString(rcursor.getColumnIndex(\"title\"));\n\t\t \t\t\t\t\tfinal String fdate = rcursor.getString(rcursor.getColumnIndex(\"date\"));\n\t\t \t\t\t\t\tfinal String ftime = rcursor.getString(rcursor.getColumnIndex(\"time\"));\n\t\t \t\t\t\t\tfinal String fdesc = rcursor.getString(rcursor.getColumnIndex(\"description\"));\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\t \n\t\t \t\t\t\t\t//Toast.makeText(getApplicationContext(), \"Reminder \"+ftitle, Toast.LENGTH_SHORT).show();\n\t\t \t\t\t \t\n\t\t \t\t\t\t\t\n\t\t \t\t\t builder.setTitle(\"Please select an action\");\n\t\t \t\t\t builder.setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\n\t\t \t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t\t\t \t attemptDelete((int) mid);\n\t\t \t\t\t }\n\t\t \t\t\t });\n\t\t \t\t\t \n\t\t \t\t\t builder.setNegativeButton(\"View\", new DialogInterface.OnClickListener() {\n\t\t \t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t\t\t \tupdateReminder((int) mid, ftitle, fdate, ftime, fdesc);\n\t\t \t\t\t \t \n\t\t \t\t\t \t//Toast.makeText(getApplicationContext(), \"Opening...\"+ mid, Toast.LENGTH_LONG).show();\n\t\t \t\t\t }\n\t\t \t\t\t });\n\t\t \t\t\t \n\t\t \t\t\t AlertDialog dialog1 = builder.create();\n\t\t \t\t\t dialog1.show();\n\t\t \t\t\t \n\t\t \t\t\t \t\n\t\t \t\t\t \t\n\t\t \t\t\t}});\n\t\t\t}", "public void addOnClickListenerForMeasurementPoint(TextView item, final String side, final int comparttype_auto) {\n if(_inspectionId == 0)\n {\n return;\n }\n\n item.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Intent intent;\n\n MSI_ComponentType componentType = new MSI_ComponentType();\n\n // For Track Rollers, open the General screen first.\n if(comparttype_auto == _utilities.COMPARTTYPE_TRACK_ROLLERS)\n {\n componentType = new MSI_ComponentType(\n _utilities.TRACK_ROLLER, comparttype_auto);\n }\n // Track Shoes and other components, view the Measurement Points.\n else if(comparttype_auto == _utilities.COMPARTTYPE_TRACK_SHOES)\n {\n componentType = new MSI_ComponentType(\n _utilities.TRACK_SHOES, comparttype_auto);\n }\n if(comparttype_auto == _utilities.COMPARTTYPE_TUMBLERS)\n {\n componentType = new MSI_ComponentType(\n _utilities.TUMBLERS, comparttype_auto);\n }\n if(comparttype_auto == _utilities.COMPARTTYPE_FRONT_IDLERS)\n {\n componentType = new MSI_ComponentType(\n _utilities.FRONT_IDLERS, comparttype_auto);\n }\n if(comparttype_auto == _utilities.COMPARTTYPE_CRAWLER_FRAMES)\n {\n componentType = new MSI_ComponentType(\n _utilities.CRAWLER_FRAMES, comparttype_auto);\n }\n\n intent = new Intent(getApplicationContext(), MSI_AdditionalRecordsActivity.class);\n Bundle b = new Bundle();\n b.putLong(\"inspection_id\", _inspectionId);\n b.putParcelable(\"componentType\", componentType);\n b.putString(\"side\", side);\n intent.putExtras(b);\n\n startActivity(intent);\n }\n });\n }", "private void initViews() {\n mCancelButton.setOnClickListener(view -> getDialog().dismiss());\n\n mSaveButton.setOnClickListener(view -> {\n //Check if callback is attached or not\n if (mCallback != null) {\n mCallback.onOptionsFiltered(SELECTED_TIME_OPTION);\n }\n getDialog().dismiss();\n });\n\n //Initialize Spinner adapter\n ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_item, Constants.TIME_OPTIONS);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mTimeOptionsSpinner.setAdapter(adapter);\n\n mTimeOptionsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n SELECTED_TIME_OPTION = i;\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n SELECTED_TIME_OPTION = 0;\n }\n });\n\n mTimeOptionsSpinner.setSelection(SELECTED_TIME_OPTION);\n }", "private void setMonthListAdapter(final ArrayList<HashMap<String, String>> monthEntryList) {\n RvAdapterMonthList adapter = new RvAdapterMonthList(monthEntryList);\n RecyclerView myView = (RecyclerView)findViewById(R.id.content_main_recyclerview);\n myView.setHasFixedSize(true);\n myView.setAdapter(adapter);\n LinearLayoutManager llm = new LinearLayoutManager(HomeActivity.this);\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n myView.setLayoutManager(llm);\n\n myView.addOnItemTouchListener(\n new RecyclerItemClickListener(HomeActivity.this, myView ,new RecyclerItemClickListener.OnItemClickListener() {\n @Override public void onItemClick(View view, int position) {\n Intent i = new Intent(HomeActivity.this, MonthEntriesActivity.class);\n i.putExtra(MONTH_KEY, mMonthsList.get(position).get(MONTH_KEY));\n i.putExtra(YEAR_KEY, mMonthsList.get(position).get(YEAR_KEY));\n startActivity(i);\n }\n\n @Override public void onLongItemClick(View view, int position) {\n // do whatever\n }\n })\n );\n }", "public void setAdapter() {\n datalist = new ArrayList<>();\n\n adapter = new SoundListAdapter(context, datalist, new AdapterClickListener() {\n @Override\n public void onItemClick(View view, int pos, Object object) {\n\n SoundsModel item = (SoundsModel) object;\n\n if (view.getId() == R.id.done) {\n stopPlaying();\n downLoadMp3(item.id, item.sound_name, item.acc_path);\n } else if (view.getId() == R.id.fav_btn) {\n callApiForFavSound(pos, item);\n } else {\n if (thread != null && !thread.isAlive()) {\n stopPlaying();\n playaudio(view, item);\n } else if (thread == null) {\n stopPlaying();\n playaudio(view, item);\n }\n }\n }\n });\n\n recyclerView.setAdapter(adapter);\n\n\n }", "public void addData() {\n if (daySchedule == null) {\n return;\n }\n int numTimes = daySchedule.size();\n TableLayout tl = findViewById(R.id.table);\n int chosenTime = MainActivity.hour * 60 + MainActivity.minute;\n if(chosenTime == 0)\n {\n Calendar now = Calendar.getInstance();\n chosenTime = now.get(Calendar.HOUR_OF_DAY) * 60 + now.get(Calendar.MINUTE);;\n }\n for (int i = 0; i < numTimes; i++) {\n TableRow tr = new TableRow(this);\n tr.setLayoutParams(getLayoutParams());\n Time t = daySchedule.get(i);\n if (!haverford) {\n if (Time.toMinutes(t.leaveBrynMawr()) > chosenTime) {\n Log.d(\"brynmawrtime\", String.valueOf(Time.toMinutes(t.leaveBrynMawr())));\n tr.addView(getTextView(i + 1, t.leaveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n tr.addView(getTextView(i + numTimes, t.arriveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n }\n } else {\n if (Time.toMinutes(t.leaveHaverford()) > chosenTime) {\n tr.addView(getTextView(i + 1, t.leaveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n tr.addView(getTextView(i + numTimes, t.arriveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n }\n }\n tl.addView(tr, getTblLayoutParams());\n }\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\tif(!tvpm.getText().equals(\"\")){\r\n\t\t\t\t\t\t\t\t\t data = info.get(position).getAdmitTime()+\"(下午)\";\r\n\t\t\t\t\t\t\t\t\tinitPopupWindow();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "private void loadTravelTracking() {\n\n ArrayList<LatLng> LatLngs = new ArrayList<LatLng>();\n\n HistoryDBHelper inst = HistoryDBHelper.getInstance(getContext());\n // SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss\", Locale.US);\n // String simpleDate = \"24-04-2021 08:00:00\";\n try {\n // Timestamp ts = Timestamp.valueOf(\"2021-04-24 13:00:27.627\");\n // Date date = new Date(ts.getTime());\n Date date = selectedDate;\n Log.d(TAG, date.toString());\n ArrayList<HistoryItem> historyItems = inst.retrieveByDate(date);\n //ArrayList<HistoryItem> historyItems = inst.getAllListHistory();\n int count = 0;\n Timestamp lastTimeStamp = new Timestamp(0);\n for (HistoryItem historyItem : historyItems) {\n Log.d(TAG, historyItem.toString() + count);\n Timestamp currentTimeStamp = historyItem.getTimestamp();\n // Ensure that two time stamps are 1 minutes away from each other.\n if (currentTimeStamp.getTime() - lastTimeStamp.getTime() > 1000 * 60) {\n LatLngs.add(new LatLng(historyItem.getLat(), historyItem.getLon()));\n lastTimeStamp = currentTimeStamp;\n }\n count++;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(TAG, \"Load Travel Tracking Date Error\");\n }\n\n Polyline line = map.addPolyline(new PolylineOptions()\n .addAll(LatLngs)\n .startCap(new RoundCap())\n .endCap(new ButtCap())\n .width(15)\n .color(Color.argb(255, 153, 27, 30)));\n\n line.setTag(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(selectedDate));\n line.setJointType(JointType.ROUND);\n line.setClickable(true);\n\n map.setOnPolylineClickListener(new GoogleMap.OnPolylineClickListener() {\n @Override\n public void onPolylineClick(Polyline polyline) {\n if ((polyline.getColor() == Color.argb(255, 153, 27, 30))) {\n polyline.setColor(Color.argb(255, 255, 204, 0));\n } else {\n // The default pattern is a solid stroke.\n polyline.setColor(Color.argb(255, 153, 27, 30));\n }\n\n Toast.makeText(getActivity(), \"Date \" + polyline.getTag().toString(),\n Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\r\n\t\t\t\tswitch (arg2) {\r\n\t\t\t\tcase 0:// Mandeville\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.571266, -85.098664,\r\n\t\t\t\t\t\t\t\t\t330)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:// Excel\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.572109, -85.096022,\r\n\t\t\t\t\t\t\t\t\t330)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:// Health Services\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.571921, -85.098759,\r\n\t\t\t\t\t\t\t\t\t327)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:// UZ6\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.572658, -85.105679,\r\n\t\t\t\t\t\t\t\t\t318)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:// Parking\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.571976, -85.099870,\r\n\t\t\t\t\t\t\t\t\t321)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:// Career Services\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.574153, -85.097198,\r\n\t\t\t\t\t\t\t\t\t327)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:// University Police\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.571976, -85.099870,\r\n\t\t\t\t\t\t\t\t\t321)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:// My House\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.571421, -85.098935,\r\n\t\t\t\t\t\t\t\t\t328)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 8:\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.74711, -84.898254)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 9:\r\n\t\t\t\t\tArActivity.startWithSetup(AdminListActivity.this,\r\n\t\t\t\t\t\t\tnew ProjectSetup(new GeoObj(33.74711, -84.898254)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n if (mItems.get(arg2).day.equals(\"\")) {\n\n } else {\n Intent intent = new Intent(getContext(), Today.class);\n intent.putExtra(\"Param1\", textYear.getText().toString()+ \"/\"\n + textMon.getText().toString() + \"/\" + mItems.get(arg2).day);\n startActivityForResult(intent, 3);\n }\n }", "@Override\n\t\t\tpublic void setDates(RecyclerViewHolder holder, String data) {\n\t\t\t\tTextView tv= holder.getView(R.id.item_tv);\n\t\t\t\ttv.setText(data);\n\t\t\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n // Check if the existing view is being reused, otherwise inflate the view\n View listItemView = convertView;\n if(listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(list_item, parent, false);\n }\n\n\n Earthquake currentEarthquake = getItem(position);\n\n\n TextView MagnitudeTextView = (TextView) listItemView.findViewById(R.id.magnitude_text);\n MagnitudeTextView.setText(currentEarthquake.getMagnitude());\n\n\n TextView LocationTextView = (TextView) listItemView.findViewById(R.id.primary_location);\n String test = primaryLocationSplit(currentEarthquake.getLocation());\n LocationTextView .setText(test);\n\n TextView locationOffsetTextView = (TextView) listItemView.findViewById(R.id.location_offset);\n String test1 = locationOffsetSplit(currentEarthquake.getLocation());\n locationOffsetTextView .setText(test1);\n\n Date dateObject = new Date(currentEarthquake.getTimeInMilliseconds());\n\n TextView DateTextView = (TextView) listItemView.findViewById(R.id.date_text);\n String formattedDate = formatDate(dateObject);\n DateTextView.setText(formattedDate);\n\n TextView timeView = (TextView) listItemView.findViewById(R.id.date_time);\n // Format the time string (i.e. \"4:30PM\")\n String formattedTime = formatTime(dateObject);\n // Display the time of the current earthquake in that TextView\n timeView.setText(formattedTime);\n\n return listItemView;\n }", "private void weeklyPlannerSetup() {\n //Setup the 7 Days of the planner\n Days monday = new Days(\"Monday\");\n Days tuesday = new Days(\"Tuesday\");\n Days wednesday = new Days(\"Wednesday\");\n Days thursday = new Days(\"Thursday\");\n Days friday = new Days(\"Friday\");\n Days saturday = new Days(\"Saturday\");\n Days sunday = new Days(\"Sunday\");\n\n //Add days to list and set them to listView\n ObservableWeekList.addAll(monday, tuesday, wednesday, thursday, friday, saturday, sunday);\n weekList.setItems(ObservableWeekList);\n\n //get listViews Height\n double listViewHeight = weekList.getPrefHeight();\n double cellHeight = Math.round(listViewHeight / 7);\n double cellWidth = weekList.getPrefWidth();\n\n //set planners cell format\n weekList.setCellFactory(new Callback<ListView<Days>, ListCell<Days>>() {\n @Override\n public ListCell<Days> call(ListView<Days> daysListView) {\n return new WeekCell(breakfastColor, lunchColor, dinnerColor, breakfastColorLight,\n lunchColorLight, dinnerColorLight, weekCellFontColor, cellHeight, cellWidth);\n }\n });\n\n //Setup a weekList View Change Listener, that will set the comboBoxs selected Recipes / Meals to match\n //the Recipes / Meals of the selected day and will then display the appropriate nutritional information\n weekList.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Days>() {\n @Override\n public void changed(ObservableValue<? extends Days> observableValue, Days days, Days t1) {\n previouslySelected = t1;\n if (t1 != null) {\n if (t1.isBreakfastSet()){\n //get the breakfast recipe id. Then use it to find the recipe in the breakfastCombo\n //this is done as when the program is loaded weekplanner.dat is loaded and the\n //recipes in here will be loaded to a new memory location to find via an object search\n Recipe breakfast = findRecipeFromID(t1.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n //set breakfast nutrition information\n displayBreakfastNutrition(t1.getBreakfast());\n\n } else {\n breakfastCombo.getSelectionModel().clearSelection();\n breakfastCombo.setValue(null);\n //clear the nutritional labels if there is no meal\n clearBreakfastNutrition();\n }\n\n if(t1.isLunchSet()){\n Recipe lunch = findRecipeFromID(t1.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n displayLunchNutrition(t1.getLunch());\n } else {\n lunchCombo.getSelectionModel().clearSelection();\n clearLunchNutrition();\n lunchCombo.setValue(null);\n }\n\n if(t1.isDinnerSet()){\n Recipe dinner = findRecipeFromID(t1.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n displayDinnerNutrition(t1.getDinner());\n } else {\n dinnerCombo.getSelectionModel().clearSelection();\n dinnerCombo.setValue(null);\n clearDinnerNutrition();\n }\n\n textDay.setText(t1.getDay());\n }\n }\n });\n\n //select the first day in the weekList\n weekList.getSelectionModel().selectFirst();\n\n setupPlannerMealComboboxs(breakfastCombo);\n setupPlannerMealComboboxs(lunchCombo);\n setupPlannerMealComboboxs(dinnerCombo);\n\n clearBreakfastNutrition();\n clearDinnerNutrition();\n clearLunchNutrition();\n clearTotalNutrition();\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tfinal int position, long id) {\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tfrom_weatherAcv_listItems.remove(position); //删掉对应被点击的那行\n\t\t\t\t\t\tmadapter.notifyDataSetChanged(); //刷新容器\n\t\t\t\t\t\tswitch(position)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t case 0:\n\t\t\t\t\t\t\tindex = 0;\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t case 1:\n\t\t\t\t\t\t\tindex = 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t case 2:\n\t\t\t\t\t\t\tindex = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t case 3:\n\t\t\t\t\t\t\tindex = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcityList.add(index); //把点击的index放到citylist中\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "private void InitializeAdapter() {\n arrayAdapter = new PlanListRVArrayAdapter(mPlanList);\n recyclerView.setAdapter(arrayAdapter);\n /* arrayAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n //arrayAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onItemRangeChanged(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeChanged(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeInserted(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeRemoved(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {\n // arrayAdapter.notifyItemMoved(fromPosition,toPosition);\n // TODO itemcount가 1일 경우이므로 1보다 크면 제대로 동작하지 않는다.\n }\n });\n*/\n\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n if (arg2 < Adapter.DataTable.Rows.size()) {\n \tfinal DataRow row = (DataRow)Adapter.getItem((int)arg2);\n \t\t\t\tpn_begin_stock_mgr_yh.this.printLabel(row);\n } else {\n \tpn_begin_stock_mgr_yh.this.refreshData(false);\n }\n\t\t\t\n\t\t\t}", "private void setAdaptersForDataToShow() {\n LinearLayoutManager linearLayoutManager_SectionOfDays = new LinearLayoutManager(this);\n linearLayoutManager_SectionOfDays.setOrientation(LinearLayoutManager.HORIZONTAL);\n recyclerView_sectionOfDays.setLayoutManager(linearLayoutManager_SectionOfDays);\n recyclerView_sectionOfDays.setAdapter(new SectionOfDays_RecyclerViewAdapter(this, daysArray, this));\n\n /**\n * Vertical Recycler View showing List Of Trains\n */\n LinearLayoutManager linearLayoutManager_ListOfTrains = new LinearLayoutManager(this);\n linearLayoutManager_ListOfTrains.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView_listOfTrains.setLayoutManager(linearLayoutManager_ListOfTrains);\n setAdapter_ListOfTrains_Vertical_RecyclerView(0);\n }", "@Override\n public void onClick(View arg0) {\n\n\n listView.setAdapter(urgentTodosAdapter);\n urgentTodosAdapter.loadObjects();\n\n Toast.makeText(getApplication(), \"แสดงรายการ\"+dayofmonth,\n Toast.LENGTH_SHORT).show();\n\n\n }" ]
[ "0.66718006", "0.64708126", "0.62696445", "0.6135802", "0.6040333", "0.5911413", "0.58778626", "0.5871289", "0.58650124", "0.583116", "0.58255064", "0.5810699", "0.5709915", "0.5703771", "0.57030934", "0.56652653", "0.5657745", "0.5657115", "0.56484866", "0.5622642", "0.5616513", "0.5604825", "0.55880725", "0.5565826", "0.5553313", "0.553005", "0.5508792", "0.550866", "0.5508319", "0.5499143", "0.54889077", "0.5486837", "0.54688144", "0.5468319", "0.5459385", "0.545788", "0.5452822", "0.54468113", "0.544154", "0.5440013", "0.5438942", "0.54263127", "0.5414216", "0.54007334", "0.5398222", "0.53944534", "0.5389568", "0.53736174", "0.53705215", "0.5361107", "0.5361107", "0.53553385", "0.535529", "0.53525656", "0.5342301", "0.5340678", "0.5337181", "0.5333354", "0.53304315", "0.53298324", "0.5328018", "0.53240645", "0.532155", "0.53170854", "0.531396", "0.53125113", "0.5310639", "0.53099144", "0.530214", "0.5300938", "0.5291764", "0.528568", "0.52767867", "0.5276269", "0.5275351", "0.52721417", "0.5268376", "0.52646774", "0.52635646", "0.526311", "0.52596426", "0.52589995", "0.5258296", "0.52507627", "0.524989", "0.524943", "0.52393717", "0.52391714", "0.52375865", "0.52356637", "0.52336276", "0.5231154", "0.5229462", "0.52289295", "0.5227428", "0.5218658", "0.5216828", "0.52146566", "0.5214103", "0.5211741", "0.52025163" ]
0.0
-1
Queries the Data and calculates the available Times
@Override protected Void doInBackground(Void... params) { tOccslots = new ArrayList<Integer>(); pOccslots = new ArrayList<Integer>(); for (int i = 0; i < teacherDateList.size(); i++){ ParseObject o = teacherDateList.get(i); tOccslots.add(o.getInt(Constants.SLOTID)); } for (int i = 0; i < parentDateList.size(); i++){ ParseObject o = parentDateList.get(i); pOccslots.add(o.getInt(Constants.SLOTID)); } ParseQuery<ParseObject> query = new ParseQuery<ParseObject>(Constants.TIMELINE); query.whereNotContainedIn(Constants.SLOTID, tOccslots); query.whereNotContainedIn(Constants.SLOTID, pOccslots); query.addAscendingOrder(Constants.SLOTID); try { timesAvailable = query.find(); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } queriedTimes = new ArrayList<Time>(); for (ParseObject allTimes : timesAvailable){ Time time = new Time(); time.setSlot(allTimes.getInt(Constants.SLOTID)); time.setTeacher(tFirstname+Constants.SPACE+tLastname); time.setTime(allTimes.getString(Constants.TIME)); queriedTimes.add(time); } timesList.addAll(queriedTimes); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void gettimes() {\n\t\tCursor c=mydb.rawQuery(\"SELECT * FROM timedata \", null);\n\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata after retriving completed @@@@@@@@@@@@@@@@@@@@@\");\n\t\t c.moveToFirst();\n\t\t \n\t\t if(c!=null)\n\t\t {\n\t\t\t do{\n\t\t\t\t \n\t\t\t\t int c1=c.getColumnIndex(\"fromtime\");\n\t\t\t\t if(c.getCount()>0)\n\t\t\t\t dfromtime=c.getString(c1);\n\t\t\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata \"+dfromtime);\n\t\t\t\t int c2=c.getColumnIndex(\"totime\");\n\t\t\t\t dtotime=c.getString(c2);\n\t\t\t\t \n\t\t\t }while(c.moveToNext());\n\t\t\t c.close();\n\t\t\t mydb.close();\n\t\t }\n\t}", "public void consultaTest() throws Exception{\n\t\t\n\t ResultSet rs = statement.executeQuery(\"select * from statistics\");\n\t \n\t \n\t while(rs.next())\n\t {\n\t\t \n\t\t DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss.SSS\");\n\t\t Date date = df.parse(rs.getString(\"timeActual\"));\n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(date);\n\t\t \n\t\t String completoDay = cal.get(Calendar.YEAR)+\"-\"+(cal.get(Calendar.MONTH) + 1)+\"-\"+ cal.get(Calendar.DAY_OF_MONTH);\n\t\t \n\t System.out.println(\"id= \" + rs.getInt(\"id\") + \" memory= \" + rs.getInt(\"memory\") + \" cpu= \" \n\t \t+ rs.getInt(\"cpu\") + \" timeActual= \" + completoDay);\n\t }\n\t \n\t if(rs != null)\n\t\t rs.close();\n\t \n\t if(connection != null)\n\t connection.close();\n\t \n\t}", "@Override\n public void queryRecords() throws VizException {\n\n ResourceName rscName = getResourceData().getResourceName();\n\n DataTime cycleTime = rscName.getCycleTime();\n\n // latest should already be resolved here.\n if (rscName.isLatestCycleTime()) {\n return;\n }\n\n List<DataTime> availableTimes = new ArrayList<>();\n\n if (cycleTime != null && gridRscData.getPluginName()\n .equalsIgnoreCase(GempakGrid.gempakPluginName)) {\n try {\n String dataLocation = null;\n try {\n dataLocation = GempakGrid\n .getGempakGridPath(gridRscData.getGdfile());\n\n } catch (VizException e) {\n statusHandler.error(\"Unable to specify location for \"\n + gridRscData.getPluginName() + \" \"\n + gridRscData.getGdfile(), e);\n return;\n }\n String[] gridAvailableTimes = GempakGrid.getAvailableGridTimes(\n dataLocation, cycleTime.toString(),\n gridRscData.getGdfile().toLowerCase());\n for (int ii = 0; ii < gridAvailableTimes.length; ii++) {\n availableTimes.add(new DataTime(gridAvailableTimes[ii]));\n }\n } catch (Exception e) {\n return;\n }\n } else {\n availableTimes = gridRscData.getAvailableDataTimes();\n }\n\n ArrayList<DataTime> dataTimes = new ArrayList<>();\n\n // loop thru all the times for the grib records for this model and\n // if the time matches the cycle time for this resource and if\n // it hasn't already been added, add it to the queue of data objects\n // to be processed by the abstract class.\n for (DataTime dt : availableTimes) {\n\n // create a dataTime without a possible validPeriod.\n DataTime availTime = new DataTime(dt.getRefTime(),\n dt.getFcstTime());\n DataTime refTime = new DataTime(dt.getRefTime());\n\n if (cycleTime != null) {\n if (cycleTime.equals(refTime)) {\n if (!dataTimes.contains(availTime)) {\n dataTimes.add(availTime);\n }\n }\n } else { // for grid analysis\n dataTimes.add(availTime);\n }\n }\n setDataTimesForDgdriv(dataTimes);\n setAllFramesAsPopulated();\n }", "private static void getStatistics() {\r\n\r\n\t\tfloat totalWaitTime = 0;\r\n\t\tfloat totalRideTime = 0;\r\n\r\n\t\t// generate info about min wait time\r\n\t\tfloat minWaitTime = people.get(0).getWaitTime();\r\n\t\tString minWaitPerson = \"\";\r\n\t\ttotalWaitTime += minWaitTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() < minWaitTime){\r\n\t\t\t\tminWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tminWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalWaitTime += people.get(i).getWaitTime();\r\n\t\t}\r\n\r\n\t\t// generate info about min ride time\r\n\t\tfloat minRideTime = people.get(0).getRideTime();\r\n\t\tString minRidePerson = \"\";\r\n\t\ttotalRideTime += minRideTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() < minRideTime){\r\n\t\t\t\tminRideTime = people.get(i).getRideTime();\r\n\t\t\t\tminRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalRideTime += people.get(i).getRideTime();\r\n\t\t}\r\n\r\n\t\t// generate info about max wait time\r\n\t\tfloat maxWaitTime = people.get(0).getWaitTime();\r\n\t\tString maxWaitPerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() > maxWaitTime){\r\n\t\t\t\tmaxWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tmaxWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// generate info about max ride time\r\n\t\tfloat maxRideTime = people.get(0).getRideTime();\r\n\t\tString maxRidePerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() > maxRideTime){\r\n\t\t\t\tmaxRideTime = people.get(i).getRideTime();\r\n\t\t\t\tmaxRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"Avg Wait Time: %.1f sec\\n\", totalWaitTime/people.size());\r\n\t\tSystem.out.printf(\"Avg Ride Time: %.1f sec\\n\\n\", totalRideTime/people.size());\r\n\r\n\t\tSystem.out.printf(\"Min Wait Time: %.1f sec (%s)\\n\", minWaitTime, minWaitPerson);\r\n\t\tSystem.out.printf(\"Min Ride Time: %.1f sec (%s)\\n\\n\", minRideTime, minRidePerson);\r\n\r\n\t\tSystem.out.printf(\"Max Wait Time: %.1f sec (%s)\\n\", maxWaitTime, maxWaitPerson);\r\n\t\tSystem.out.printf(\"Max Ride Time: %.1f sec (%s)\\n\\n\", maxRideTime, maxRidePerson);\r\n\r\n\t}", "public String[][][] getSchedule(int userId)throws SQLException{\n //create the arrays\n String[] startTimes;\n String[] endTimes;\n String[] titles;\n String[] locations;\n String[][] times;\n String[][] data;\n String[][][] results;\n \n //declare the size int, used to initialize the arrays\n int size = 0;\n \n //Create the LocalDate objects to use in query\n LocalDate date = LocalDate.now();\n Month month = date.getMonth();\n int year = date.getYear();\n int firstDay = 1;\n int lastDay = date.lengthOfMonth();\n LocalDate begin = LocalDate.of(year, month, firstDay);\n LocalDate end = LocalDate.of(year, month, lastDay);\n \n //Establish the connection\n Connection conn = DriverManager.getConnection(url, user, pass);\n \n //Run query and set size value\n String query = \"SELECT COUNT(*) FROM appointment WHERE userId = \"\n + userId + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n PreparedStatement ps = conn.prepareStatement(query);\n \n ResultSet set = ps.executeQuery(query);\n ResultSetMetaData meta = set.getMetaData();\n int columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n size = set.getInt(i);\n }\n } \n \n //initialize the arrays\n startTimes = new String[size];\n endTimes = new String[size];\n titles = new String[size];\n locations = new String[size];\n \n //Populate the startTimes array\n int x = 0;\n query = \"SELECT start FROM appointment WHERE userId = \" + userId \n + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n ps = conn.prepareStatement(query);\n \n set = ps.executeQuery(query);\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n startTimes[x] = value;\n x++;\n }\n } \n \n //Populate the endTimes array\n x = 0;\n set = ps.executeQuery(\"SELECT end FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n endTimes[x] = value;\n x++;\n }\n }\n \n //Populate the titles array\n x = 0;\n set = ps.executeQuery(\"SELECT title FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n titles[x] = value;\n x++;\n }\n }\n \n //Populate the descriptions array\n x = 0;\n set = ps.executeQuery(\"SELECT location FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n locations[x] = value;\n x++;\n }\n }\n \n //initialize the matrices\n data = new String[][]{titles, locations};\n times = new String[][]{startTimes, endTimes};\n \n results = new String[][][]{data, times};\n return results;\n \n }", "private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}", "public static List<String> getAllStartTime(String data) throws SQLException\n {\n \tList<String> all_time = new ArrayList<String>();\n \tResultSet time;\n \tif(data.charAt(0) == 'M')\n \t\ttime = test.readDatabase(\"select distinct Begin_Time from class_2016 where Term_Code = '\"+test.getLatestSemester()+\"' and Monday_Ind1 = 'M' and Wednesday_Ind1 = 'W'and Friday_Ind1 = 'F' and Begin_Time >= 800 and Begin_Time <= 1700 order by Begin_Time\");\n \telse\n \t\ttime = test.readDatabase(\"select distinct Begin_Time from class_2016 where Term_Code = '\"+test.getLatestSemester()+\"' and Tuesday_Ind1 = 'T' and Thursday_Ind1 = 'R' and Begin_Time >= 800 and Begin_Time <= 1700 and (End_Time - Begin_Time) = 120 order by Begin_Time\");\n\t\tall_time = test.writeResultSet(time,\"Begin_Time\");\n \treturn all_time;\n\n }", "protected void readAllData() {\n \n String query = buildDataQuery();\n \n try {\n ResultSet rs = executeQuery(query);\n ResultSetMetaData md = rs.getMetaData();\n \n //Construct the internal data containers\n _dataMap = new LinkedHashMap<String,double[]>();\n _textDataMap = new LinkedHashMap<String,String[]>();\n \n //Make containers to collect data as we get it from the ResultSet\n int ncol = md.getColumnCount();\n ResizableDoubleArray[] dataArrays = new ResizableDoubleArray[ncol]; //tmp holder for numeric data\n List<String>[] textDataLists = new List[ncol]; //tmp holder for text data\n for (int i=0; i<ncol; i++) {\n dataArrays[i] = new ResizableDoubleArray();\n textDataLists[i] = new ArrayList<String>();\n }\n\n //Define a Calendar so we get our times in the GMT time zone.\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n \n //Read data from the result set into the ResizableDoubleArray-s which are already in the _dataArrayMap.\n while (rs.next()) { \n for (int i=0; i<ncol; i++) {\n double d = Double.NaN;\n //Check type and read as appropriate\n //TODO: check for other variation of time and text types\n int typeID = md.getColumnType(i+1); \n \n if (typeID == java.sql.Types.TIMESTAMP) { //TODO: test for DATE and TIME types?\n //We need to convert timestamps to numerical values.\n Timestamp ts = rs.getTimestamp(i+1, cal);\n d = ts.getTime();\n } else if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) {\n //Text column. Save strings apart from other data.\n //They will appear as NaNs in the numeric data values.\n String s = rs.getString(i+1);\n textDataLists[i].add(s);\n } else d = rs.getDouble(i+1);\n \n dataArrays[i].addElement(d);\n }\n }\n \n //Extract the primitive arrays from the ResizableDoubleArray-s and put in data map.\n //Segregate the text data. Don't bother to save \"data\" (NaNs) for String types.\n for (int i=0; i<ncol; i++) {\n String name = md.getColumnName(i+1);\n int typeID = md.getColumnType(i+1);\n if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) { \n String[] text = new String[1];\n text = (String[]) textDataLists[i].toArray(text);\n _textDataMap.put(name, text);\n } else {\n double[] data = dataArrays[i].getElements();\n _dataMap.put(name, data);\n }\n }\n \n } catch (SQLException e) {\n String msg = \"Unable to process database query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n }", "public static void queryLyftTaskAndStore(LocationAndTime locationAndTime,LyftClientUtil lyftClient){\n Map requestMap=new HashMap<>();\n requestMap.put(\"startLatitude\",locationAndTime.getStartLatitude());\n requestMap.put(\"startLongitude\",locationAndTime.getStartLongitude());\n requestMap.put(\"endLatitude\",locationAndTime.getEndLatitude());\n requestMap.put(\"endLongitude\",locationAndTime.getEndLongitude());\n List<CostEstimate> costEstimates=lyftClient.getCostEstimate(requestMap).getCostEstimates();\n LocalDateTime localDateTime=Instant.ofEpochMilli(locationAndTime.getJourneyStartTime().getTime()).atZone( ZoneId.systemDefault()).toLocalDateTime();\n LocalDateTime now=LocalDateTime.now();\n LocalDateTime toDateTime=LocalDateTime.of( now.getYear(),now.getMonthValue(),now.getDayOfMonth() , localDateTime.getHour(), localDateTime.getMinute(), localDateTime.getSecond());\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n if(costEstimates!=null){\n for(CostEstimate estimate:costEstimates){\n estimate.setCurrentDate(formatter.format(toDateTime.atZone(ZoneId.systemDefault()).toInstant()));\n csvUtilLyft.writeRecordToFile(estimate);\n }\n }\n\n\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "private Set calculateTimeSet() {\n List choices = getDataChoices();\n if (choices.isEmpty()) {\n return null;\n }\n Set newSet = null;\n for (int i = 0; i < choices.size(); i++) {\n try {\n VerticalProfileInfo info = getVPInfo(i);\n GridDataInstance dataInstance = info.getDataInstance();\n Set set = GridUtil.getTimeSet(dataInstance.getGrid());\n //System.out.println(\"di.timeset[\"+i+\"] = \" + set);\n if (set != null) {\n if (newSet == null) {\n newSet = set;\n } else {\n newSet = newSet.merge1DSets(set);\n }\n }\n } catch (Exception e) {\n logger.error(\"Problem calculating TimeSet\", e);\n }\n }\n //System.out.println(\"merged time set = \" + newSet);\n return newSet;\n }", "private List<Object[]> executeDayQuery(\n List<Object> segments, List<Object> workplaces,\n String Eq1startTime, String Eq1endTime,\n String Eq2startTime, String Eq2endTime,\n String Eq3startTime, String Eq3endTime) {\n try {\n //Clear all tables\n //################# Declared Harness Data #################### \n Helper.startSession();\n\n String query_str_1 = \"(SELECT 'Matin' as shift,'%s' As start_time, '%s' as end_time, \"\n + \"bh.segment AS segment, \"\n + \"bh.workplace AS workplace, \"\n + \"bh.harness_part AS harness_part, \"\n + \"bh.std_time AS std_time, \"\n + \"COUNT(bh.harness_part) AS produced_qty, \"\n + \"SUM(bh.std_time) AS produced_hours \"\n + \"FROM base_harness bh, base_container bc \"\n + \"WHERE bc.id = bh.container_id \"\n + \"AND bh.create_time BETWEEN '%s' AND '%s' \"\n + \"AND bh.segment IN (:segments) \"\n + \"AND bh.workplace IN (:workplaces) \"\n + \"GROUP BY bh.segment, bh.workplace, bh.harness_part, bh.std_time)\";\n\n query_str_1 = String.format(query_str_1, Eq1startTime, Eq1endTime, Eq1startTime, Eq1endTime);\n\n String query_str_2 = \"(SELECT 'Soir' as shift,'%s' As start_time, '%s' as end_time, \"\n + \"bh.segment AS segment, \"\n + \"bh.workplace AS workplace, \"\n + \"bh.harness_part AS harness_part, \"\n + \"bh.std_time AS std_time, \"\n + \"COUNT(bh.harness_part) AS produced_qty, \"\n + \"SUM(bh.std_time) AS produced_hours \"\n + \"FROM base_harness bh, base_container bc \"\n + \"WHERE bc.id = bh.container_id \"\n + \"AND bh.create_time BETWEEN '%s' AND '%s' \"\n + \"AND bh.segment IN (:segments) \"\n + \"AND bh.workplace IN (:workplaces) \"\n + \"GROUP BY bh.segment, bh.workplace, bh.harness_part, bh.std_time)\";\n\n query_str_2 = String.format(query_str_2, Eq2startTime, Eq2endTime, Eq2startTime, Eq2endTime);\n\n String query_str_3 = \"(SELECT 'Nuit' as shift,'%s' As start_time, '%s' as end_time, \"\n + \"bh.segment AS segment, \"\n + \"bh.workplace AS workplace, \"\n + \"bh.harness_part AS harness_part, \"\n + \"bh.std_time AS std_time, \"\n + \"COUNT(bh.harness_part) AS produced_qty, \"\n + \"SUM(bh.std_time) AS produced_hours \"\n + \"FROM base_harness bh, base_container bc \"\n + \"WHERE bc.id = bh.container_id \"\n + \"AND bh.create_time BETWEEN '%s' AND '%s' \"\n + \"AND bh.segment IN (:segments) \"\n + \"AND bh.workplace IN (:workplaces)\"\n + \"GROUP BY bh.segment, bh.workplace, bh.harness_part, bh.std_time) \";\n\n query_str_3 = String.format(query_str_3, Eq3startTime, Eq3endTime, Eq3startTime, Eq3endTime);\n\n String query_str = \"SELECT * FROM (\"\n + query_str_1 + \" UNION \"\n + query_str_2 + \" UNION \"\n + query_str_3\n + \") results ORDER BY start_time ASC, segment ASC, workplace ASC, harness_part ASC\";\n\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n query.addScalar(\"shift\", StandardBasicTypes.STRING)\n .addScalar(\"start_time\", StandardBasicTypes.STRING)\n .addScalar(\"end_time\", StandardBasicTypes.STRING)\n .addScalar(\"segment\", StandardBasicTypes.STRING)\n .addScalar(\"workplace\", StandardBasicTypes.STRING)\n .addScalar(\"harness_part\", StandardBasicTypes.STRING)\n .addScalar(\"std_time\", StandardBasicTypes.DOUBLE)\n .addScalar(\"produced_qty\", StandardBasicTypes.INTEGER)\n .addScalar(\"produced_hours\", StandardBasicTypes.DOUBLE)\n .setParameterList(\"segments\", segments)\n .setParameterList(\"workplaces\", workplaces);\n\n this.dataResultList = query.list();\n\n Helper.sess.getTransaction().commit();\n\n return this.dataResultList;\n\n } catch (HibernateException e) {\n if (Helper.sess.getTransaction() != null) {\n Helper.sess.getTransaction().rollback();\n }\n }\n\n return this.dataResultList;\n }", "private void querys() {\n\t try {\r\n\t\tBoxYieldRptFactory.getRemoteInstance().SteDate();\r\n\t } catch (EASBizException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t } catch (BOSException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}", "public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}", "public static void analyzeEventsQueriesAmounts() throws SQLException\r\n\t{\r\n\t\tStatement stat = conn.createStatement();\r\n \r\n ResultSet result = stat.executeQuery(\"SELECT * FROM fraud.afm_fraudeventrecord;\");\r\n \r\n while (result.next())\r\n {\r\n \tString event = result.getString(\"eventType\");\r\n \tString user = result.getString(\"userId\");\r\n \t\r\n \tif (\r\n \t\t\t(event.contains(\"LOAD\"))\r\n \t&& \t\t(user.equals(\"user40\"))\r\n \t\t\t\r\n \t\t\t){\r\n \tSystem.out.print(new Date(result.getInt(\"timestamp\")));\r\n \tSystem.out.print(\" User : \" + user);\r\n \tSystem.out.print(\" Event : \" + event);\r\n \t\r\n \tString recordId = result.getString(\"fraudScoreRecordId\");\r\n \t\r\n \tif (recordId != null)\r\n \t{\r\n \t\tStatement stat2 = conn.createStatement();\r\n \t\tResultSet s = stat2.executeQuery(\"SELECT * FROM fraud.afm_fraudscorerecord where recordId='\"+recordId+\"';\");\r\n \t\twhile (s.next())\r\n \t\t{\r\n \t\t\tSystem.out.print(\" Query Type: \" + s.getString(\"queryType\"));\r\n \t\t\tSystem.out.print(\" Amount: \" + s.getDouble(\"transactionAmount\"));\r\n \t\t}\r\n \t}\r\n \t\r\n \t\r\n \tSystem.out.println();\r\n \t} \t\r\n }\r\n stat.close();\r\n\t}", "private void getSpendingData() {\n mort = 0;\n cred = 0;\n loan = 0;\n auto = 0;\n groc = 0;\n medi = 0;\n util = 0;\n ente = 0;\n othe = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n if (remindersTable.getValueAt(i, 0).toString().equals(\"true\")) {\n // do nothing...we want spending only\n } else {\n switch (remindersTable.getValueAt(i, 4).toString()) {\n case (\"mortgage\"):\n mort = mort + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"credit\"):\n cred = cred + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"loans\"):\n loan = loan + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"auto\"):\n auto = auto + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"utilities\"):\n util = util + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"grocery\"):\n groc = groc + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"medical\"):\n medi = medi + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"entertainment\"):\n ente = ente + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"other\"):\n othe = othe + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n default:\n // no match ... do nothing \n }\n }\n }\n }", "public List<TimeSpan> getRequestedTimes()\r\n {\r\n return myRequestedTimes;\r\n }", "private void loadTimingInformation()\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile loadFile = new File(\"asdasda.save\");\n\t\t\tif(loadFile.exists())\n\t\t\t{\n\t\t\t\tqueryList.clear();\n\t\t\t\tScanner textScanner = new Scanner(loadFile);\n\t\t\t\twhile(textScanner.hasNext())\n\t\t\t\t{\n\t\t\t\t\tString query = textScanner.nextLine();\n\t\t\t\t\tlong queryTime = Long.parseLong(textScanner.nextLine());\n\t\t\t\t\tqueryList.add(new QueryInfo(query, queryTime));\n\t\t\t\t}\n\t\t\t\ttextScanner.close();\n\t\t\t\tJOptionPane.showMessageDialog(getAppFrame(), queryList.size() + \" QueryInfo objects were loaded into the application\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(getAppFrame(), \"File not present. No QueryInfo objects loaded\");\n\t\t\t}\n\t\t}\n\t\tcatch(IOException currentError)\n\t\t{\n\t\t\tdataController.displayErrors(currentError);\n\t\t}\n\t}", "@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}", "@Override\n\t public synchronized String fnGetAvailableTimeSlot(String campusName, String date) \n\t\t\t throws RemoteException, UnknownHostException, IOException {\n\t\t System.out.println(campusName);\n\n\t\tbyte[] bReceiveData = new byte[10];\n\t\tbyte[] bSendData = date.getBytes();\n\t\tString strTotalCount = \"\";\n\t\t// Here we are using local system so \"localhost\"\n\t\tInetAddress ipHostAddress = InetAddress.getByName(\"localhost\");\n\t\tDatagramSocket dgSocket = new DatagramSocket();\n\t\tDatagramPacket dpSendPacket = null;\n\t\tString strReplyFromServerOne = \"\";\n\t\tString strReplyFromServerTwo = \"\";\n\n\t\tDatagramPacket dpReceivePacket = new DatagramPacket(bReceiveData, bReceiveData.length);\n\t\ttry {\n\t\t\tif (campusName.equalsIgnoreCase(\"DVL\")) {\n\t\t\t\tdpSendPacket = new DatagramPacket(bSendData, bSendData.length, ipHostAddress, 8000);\n\t\t\t\tdgSocket.send(dpSendPacket);\n\t\t\t\tdgSocket.receive(dpReceivePacket);\n\t\t\t\tstrReplyFromServerOne = new String(trim(dpReceivePacket.getData()), \"UTF-8\");\n\t\t\n\t\t\t\tdpSendPacket = new DatagramPacket(bSendData, bSendData.length, ipHostAddress, 9000);\n\t\t\t\tdgSocket.send(dpSendPacket);\n\t\t\t\tdgSocket.receive(dpReceivePacket);\n\t\t\t\tstrReplyFromServerTwo = new String(trim(dpReceivePacket.getData()), \"UTF-8\");\n\t\t\t\tstrTotalCount = \"DVL: \" + fnGetAvailableTimeSlotOfACampus(campusName,date) + \", \" + \"KKL: \" + strReplyFromServerOne + \", \"+ \"WST: \" + strReplyFromServerTwo;\n\t\t\t\n\t\t\t} else if (campusName.equalsIgnoreCase(\"KKL\")) {\n\t\t\t\tdpSendPacket = new DatagramPacket(bSendData, bSendData.length, ipHostAddress, 7011);\n\t\t\t\tdgSocket.send(dpSendPacket);\n\t\t\t\tdgSocket.receive(dpReceivePacket);\n\t\t\t\tstrReplyFromServerOne = new String(trim(dpReceivePacket.getData()), \"UTF-8\");\n\t\t\n\t\t\t\tdpSendPacket = new DatagramPacket(bSendData, bSendData.length, ipHostAddress, 9000);\n\t\t\t\tdgSocket.send(dpSendPacket);\n\t\t\t\tdgSocket.receive(dpReceivePacket);\n\t\t\t\tstrReplyFromServerTwo = new String(trim(dpReceivePacket.getData()), \"UTF-8\");\n\t\t\t\tstrTotalCount = \"KKL: \" + fnGetAvailableTimeSlotOfACampus(campusName,date) + \", \" + \"DVL: \" + strReplyFromServerOne + \", \"+ \"WST: \" + strReplyFromServerTwo;\n\n\t\t\t} else if (campusName.equalsIgnoreCase(\"WST\")) {\n\t\t\t\tdpSendPacket = new DatagramPacket(bSendData, bSendData.length, ipHostAddress, 7011);\n\t\t\t\tdgSocket.send(dpSendPacket);\n\t\t\t\tdgSocket.receive(dpReceivePacket);\n\t\t\t\tstrReplyFromServerOne = new String(trim(dpReceivePacket.getData()), \"UTF-8\");\n\t\t\t\n\t\t\t\tdpSendPacket = new DatagramPacket(bSendData, bSendData.length, ipHostAddress, 8000);\n\t\t\t\tdgSocket.send(dpSendPacket);\n\t\t\t\tdgSocket.receive(dpReceivePacket);\n\t\t\t\tstrReplyFromServerTwo = new String(trim(dpReceivePacket.getData()), \"UTF-8\");\n\t\t\t\tstrTotalCount = \"WST: \" + fnGetAvailableTimeSlotOfACampus(campusName,date) + \", \" + \"DVL: \" + strReplyFromServerOne + \", \"+ \"KKL: \" + strReplyFromServerTwo;\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error\");\n\t\t}\n\t return strTotalCount; \n\t}", "private static void printData(List<Long> runningTimes) {\n\t\tlong min = Collections.min(runningTimes);\n\t\tlong max = Collections.max(runningTimes);\n\t\t\n\t\tlong total = 0;\n\t\tfor(long runTime : runningTimes)\n\t\t\ttotal+=runTime;\n\t\t\n\t\tSystem.out.println(\"******* SEQUENTIAL RESULTS *******\");\n\t\tSystem.out.println(\"MIN RUNNING TIME(ms): \"+min);\n\t\tSystem.out.println(\"MAX RUNNING TIME(ms): \"+max);\n\t\tSystem.out.println(\"AVG RUNNING TIME(ms): \"+(total/runningTimes.size()));\n\t\tSystem.out.println(\"***********************************\");\n\t\tSystem.out.println();\n\t}", "public List<String> getTime() {\r\n\t\treturn timeAvailable;\r\n\t}", "private void gettime(){\n\t\t String depart_time = view.shpmTable.getSelection()[0].getAttribute(\"DEPART_TIME\");\n\t\t String unload_time = view.panel.getValue(\"UNLOAD_TIME\").toString();\n\t\t if(!DateUtil.isAfter(unload_time, depart_time)){\n\t\t\t\tdoConfirm(view.panel.getValue(\"UNLOAD_TIME\").toString());\n\t\t\t}else {\n\t\t\t\tMSGUtil.sayWarning(\"到货签收时间不能小于实际发货时间!\");\n\t\t\t}\n\t\t /*Util.db_async.getSingleRecord(\"MAX(DEPART_TIME)\", \"V_SHIPMENT_HEADER\", \" WHERE LOAD_NO='\"+load_no+\"'\", null, new AsyncCallback<HashMap<String,String>>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onSuccess(HashMap<String, String> result) {\n\t\t\t\tString depart_time = result.get(\"MAX(DEPART_TIME)\");\n\t\t\t\tString unload_time = view.panel.getValue(\"UNLOAD_TIME\").toString();\n//\t\t\t\tboolean x =DateUtil.isAfter(unload_time, depart_time);\n\t\t\t\tif(!DateUtil.isAfter(unload_time, depart_time)){\n\t\t\t\t\tdoConfirm(view.panel.getValue(\"UNLOAD_TIME\").toString());\n\t\t\t\t}else {\n\t\t\t\t\tMSGUtil.sayWarning(\"到货签收时间不能小于实际发货时间!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t});*/\n\t}", "@GetMapping(\"/table/checkAvailability\")\n\tpublic WaitingTime getAvailability() throws ParseException\n\t{\n\n\t\t\tTableRestaurant availableTime = tableRepo.checkTableAvailability();\n\t\t\t\n\t\t\tlogger.info(\"waiting time ---> {}\", availableTime.getWaitingTime());\n\t\t\tif(availableTime.equals(null))\n\t\t\t{\n\t\t\t\tthrow new UniquoNotFoundException(\"The waiting time cannot be calculated\");\n\t\t\t}\n\t\t\tint tableNumber = availableTime.getId();\n\t\t\tlogger.info(\"{}\", tableNumber);\n\t\t\tint waiting_Time = availableTime.getWaitingTime();\n\t\t\tlogger.info(\"{}\", waiting_Time);\n\t\t\tWaitingTime waitingTime = new WaitingTime(tableNumber, waiting_Time);\n\t\t\t\n\t\t\treturn waitingTime;\n\t}", "private void process () {\r\n\r\n ArrayList<String> anomaly;\r\n ArrayList<DataInfo> tmp = new ArrayList<>();\r\n int appState, screenState, screenOrientation, closeToObject, opID;\r\n long permissionCount;\r\n double scanDuration;\r\n String packageName, permission, accessTime;\r\n\r\n // get the data in the given scope (from offset, limit rows)\r\n Cursor cursor = sqliteDBHelper.get_data(\"SELECT \" + SqliteDBStructure.PACKAGE_NAME + \", \"\r\n + SqliteDBStructure.PERMISSION + \", \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \", \"\r\n + SqliteDBStructure.APP_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_ORIENTATION + \", \"\r\n + SqliteDBStructure.CLOSE_TO_OBJECT\r\n + \" FROM \" + SqliteDBStructure.DATA_AGGREGATE\r\n + \" JOIN \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \" ON \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \" = \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \".\" + SqliteDBStructure.ACCESS_TIME\r\n + \" LIMIT \" + limit + \" OFFSET \" + offset);\r\n\r\n try {\r\n if (cursor != null) {\r\n cursor.moveToFirst();\r\n\r\n while (!cursor.isAfterLast()) {\r\n packageName = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.PACKAGE_NAME));\r\n opID = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.PERMISSION));\r\n permission = Permission.opIDToName(opID);\r\n accessTime = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.ACCESS_TIME));\r\n appState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.APP_STATE));\r\n screenState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_STATE));\r\n screenOrientation = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_ORIENTATION));\r\n closeToObject = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.CLOSE_TO_OBJECT));\r\n\r\n permissionCount = DatabaseUtils.longForQuery(sqliteDBHelper.getReadableDatabase(), \"SELECT COUNT(*) FROM \" + SqliteDBStructure.DATA_AGGREGATE + \" WHERE \" + SqliteDBStructure.PACKAGE_NAME + \" = '\" + packageName + \"' \" + \" AND \" + SqliteDBStructure.PERMISSION + \" = '\" + opID + \"';\", null);\r\n\r\n //Scan duration in Minutes\r\n scanDuration = (((double) stop_scan_time.getTime() + (double) start_scan_time.getTime()) / 1000 )/ 60;\r\n //check for anomaly by ruleset class\r\n anomaly = RuleSet.checkForAnomaly(packageName, permission, permissionCount, appState, screenState, screenOrientation, closeToObject, scanDuration, context);\r\n\r\n //Send data to server or save it locally, if no valid internet connection is available\r\n if (networking) {\r\n sendRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n MyClient.POST_Anomaly(packageName, permission, anomaly.get(1), \"0\");\r\n } else {\r\n saveRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n saveAnomaliesImage(packageName, permission, anomaly.get(1), 0);\r\n }\r\n\r\n // create a info object which holds all the necessary information about that data block and store it temporarily in a list\r\n DataInfo info = new DataInfo(packageName, Permission.opIDToDescription(opID), accessTime, permissionCount, anomaly.get(0), anomaly.get(1), scanTime, 0);\r\n tmp.add(info);\r\n\r\n // should the size of the temporary list exceeds MaxBatchSize, write list to the local DB and clear the temp list afterwards \r\n // technically this cannot happen but we are working with threads here so better be safe than sorry\r\n // temp list should not be to big, because we have have to hold task amount of temp list, with each containing around MaxBatchSize entries, in memory at the same time\r\n if (tmp.size() > MaxBatchSize) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n\r\n cursor.moveToNext();\r\n }\r\n\r\n }\r\n } finally {\r\n if (cursor != null) {\r\n cursor.close();\r\n }\r\n }\r\n\r\n // write the data stored in the temp list to the local DB \r\n if (tmp.size() > 0) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n // inform the progress dialog that a task has been finished\r\n updateProgressDialog();\r\n // decrease the amount of ongoing tasks by 1\r\n decreaseTasks();\r\n }", "private void checking() {\n try {\n ResultSet rs;\n Statement st;\n Connection con = db.getDBCon();\n st = con.createStatement();\n String sql = \"select * from trainset_reservation where train_no='\" + Integer.parseInt(no.getText()) + \"'\";\n rs = st.executeQuery(sql);\n boolean b = false;\n String dat0 = null;\n String dat1 = null;\n\n while (rs.next()) {\n dat0 = rs.getString(\"start_date\");\n dat1 = rs.getString(\"end_date\");\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"E MMM dd HH:mm:ss z yyyy\");\n Date f_dbdate = sdf.parse(dat0);\n Date s_dbdate = sdf.parse(dat1);\n Date f_date = s_date.getDate();\n Date s_date = e_date.getDate();\n if (f_date.getTime() < f_dbdate.getTime() && s_date.getTime() < f_dbdate.getTime()) {\n ava.setText(\"AVAILABLE\");\n }\n if (f_date.getTime() < f_dbdate.getTime() && s_date.getTime() > s_dbdate.getTime()) {\n ava.setText(\"NOT AVAILABLE\");\n break;\n }\n if (f_date.getTime() > f_dbdate.getTime() && s_date.getTime() < s_dbdate.getTime()) {\n ava.setText(\"NOT AVAILABLE\");\n break;\n }\n if (f_date.getTime() > f_dbdate.getTime() && f_date.getTime() < s_dbdate.getTime() && s_date.getTime() > s_dbdate.getTime()) {\n ava.setText(\"NOT AVAILABLE\");\n break;\n }\n if (f_date.getTime() < f_dbdate.getTime() && s_date.getTime() > f_dbdate.getTime() && s_date.getTime() < s_dbdate.getTime()) {\n ava.setText(\"NOT AVAILABLE\");\n break;\n }\n\n if (f_date.getTime() > s_dbdate.getTime() && s_date.getTime() > s_dbdate.getTime()) {\n ava.setText(\"AVAILABLE\");\n }\n\n long diffIn = Math.abs(s_date.getTime() - f_date.getTime());\n long diff = TimeUnit.DAYS.convert(diffIn, TimeUnit.MILLISECONDS);\n // t2.setText(String.valueOf(diff));\n b = true;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void getFlowData() {\n\t\tdbService.getCacheLastUpdated(Tables.STATIONS, new ListCallback<GenericRow>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\tString currentMap = localStorage.getItem(\"KEY_CURRENT_MAP\");\n\t\t\t\tboolean shouldUpdate = true;\n\n\t\t\t\tif (!result.isEmpty()) {\n\t\t\t\t\tdouble now = System.currentTimeMillis();\n\t\t\t\t\tdouble lastUpdated = result.get(0).getDouble(CachesColumns.CACHE_LAST_UPDATED);\n\t\t\t\t\tshouldUpdate = (Math.abs(now - lastUpdated) > (3 * 60000)); // Refresh every 3 minutes.\n\t\t\t\t}\n\n\t\t\t view.showProgressIndicator();\n\t\t\t \n\t\t\t if (!currentMap.equalsIgnoreCase(\"seattle\")) {\n\t\t\t \tshouldUpdate = true;\n\t\t\t\t\tlocalStorage.setItem(\"KEY_CURRENT_MAP\", \"seattle\");\n\t\t\t }\n\t\t\t \n\t\t\t if (shouldUpdate) {\n\t\t\t \ttry {\n\t\t\t \t String url = Consts.HOST_URL + \"/api/flowdata/MinuteDataNW\";\n\t\t\t \t JsonpRequestBuilder jsonp = new JsonpRequestBuilder();\n\t\t\t \t jsonp.setTimeout(30000); // 30 seconds\n\t\t\t \t jsonp.requestObject(url, new AsyncCallback<FlowDataFeed>() {\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t \t\t\t\tview.hideProgressIndicator();\n\t\t\t \t\t\t\tGWT.log(\"Failure calling traffic flow api.\");\n\t\t\t \t\t\t}\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onSuccess(FlowDataFeed result) {\n\t\t\t \t\t\t\tstationItems.clear();\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\tif (result.getFlowData() != null) {\n\t\t\t \t\t\t\t\tint numStations = result.getFlowData().getStations().length();\n\t\t\t \t\t\t\t\tString timestamp = result.getFlowData().getTimestamp();\n\t\t\t \t\t\t\t\ttimestamp = timestamp.replaceAll(\"PST|PDT\", \"\");\n\t\t\t \t\t\t\t\tDate date = parseDateFormat.parse(timestamp);\n\t\t\t \t\t\t\t\tString lastUpdated = displayDateFormat.format(date);\n\t\t\t \t\t\t\t\tlocalStorage.setItem(\"KEY_LAST_UPDATED\", lastUpdated);\n\t\t\t \t\t\t\t\tStationItem item;\n\t\t\t \t\t\t\t\t\n\t\t\t \t\t\t\t\tfor (int i = 0; i < numStations; i++) {\n\t\t\t \t\t\t\t\t\tString stationId = result.getFlowData().getStations().get(i).getId();\n\t\t\t \t\t\t\t\t\tString status = result.getFlowData().getStations().get(i).getStat();\n\t\t\t \t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\tif (stationItemsMap.containsKey(stationId) && status.equalsIgnoreCase(\"good\")) {\n\t\t\t\t \t\t\t\t\t\titem = new StationItem();\n\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t \t\t\t\t\t\titem.setId(stationId);\n\t\t\t \t\t\t\t\t\t\titem.setVolume(result.getFlowData().getStations().get(i).getVol());\n\t\t\t \t\t\t\t\t\t\titem.setSpeed(result.getFlowData().getStations().get(i).getSpd());\n\t\t\t \t\t\t\t\t\t\titem.setOccupancy(result.getFlowData().getStations().get(i).getOcc());\n\t\t\t \t\t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\t\tstationItems.add(item);\n\t\t\t \t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t}\n\t\t\t \t\t\t\t}\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\t// Purge existing stations covered by incoming data\n\t\t\t \t\t\t\tdbService.deleteStations(new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t// Bulk insert all the new stations and data.\n\t\t\t\t\t\t\t\t\t\tdbService.insertStations(stationItems, new RowIdListCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\tview.hideProgressIndicator();\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<Integer> rowIds) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Update the cache table with the time we did the update\n\t\t\t\t\t\t\t\t\t\t\t\tList<CacheItem> cacheItems = new ArrayList<CacheItem>();\n\t\t\t\t\t\t\t\t\t\t\t\tcacheItems.add(new CacheItem(Tables.STATIONS, System.currentTimeMillis()));\n\t\t\t\t\t\t\t\t\t\t\t\tdbService.updateCachesTable(cacheItems, new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Get all the stations and data just inserted.\n\t\t\t\t\t\t\t\t\t\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetStations(result);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t \t\t\t}\n\t\t\t \t\t});\n\n\t\t\t \t} catch (Exception e) {\n\t\t\t \t\t// TODO Do something with the exception\n\t\t\t \t}\n\t\t\t } else {\n\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\tgetStations(result);\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 }\n\t\t\t}\n\t\t});\n\t}", "private void twoDateOccupancyQuery(String startDate, String endDate){\n List<String> emptyRooms = findEmptyRoomsInRange(startDate, endDate);\n List<String> fullyOccupiedRooms = findOccupiedRoomsInRange(startDate, endDate, emptyRooms);\n List<String> partiallyOccupiedRooms = \n (generateListOfAllRoomIDS().removeAll(emptyRooms)).removeAll(fullyOccupiedRooms);\n\n occupancyColumns = new Vector<String>();\n occupancyData = new Vector<Vector<String>>();\n occupancyColumns.addElement(\"RoomId\");\n occupancyColumns.addElement(\"Occupancy Status\");\n\n for(String room: emptyRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Empty\");\n occupancyData.addElement(row);\n }\n for(String room: fullyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Fully Occupied\");\n occupancyData.addElement(row);\n }\n for(String room: partiallyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Partially Occupied\");\n occupancyData.addElement(row);\n }\n return;\n}", "private void updateTimeEntryData()\n throws RedmineException\n {\n if (System.currentTimeMillis() > (timeEntriesUpdateTimeStamp+Settings.cacheExpireTime*1000))\n {\n synchronized(timeEntries)\n {\n // get total number of time entries\n int timeEntryCount = getDataLength(\"/time_entries\",\"time_entry\");\n for (int i = timeEntries.size(); i < timeEntryCount; i++)\n {\n timeEntries.add(TIME_ENTRY_NULL);\n }\n\n // get date of first time entry (Note: always sorted descending and cannot be changed)\n timeEntryStartDate = new Date();\n getData(\"/time_entries\",\"time_entry\",timeEntryCount-1,1,new ParseElementHandler<TimeEntry>()\n {\n public void data(Element element)\n {\n timeEntryStartDate = getDateValue(element,\"spent_on\");\n//Dprintf.dprintf(\"timeEntryStartDate=%s\",timeEntryStartDate);\n }\n });\n\n timeEntriesUpdateTimeStamp = System.currentTimeMillis();\n }\n }\n }", "private static boolean availabilityQuery(String roomid, String date1, String date2)\n {\n String query = \"SELECT status\"\n + \" FROM (\"\n + \" SELECT DISTINCT ro.RoomId, 'occupied' AS status\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\" \n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\"\n + \" UNION\"\n + \" SELECT DISTINCT RoomId, 'empty' AS status\"\n + \" FROM myRooms\"\n + \" WHERE RoomId NOT IN (\"\n + \" SELECT DISTINCT re.Room\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\"\n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\"\n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\" \n + \" )) AS tb\"\n + \" WHERE RoomId = '\" + roomid + \"'\";\n\n PreparedStatement stmt = null;\n ResultSet rset = null;\n\n try\n {\n stmt = conn.prepareStatement(query);\n rset = stmt.executeQuery();\n rset.next();\n if(rset.getString(\"status\").equals(\"empty\"))\n return true;\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try {\n stmt.close();\n }\n catch (Exception ex) {\n ex.printStackTrace( ); \n } \t\n }\n \n return false;\n\n }", "public Map<String,Long> getOnJobTotalTimes(String accessKey, Set<String> entityIds, long startTime, long endTime) throws org.apache.thrift.TException;", "@Test\n public void testQuery() throws Exception {\n\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // There should be 4 rows\n MxAssert.assertEquals( \"Number of retrieved rows\", 4, iDataSet.getRowCount() );\n\n // assigned task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assign task with deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 102 ), \"ASSIGNEDTASK102\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // loose task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n iDataSet.next();\n testRow( new TaskKey( 4650, 500 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n }", "public void getSpecificData(Connection connection, StoreData data, int bool){\n\t\t//This code is used to prepare a statement to send to the database based on the start date\n\t\tPreparedStatement preStmt=null;\n\t\tString stmt = \"SELECT * FROM Event WHERE Start_Date = (?)\";\n\t\tString formatSDate = null;\n\t\tString formatEDate = null;\n\t\tStoreData extra = new StoreData();\n\t\t\n\t\t//This try catch block is used to format the date to be sent to the database\n\t\t//The command is then sent to get the correct events\n\t\ttry{\n\t\t\tpreStmt = (PreparedStatement) connection.prepareStatement(stmt);\n\t\t\tSimpleDateFormat displayDate = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\t\tSimpleDateFormat dbDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t//formats the date to match the database\n\t\t\ttry {\n\n\t\t\t\tformatSDate = dbDate.format(displayDate.parse(data.getDate()));\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t//System.out.println(formatSDate);\n\t\t\tpreStmt.setString(1, formatSDate);\n\t\t\tResultSet rs = preStmt.executeQuery();\n\t\t\t//re-adds the correct events back to the storedata object to be used later\n\t\t\tfor(int i = 0; i < data.getMultiDay().size();i++){\n\t\t\t\tdata.addName(data.getMultiDay().get(i).getName());\n\t\t\t}\n\t\t\t//loops through the result set returned by the database call\n\t\t\twhile(rs.next()){\n\t\t\t\tString description = rs.getString(\"Description\");\n\t\t\t\tString location = rs.getString(\"Location\");\n\t\t\t\tString name = rs.getString(\"Name\");\n\t\t\t\tString endDate = rs.getString(\"End_Date\");\n\t\t\t\tString sTime = rs.getString(\"Start_Time\");\n\t\t\t\tString eTime = rs.getString(\"End_Time\");\n\t\t\t\t//This try catch is used to format the date correctly\n\t\t\t\ttry {\n\t\t\t\t\tformatEDate = displayDate.format(dbDate.parse(endDate));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//System.out.println(formatEDate);\n\t\t\t\tdata.setEndDate(formatEDate);\n\t\t\t\tdata.setName(name);\n\t\t\t\t\n\t\t\t\tdata.addName(name);\n\t\t\t\tdata.setDescription(description);\n\t\t\t\tdata.setLocation(location);\n\t\t\t\tdata.setSTime(sTime);\n\t\t\t\tdata.setETime(eTime);\n\n\t\t\t\textra.setEndDate(formatEDate);\n\t\t\t\textra.setName(name);\n\t\t\t\textra.setDescription(description);\n\t\t\t\textra.setLocation(location);\n\t\t\t\textra.setSTime(sTime);\n\t\t\t\textra.setETime(eTime);\n\t\t\t\t//adds the event to the multi-day arraylist to be used later\n\t\t\t\tif(!data.getDate().equals(data.getEndDate())){\n\t\t\t\t\tdata.addEvent(extra);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void queryDataFromDatabase() {\n AppDatabase database = Room.databaseBuilder(this, AppDatabase.class, DB_NAME).allowMainThreadQueries().build();\n runningdao = database.getRunningdataDAO();\n List<Runningdata> runningdata_list = runningdao.getAllRuningdata();\n for (int i = 0; i < runningdata_list.size(); i++) {\n int oldId = runningdata_list.get(i).getId();\n String oldStarttime = runningdata_list.get(i).getStarttime();\n double oldDistance = runningdata_list.get(i).getDistance();\n double oldCalorie = runningdata_list.get(i).getCalorie();\n System.out.println(\"Database shows here: \"+\"i:\"+i+\"oldId:\"+oldId +\"oldStarttime\"+oldStarttime+\"oldDistance\"+oldDistance+\"oldCalorie\"+oldCalorie);\n }\n // delete data from database by ID\n //runningdao.deleteById(10);\n }", "private void summarizeTimeslot ()\n {\n if (null == brokers) {\n // first time through\n brokers = new ArrayList<>();\n stats = new HashMap<>();\n\n data.print(\"Broker Name,\");\n data.print(\"Power Type,\");\n data.print(\"Customers,\");\n data.print(\"Usage (kWh),\");\n data.println(\"Income Gained\");\n\n // set up the maps of brokers, and stats by power type\n for (Broker broker : brokerRepo.findRetailBrokers())\n {\n brokers.add(broker);\n stats.put(broker, new HashMap<>());\n for (PowerType type : powerTypes)\n {\n StatsTracked theseStats = new StatsTracked();\n HashMap<PowerType, StatsTracked> map = stats.get(broker);\n map.put(type, theseStats);\n stats.put(broker, map);\n }\n }\n\n // store customer statistics\n\n }\n\n if (ttx.size() > 0) {\n // there are some signups and withdraws here\n for (TariffTransaction tx : ttx) {\n Broker broker = tx.getBroker();\n PowerType type = tx.getTariffSpec().getPowerType();\n HashMap<PowerType, StatsTracked> brokerMap = stats.get(broker);\n StatsTracked theseStats = brokerMap.get(type);\n if (tx.getTxType() == TariffTransaction.Type.CONSUME ||\n tx.getTxType() == TariffTransaction.Type.PRODUCE) {\n theseStats.updateUsage(tx.getKWh());\n theseStats.updateProfit(tx.getCharge());\n }\n else if (tx.getTxType() == TariffTransaction.Type.SIGNUP)\n theseStats.updateCustomers(tx.getCustomerCount());\n\n // reupdate the tracking...\n brokerMap.put(type, theseStats);\n stats.put(broker, brokerMap);\n }\n }\n ttx.clear();\n }", "public void externalTestcase() {\n\t\ttry {\n\t\t\n\t\t\tString s;\n\t\t\tDBCursor cur=null;\n\t\t\tDBCollection col;\n\t\t\tcol=mdb.getCollection(Performance.col.toString());//\n\t\t\tSystem.out.println(\"Starting Benchmark\");\n\t\t\tif (Performance.geonear){\n\t\t\t\tfor (int i = 0; i < Performance.externaliterations; i++) {\n\t\t\t\t\ts = parseToRequest(Performance.requestM);\n\t\t\t\t\tBasicDBObject cmd = new BasicDBObject();\n\t\t\t\t\tcmd =(BasicDBObject)(JSON.parse(s));\n\t\t\t\t\tmdb.requestStart();\n\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\tCommandResult r = mdb.command(cmd); \n\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t\tmdb.requestDone();\n\t\t\t\t\tTimer=Timer+stop;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tPerformance.geonear=false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor (int i = 0; i < Performance.externaliterations; i++) {\n\t\t\t\t\ts = parseToRequest(Performance.requestM);\n\t\t\t\t\tmdb.requestStart();\n\t\t\t\t\tif (Performance.limit.length()>0){\n\t\t\t\t\t\tBasicDBObject bo=new BasicDBObject(Performance.geoField.toString(),JSON.parse(s));\n\t\t\t\t\t\tint lim = Integer.parseInt(Performance.limit.toString());\n\t\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\t\tcur= col.find(bo).limit(lim);\n\t\t\t\t\t\twhile(cur.hasNext()) {\n\t\t\t\t\t\t\tcur.next();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tBasicDBObject bo=new BasicDBObject(Performance.geoField.toString(),JSON.parse(s));\n\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\tcur= col.find(bo);\n\t\t\t\t\twhile(cur.hasNext()) {\n\t\t\t\t\t\tcur.next();\n\t\t\t\t\t\t}\n\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmdb.requestDone();\n\t\t\t\tTimer=Timer+stop;\n\t\t\t\n\t\t\t}\n\t\t\t\tcur.close();\n\t\t\t}\n\t\t\n\t\t\n\t\t\tSystem.out.println(\"Mongo Timer \"+Long.toString(Timer));\n\t\t\tdisconnect();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "private boolean CheckAvailableDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query = \"SELECT * FROM Available WHERE available_hid = '\"+hid+\"' AND \"+\n\t\t\t\t\t\t\t\"startDate = '\"+tp.stringStart+\"' AND endDate = '\"+tp.stringEnd+\"'\"; \n\t\t\t\n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\treturn true; \n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public void generateSchedule(){\r\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\"); // Date formatter used when getting SQL records\r\n Database db = new Database();\r\n Connection connection = null;\r\n String sql = \"\";\r\n String report = \"\";\r\n \r\n // Retrieve the inputted consultant's id\r\n User user = (User) combo_user.getValue();\r\n int userID = user.getId();\r\n try{\r\n connection = db.jdbc_connection.connect();\r\n Statement statement = connection.createStatement(); // Set up statement\r\n \r\n sql = \"SELECT appointment.appointmentID, customer.customerName, appointment.title, appointment.description, appointment.location, appointment.contact, \" +\r\n \"appointment.type, appointment.url, appointment.start, appointment.end FROM appointment \" +\r\n \"INNER JOIN customer ON appointment.customerID=customer.customerID \" +\r\n \"WHERE userID = \" + userID + \" GROUP BY appointment.start\"; \r\n ResultSet results = statement.executeQuery(sql); \r\n \r\n while(results.next()) { \r\n String customer = results.getString(\"customerName\");\r\n String title = results.getString(\"title\");\r\n String description = results.getString(\"description\");\r\n String location = results.getString(\"location\");\r\n String contact = results.getString(\"contact\");\r\n String type = results.getString(\"type\");\r\n String url = results.getString(\"url\");\r\n String start = results.getString(\"start\");\r\n String end = results.getString(\"end\");\r\n \r\n \r\n // Convert the start and end DATETIMES to the user's current timezone \r\n java.time.LocalDateTime start_converted = convertToCurrentZone(java.time.LocalDateTime.parse(start.replace(\".0\", \"\"), formatter));\r\n String month = start_converted.getMonth().toString();\r\n int day = start_converted.getDayOfMonth();\r\n int hour = start_converted.getHour();\r\n String minute = String.valueOf(start_converted.getMinute());\r\n \r\n if(minute.length() == 1) minute += \"0\"; // Add following zeroes\r\n \r\n report += month + \" \" + day + \" at \" + hour + \":\" + minute + \" - appointment with \" + customer + \"\\n\";\r\n } \r\n }catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }finally {\r\n try {\r\n connection.close();\r\n } catch (Exception e2) { // Closing databse error handling\r\n System.err.println(e2.getMessage());\r\n }\r\n } \r\n \r\n text_schedule.setText(report);\r\n }", "private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }", "@Override\n\tpublic List<MovieModel> getTimeMovieData() {\n\t\treturn sqlSessionTemplate.selectList(\"reserve.timeMovieData\");\n\t}", "@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}", "private void getWeekActiveTimeData(String accessToken) {\r\n String[] taskParams = new String[3];\r\n\r\n taskParams[0] = accessToken;\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n // Fairly active and very active minutes are added to get active minutes total\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/minutesFairlyActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n taskParams[2] = \"https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "public void testGetAllTimeEntries() throws Exception {\r\n assertEquals(\"The time_entry table should be empty.\", 0, instance.getAllTimeEntries().length);\r\n }", "Date getDataIns();", "private int syncEnergyData() throws IOException {\n\n // initialize some useful dates\n Calendar today = Calendar.getInstance();\n //today.add(Calendar.MINUTE, -15);\n Calendar year_ago = Calendar.getInstance();\n year_ago.add(Calendar.YEAR, -1);\n Calendar week_ago = Calendar.getInstance();\n week_ago.add(Calendar.MONTH, -1);\n Calendar day_ago = Calendar.getInstance();\n day_ago.add(Calendar.DATE, -1);\n\n\n String consumption_point = \"carleton_campus_en_use\";\n String production_point = \"carleton_wind_production\";\n\n //get the two live data points for first screen\n\n String quarter_hourly_consumption = readEnergyJSON(day_ago.getTime(), today.getTime(), \"quarterhour\", consumption_point);\n Log.i(\"quarter_hourly_consumption\", quarter_hourly_consumption);\n // update liveConsumption based on data from most recent complete 1/4 hour\n String[] consumption_list = quarter_hourly_consumption.split(\"[\\n|\\r]\");\n String recent_consumption_line = consumption_list[consumption_list.length - 2];\n liveConsumption = (Double.parseDouble(recent_consumption_line.substring(recent_consumption_line.indexOf(';') + 1, recent_consumption_line.length())));\n\n // quarter-hourly windmill1 production for past 24 hours\n String quarter_hourly_production1 = readEnergyJSON(day_ago.getTime(), today.getTime(), \"quarterhour\", production_point);\n // update liveProduction based on data from most recent complete 1/4 hour\n String[] production1_list = quarter_hourly_production1.split(\"[\\n|\\r]\");\n String recent_production1_line = production1_list[production1_list.length - 2];\n liveProduction1 = (Double.parseDouble(recent_production1_line.substring(recent_production1_line.indexOf(';') + 1, recent_production1_line.length())));\n\n // update values stored in sharedPref for next time app loads\n SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor ed = sharedPref.edit();\n ed.putFloat(\"liveConsumption\", (float)liveConsumption);\n ed.putFloat(\"liveProduction1\", (float)liveProduction1);\n ed.commit();\n\n\n // get all the graph data and save in files\n String[] time_units = {\"day\", \"hour\", \"quarterhour\"};\n Date[] start_dates = {year_ago.getTime(), week_ago.getTime(), day_ago.getTime()};\n String[] points = {consumption_point, production_point};\n String[] dependent_variables = {\"consumption\", \"production1\"};\n\n for (int i = 0; i < time_units.length; i++) {\n String increment = time_units[i];\n Date start = start_dates[i];\n\n for (int j = 0; j < points.length; j++) {\n String data = readEnergyJSON(start, today.getTime(), increment, points[j]);\n\n try {\n DataOutputStream out = new DataOutputStream(\n context.openFileOutput(increment + \"_\" + dependent_variables[j] +\n \"_data\", Context.MODE_PRIVATE));\n out.writeUTF(data);\n out.close();\n } catch (IOException e) {\n Log.i(\"syncEnergyData\", \"I/O Error\");\n }\n }\n }\n return 0;\n }", "void all_Data_retrieve_Days_Desc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Days_on_Market desc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t\t}", "private void evaluateData () {\n long rows = DatabaseUtils.longForQuery(sqliteDBHelper.openSqlDatabaseReadable(), \"SELECT COUNT(*) FROM \" + SqliteDBStructure.DATA_AGGREGATE\r\n + \" JOIN \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \" ON \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \" = \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \".\" + SqliteDBStructure.ACCESS_TIME, null);\r\n // calculate the amount of tasks (thread) depending on the MaxBatchSize\r\n tasks = rows >= MaxBatchSize? (int)(rows/MaxBatchSize + 1):1;\r\n // set the amount of finished tasks to 0\r\n finished = 0;\r\n // send the amount of task to the main activity so it can be displayed in the progress dialog\r\n sendTaskAmount(tasks + 1);\r\n // create a thread pool with tasks amount of threads\r\n final ExecutorService executorService = Executors.newFixedThreadPool(tasks);\r\n // create a list which holds all the tasks to be executed\r\n final List<ProcessingDataHandler> taskList = new LinkedList<>();\r\n // for each task create a batch of MaxBatchSize rows to evaluate\r\n for (int i = 0; i < tasks; i++) {\r\n // pass the offset (where to start) and the limit (how many rows)\r\n taskList.add(new ProcessingDataHandler(i*MaxBatchSize, MaxBatchSize));\r\n }\r\n // invoke all the task at once\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n try {\r\n executorService.invokeAll(taskList);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }).start();\r\n\r\n updateProgressDialog();\r\n }", "private TimeSpanList activeTimeAnswer()\r\n {\r\n return TimeSpanList.singleton(TimeSpan.get(myQueryTime));\r\n }", "public void run() {\n List<Map> queries = (List<Map>) server.get(\"queries\");\n Connection connection = null;\n if (queries != null && !queries.isEmpty()) {\n String dbServerDisplayName = (String) server.get(\"displayName\");\n try {\n long timeBeforeConnection = System.currentTimeMillis();\n connection = getConnection();\n long timeAfterConnection = System.currentTimeMillis();\n logger.debug(\"Time taken to get Connection: \" + (timeAfterConnection - timeBeforeConnection));\n\n logger.debug(\"Time taken to get Connection for \" + dbServerDisplayName + \" : \" + (timeAfterConnection - timeBeforeConnection));\n\n if (connection != null) {\n logger.debug(\" Connection successful for server: \" + dbServerDisplayName);\n for (Map query : queries)\n executeQuery(connection, query);\n } else {\n\n logger.debug(\"Null Connection returned for server: \" + dbServerDisplayName);\n }\n\n } catch (SQLException e) {\n logger.error(\"Error Opening connection\", e);\n status = false;\n } catch (ClassNotFoundException e) {\n logger.error(\"Class not found while opening connection\", e);\n status = false;\n } catch (Exception e) {\n logger.error(\"Error collecting metrics for \"+dbServerDisplayName, e);\n status = false;\n }\n finally {\n try {\n if (connection != null) {\n closeConnection(connection);\n }\n } catch (Exception e) {\n logger.error(\"Issue closing the connection\", e);\n }\n }\n }\n }", "public List<MeteringDataSec> findWithinTimeRange(final Instant startTime, final Instant untilTime) {\n\t\tInstant until = untilTime == null ? startTime.plus(5, ChronoUnit.MINUTES) : untilTime;\n\n\t\tList<MeteringDataSec> matches = meteringDataRepository.findWithinTimeRange(Timestamp.from(startTime), Timestamp.from(until));\n\t\tif (!matches.isEmpty()) {\n\t\t\tLOG.info(\"findWithinTimeRange found {} entries starting with: {}\", matches.size(), matches.get(0).getCreationTime());\n\t\t}\n\n\t\treturn matches;\n\t}", "public Collection<TimeRange> getAvailableTimes(List<TimeRange> unavailableTimes, long requestDuration) {\n int startTime = TimeRange.START_OF_DAY;\n Collections.sort(unavailableTimes, TimeRange.ORDER_BY_START);\n Collection<TimeRange> availableTimes = new ArrayList<>();\n \n for(TimeRange unavailableTime : unavailableTimes) {\n if(startTime < unavailableTime.start()) {\n TimeRange availableTime = TimeRange.fromStartEnd(startTime, unavailableTime.start(), false);\n if(availableTime.duration() >= requestDuration){\n availableTimes.add(availableTime);\n }\n }\n if(unavailableTime.end() > startTime){\n startTime = unavailableTime.end();\n }\n }\n\n if(startTime != TimeRange.END_OF_DAY+1){\n availableTimes.add(TimeRange.fromStartEnd(startTime, TimeRange.END_OF_DAY, true));\n }\n \n return availableTimes;\n }", "boolean hasQueryTimeNsec();", "public Collection<TimeRange> query(Collection<Event> events, MeetingRequest request) {\n if(request.getAttendees().isEmpty()){\n return Arrays.asList(TimeRange.WHOLE_DAY);\n }\n // nobody has time to meet for more than a day\n if(request.getDuration() > TimeRange.WHOLE_DAY.duration()){\n return Arrays.asList();\n }\n // if there're no already existing events, whole day is available, \n if(events.isEmpty()){\n return Arrays.asList(TimeRange.WHOLE_DAY);\n }\n\n Collection<String> listOfAttendees = request.getAttendees();\n List<TimeRange> unavailableTimes = getUnavailableTimesForAttendees(events, listOfAttendees);\n\n return getAvailableTimes(unavailableTimes, request.getDuration());\n }", "public void getDateEvents(Connection connection, StoreData data){\n\t\t//The following code is used to prepare a sql statement to get all the events\n\t\tdata.resetSingle();\n\t\tPreparedStatement preStmt=null;\n\t\tString stmt = \"SELECT * FROM Event\";\n\t\t//prepares the date given to this method to be used to get the correct events \n\t\tString passedDate = data.getDate();\n\t\tSimpleDateFormat displayDate = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\tSimpleDateFormat dbDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tSimpleDateFormat theDay = new SimpleDateFormat(\"dd\");\n\t\tSimpleDateFormat month = new SimpleDateFormat(\"MM\");\n\t\tSimpleDateFormat year = new SimpleDateFormat(\"yyyy\");\n\t\tString formatSDate = null;\n\t\tString formatEDate = null;\n\t\tString sMonth = null;\n\t\tString eMonth = null;\n\t\tString sDay = null;\n\t\tString eDay = null;\n\t\tString curDay = null;\n\t\tString curMonth = null;\n\t\tint startD = 0;\n\t\tint endD = 0;\n\t\tint curD = 0;\n\t\tint startM = 0;\n\t\tint curM = 0;\n\t\tint endM = 0;\n\t\t\n\t\t//This try catch block is used to get the events that are returned based on\n\t\t//the dates that the event has\n\t\ttry{\n\t\t\tpreStmt = (PreparedStatement) connection.prepareStatement(stmt);\n\t\t\tResultSet rs = preStmt.executeQuery();\n\t\t\tStoreData newDay;\n\t\t\t//loops through all of the events storing the ones that have the matching dates\n\t\t\twhile(rs.next()){\n\t\t\t\tnewDay = new StoreData();\n\t\t\t\tString name = rs.getString(\"Name\");\n\t\t\t\tString description = rs.getString(\"Description\");\n\t\t\t\tString location = rs.getString(\"Location\");\n\t\t\t\tString date = rs.getString(\"Start_Date\");\n\t\t\t\tString endDate = rs.getString(\"End_Date\");\n\t\t\t\t//This try catch formats the dates to be used to check to see if they are correct\n\t\t\t\ttry {\n\n\t\t\t\t\tformatSDate = displayDate.format(dbDate.parse(date));\n\t\t\t\t\tformatEDate = displayDate.format(dbDate.parse(endDate));\n\t\t\t\t\tsDay = theDay.format(dbDate.parse(date));\n\t\t\t\t\teDay = theDay.format(dbDate.parse(endDate));\n\t\t\t\t\tcurDay = theDay.format(displayDate.parse(passedDate));\n\t\t\t\t\tsMonth = month.format(dbDate.parse(date));\n\t\t\t\t\teMonth = month.format(dbDate.parse(endDate));\n\t\t\t\t\tcurMonth = month.format(displayDate.parse(passedDate));\n\t\t\t\t\tstartD = Integer.parseInt(sDay);\n\t\t\t\t\tendD = Integer.parseInt(eDay);\n\t\t\t\t\tcurD = Integer.parseInt(curDay);\n\t\t\t\t\tstartM = Integer.parseInt(sMonth);\n\t\t\t\t\tcurM = Integer.parseInt(curMonth);\n\t\t\t\t\tendM = Integer.parseInt(eMonth);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tString sTime = rs.getString(\"Start_Time\");\n\t\t\t\tString eTime = rs.getString(\"End_Time\");\n\t\t\t\tnewDay.setName(name);\n\t\t\t\tnewDay.setDescription(description);\n\t\t\t\tnewDay.setLocation(location);\n\t\t\t\tnewDay.setDate(date);\n\t\t\t\tnewDay.setEndDate(endDate);\n\t\t\t\tnewDay.setSTime(sTime);\n\t\t\t\tnewDay.setETime(eTime);\n\t\t\t\t//stores the events that match the date that was given\n\t\t\t\tif(curD >= startD && curD <= endD && curM == startM){\n\t\t\t\t\tdata.addDayEvent(newDay);\n\t\t\t\t}else if(startM < curM && curM == endM && curD <= endD){\n\t\t\t\t\tdata.addDayEvent(newDay);\n\t\t\t\t}else if(curD < startD || curD > endD){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Man you got problems now\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic List getTime() {\n\t\treturn timeInitDao.getTime();\n\t}", "public void caltotaltraveltime()\n {\n \t\n \t switch(this.mLegs.size())\n \t {\n \t case 0:\n \t {\n \t\t this.mTravelTime=0;\n \t\t break;\n \t }\n \t case 1:\n \t { \n \t\t this.mTravelTime=this.mLegs.get(0).flighttime();\n \t\t break;\n \t }\n \t case 2:\n \t {\n \t\t Date arrivalt = this.mLegs.get(1).arrivaldate();\n \t\t Date departt = this.mLegs.get(0).departuredate();\n \t\t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t\t this.mTravelTime=diff;\n \t\t break;\n \t }\n \t case 3:\n \t {\n \t Date arrivalt = this.mLegs.get(2).arrivaldate();\n \t Date departt = this.mLegs.get(0).departuredate();\n \t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t this.mTravelTime=diff;\n \t break;\n \t }\n \t }\n }", "@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}", "boolean hasQueryTimeSec();", "public void calculateTimeDifferences() {\n\n findExits();\n\n try {\n\n\n if (accumulate.size() > 0) {\n\n for (int i = 1; i < accumulate.size() - 1; i++) {\n if (accumulate.get(i).value > accumulate.get(i - 1).value\n && timeOfExists.size() > 0) {\n\n double timeOfEntry = accumulate.get(i).timeOfChange;\n double timeOfExit = timeOfExists.get(0);\n\n timeOfExists.remove(timeOfExit);\n timeOfChanges.add(timeOfExit - timeOfEntry);\n }\n\n }\n }\n } catch (IndexOutOfBoundsException exception) {\n LOG_HANDLER.logger.severe(\"calculateTimeDifferences \"\n + \"Method as thrown an OutOfBoundsException: \"\n + exception\n + \"Your timeOfChanges seems to be null\");\n }\n }", "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 }", "void getData(){\n loader.setVisibility(View.VISIBLE);\n //recyclerView.setVisibility(View.GONE);\n //show_more.setVisibility(View.GONE);\n myRef = database.getReference(\"/recordList/Home/reportList\");\n myRef.keepSynced(true);\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n loader.setVisibility(View.GONE);\n //recyclerView.setVisibility(View.VISIBLE);\n reportList.clear();\n for(DataSnapshot report: dataSnapshot.getChildren()){\n Report r = report.getValue(Report.class);\n if (r != null) {\n r.key = report.getKey();\n }\n reportList.add(r);\n }\n if(reportList.size()>10){\n show_more.setVisibility(View.VISIBLE);\n }\n Collections.sort(reportList,new TimeCompare());\n calculate(startDate,endDate);\n Log.d(\"Size \", String.valueOf(reportList.size()));\n// transferData();\n populate_data();\n }\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n loader.setVisibility(View.GONE);\n //recyclerView.setVisibility(View.VISIBLE);\n Toast.makeText(MainActivity.this,\"Something Went Wrong\",Toast.LENGTH_SHORT).show();\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n\n }", "public int[] findTime(String startDate, String endDate) {\n //read data from crime csv\n Path questionPath = Paths.get(\"CrimeLatLonXY1990.csv\");\n File questionFile = questionPath.toFile();\n FileReader reader;\n BufferedReader br;\n String startTime = null, endTime = null;\n int[] res = new int[2];\n String columns[] = null;\n try {\n reader = new FileReader(questionFile);\n br = new BufferedReader(reader);\n String str = null;\n try {\n while ((str = br.readLine()) != null) {\n columns = str.split(\"\\\\,\");\n try {\n // get data and time info from file\n String date = columns[5].trim();\n String time = columns[2].trim();\n // get corresponding time info according to date\n if (date.equals(startDate)) {\n startTime = time;\n }\n if (date.equals(endDate)) {\n endTime = time;\n }\n // if finished find, return found value\n if (startTime != null && endTime != null) {\n res[0] = Integer.parseInt(startTime);\n res[1] = Integer.parseInt(endTime);\n return res;\n }\n } catch (NumberFormatException e) {\n //skip the first line\n continue;\n }\n\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n\n }\n } catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public void setAvailableTime() {\n System.out.println(\"What is the free time for the playground\");\n System.out.println(\"From:\");\n Scanner input = new Scanner(System.in);\n int x = input.nextInt();\n System.out.print(\"To: \");\n int y = input.nextInt();\n for (int i = x; i <= y; ++i) {\n availableTime[i] = true;\n }\n }", "public void addData() {\n if (daySchedule == null) {\n return;\n }\n int numTimes = daySchedule.size();\n TableLayout tl = findViewById(R.id.table);\n int chosenTime = MainActivity.hour * 60 + MainActivity.minute;\n if(chosenTime == 0)\n {\n Calendar now = Calendar.getInstance();\n chosenTime = now.get(Calendar.HOUR_OF_DAY) * 60 + now.get(Calendar.MINUTE);;\n }\n for (int i = 0; i < numTimes; i++) {\n TableRow tr = new TableRow(this);\n tr.setLayoutParams(getLayoutParams());\n Time t = daySchedule.get(i);\n if (!haverford) {\n if (Time.toMinutes(t.leaveBrynMawr()) > chosenTime) {\n Log.d(\"brynmawrtime\", String.valueOf(Time.toMinutes(t.leaveBrynMawr())));\n tr.addView(getTextView(i + 1, t.leaveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n tr.addView(getTextView(i + numTimes, t.arriveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n }\n } else {\n if (Time.toMinutes(t.leaveHaverford()) > chosenTime) {\n tr.addView(getTextView(i + 1, t.leaveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n tr.addView(getTextView(i + numTimes, t.arriveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n }\n }\n tl.addView(tr, getTblLayoutParams());\n }\n }", "@Query(\n \"SELECT wayToWellbeing, SUM(num) AS value FROM ( \" +\n \"SELECT wellbeing_questions.way_to_wellbeing AS wayToWellbeing, SUM(wellbeing_questions.weighting) AS num FROM wellbeing_questions \" +\n \"INNER JOIN wellbeing_records ON wellbeing_records.question_id == wellbeing_questions.wellbeing_question_id \" +\n \"WHERE user_input == 1 AND wellbeing_records.time BETWEEN :startTime AND :endTime \" +\n \"GROUP BY wellbeing_questions.way_to_wellbeing \" +\n \"UNION ALL \" +\n \"SELECT activity_records.way_to_wellbeing AS wayToWellbeing, SUM(\" + ACTIVITY_OF_TYPE_VALUE + \") AS num FROM survey_activity \" +\n \"INNER JOIN activity_records ON survey_activity.activity_record_id == activity_records.id \" +\n \"INNER JOIN survey_response ON survey_activity.survey_response_id == survey_response.id \" +\n \"WHERE survey_response.timestamp BETWEEN :startTime AND :endTime \" +\n \"GROUP BY activity_records.way_to_wellbeing ) \" +\n \"GROUP BY wayToWellbeing\"\n )\n List<WellbeingGraphItem> getWaysToWellbeingBetweenTimesNotLive(long startTime, long endTime);", "int getQueryTimeNsec();", "public List<Timetable> getAllTimetable() throws Exception;", "float getTimeRecord();", "public ArrayList<Station> searchTrainTimes ( String stationName,int deparH, String befAft) {\r\n ArrayList<Station> result = new ArrayList<>();\r\n \r\n Station station;\r\n String s_name;\r\n int hh;\r\n int mm;\r\n \r\n AdditionalTestData();\r\n \r\n Iterator<Station> iterator = stationList.iterator();\r\n \r\n // record start time\r\n long sTime = System.currentTimeMillis();\r\n while (iterator.hasNext()) {\r\n \r\n station = iterator.next();\r\n s_name = station.getStationName();\r\n hh = station.getDepartureHour();\r\n mm = station.getDepartureMinute();\r\n \r\n System.out.println(\"Searching..........: \" + stationName + \"----\" + deparH);\r\n \r\n if( befAft.compareTo( \"After\" ) == 0) {\r\n if( s_name.compareTo( stationName ) == 0 && hh >= deparH )\r\n result.add(station);\r\n }\r\n \r\n if( befAft.compareTo( \"Before\" ) == 0) {\r\n if( s_name.compareTo( stationName ) == 0 && hh <= deparH)\r\n result.add(station);\r\n }\r\n }\r\n \r\n long eTime = System.currentTimeMillis();\r\n \r\n long timeNeeded = eTime - sTime;\r\n System.out.println(\"Time needed:\" + timeNeeded);\r\n \r\n return result; \r\n }", "public interface DataModel {\n\n /*\n Returns an ArrayList of all the Click Logs\n */\n// List<ClickLog> getClickData();\n\n /*\n Returns an ArrayList of all the Impression Logs\n */\n// List<ImpressionLog> getImpressionData();\n\n /*\n Returns an ArrayList of all the Server Logs\n */\n// List<ServerLog> getServerData();\n\n\n /**\n * Gets the name of the associated campaign\n * @return the name of the campaign\n */\n String getName();\n\n /**\n *\n * @return the total number of impressions in the campaign\n */\n int getImpressionsNumber() throws SQLException;\n\n /**\n * Gets all the impression data, grouped within a\n * specified interval\n * @param step the millisecond interval by which to group\n * @return A grouped map of Impression quantity and date\n */\n Map<Date, Integer> getFullImpressions(Step step) throws SQLException;\n\n //int getOverallImpressionsByInterval(Date startInterval, Date endInterval);\n\n /**\n * Get the total number of clicks in the campaign\n * @return Number of clicks\n */\n int getClicksNumber() throws SQLException;\n\n /**\n * get the number of clicks grouped by an interval\n * @param step the millisecond interval by which to group\n * @return A map of number of clicks within a date interval\n */\n Map<Date, Integer> getFullClicks(Step step) throws SQLException;\n\n //int getOverallClicksByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total number of uniques within the campaign\n * @return total uniques\n */\n int getUniquesNumber() throws SQLException;\n\n /**\n * The number of uniques grouped by a specified interval\n * @param step the millisecond interval by which to group\n * @return a map of uniques by date interval\n */\n Map<Date, Integer> getFullUniques(Step step) throws SQLException;\n\n// int getOverallUniquesByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total number of bounces across the campaign\n * @return total bounces\n */\n int getBouncesNumber() throws SQLException;\n\n// Map<Date, Integer> getBouncesByInterval(Date startInterval, Date endInterval);\n// Map<Date, Integer> getBouncesByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the number of bounces grouped by the a step interval\n * @param step the millisecond interval by which to group\n * @return a map of the number of bounces in each time interval\n */\n Map<Date, Integer> getFullBounces(Step step) throws SQLException;\n\n// int getOverallBouncesByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total number of conversions across the campaign\n * @return number of conversions\n */\n int getConversionsNumber() throws SQLException;\n\n// Map<Date, Integer> getConversionsByInterval(Date startInterval, Date endInterval);\n// Map<Date, Integer> getConversionsByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the number of conversions grouped by a step interval\n * @param step the millisecond interval by which to group\n * @return a mapping of conversion quantity and time interval\n */\n Map<Date, Integer> getFullConversions(Step step) throws SQLException;\n\n// int getOverallConversionsByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total cost of the campaign\n * @return campaign total cost\n */\n float getTotalCost() throws SQLException;\n\n// Map<Date, Float> getCostByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCostByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the cost of the campaign grouped by a time step\n * @param step the millisecond interval by which to group\n * @return cost of the campaign within each time step\n */\n Map<Date, Float> getFullCost(Step step) throws SQLException;\n\n /**\n * get the Click Through Rate of the campaign\n * @return click through rate\n */\n float getCTR() throws SQLException;\n\n// Map<Date, Float> getCTRByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCTRByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the Click Through Rate for the campaign grouped\n * by a specified step interval\n * @param step the millisecond interval by which to group\n * @return a mapping of the click through rate with its date interval\n */\n Map<Date, Float> getFullCTR(Step step) throws SQLException;\n\n// float getOverallCTRByInterval(Date startInterval, Date endInterval);\n\n /*\n The average amount of money spent on an advertising campaign.\n */\n\n /**\n * The Cost-Per-Acquisition of the whole campaign\n * @return cost-per-acquisition\n */\n float getCPA() throws SQLException;\n\n// Map<Date, Float> getCPAByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCPAByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the cost-per-acquisition grouped by a specified time step\n * @param step the millisecond interval by which to group\n * @return map of date interval with corresponding cost-per-acquisition\n */\n Map<Date, Float> getFullCPA(Step step) throws SQLException;\n\n\n /**\n * get the average cost-per-click of the whole campaign\n * @return average cost-per-click\n */\n float getCPC() throws SQLException;\n\n /**\n * get the cost-per-click of time intervals within the campaign\n * @param step the millisecond interval by which to group\n * @return map of date interval with corresponding cost-per-click\n */\n Map<Date, Float> getFullCPC(Step step) throws SQLException;\n\n /**\n * get cost-per-thousand-impressions fot the whole campaign\n * @return cost-per-thousand-impressions\n */\n float getCPM() throws SQLException;\n\n// Map<Date, Float> getCPMByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCPMByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the cost-per-thousand-impressions for intervals within the campaign\n * @param step millisecond interval by which to group\n * @return map of cost-per-thousand-impressions with date interval\n */\n Map<Date, Float> getFullCPM(Step step) throws SQLException;\n\n// float getOverallCPMByInterval(Date startInterval, Date endInterval);\n\n /*\n The average number of bounces per click.\n */\n\n /**\n * returns the average number of bounces per click\n * @return average bounces per click\n */\n float getBounceRate() throws SQLException;\n\n// Map<Date, Float> getBounceRateByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getBounceRateByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * returns a mapping of bounces per click grouped by a specified\n * time interval\n * @param step millisecond time interval by which to group\n * @return map of bounce rates within associated time intervals\n */\n Map<Date, Float> getFullBounceRate(Step step) throws SQLException;\n\n// float getOverallBounceRateByInterval(Date startInterval, Date endInterval);\n\n// Map<Date, Set<String>> getUsersByInterval(Date startInterval, Date endInterval);\n// Map<Date, Set<String>> getUsersByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * return the names of users with registered activity grouped by\n * a specified time interval\n * @param step the millisecond interval by which to group\n * @return map of user sets within associated time intervals\n */\n Map<Date, Set<String>> getFullUsers(Step step) throws SQLException;\n\n LinkedHashMap<String, Integer> getHistogramData() throws SQLException;\n\n// Set<String> getOverallUsersRateByInterval(Date startInterval, Date endInterval);\n\n /**\n * gets the currently applied filter\n * @return currently applied filter\n */\n Filter getFilter();\n\n /**\n * sets the current filter for the campaign\n * @param f the filter that should be applied to the campaign\n */\n void setFilter(Filter f);\n}", "private void timeSearch(ServerAccess sa, List<String> sports) {\r\n Collections.shuffle(sports);\r\n \r\n final long starttime = 1399986000; //13-5-2014 15:00:00\r\n final long endtime = 1431522000; //13-5-2015 15:00:00\r\n final long hourdif = 3600;\r\n final long daydif = 86400;\r\n final long weekdif = 7*daydif;\r\n \r\n final List<String> sports1 = new ArrayList<>();\r\n for (int i = 0; i < (int) Math.floor(sports.size() / 2); i++) {\r\n sports1.add(sports.get(i));\r\n }\r\n \r\n //Collections.reverse(sports1);\r\n firstSearch.add(false);\r\n final Runnable r1 = () -> timeSearchSports(1, sports1, sa, getAuth());\r\n \r\n \r\n final List<String> sports2 = new ArrayList<>();\r\n for (int i = (int) Math.floor(sports.size() / 2); i < sports.size(); i++) {\r\n sports2.add(sports.get(i));\r\n }\r\n //Collections.reverse(sports2);\r\n firstSearch.add(false);\r\n final Runnable r2 = () -> timeSearchSports(2, sports2, sa, getAuth2());\r\n \r\n final Thread t1 = new Thread(r1);\r\n final Thread t2 = new Thread(r2);\r\n t1.start();\r\n t2.start();\r\n \r\n try {\r\n t1.join();\r\n } catch (InterruptedException ex) {\r\n }\r\n try {\r\n t2.join();\r\n } catch (InterruptedException ex) {\r\n }\r\n \r\n storeRest();\r\n DBStore.getInstance().setDone();\r\n }", "@Query(\n \"SELECT wayToWellbeing, SUM(num) AS value FROM ( \" +\n \"SELECT wellbeing_questions.way_to_wellbeing AS wayToWellbeing, SUM(wellbeing_questions.weighting) AS num FROM wellbeing_questions \" +\n \"INNER JOIN wellbeing_records ON wellbeing_records.question_id == wellbeing_questions.wellbeing_question_id \" +\n \"WHERE user_input == 1 AND wellbeing_records.time BETWEEN :startTime AND :endTime \" +\n \"GROUP BY wellbeing_questions.way_to_wellbeing \" +\n \"UNION ALL \" +\n \"SELECT activity_records.way_to_wellbeing AS wayToWellbeing, SUM(\"+ ACTIVITY_OF_TYPE_VALUE +\") AS num FROM survey_activity \" +\n \"INNER JOIN activity_records ON survey_activity.activity_record_id == activity_records.id \" +\n \"INNER JOIN survey_response ON survey_activity.survey_response_id == survey_response.id \" +\n \"WHERE survey_response.timestamp BETWEEN :startTime AND :endTime \" +\n \"GROUP BY activity_records.way_to_wellbeing )\" +\n \"GROUP BY wayToWellbeing\"\n )\n LiveData<List<WellbeingGraphItem>> getWaysToWellbeingBetweenTimes(long startTime, long endTime);", "public scala.Option<org.apache.spark.rdd.RDD<org.apache.spark.streaming.rdd.MapWithStateRDDRecord<K, S, E>>> compute (org.apache.spark.streaming.Time validTime) { throw new RuntimeException(); }", "private static void fillBriefServerTimes(ResultSet resultSet, List<ReserveTime> reserveTimes) {\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tReserveTime reserveTime = new ReserveTime();\n\t\t\t\treserveTime.setID(resultSet.getInt(1));\n\t\t\t\treserveTime.setDateID(resultSet.getInt(2));\n\t\t\t\treserveTime.setResCodeID(resultSet.getString(3));\n\t\t\t\treserveTime.setStartTime(resultSet.getObject(4, LocalTime.class));\n\t\t\t\treserveTimes.add(reserveTime);\n\t\t\t}\n\t\t}catch (SQLException e){\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "public SoftHashMap<Integer,TimeEntry> getTimeEntries(SpentOn spentOn)\n throws RedmineException\n {\n return getTimeEntries(ID_ANY,ID_ANY,ownUserId,spentOn);\n }", "public DBCursor exportData() {\n\t\tCalendar startDate = new GregorianCalendar(2012, 9-1, 01, 0, 0, 0);\n\t\tCalendar endDate = new GregorianCalendar(2012, 9-1, 30, 23, 59, 59);\n\n\t\t/*\t*/\n\t\tBasicDBObject query = new BasicDBObject(\"date\", new BasicDBObject(\n\t\t\t\t\"$gte\", startDate.getTime()).append(\"$lte\", endDate.getTime()));\n\t\t//query.append(\"componentName\", \"CONTROL/DV10/FrontEnd/Cryostat\");\n\t\t//query.append(\"monitorPointName\", \"GATE_VALVE_STATE\");\n\t\t//query.append(\"componentName\", \"CONTROL/DV16/LLC\");\n\t\t//query.append(\"monitorPointName\", \"POL_MON4\");\n\n\t\t// Used only when the query take more than 10 minutes.\n\t\t_collection.addOption(Bytes.QUERYOPTION_NOTIMEOUT);\n\n\t\t/*\t*/\n\n\t\t// Registros utilizados para probar la diferencia de la zona horaria \n\t\t// local con la del servidor de mongo\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50528be325d8b6dfbafd7ac2\"));\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50529496a310ecc5da59531c\"));\n\n\t\tcursor = _collection.find(query);\n\n\t\t//System.out.println(\"Collections: \"+_database.getCollectionNames());\n\t\t\n\t\t//System.out.println(\"Error: \"+_database.getLastError());\n\t\treturn cursor;\n\t}", "public static void getReminder()\n {\n System.out.println(\"Which reminder do you want to see?\");\n String eventNo = String.valueOf(CheckInput.checkIntRange(1, 25));\n \n try {\n stmt = conn.createStatement();\n String sql = \"SELECT REMINDERDATE,REMINDERTIME FROM REMINDER WHERE EVENTNUMBER = '\" + eventNo +\"'\";\n ResultSet rs = stmt.executeQuery(sql);\n\n System.out.printf(displayReminderFormat, \"Reminder Date\", \"Reminder Time\");\n while (rs.next()) {\n String remDate = rs.getString(\"reminderdate\");\n String remTime = rs.getString(\"remindertime\");\n\n System.out.printf(displayReminderFormat, dispNull(remDate), dispNull(remTime));\n System.out.println(\"\");\n System.out.println(\"\");\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static String listScheduleIdSymbol(int tambahanBolehABs) {\n DBResultSet dbrs = null;\n String result = \"\";\n try {\n Date dtStart = new Date();\n Date dtEnd = new Date();\n String dtManual = \"\";\n boolean crossDay = false;\n //dtStart.setHours(dtStart.getHours()-tambahanBolehABs);\n dtStart = new Date(dtStart.getYear(), dtStart.getMonth(), (dtStart.getDate()), (dtStart.getHours() - tambahanBolehABs), dtStart.getMinutes(), dtStart.getSeconds());\n dtEnd = new Date(dtEnd.getYear(), dtEnd.getMonth(), (dtEnd.getDate()), (dtEnd.getHours() + tambahanBolehABs), dtEnd.getMinutes(), dtEnd.getSeconds());\n int jamMelebihiOneDay = 23;\n if (dtStart.getHours() == 0 || dtStart.getHours() == 23) {\n dtManual = \"23:\" + \"59:\" + \"59\";\n crossDay = true;\n jamMelebihiOneDay = jamMelebihiOneDay + tambahanBolehABs;\n }\n if (dtEnd.getHours() == 0) {\n dtManual = \"23:\" + \"59:\" + \"59\";\n crossDay = true;\n jamMelebihiOneDay = jamMelebihiOneDay + tambahanBolehABs;\n }\n\n// String dtManual=\"\";\n// if(dt.getHours()==0 || dt.getHours()+tambahanBolehABs>=23){\n// int idtManual = 24+tambahanBolehABs;\n// dtManual = idtManual+\":59:00\" ;\n// }else{\n// dt.setHours(dt.getHours()+tambahanBolehABs);\n// }\n\n String sql = \"SELECT * FROM \" + PstScheduleSymbol.TBL_HR_SCHEDULE_SYMBOL\n + \" WHERE \\\"00:00:00\\\" <=\" + PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_TIME_OUT]\n + \" AND \" + PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_TIME_IN] + \"<= \\\"\"\n + \"23:59:00\"\n //+ (dtStart.getHours() == 0 || dtStart.getHours() == 23 || dtEnd.getHours() == 0 ? dtManual : Formater.formatDate(dtEnd, \"HH:mm:00\"))\n + \"\\\"\";\n //+ \" WHERE \" + \"(\"+PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_TIME_IN] +\" BETWEEN \\\"00:00:00\\\" AND \\\"\"+ (crossDay?dtManual:Formater.formatDate(dtStart, \"HH:mm:00\")) +\"\\\") OR (\"+PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_TIME_OUT] +\" BETWEEN \\\"00:00:00\\\" AND \\\"\"+Formater.formatDate(dtEnd, \"HH:mm:00\")+\"\\\")\";\n\n dbrs = DBHandler.execQueryResult(sql);\n ResultSet rs = dbrs.getResultSet();\n while (rs.next()) {\n dtEnd = new Date();\n dtEnd = new Date(dtEnd.getYear(), dtEnd.getMonth(), (dtEnd.getDate()), (dtEnd.getHours() + tambahanBolehABs), dtEnd.getMinutes(), dtEnd.getSeconds());\n \n Date schTimeIn = rs.getTime(PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_TIME_IN]);\n\n Date schTimeOut = rs.getTime(PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_TIME_OUT]);\n Date dtTmpSchTimeIn = new Date();\n Date dtTmpSchTimeOut = new Date();\n\n\n if (schTimeIn != null && schTimeOut != null) {\n schTimeOut = new Date(dtTmpSchTimeOut.getYear(), dtTmpSchTimeOut.getMonth(), dtTmpSchTimeOut.getDate(), schTimeOut.getHours(), schTimeOut.getMinutes());\n schTimeIn = new Date(dtTmpSchTimeIn.getYear(), dtTmpSchTimeIn.getMonth(), dtTmpSchTimeIn.getDate(), schTimeIn.getHours(), schTimeIn.getMinutes());\n\n Date dtCobaTimeOut = new Date(schTimeOut.getYear(), schTimeOut.getMonth(), (schTimeOut.getDate()), (schTimeOut.getHours() + tambahanBolehABs), schTimeOut.getMinutes(), schTimeOut.getSeconds());\n boolean melebihiHari=false;\n if (schTimeIn.getHours() == 0 || schTimeOut.getHours() == 0) {\n \n } else {\n if (dtCobaTimeOut.getDate() > schTimeIn.getDate()) {\n //dtEnd = new Date(dtEnd.getYear(), dtEnd.getMonth(), (dtEnd.getDate() + 1), (dtEnd.getHours()), dtEnd.getMinutes(), dtEnd.getSeconds());\n melebihiHari=true;\n }\n\n if ( (melebihiHari && dtEnd.getHours()<dtCobaTimeOut.getHours()) || schTimeIn.getTime() <= dtEnd.getTime() || (schTimeIn.getHours() > schTimeOut.getHours() && dtEnd.getTime() < schTimeOut.getTime())) {\n result = result + rs.getString(PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_SCHEDULE_ID]) + \",\";\n }\n }\n\n\n\n\n\n }\n\n }\n if (result != null && result.length() > 0) {\n result = result.substring(0, result.length() - 1);\n }\n rs.close();\n return result;\n\n } catch (Exception e) {\n System.out.println(e);\n } finally {\n DBResultSet.close(dbrs);\n }\n return result;\n }", "public void Times() \n {\n if(status.getStatus_NUM() == 1 || status.getStatus_NUM() == 2 || status.getStatus_NUM() == 3)\n { //Waiting Time\n startWaitingTime = System.nanoTime();\n if(status.getStatus_NUM() != 1 || status.getStatus_NUM() != 2 || status.getStatus_NUM() != 3)\n {\n endWaitingTime = System.nanoTime();\n }\n \n totalWaitingTime += endWaitingTime - startWaitingTime;\n }\n //When it is running status \n else if(status.getStatus_NUM() == 0)\n {\n //Running Time\n startRunningTime = System.nanoTime();\n //Add a process\n if(status.getStatus_NUM() != 0)\n {\n endRunningTime = System.nanoTime();\n }\n \n totalRunningTime += endRunningTime - startRunningTime;\n }\n //When it is terminated\n else\n {\n System.out.println(\"Terminated\");\n System.out.println(\"Total Running Time : \" + totalRunningTime);\n System.out.println(\"Total Waiting Time : \" + totalWaitingTime);\n }\n }", "public void addListDataToDB() {\n\n for (int i = 1; i < 10; i++) {\n TimerDisplay timer = new TimerDisplay();\n timer.setCurrentDate(\"Jan 0\" + i + \" 2017 00:00\");\n timer.setEndDate(\"Jan 0\" + (i + 2) + \" 2017 00:00\");\n timer.setPercentage();\n\n databaseHelper.addDate(timer);\n //listTimers.add(timer);\n }\n }", "public List<Measurement> findMeasurementsByTimeRange(Date fromDate, Date toDate) {\n return entityManager.createQuery(\"SELECT m from \" +\n \"Measurement m where m.date >= :fromDate and m.date <= :toDate\", Measurement.class)\n .setParameter(\"fromDate\", fromDate)\n .setParameter(\"toDate\", toDate)\n .getResultList();\n\n }", "public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }", "@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }", "private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }", "private void fetchData(int whenCode){\n NewConnection c = new NewConnection();\n int custID, custStatus, r = 0;\n String custName, custAddress, custReturnDate;\n DateConverter dc = new DateConverter();\n \n try {\n c.openConnection();\n c.ps = c.con.prepareStatement(\"SELECT * FROM custDetail\");\n c.rs = c.ps.executeQuery();\n while (c.rs.next()){\n custStatus = c.rs.getInt(\"custStatus\");\n if (custStatus == 0){\n custID = Integer.parseInt(c.rs.getString(\"custID\"));\n custName = c.rs.getString(\"custFName\");\n custName += \" \" + c.rs.getString(\"custLName\");\n custAddress = \"<html>\" + c.rs.getString(\"custHouseNo\") + \" \" + c.rs.getString(\"custStreet\") + \"<br>\";\n custAddress += c.rs.getString(\"custBarangay\") + \", \" + c.rs.getString(\"custCityOrTown\");\n if (c.rs.getString(\"custProvince\").isEmpty())\n custAddress += \"</html>\";\n else\n custAddress += \", \" + c.rs.getString(\"custProvince\");\n custReturnDate = c.rs.getString(\"custReturnDate\");\n\n switch (whenCode){\n case 1:\n if (dc.isThisWeek(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n case 2:\n if (dc.isNextWeek(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n\n case 3:\n if (dc.isUpcoming(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n default:\n System.out.println(\"*** An unexpected error occurred at PickUpDate -> fetchDate ***\");\n }\n }\n }\n } \n catch (SQLException ex) {\n Logger.getLogger(PickUpDate.class.getName()).log(Level.SEVERE, null, ex);\n }\n finally {\n c.closeConnection();\n }\n valuesHolder.setN(r);\n }", "public int getTotalTime();", "public void realTimeUpdate() {\n if ( millis() - lastTime >= 60000 ) {\n // *Load all_hour data\n eqData.init(hourURL);\n eqData.update(hour);\n println( \"all_hour data updated!\" );\n isHour = true;\n lastTime = millis();\n }\n}", "public static void queryUberAndStore(LocationAndTime locationAndTime,UberClientUtil uberClient){\n Map requestMap=new HashMap<>();\n requestMap.put(\"startLatitude\",locationAndTime.getStartLatitude());\n requestMap.put(\"startLongitude\",locationAndTime.getStartLongitude());\n requestMap.put(\"endLatitude\",locationAndTime.getEndLatitude());\n requestMap.put(\"endLongitude\",locationAndTime.getEndLongitude());\n List<Price> prices=uberClient.getPriceRequest(requestMap).getPrices();\n LocalDateTime localDateTime=Instant.ofEpochMilli(locationAndTime.getJourneyStartTime().getTime()).atZone( ZoneId.systemDefault()).toLocalDateTime();\n LocalDateTime now=LocalDateTime.now();\n LocalDateTime toDateTime=LocalDateTime.of( now.getYear(),now.getMonthValue(),now.getDayOfMonth() , localDateTime.getHour(), localDateTime.getMinute(), localDateTime.getSecond());\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n if(prices!=null){\n for(Price price:prices){\n price.setCurrentDate(formatter.format(toDateTime.atZone(ZoneId.systemDefault()).toInstant()));\n csvUtilUber.writeRecordToFile(price);\n }\n }\n\n\n\n\n }", "long getTotalDoExamTime();", "private void updateTimes(final String[] args) throws IOException {\r\n final BufferedReader[] bf = new BufferedReader[args.length];\r\n for(int j = 0; j < bf.length; j++)\r\n bf[j] = new BufferedReader(new FileReader(args[j]));\r\n \r\n final int numdb = 10;\r\n final double[] qut = new double[nqueries * numdb];\r\n String l;\r\n int i = 0;\r\n while((l = bf[0].readLine()) != null) {\r\n qut[i++] = Double.parseDouble(l.substring(0, l.indexOf(';')));\r\n }\r\n bf[0].close();\r\n \r\n for(int j = 1; j < bf.length; j++) {\r\n i = 0;\r\n while((l = bf[j].readLine()) != null) {\r\n qut[i] = Math.min(qut[i], Double.parseDouble(l));\r\n i++;\r\n }\r\n bf[j].close();\r\n }\r\n \r\n final double[] tmp = new double[nqueries];\r\n for(int j = 0; j < tmp.length; j++) {\r\n for(int z = 0; z < numdb; z++) {\r\n tmp[j] += qut[j + z * nqueries];\r\n }\r\n }\r\n \r\n final BufferedReader br =\r\n new BufferedReader(new FileReader(SUBMISSION));\r\n final PrintOutput o = new PrintOutput(SUBMISSIONU);\r\n i = 0;\r\n while((l = br.readLine()) != null) {\r\n if(l.contains(\"<topic topic-id=\")) {\r\n final int s = l.indexOf(\"total_time_ms=\\\"\") +\r\n \"total_time_ms=\\\"\".length();\r\n final int e = l.lastIndexOf('\"');\r\n final double ti = Double.parseDouble(l.substring(s, e));\r\n if(ti > tmp[i] || ti == 0) {\r\n o.print(l.substring(0, s) + tmp[i] + l.substring(e));\r\n } else {\r\n o.print(l);\r\n }\r\n i++;\r\n } else o.print(l);\r\n o.print(NL);\n }\r\n br.close();\r\n o.flush();\r\n o.close();\r\n Main.outln(\"Updated\");\r\n }", "public ArrayList<Object> DataBaseLogFoodsGetFoodsAndMeals (long initialDate, long finalDate) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n String mealsTime[] = {MealTime.BREAKFAST, MealTime.MORNING_SNACK, MealTime.LUNCH,\n MealTime.AFTERNOON_SNACK, MealTime.DINNER, MealTime.EVENING_SNACK};\n\n ArrayList<Object> foodsAndMealsList = new ArrayList<>();\n int foodsAndMealsListPosition = 0;\n int foodsAndMealsListStartPosition = 0;\n for (String mealTime : mealsTime) {\n String query = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \" + COLUMN_DATE + \" BETWEEN \" +\n +initialDate + \" AND \" + finalDate + \" AND \" + COLUMN_MEAL_TIME + \" LIKE \" +\n \"'\" + mealTime + \"'\" + \" ORDER BY \" + COLUMN_DATE + \" ASC\";\n\n Cursor cursor = db.rawQuery(query, null);\n cursor.moveToFirst();\n int counter = cursor.getCount();\n int calories = 0;\n int mealCalories = 0;\n boolean foodAdded = false;\n for (; counter > 0; ) {\n if (cursor.isAfterLast()) break;\n Foods food = new Foods();\n food.setId(cursor.getInt(cursor.getColumnIndex(COLUMN_ID)));\n food.setDate(cursor.getLong(cursor.getColumnIndex(COLUMN_DATE)));\n food.setName(cursor.getString(cursor.getColumnIndex(COLUMN_NAME)));\n food.setBrand(cursor.getString(cursor.getColumnIndex(COLUMN_BRAND)));\n food.setUnitsLogged(cursor.getFloat(cursor.getColumnIndex(COLUMN_UNITS_LOGGED)));\n\n // keep track of total calories on this MealTime\n calories = cursor.getInt(cursor.getColumnIndex(COLUMN_CALORIES_LOGGED));\n mealCalories += calories;\n food.setCaloriesLogged(calories);\n food.setUnits(cursor.getFloat(cursor.getColumnIndex(COLUMN_UNITS)));\n food.setUnitType(cursor.getString(cursor.getColumnIndex(COLUMN_UNIT_TYPE)));\n food.setCalories(cursor.getInt(cursor.getColumnIndex(COLUMN_CALORIES)));\n food.setMealTime(cursor.getString(cursor.getColumnIndex(COLUMN_MEAL_TIME)));\n food.setIsCustomCalories(cursor.getInt(cursor.getColumnIndex(COLUMN_IS_CUSTOM_CALORIES)) == 1);\n foodsAndMealsList.add(food);\n foodAdded = true;\n foodsAndMealsListPosition++;\n cursor.moveToNext();\n }\n\n if (foodAdded == true) {\n // add to begin of list the MealTime\n foodsAndMealsList.add(foodsAndMealsListStartPosition, new MealTime(mealTime, mealCalories));\n foodsAndMealsListPosition++;\n foodsAndMealsListStartPosition = foodsAndMealsListPosition;\n }\n cursor.close();\n }\n\n db.close(); // Closing database connection\n return foodsAndMealsList;\n }", "void ViewTable(){\n String subMo1 = null;\n String subTu1 = null;\n String subWe1 = null;\n String subTh1 = null;\n String subFr1 = null;\n String subSa1 = null;\n String subMo2 = null;\n String subTu2 = null;\n String subWe2 = null;\n String subTh2 = null;\n String subFr2 = null;\n String subSa2 = null;\n String type = null;\n \n String cl = cls.substring(0,1);\n if(cl.equals(\"A\")||cl.equals(\"S\")){\n txtSession1.setText(\"2:00 - 3:30\");\n txtSession2.setText(\"3:45 - 5:15\");\n }\n else if(cl.equals(\"M\")){\n txtSession1.setText(\"7:00 - 8:30\");\n txtSession2.setText(\"8:45 - 10:15\");\n }\n else if(cl.equals(\"E\")){\n txtSession1.setText(\"5:30 - 7:00\");\n txtSession2.setText(\"7:15 - 8:45\");\n }\n \n try {\n clsCon.setRs(clsCon.getStmt().executeQuery(\"select * from qTimetable where CourseID=\"+lblCourse.getText()+\" and SemesterID='\"+lblSemester.getText()+\"' and ClassID='\"+lblClass.getText()+\"' and Active = 1\"));\n // JOptionPane.showConfirmDialog(null, \"L\");\n if(clsCon.getRs().first()){ \n do{\n if(clsCon.getRs().getByte(\"RoomType\")==1){\n if(clsCon.getRs().getString(\"Day\").equals(\"Monday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subMo1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtMonday1.setText(subMo1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Tuesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subTu1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtTuesday1.setText(subTu1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Wednesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subWe1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtWednesday1.setText(subWe1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Thursday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subTh1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtThursday1.setText(subTh1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Friday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subFr1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtFriday1.setText(subFr1); \n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Saturday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subSa1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtSaturday1.setText(subSa1);\n }\n\n if(clsCon.getRs().getString(\"Day\").equals(\"Monday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subMo2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtMonday2.setText(subMo2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Tuesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subTu2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtTuesday2.setText(subTu2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Wednesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subWe2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtWednesday2.setText(subWe2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Thursday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subTh2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtThursday2.setText(subTh2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Friday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subFr2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtFriday2.setText(subFr2); \n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Saturday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subSa2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtSaturday2.setText(subSa2);\n } \n if(txtSaturday1.getText() == null||txtSaturday1.getText().equals(\"\")||txtSaturday2.getText() == null||txtSaturday2.getText().equals(\"\"))\n {\n txtSaturday1.setBackground(Color.red);\n txtSaturday2.setBackground(Color.red);\n }\n }\n if(clsCon.getRs().getByte(\"RoomType\")==2){\n type = \"Lab\";\n if(clsCon.getRs().getString(\"Day\").equals(\"Monday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subMo1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtMonday1.setText(subMo1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Tuesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subTu1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtTuesday1.setText(subTu1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Wednesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subWe1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtWednesday1.setText(subWe1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Thursday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subTh1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtThursday1.setText(subTh1);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Friday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subFr1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtFriday1.setText(subFr1); \n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Saturday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session1\")){ \n subSa1 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtSaturday1.setText(subSa1);\n }\n\n if(clsCon.getRs().getString(\"Day\").equals(\"Monday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subMo2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtMonday2.setText(subMo2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Tuesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subTu2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtTuesday2.setText(subTu2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Wednesday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subWe2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtWednesday2.setText(subWe2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Thursday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subTh2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtThursday2.setText(subTh2);\n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Friday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subFr2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\");\n txtFriday2.setText(subFr2); \n }\n if(clsCon.getRs().getString(\"Day\").equals(\"Saturday\"))\n if(clsCon.getRs().getString(\"SessionName\").equals(\"Session2\")){ \n subSa2 = clsCon.getRs().getString(\"SubjectName\") + \"\\n\\r\" + clsCon.getRs().getString(\"Name\") + \"\\n\\r\" + type + \" \" + clsCon.getRs().getString(\"Building\") + clsCon.getRs().getString(\"RoomNumber\"); \n txtSaturday2.setText(subSa2);\n } \n if(txtSaturday1.getText() == null||txtSaturday1.getText().equals(\"\")||txtSaturday2.getText() == null||txtSaturday2.getText().equals(\"\"))\n {\n txtSaturday1.setBackground(Color.red);\n txtSaturday2.setBackground(Color.red);\n }\n }\n }while(clsCon.getRs().next()); \n \n }\n } catch (SQLException e) {\n }\n }", "private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}", "long getRetrievedTime();", "public void setTime() {\r\n\t\tArrayList<String> slots = new ArrayList<String>();\r\n\t\tString inSched = getWorkHours();\r\n\t\tswitch(inSched) {\r\n\t\tcase \"6AM-3PM\":\r\n\t\t\tArrayList<String> sched1 = new ArrayList<String>(Arrays.asList(\"06AM\",\"07AM\",\"08AM\",\"09AM\",\"10AM\",\"12PM\",\"1PM\",\"2PM\"));\r\n\t\t\tslots = sched1;\r\n\t\t\tbreak;\r\n\t\tcase \"7AM-4PM\":\r\n\t\t\tArrayList<String> sched2 = new ArrayList<String>(Arrays.asList(\"07AM\",\"08AM\",\"09AM\",\"10AM\",\"11AM\",\"1PM\",\"2PM\",\"3PM\"));\r\n\t\t\tslots = sched2;\r\n\t\t\tbreak;\r\n\t\tcase \"8AM-5PM\":\r\n\t\t\tArrayList<String> sched3 = new ArrayList<String>(Arrays.asList(\"08AM\",\"09AM\",\"10AM\",\"11AM\",\"12PM\",\"2PM\",\"3PM\",\"4PM\"));\r\n\t\t\tslots = sched3;\r\n\t\t\tbreak;\r\n\t\tcase \"9AM-6PM\":\r\n\t\t\tArrayList<String> sched4 = new ArrayList<String>(Arrays.asList(\"09AM\",\"10AM\",\"11AM\",\"12PM\",\"1PM\",\"3PM\",\"4PM\",\"5PM\"));\r\n\t\t\tslots = sched4;\r\n\t\t\tbreak;\r\n\t\tcase \"10AM-7PM\":\r\n\t\t\tArrayList<String> sched5 = new ArrayList<String>(Arrays.asList(\"10AM\",\"11AM\",\"12PM\",\"1PM\",\"2PM\",\"4PM\",\"5PM\",\"6PM\"));\r\n\t\t\tslots = sched5;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tslots.add(\"No appointments available for this date.\");\r\n\t\t}\r\n\t\tthis.timeAvailable = slots;\r\n\t}", "public void fillUserStats(){\n\t\t \t\t\t \t\n\t\t \tif (curResults.getCount()==0){ // sets to 0 if there are no results\n\t\t \t\ttxtTime.setText(\"0\");\n\t\t \t\ttxtDate.setText(\"0\");\n\n\t\t \t}\n\t\t \telse{ //sets them to the users last result if there are results\n\t\t \t\tcurResults.moveToLast();\n\t\t \t\ttxtTime.setText(curResults.getString(3));\n\t\t \t\ttxtDate.setText(curResults.getString(2));\n\t\t \t}\n\t\t }", "public static List<String> findTime(String crn, String date, int priority) throws SQLException\n\t{\n\t\tString semester = test.getLatestSemester();\n\t\t//String[] parse = test.parseCourse(course);\n\t\tResultSet student_id;\n\t\t\n\t\tif(priority == 1)\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where Class_Desc = 'Senior' and CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\t\telse if(priority == 2)\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where Class_Desc = 'Junior' and CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\t\telse\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\n\t\tList<String> student = test.writeResultSet(student_id, \"Banner_id\");\n\t\tList<String> dist_time = new ArrayList<String>();\n\t\tfor(int x = 0; x < student.size(); x++)\n\t\t{\n\t\t\tResultSet class_t;\n\t\t\tif(date.charAt(0) == 'M')\n\t\t\t\tclass_t = test.readDatabase(\"select distinct Begin_Time from class_2016 where Banner_id = '\"+student.get(x)+\"' and Term_Code = '\"+semester+\"' and Monday_Ind1 = 'M' and Wednesday_Ind1 = 'W'and Friday_Ind1 = 'F' order by Begin_Time\");\n\t\t\telse\n\t\t\t\tclass_t = test.readDatabase(\"select distinct Begin_Time from class_2016 where Banner_id = '\"+student.get(x)+ \"' and Term_Code = '\"+semester+\"' and Tuesday_Ind1 = 'T' and Thursday_Ind1 = 'R' order by Begin_Time\");\n\t\t\tList<String> class_time = test.writeResultSet(class_t, \"Begin_Time\");\n\t\t\t//System.out.println(class_time);\n\t\t\tfor(int y = 0; y < class_time.size();y++)\n\t\t\t{\n\t\t\t\tif(dist_time.contains(class_time.get(y))==false)\n\t\t\t\t\tdist_time.add(class_time.get(y));\n\t\t\t}\n\n\t\t}\n\t\treturn dist_time;\n\t}", "public synchronized void updateTransdailyData() {\n Instant startTime = Instant.now();\n log.debug(\"start updateTransdailyData startTime:{}\", startTime.toEpochMilli());\n try {\n\n // query all group statistical info\n List<StatisticalGroupTransInfo> groupStatisticalList = groupService\n .queryLatestStatisticalTrans();\n\n // traverse group list\n traverseNetList(groupStatisticalList);\n\n } catch (Exception ex) {\n log.error(\"fail updateTransdailyData\", ex);\n }\n log.debug(\"end updateTransdailyData useTime:{}\",\n Duration.between(startTime, Instant.now()).toMillis());\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 }" ]
[ "0.6404318", "0.6113548", "0.597154", "0.5855078", "0.58462065", "0.57283896", "0.57074994", "0.5697564", "0.56827784", "0.56545657", "0.5649578", "0.5634623", "0.5628167", "0.5596652", "0.55912536", "0.5556516", "0.55443627", "0.55389655", "0.5515533", "0.55138755", "0.5503612", "0.547405", "0.5459366", "0.54549044", "0.5440834", "0.5431511", "0.5430254", "0.542375", "0.54206944", "0.541742", "0.5406942", "0.5398856", "0.53887135", "0.53865886", "0.5368354", "0.5368055", "0.5362641", "0.5353926", "0.5352896", "0.5336095", "0.53282046", "0.5321594", "0.53152215", "0.52860856", "0.5285893", "0.52855796", "0.5282291", "0.52785486", "0.52783895", "0.52783614", "0.527631", "0.5274782", "0.5267774", "0.5266819", "0.52637506", "0.52324927", "0.5230114", "0.5222762", "0.5218097", "0.52170944", "0.52164894", "0.5216401", "0.5214967", "0.5197426", "0.5190587", "0.51788527", "0.51766753", "0.5175744", "0.5173961", "0.517345", "0.51686466", "0.51663536", "0.51657104", "0.51652354", "0.51651704", "0.51624006", "0.51622385", "0.51606405", "0.5156059", "0.5154634", "0.5151558", "0.51470035", "0.5141762", "0.5138755", "0.5135194", "0.5133083", "0.513121", "0.5125139", "0.5110212", "0.5106322", "0.51061785", "0.5103473", "0.5101485", "0.5100021", "0.5099462", "0.509942", "0.50929755", "0.50920874", "0.50904447", "0.5087349" ]
0.53580827
37
Saves the Appointment in the Database
@Override protected Void doInBackground(Void... params) { ParseObject appointment = new ParseObject(Constants.APPIONT); appointment.put(Constants.PARENTID, currentUser.getUsername()); appointment.put(Constants.TEACHER_FIRSTNAME,tFirstname); appointment.put(Constants.TEACHER_LASTNAME, tLastname); appointment.put(Constants.PARENT_FIRSTNAME, currentUser.getString(Constants.FIRSTNAME)); appointment.put(Constants.PARENT_LASTNAME, currentUser.getString(Constants.LASTNAME)); Log.d("Debug", "name= " + currentUser.getString(Constants.FIRSTNAME)+currentUser.getString(Constants.LASTNAME)); appointment.put(Constants.TIME, confirmedTime.getTime()); appointment.put(Constants.SLOTID, confirmedTime.getSlot()); appointment.put(Constants.TEACHERID, teacherUsername); appointment.saveInBackground(); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveAppointment(Appointment appointment) {\n\t\tappointmentDao.saveAppointment(appointment);\n\t}", "public void saveAppointment(ActionEvent event) throws IOException {\n if(!validateInputFields()){\n return;\n }\n if(!validateTime()){\n return;\n }\n LocalDate date = startLDT.toLocalDate();\n int customer = customerCombo.getSelectionModel().getSelectedItem().getId();\n overlaps = getSameDateAppointments(customer, date);\n if(overlaps.size() > 0){\n boolean noOverlap = validateOverlap(overlaps);\n if (!noOverlap){\n showError(true, \"Selected time for customer overlaps with another appointment. Please select another time.\");\n return;\n }\n }\n // update db\n String titleField = titleText.getText();\n String descriptionField = descriptionText.getText();\n String loc = locationCombo.getSelectionModel().getSelectedItem().toString();\n int contact = contactCombo.getSelectionModel().getSelectedItem().getId();\n String ty = typeCombo.getSelectionModel().getSelectedItem().toString();\n int user = userCombo.getSelectionModel().getSelectedItem().getId();\n Timestamp start = convertZDT(startZDT);\n Timestamp end = convertZDT(endZDT);\n updateAppointment(selectedRow.getId(), titleField, descriptionField, loc, start, end, ty, user, contact, customer);\n backToMain(event);\n }", "@Override\n public void handleSaveAppointment() {\n if (wrapperDataMakeAppoint.isUpdateProfile()) {\n wrapperDataMakeAppoint.setAddNewCar(false);\n }\n String encode = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create().toJson(wrapperDataMakeAppoint);\n RESTManager.getInstance().makeAppointment(encode, new IRequestListener<PostAppointmentResponse>() {\n @Override\n public void onCompleted(PostAppointmentResponse data) {\n super.onCompleted(data);\n if (data != null && data.isSuccess()) {\n EventBusUtils.postEvent(data);\n getView().showSuccessMakeAppointment();\n if (wrapperDataMakeAppoint.isUpdateProfile()) {\n LocalDataManager.getInstance(getContext()).updateProfile(wrapperDataMakeAppoint.getCustomerName(), wrapperDataMakeAppoint.getCustomerEmail());\n }\n if (wrapperDataMakeAppoint.isAddNewCar()) {\n LocalDataManager.getInstance(getContext()).updateCar(wrapperDataMakeAppoint.getCarId(), wrapperDataMakeAppoint.getCarName(), wrapperDataMakeAppoint.getLicensePlates());\n }\n }\n }\n });\n }", "public Appointment addAppointment(Appointment appointment) {\n return appointmentRepository.save(appointment);\n }", "@Override\n\tpublic boolean addNewAppointment(Appointment appointment) {\n\t\t\t\tboolean status = false;\n\t\t\t\ttry {\n\t\t\t\t\tar.save(appointment);\n\t\t\t\t\tstatus = true;\n\t\t\t\t}catch(Exception e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\tstatus = false;\n\t\t\t\t}\n\t\t\t\treturn status;\n\t}", "private void SaveAppoint(View view)\n {\n String userIdStr = getSharedPreferences(\"prefs\",0).getString(\"Id_User\", \"\");\n if(userIdStr.equals(\"\"))\n {\n Intent i = new Intent(this, LoginActivity.class);\n startActivity(i);\n finish();\n return;\n }\n\n dbAdapter = new DbAdapter(this);\n\n //covert unix-datetime (in seconds) to string\n Date appointTime = new Date(dateTimeUnix * 1000L);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEE, d MMM yyyy hh:mm aaa\");\n AppointmentTime = sdf.format(appointTime);\n\n //bind model\n bModel = new Booking();\n userIdStr = getSharedPreferences(\"prefs\", 0).getString(\"Id_User\", \"1\");\n int userIdInt = Integer.parseInt(userIdStr);\n bModel.setId_User(userIdStr);\n bModel.setAppointmentTime(this.AppointmentTime);\n bModel.setClinic(txtV.getText().toString());\n bModel.setCreationTime(sdf.format( Calendar.getInstance().getTime() ));\n if(spinDrList.getSelectedItemPosition() == 0)\n {\n Snackbar.make(view, \"Select a doctor\", Snackbar.LENGTH_LONG).show();\n return;\n }\n bModel.setDoctor(VariablesGlobal.DrProfiles.get(spinDrList.getSelectedItemPosition() -1).name);\n bModel.setDRAVAILABLE(\"1\");\n bModel.setId_Doc((VariablesGlobal.DrProfiles.get(spinDrList.getSelectedItemPosition() - 1)).id_doc);\n\n //make json from model\n formData = gson.toJson(bModel);\n\n //chk if u r coming from List of appoints or from Map\n if (app == null) //i.e. Coming from Map, hence a non-existing booking, so create a new one\n {\n\n paramsApiUri[0] = VariablesGlobal.API_URI + \"/api/values/newAppointment\";\n paramsApiUri[1] = formData;\n paramsApiUri[2] = \"POST\";\n }\n else\n {\n int appointId = getSharedPreferences(\"prefs\", 0).getInt(\"Id_Appointment\", 0);\n paramsApiUri[0] = VariablesGlobal.API_URI + \"/api/values/UpdateAppoint/\" + appointId;\n paramsApiUri[1] = formData;\n paramsApiUri[2] = \"POST\";\n }\n\n //pass args to AsyncTask to read db\n dbAdapter.execute(paramsApiUri);\n if(Bookings_AllActivity.instance != null)\n {\n Bookings_AllActivity.instance.finish();\n }\n }", "public void setAppointment() throws SQLException {\n ResultSet rs;\n Statement st = dbConnection.dbConnect().createStatement();\n Timestamp date = new java.sql.Timestamp(new java.util.Date().getTime());\n \n String getCustomerId=\"SELECT customerId FROM customer WHERE customerName = '\" + selectedCustomer + \"';\";\n rs = st.executeQuery(getCustomerId);\n rs.next();\n selectedCustomerId = rs.getInt(1);\n \n long startTime = appointmentStart.getTime();\n Date startDate = new Date(startTime - TimeZone.getDefault().getOffset(startTime));\n appointmentStarts = new Timestamp(startDate.getTime());\n \n long endTime = appointmentEnd.getTime();\n Date endDate = new Date(endTime - TimeZone.getDefault().getOffset(endTime));\n appointmentEnds = new Timestamp(endDate.getTime());\n \n // Adding to customer table\n String query=\"INSERT INTO appointment(customerId, title, description, location, url, start, end, createDate, createdBy, lastUpdateBy) VALUES('\" \n + selectedCustomerId + \"', '\"\n + title.getText() + \"', '\"\n + description.getText() + \"', '\"\n + location.getText() + \"', '\"\n + urlText.getText() + \"', '\"\n + appointmentStarts + \"', '\"\n + appointmentEnds + \"', '\"\n + date + \"', '\"\n + LoginPageController.getUser() + \"', '\"\n + LoginPageController.getUser() + \"')\";\n st.executeUpdate(query);\n }", "@Override\r\n public void create(Appointment a) throws SQLException {\r\n\r\n String statement =\r\n \"INSERT INTO appointments (Appointment_ID, Title, Description, Location, Type, Start, End, Customer_ID, User_ID, Contact_ID) VALUES (\" +\r\n a.getAppointmentId() + \",'\" +\r\n a.getTitle() + \"','\" +\r\n a.getDescription() + \"','\" +\r\n a.getLocation() + \"','\" +\r\n a.getType() + \"','\" +\r\n DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\").format(a.getStartTime().withZoneSameInstant(ZoneId.of(\"Etc/UTC\"))) + \"','\" +\r\n DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\").format(a.getEndTime().withZoneSameInstant(ZoneId.of(\"Etc/UTC\"))) + \"',\" +\r\n a.getCustomer().getCustomerId() + \",\" +\r\n a.getUser().getId() + \",\" +\r\n a.getContact().getId() + \");\";\r\n\r\n //System.out.println(statement);\r\n conn.prepareStatement(statement).executeUpdate();\r\n }", "@PostMapping(\"/appointments\")\n @ResponseStatus(HttpStatus.CREATED)\n Appointment createAppointment(@Valid @RequestBody Appointment newApp) {\n\n Appointment appointment = modelMapper.map(newApp, Appointment.class);\n appointment = appointmentService.saveAppointment(appointment);\n\n return appointment;\n }", "public boolean updateAppointment(Appointment app);", "@Override\n\tpublic void insertAppointment(AppointmentDto appointment) {\n\t\ttry{\n\t\t\tjdbcTemplate.update(INSERT, (ps)->{\n\t\t\t\tps.setTime(1, appointment.getStartTime());\n\t\t\t\tps.setTime(2, appointment.getEndTime());\n\t\t\t\tps.setDate(3, appointment.getDate());\n\t\t\t\tps.setInt(4, appointment.getPhysicianId());\n\t\t\t\tps.setInt(5, appointment.getUserId());\n\t\t\t\tps.setInt(6, appointment.getProductId());\n\t\t\t\tps.setString(7, appointment.getConfirmationStatus());\n\t\t\t\tps.setString(8, appointment.getZip());\n\t\t\t\tps.setString(9, appointment.getCancellationReason());\n\t\t\t\tps.setString(10, appointment.getAdditionalNotes());\n\t\t\t});\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createAppointment(View v) {\n checkFields();\n\n // grab the info in the fields and turn it into usable stuff\n int mon = parseInt(month.getText().toString());\n int d = Integer.parseInt(day.getText().toString());\n int y = Integer.parseInt(year.getText().toString());\n int h = Integer.parseInt(hour.getText().toString());\n int min = Integer.parseInt(minute.getText().toString());\n String AorP = AMorPM.getText().toString();\n String p = place.getText().toString();\n\n\n // all of the fields have been checked now. Create a new appointment\n //Appointment apt = new Appointment(d, mon, y, h, min, AorP, p);\n Appointment apt = new Appointment();\n apt.setDay(d);\n apt.setMonth(mon);\n apt.setYear(y);\n apt.setHour(h);\n apt.setMinute(min);\n apt.setAmOrPm(AorP);\n apt.setPlace(p);\n apt.setConfirmed(false);\n apt.setTaken(false);\n\n // push it onto the database\n DatabaseReference aptsRef = ref.child(\"appointmentList\");\n aptsRef.push().setValue(apt);\n\n // send out a toast signalling that we've successfully created an appointment\n Toast.makeText(getApplicationContext(), \"Appointment successfully created\", Toast.LENGTH_SHORT).show();\n\n // now send the user back to the main activity -> with their membership number\n Intent intent = new Intent(this, MainActivity.class);\n intent.putExtra(MESSAGE, memberNumber);\n startActivity(intent);\n }", "public void insertAppointment(Appointment app, Account account) {\n String toDateStr = \"\";\n String toTimeStr = \"\";\n\n if (app.getToDate() != null) {\n toDateStr = app.getToDate().toString();\n }\n if (app.getToTime() != null) {\n toTimeStr = app.getToTime().toString();\n }\n\n // save mails to array with Semikolon separated\n String guests = \"\";\n // mails is null as long as no mails gonna get set\n if (app.getMails() != null) {\n //final string to store in db\n //TODO have to read for \"functional operations(Streams)\" in JAVA 8 API for this\n guests = app.getMails().stream().map((mail) -> mail + \";\").reduce(guests, String::concat);\n }\n String q\n = \"INSERT INTO '\" + account.getId() + \"' (\"\n + \"name, \"\n + \"description, \"\n + \"startdate, \"\n + \"starttime, \"\n + \"enddate, \"\n + \"endtime, \"\n + \"guests\"\n + \") VALUES (\"\n + \"'\" + app.getTitle()\n + \"','\" + app.getDescription()\n + \"','\" + app.getFromDate().toString() + \"','\"\n + app.getFromTime().toString() + \"','\"\n + toDateStr + \"','\"\n + toTimeStr + \"','\"\n + guests + \"'\"\n + \") \";\n insert(q);\n }", "public void save() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.save(this);\r\n\t}", "public void savePatientDetails(View view){\r\n\t\tsaveToSQLite();\r\n createCalendarEntry();\r\n\t\tToast.makeText(this, \"Saved. Reminder created.\", Toast.LENGTH_SHORT).show();\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString date = AppDateField.getText();\n\t\tString Time = AppTimeField.getText();\t\n\t\tString Name = AppPatNameField.getText();\n\t\tString Surname = AppPatSurnameField.getText();\n\t\tint Id = Integer.parseInt(AppPatIdField.getText());\n\t\tString Doctor = AppDocNameField.getText();\n\t\tString Service = (String) SelectTask.getSelectedItem();\n\t\t\n\t\tDBH db = new DBH();\n\t\t\n\t\tString sql = \"INSERT INTO `Narnia_Hospital`.`Appointments` (`Appointment_Date`, `Appointment_Time`, `AppPat_Name`, `AppPat_Surname`, `AppPatId`, `AppDoctor`, `AppService`) VALUES ('\"+date+\"','\"+Time+\"','\"+Name+\"','\"+Surname+\"','\"+Id+\"','\"+Doctor+\"','\"+Service+\"')\"; \n\t\t\n\t\t\n\t\tResultSet rs = null;\n\t\t\n\t\ttry{\n\t\t rs = db.executeCall(sql);\n \t\t\n\t\t while(rs.next()){\n\t\t\t \n\t\t\t Appointment A1 = new Appointment();\n\t\t\t \n\t\t\t A1.setAppDate (date);\n\t\t\t A1.setAppTime(Time);\n\t\t\t A1.setPatientName(Name);\n\t\t\t A1.setPatientSurname(Surname);\n\t\t\t A1.setPatId(Id);\n\t\t\t A1.setDoctorName(Doctor);\n\t\t\t A1.setServiceRequired(Service);\n\t\t\t \n\t\t\t \n\t\t\t \t\n\t\t\t\t }\n\t\t\t \n\t\t \n\t\t \n\t\t \n\t\t}catch (Exception ex){}\n\t\t\n\t\t//Offers the option to create a new one or leave this screen.\n\t\t\n\t\tJOptionPane.showMessageDialog(this, \"Appointment Registered!\");\n\t\t\n\t\t int n = JOptionPane.showConfirmDialog(this,\"Do you want to add another appointment?\", \"Message Selected\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t if (n == 0){ \n\t\t\t this.setVisible(false);\n\t\t\t new NewAppointment();\n\t\t\t\n\t\t} else if (n == 1){\n\t\t\t this.setVisible(false);\n\t\t\t new SecretaryScreen();\n\t\t}\n\t\t\n\t}", "private void saveEvent(){\n String event_name = eventName.getText().toString();\r\n String coach = coach_string;\r\n String time = class_time_string;\r\n int nfcID= 4;\r\n\r\n Map<String, Object> data = new HashMap<>();\r\n\r\n data.put(\"event_name\", event_name);\r\n data.put(\"coach\", coach);\r\n data.put(\"class_time\", time);\r\n data.put(\"nfcID\", nfcID);\r\n\r\n Database.writeClassDb(data, time ,date);\r\n startActivity(new Intent(addCalenderEvent.this, CalendarActivity.class));\r\n finish();\r\n }", "public void appointmentPost(String patientId, String owner, String notes, String date,\n String appointmentType, String endTime, String startTime){\n Callback<Enrollment> callback = new Callback<Enrollment>() {\n @Override\n public void success(Enrollment serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceEnrollmentServerEvent(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postAppointments(patientId, owner, notes, date, appointmentType,\n endTime, startTime, callback);\n }", "public int createAppointment(Appointment appointment) {\n\t\treturn 0;\r\n\t}", "public Appointment createAppointment (Appointment appointmentModel) {\n\t\tAppointmentEO appointmentEntity = mapToEntity(appointmentModel);\r\n\t\t\r\n\t\tAppointmentEO responseEntity = appointmentRepo.save(appointmentEntity);\r\n\t\t\r\n\t\tList<AppointmentPOEO> appointmentPOEntityList = new ArrayList<>(); \r\n\t\tfor (AppointmentPO appointmentPO : appointmentModel.getAppointmentPOs()) {\r\n\t\t\tAppointmentPOEO appointmentPOEntity = new AppointmentPOEO();\r\n\t\t\t\r\n\t\t\tappointmentPOEntity.setId(appointmentPO.getId());\r\n\t\t\tappointmentPOEntity.setPoNumber(appointmentPO.getPoNumber());\r\n\t\t\tappointmentPOEntity.setAppointment(responseEntity);\r\n\t\t\t\r\n\t\t\tappointmentPOEntityList.add(appointmentPOEntity);\r\n\t\t}\r\n\t\t\r\n\t\tIterable<AppointmentPOEO> iterable = () -> new Iterator<AppointmentPOEO>() {\r\n\t\t\tprivate int index = 0;\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic boolean hasNext() {\r\n\t\t\t\treturn appointmentPOEntityList.size() > index;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic AppointmentPOEO next() {\r\n\t\t\t\treturn appointmentPOEntityList.get(index++);\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tappointmentPORepo.saveAll(iterable);\r\n\t\treturn mapToModel(responseEntity);\r\n\t}", "private void save(){\n\n this.title = mAssessmentTitle.getText().toString();\n String assessmentDueDate = dueDate != null ? dueDate.toString():\"\";\n Intent intent = new Intent();\n if (update){\n assessment.setTitle(this.title);\n assessment.setDueDate(assessmentDueDate);\n assessment.setType(mAssessmentType);\n intent.putExtra(MOD_ASSESSMENT,assessment);\n } else {\n intent.putExtra(NEW_ASSESSMENT, new Assessment(course.getId(),this.title,mAssessmentType,assessmentDueDate));\n }\n setResult(RESULT_OK,intent);\n finish();\n }", "public Booking saveBooking(Booking booking);", "Patient save(Patient patient);", "public void updateAppoint(Appointment appointment) {\n\t\tappointmentDao.updateAppoin(appointment);\n\t}", "boolean saveSchedule(Schedule schedule);", "@Override\r\n public void update(Appointment a) throws SQLException {\r\n int id = a.getAppointmentId();\r\n String statement =\r\n \"UPDATE appointments SET \" +\r\n \"Title='\" + a.getTitle() +\r\n \"', Description ='\" + a.getDescription() +\r\n \"', Location ='\" + a.getLocation() +\r\n \"', Type='\" + a.getType() +\r\n \"', Start='\" + DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\").format(a.getStartTime().withZoneSameInstant(ZoneId.of(\"Etc/UTC\"))) +\r\n \"', End= '\" + DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\").format(a.getEndTime().withZoneSameInstant(ZoneId.of(\"Etc/UTC\"))) +\r\n \"', Customer_ID =\" + a.getCustomer().getCustomerId() +\r\n \", User_ID=\" + a.getUser().getId() +\r\n \", Contact_ID=\" + a.getContact().getId() +\r\n \" WHERE Appointment_ID =\" + id + \";\";\r\n System.out.println(statement);\r\n conn.prepareStatement(statement).executeUpdate();\r\n }", "public void save(MeetingTable nt) {\n\t\tgetSession().save(nt);\r\n\t\t\r\n\t}", "AttendanceDTO save(AttendanceDTO attendance);", "public void newApointment(Appointment ap){\n\n this.appointments.add(ap);\n }", "@PostMapping(\"/Scheduling/addAppointment\")\r\n\tpublic String addAppointment(Scheduling scheduling) {\r\n\t\tschedulingService.createAppointment(scheduling);\r\n\t\treturn \"redirect:/Scheduling\";\r\n\t}", "@PostMapping(\"/sys-appointments\")\n @Timed\n public ResponseEntity<SysAppointment> createSysAppointment(@RequestBody SysAppointment sysAppointment) throws URISyntaxException {\n log.debug(\"REST request to save SysAppointment : {}\", sysAppointment);\n if (sysAppointment.getId() != null) {\n throw new BadRequestAlertException(\"A new sysAppointment cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n SysAppointment result = sysAppointmentService.save(sysAppointment);\n return ResponseEntity.created(new URI(\"/api/sys-appointments/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, datePicker);\n \ttask.set(Task.Attributes.Hours, lengthText);\n \ttask.set(Task.Attributes.Progress, progressBar);\n \ttask.set(Task.Attributes.Priority, priorityBox);\n \t\n \t// Save it to the database either as a new task or over an old task\n \tif (editmode) { app.dbman.editTask(id, task); }\n \telse { app.dbman.insertTask(task); }\n \t\n \t// A task has been added or changed, rescedule\n \tapp.schedule();\n \t\n \tapp.toaster(\"NEW / EDITED TASK\");\n \t\n \t// Quit the activity\n \tfinish();\n }", "public Bookings saveBookingDetails(Bookings bookings) ;", "public void saveOrUpdate(AircraftProductParam app);", "public static void createAppointment(Appointment TemplateAppointment) {\n String sql = \"INSERT INTO appointments Values(NULL, ?, ?,?,?,?,?,Now(),'',Now(),'',?,?,?)\";\n // (Appointment_ID,Title,Description, Type, Phone, Division_ID) VALUES (5, '', 'test', '', 'test','')\" ;\n\n try {\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n ps.setString(1, TemplateAppointment.getTitle());\n ps.setString(2, TemplateAppointment.getDescription());\n ps.setString(3, TemplateAppointment.getLocation());\n ps.setString(4, TemplateAppointment.getType());\n LocalDateTime start = LocalDateTime.of(TemplateAppointment.getDate(), TemplateAppointment.getStartTime());\n start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n LocalDateTime end = LocalDateTime.of(TemplateAppointment.getDate(), TemplateAppointment.getEndTime());\n end = WashTimeZone(end, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n Timestamp Tstart = Timestamp.valueOf(start);\n Timestamp Tend = Timestamp.valueOf(end);\n ps.setTimestamp(5, Tstart);\n ps.setTimestamp(6, Tend);\n//timezone work needs to happen here\n\n ps.setInt(7, TemplateAppointment.getCustomerid());\n ps.setInt(8, TemplateAppointment.getUserid());\n ps.setInt(9, TemplateAppointment.getContactid());\n\n ps.execute();\n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "private void saveAT() \n {\n // get DatabaseConnector to interact with the SQLite database\n\t AnimalDatabase db = new AnimalDatabase(this);\n\t AnimalList al = new AnimalList (db);\n\t \n // insert the contact information into the database\n al.Update(id, amount, comments);\n\n }", "private void savePatientToDatabase(Patient patient){\n DatabaseAdapter cateDB = new DatabaseAdapter(AddPatientActivity.this);\n try {\n cateDB.openDatabaseForRead();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n patient.printPatient();\n cateDB.insertPatient(patient);\n\n cateDB.closeDatabase();\n }", "void save(Employee employee);", "public boolean updateAppintment(Appointment appointment) {\n\t\treturn false;\r\n\t}", "public void save();", "public void save();", "public void save();", "public void save();", "@Override\n public void onClick(View view) {\n Log.d(\"CALL_TEST\", \"SAVE!\");\n DbManager db = DbManager.getInstance(getApplicationContext());\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"NAME\", \"홍길동\");\n contentValues.put(\"PHONE\", \"1234\");\n\n db.insert(contentValues);\n }", "public boolean approveAppointment() {\n\t\tIHealthCareDAO dao = new HealthCareDAO();\r\n\t\treturn dao.approveAppointment();\r\n\t}", "@Override\n\tpublic Meeting save(Meeting meeting) {\n\t\tmeeting.setCreationTs(System.currentTimeMillis());\n\t\tmeeting = repo.save(meeting);\n\n\t\t// send e-mail notification\n\t\tsendEmail(meeting);\n\t\treturn meeting;\n\t}", "@Test\r\n\tvoid testAppointmentServiceClassAddAppointment() {\r\n\t\tAppointmentService appointmentService = new AppointmentService();\r\n\t\tAppointment appointment = new Appointment(\"23456\", new Date(), \"This is a description\");\r\n\t\tappointmentService.addAppointment(appointment);\r\n\t\tassertTrue(appointmentService.getAppointments().containsValue(appointment));\r\n\t}", "Notification createNewAppointmentNotification(Appointment appointment);", "private void onSaveButtonClicked() {\n final String date = dayValue + \".\" + monthValue + \".\" + yearValue;\n final String name = edtEventName.getText().toString();\n final String location = edtEventLocation.getText().toString();\n final String desc = edtEventDesc.getText().toString();\n final EventData eventData = new EventData(name,\n date, location, desc);\n\n // create a new thread to insert or update db\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // the condition when user click the one of the items in recyclerView (Update existing row)\n if (intent != null && intent.hasExtra(\"id\")) {\n eventData.setId(intent.getIntExtra(\"id\", 0));\n eventDatabase.eventDAO().updateEvent(eventData);\n }\n // the condition when user click plus button from MainActivity.java (Insert a new row)\n else {\n eventDatabase.eventDAO().insertNewEvent(eventData);\n\n }\n finish(); // destroy activity (when u press back key after clicking \"save btn\", this activity won't be called again)\n }\n });\n }", "@FXML\n public void modApptSubmitBtnClicked(ActionEvent event) throws IOException {\n // when triggered an information alert will inform the user that their changes have been saved and take them\n // back to All_Appointments_Scene.\n String appt_ID = String.valueOf(modApptID.getText());\n\n if(isValid()){\n if (apptTimeIsValid()) {\n DBAppointments.modifyAppt(Integer.parseInt(appt_ID)\n , modApptTitle.getText()\n , modApptDescript.getText()\n , modApptLocale.getText()\n , modApptType.getValue()\n , LocalDateTime.of(modApptDate.getValue(), modStartTime.getValue())\n , LocalDateTime.of(modApptDate.getValue(), modApptEndTime.getValue())\n , Appointments.getCurrentDateTime()\n , DBUsers.getUserName(modApptUserID.getValue())\n , DBCustomers.getCustomerID(modApptCustName.getValue())\n , modApptUserID.getValue()\n , DBContacts.getContactID(modApptContact.getValue()));\n Alert submit = new Alert(Alert.AlertType.INFORMATION);\n submit.initModality(Modality.NONE);\n submit.setTitle(\"Thank You!\");\n submit.setHeaderText(\"Your appointment has been saved.\");\n Optional<ButtonType> results = submit.showAndWait();\n if(results.get() == ButtonType.OK) {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"../resources/All_Appointments_Scene.fxml\"));\n Parent submitApptRoot = loader.load();\n\n Stage submitApptStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n Scene submitApptScene = new Scene(submitApptRoot);\n submitApptStage.setScene(submitApptScene);\n submitApptStage.show();\n }\n } else {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Conflicting Appointment Times\");\n error.setHeaderText(\"Please make sure your appointment times do not overlap with another existing appointment on the same day\");\n Optional<ButtonType> results = error.showAndWait();\n }\n } else {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Missing Information.\");\n error.setHeaderText(\"Please make sure you have filled out each text field.\");\n Optional<ButtonType> results = error.showAndWait();\n }\n }", "public void saveAction (){\n\t \tif(dayNum ==7){\n\t \t\tintPhaseCompletes = intPhaseCompletes +1;\n\t \t\tdb.execSQL(\"UPDATE Phases SET Completions= \"+ intPhaseCompletes + \" WHERE PhaseID = \" + \"'\" + phaseID + \"'\");\n\t \t}\n \tcontent = timerTextView.getText().toString();\n \tstrDate = functions.getDate();\n \tintCompletes = intCompletes +1;\n \tdb.execSQL(\"INSERT INTO results (ExerciseName,time,date) VALUES(\"+ \"'\" + dayName +\"'\" + \",\" \n \t\t\t+ \"'\" + content + \"'\" + \",\"+ \"'\" + strDate +\"'\"+ \")\");\n \tdb.execSQL(\"UPDATE Days SET LastDate= \"+ \"'\" + strDate + \"'\" + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.execSQL(\"UPDATE Days SET Completions= \"+ intCompletes + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.close();\n \tdialogShare();\n }", "@RequestMapping(value=\"/Scheduling/updateAppointment\", method= {RequestMethod.PUT, RequestMethod.GET})\r\n\tpublic String updateAppointment(Scheduling scheduling) {\r\n\t\tschedulingService.createAppointment(scheduling);\r\n\t\treturn \"redirect:/Scheduling\";\r\n\t}", "Hotel saveHotel(Hotel hotel);", "private void setAppointment(Appointment appointment) {\n appointment.setCustomerId(customerNameTxt.getSelectionModel().getSelectedItem().getId());\n appointment.setTitle(titleTxt.getText());\n appointment.setDescription(descriptionTxt.getText());\n appointment.setLocation(locationTxt.getText());\n appointment.setContact(contactTxt.getText());\n appointment.setType(typeTxt.getText());\n appointment.setUrl(urlTxt.getText());\n\n // format times\n // Date formatter for date picker and time combo boxes\n final DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n final DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern(\"hh:mm:ss\");\n LocalTime startTime = startTxt.getSelectionModel().getSelectedItem();\n LocalTime endTime = startTime.plusMinutes(endTxt.getSelectionModel().getSelectedItem());\n\n if (datePicker.getValue() != null && startTime != null && endTime != null) {\n appointment.setStart(Timestamp.valueOf(dateFormatter.format(datePicker.getValue()) + \" \" + timeFormatter.format(startTime)));\n appointment.setEnd(Timestamp.valueOf(dateFormatter.format(datePicker.getValue()) + \" \" + timeFormatter.format(endTime)));\n } else {\n Alert a = new Alert(Alert.AlertType.INFORMATION, \"You must select a date, start time, and end time.\");\n a.showAndWait();\n }\n }", "public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }", "void save(Exam exam);", "public void saveApplication(Application app) {\n\t\trepo.save(app);\r\n\t}", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void onSaveButtonClicked() {\n\n //check for getting address data from map at all\n if(mMapDestination == null){\n Toast.makeText(getApplicationContext(),\n R.string.error_mandatory, Toast.LENGTH_SHORT)\n .show();\n return;\n }\n\n // Parse numeric fields to their appropriate types\n String location = mMapDestination.getLocation();\n float radius = mMapDestination.getRadius();\n double latitude = mMapDestination.getLatitude();\n double longitude = mMapDestination.getLongitude();\n String ringtone =\n mAlarmRingtone == null ? getDefaultRingtone().toString() : mAlarmRingtone.toString();\n\n boolean vibrate = mDetailBinding.clockDetails.vibrate.isChecked();\n String message = mDetailBinding.clockDetails.message.getText().toString();\n\n /*\n Validation check\n */\n\n // Show error and abort save if one of the mandatory fields is empty\n if (radius <= 0 || location == null) {\n Toast.makeText(getApplicationContext(),\n R.string.error_mandatory,\n Toast.LENGTH_SHORT)\n .show();\n return;\n }\n\n // Check if coordinates are valid: -90 < latitude < 90 && -180 < longitude < 180\n if (latitude < -90 || latitude > 90) {\n Toast.makeText(getApplicationContext(),\n R.string.error_latitude,Toast.LENGTH_SHORT).show();\n return;\n }\n if (longitude < -180 || longitude > 180) {\n Toast.makeText(getApplicationContext(),\n R.string.error_longitude,Toast.LENGTH_SHORT).show();\n return;\n }\n\n // \"enabled\" field is not shown on this screen - keep current value (if exists)\n boolean enabled = (mViewModel == null) || (mViewModel.getAlarm() == null) ||\n Objects.requireNonNull(mViewModel.getAlarm().getValue()).isEnabled();\n\n // Save the added/updated alarm entity\n final AlarmEntry alarm;\n if (mAlarmId == Constants.DEFAULT_ALARM_ID) {\n alarm = new AlarmEntry(location, latitude, longitude, radius,\n enabled, vibrate, message, ringtone);\n } else {\n alarm = new AlarmEntry(mAlarmId, location, latitude, longitude, radius,\n enabled, vibrate, message, ringtone);\n }\n // Save the added/updated alarm entity\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n if (mAlarmId == Constants.DEFAULT_ALARM_ID) {\n mAlarmId = (int) mDb.alarmDao().insertAlarm(alarm);\n } else {\n mDb.alarmDao().updateAlarm(alarm);\n }\n FileUtils.saveMapImage(mAlarmId);\n finish();\n }\n });\n }", "public void putMeeting(Meeting meeting) throws Exception;", "public void appointmentUpdate(long appointmentID, String appointmentType, String owner,\n String patientId, String date, String startTime, String endTime,\n String notes){\n Callback<Appointment> callback = new Callback<Appointment>() {\n\n @Override\n public void success(Appointment serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceAppointmentServerEvent(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.updateAppointments(appointmentID, patientId, owner, notes, date,\n appointmentType, endTime, startTime, callback);\n }", "@Override\n\tpublic void saveBooking(BookingDetails bookingDetails) {\n\t\tbookingDao.saveBooking(bookingDetails);\n\t}", "@Override\n public void onClick(View view) {\n PSMApplication newApp = new PSMApplication();\n newApp.setFullName(txtName.getText().toString());\n newApp.setAddress(txtAddress.getText().toString());\n newApp.setEmail(txtEmail.getText().toString());\n newApp.setDocId(db.collection(\"PSMApplication\").document().getId());// get id of new entry\n // Record in the database\n DocumentReference docRef = db.collection(\"PSMApplication\").document(newApp.getDocId());\n Task insert = docRef.set(newApp);\n insert.addOnSuccessListener(o -> {\n Log.d(\"TAG\", \"New PSM application added!\");\n // Show thank you message\n txtThankYou.setVisibility(View.VISIBLE);\n btnBack.setVisibility(View.VISIBLE);\n btnApply.setEnabled(false);\n txtName.setEnabled(false);\n txtAddress.setEnabled(false);\n txtEmail.setEnabled(false);\n });\n insert.addOnFailureListener(o->{\n Log.e(\"TAG\", \"Failed to add new PSM application.\");\n Toast.makeText(ApplyPsmLicenseActivity.this, \"An error occurred\", Toast.LENGTH_SHORT).show();\n finish();\n });\n\n }", "@Override\n\tpublic void updateAppointment(Time startTime, Time endTime, Date date, String status, String additionalNotes,int appointmentId) {\n\t\ttry{\n\t\t\tjdbcTemplate.update(UPDATE_APPOINTMENT, (ps)->{\n\t\t\t\tps.setTime(1, startTime);\n\t\t\t\tps.setTime(2, endTime);\n\t\t\t\tps.setDate(3, date);\n\t\t\t\tps.setString(4, status);\n\t\t\t\tps.setString(5, additionalNotes);\n\t\t\t\tps.setInt(6, appointmentId);\n\t\t\t});\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void updateAppointments(Appointment PlaceholderAppointment) {\n String sql = \"UPDATE appointments SET Title =?, Description=?, Location=?, Type=?, start=?, end=?, Customer_ID=?, User_ID=?, Contact_ID=? WHERE Appointment_ID = ?\";\n\n try {\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n ps.setString(1, PlaceholderAppointment.getTitle());\n ps.setString(2, PlaceholderAppointment.getDescription());\n ps.setString(3, PlaceholderAppointment.getLocation());\n ps.setString(4, PlaceholderAppointment.getType());\n LocalDateTime start = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getStartTime());\n start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n LocalDateTime end = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getEndTime());\n end = WashTimeZone(end, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n Timestamp Tstart = Timestamp.valueOf(start);\n Timestamp Tend = Timestamp.valueOf(end);\n ps.setTimestamp(5, Tstart);\n ps.setTimestamp(6, Tend);\n//timezone work needs to happen here\n\n ps.setInt(7, PlaceholderAppointment.getCustomerid());\n ps.setInt(8, PlaceholderAppointment.getUserid());\n ps.setInt(9, PlaceholderAppointment.getContactid());\n ps.setInt(10, PlaceholderAppointment.getAppointment_ID());\n ps.execute();\n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n }", "public void createAppointment(Doctor doctor, Patient patient, Date date, String time)\n {\n AppointmentListSingleton appointments = AppointmentListSingleton.getInstance();\n appointments.addAppointment(doctor, patient, date, time);\n }", "public void save() {\n\t\tSystem.out.println(\"-----------from PersonDao.save()\");\n\t}", "public final void addAppointment(Appointment appointment) {\n appointments.add(appointment);\n }", "EmployeeDetail save(EmployeeDetail detail) throws DBException;", "public void setIdAppointment(int idAppointment) {\n\t\tthis.idAppointment = idAppointment;\n\t}", "void saveTrip(Trip parTrip);", "public void insertMeetingRecord(Meeting meeting) {\n SQLiteDatabase db = dbHelper.getDatabase();\n ContentValues cv = new ContentValues();\n\n // Note: derived from RaceDay.xml.\n cv.put(SchemaConstants.MEETING_DATE, meeting.getMeetingDate());\n cv.put(SchemaConstants.MEETING_ABANDONED, meeting.getAbandoned());\n cv.put(SchemaConstants.MEETING_VENUE, meeting.getVenueName());\n cv.put(SchemaConstants.MEETING_HI_RACE, meeting.getHiRaceNo());\n cv.put(SchemaConstants.MEETING_CODE, meeting.getMeetingCode());\n cv.put(SchemaConstants.MEETING_ID, meeting.getMeetingId());\n cv.put(SchemaConstants.MEETING_TRACK_DESC, meeting.getTrackDescription());\n cv.put(SchemaConstants.MEETING_TRACK_RATING, meeting.getTrackRating());\n cv.put(SchemaConstants.MEETING_WEATHER_DESC, meeting.getTrackWeather());\n\n try {\n db.beginTransaction();\n db.insertOrThrow(SchemaConstants.MEETINGS_TABLE, null, cv);\n db.setTransactionSuccessful();\n } catch (SQLException ex) {\n Log.d(context.getClass().getCanonicalName(), ex.getMessage());\n } finally {\n db.endTransaction();\n }\n }", "@RequestMapping(path = \"/{appointmentId}\", method = RequestMethod.PUT, produces = \"application/json\", consumes = \"application/json\")\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic Appointment update(@PathVariable Long appointmentId, @RequestBody Appointment appointment) {\n\t\treturn appointmentService.update(appointmentId, appointment);\n\t}", "private void executeBookingTransaction(BankClient clientLoggedIn) throws ParseException {\n\t\t\n\t\tAppointment object = new Appointment(new SimpleDateFormat(\"dd/MM/yyyy\").parse(dateOfAppointment), employee, clientLoggedIn, false);\n\t\t\n\t\tSystem.out.println(\"Employee has been sent a notification. They will get back to you to confirm if appointment can be scheduled\");\n\t\t\n\t\t//employee.appointments.add(object);\n\t\ttry {\n\t\t\temployee.notify(object);\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\tSystem.out.print(\"\");\n\t\t}\n\t\t\n\t\t\n\t}", "void save(DeliveryOrderForm deliveryOrderForm);", "void save(Athletes athletes);", "@Override\r\n public void delete(Appointment a) throws SQLException {\r\n int id = a.getAppointmentId();\r\n String statement = \"DELETE FROM appointments WHERE Appointment_ID =\" + id + \";\";\r\n System.out.println(statement);\r\n conn.prepareStatement(statement).executeUpdate();\r\n }", "public void delete(Appointment appointment) {\n\t\tappointmentDao.delete(appointment);\n\t}", "private void saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}", "void AddMeeting (Meeting m) throws Exception;", "@Test\r\n\tvoid testAppointmentServiceClassUpdateAppointment() {\r\n\t\tAppointmentService appointmentService = new AppointmentService();\r\n\t\tAppointment temp = new Appointment(\"12345\", new Date(), \"This is a description\");\t\t\r\n\t\tappointmentService.addAppointment(temp);\r\n\t\tassertTrue(appointmentService.getAppointments().containsValue(temp));\r\n\t\tassertTrue(temp.getDescription().equals(\"This is a description\"));\r\n\t\tappointmentService.updateAppointment(\"12345\", new Date(), \"This is a NEW description\");\r\n\t\tassertTrue(appointmentService.getAppointments().containsValue(temp));\r\n\t\tassertFalse(temp.getDescription().equals(\"This is a description\"));\r\n\t}", "@Override\n\tpublic void save(Employee employee) {\n\t\temployeeDao.save(employee);\n\t\t\n\t}", "public Appointment() {\n ID = null;\n name = \"\";\n place = \"\";\n doctorID = null;\n date = new GregorianCalendar();\n date.setTime(new Date());\n\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH);\n int day = date.get(Calendar.DAY_OF_YEAR);\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n int second = date.get(Calendar.SECOND);\n int ms = date.get(Calendar.MILLISECOND);\n int id = (year + month + day + hour + minute + second + ms);\n this.setID(id);\n }", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "private void confirmAppointment(Appointment appointment) throws SQLException {\n\t\ttry {\n\t\t\tappCtr.confirmAppointment(appointment, appointment.getAppServices());\n\t\t} catch (DataAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void save(PtJJdwcy entity);", "public boolean save();", "@Override\n\tpublic void takeAppointment() {\n\t\tsearchByMobile();\n\t\tif (count == 0) {\n\t\t\tnew ManagerServiceImplementation().addPatient();\n\t\t}\n\t\tnew DoctorServiceImplementation().showDoctorDetails();\n\t\tSystem.out.println(\"Enter doctor's ID:\");\n\t\tString dID = UtilityClinic.readString();\n\t\tfor (int i = 0; i < UtilityClinic.docJson.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) UtilityClinic.docJson.get(i);\n\t\t\tif (obj.get(\"Doctor's ID\").toString().equals(dID)) {\n\t\t\t\tif (UtilityClinic.docWisePatCounter.isEmpty()) {\n\t\t\t\t\tfor (int j = 0; j < UtilityClinic.docJson.size(); j++) {\n\t\t\t\t\t\tUtilityClinic.docWisePatCounter.add(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (UtilityClinic.docWisePatCounter.get(i) < 5) {\n\t\t\t\t\tnew Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tUtilityClinic.docWisePatCounter.add(i, UtilityClinic.docWisePatCounter.get(i) + 1);\n\n\t\t\t\t\tif (UtilityClinic.appFile == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tutil.accessExistingAppJson();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t\tutil.createAppJson();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tutil.readFromAppJson(util.appFile);\n\t\t\t\t\tJSONObject appObject = new JSONObject();\n\t\t\t\t\tAppointment app = new Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tappObject.put(\"Patient's name\", app.getPatientName());\n\t\t\t\t\tappObject.put(\"Patient's ID\", app.getPatientId());\n\t\t\t\t\tappObject.put(\"Doctor's name\", app.getDoctorName());\n\t\t\t\t\tappObject.put(\"Doctor's ID\", app.getDoctorId());\n\t\t\t\t\tappObject.put(\"Time stamp\", app.getTime());\n\t\t\t\t\tUtilityClinic.appJson.add(appObject);\n\t\t\t\t\tutil.writetoJson(UtilityClinic.appJson, util.getAppFileName());\n\t\t\t\t\tutil.readFromAppJson(util.getAppFileName());\n\t\t\t\t\tSystem.out.println(\"Appointment done.....\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Sorry!!! Doctor is not available....Please try on next day.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void performSave() {\n if (validate()) {\n int taskId = AppUtils.getLatestTaskId() + 1;\n int catId;\n if (category.equals(AppUtils.CREATE_CATEGORY)) {\n catId = saveNewCategory();\n } else {\n catId = AppUtils.getCategoryIdByName(category);\n }\n saveNewTask(taskId, catId);\n clearAll();\n redirectToViewTask();\n }\n\n }", "public void saveAlarms(String Epillname, Date date) {\n Gson gson = new Gson();\n String record = gson.toJson(date, Date.class);\n SharedPreferences sp = mContext.getSharedPreferences(\"alarmInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(Epillname, record);\n editor.commit();\n }", "int insert(ApplicationDO record);", "@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}", "public void save(ReservationDrive reservationDrive){\n reservationDriveRepository.save(reservationDrive);\n }", "public void save() {\n }", "public void verifyData() {\n\n saveDay();\n\n }", "abstract public void setServiceAppointment(Date serviceAppointment);", "public Flight save(Flight flight);", "public interface AppointmentDao {\n\n // Создает новую запись и соответствующий ей приём\n void addAppointment(long id);\n\n // Возвращает приём соответствующий записи с первичным ключом id или null\n Appointment getAppointment(long id);\n\n // Возвращает список приёмов соответствующих всем записям в базе данных\n List<Appointment> getAllAppointments();\n\n // Сохраняет состояние приёма в базе данных\n void setAppointment(long id);\n\n // Удаляет запись о приёме из базы данных\n void deleteAppointment(long id);\n}", "private void saveNote() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E,MMM d, hh:mm a\");\n String lastSavedDate = sdf.format(new Date());\n String id;\n boolean isNew = true;\n if (oldNote != null && oldNote.getId() != null && !oldNote.getId().isEmpty()) {\n id = oldNote.getId();\n isNew = false;\n } else\n id = UUID.randomUUID().toString();\n Note note = new Note(id, etTitle.getText().toString().trim(), lastSavedDate, etNote.getText().toString().trim());\n note.setNew(isNew);\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"NEW_NOTE\", note);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }", "@Override\n public void onClick(View v) {\n TextView txtDate = (TextView)findViewById(R.id.tvDate);\n TextView txtTime = (TextView)findViewById(R.id.tvTime);\n // Log.v(\"Vidushi:update\", userId);\n helper.insertVolunteerDuty(userId,txtDate.getText().toString(),txtTime.getText().toString());\n Toast.makeText(getApplicationContext(),\"Information Saved\", Toast.LENGTH_SHORT).show();\n\n\n }", "public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }" ]
[ "0.82803345", "0.7423102", "0.7135298", "0.71218395", "0.70556784", "0.684306", "0.68258834", "0.68008184", "0.6734431", "0.66422147", "0.65336823", "0.648233", "0.6395109", "0.63889027", "0.6386995", "0.63261926", "0.625882", "0.6241928", "0.6238365", "0.6231999", "0.6174185", "0.6173123", "0.61530757", "0.60743064", "0.60520726", "0.6051159", "0.6044996", "0.6040152", "0.6017903", "0.60115886", "0.59970194", "0.58930695", "0.58003724", "0.57858735", "0.57559896", "0.57522476", "0.57294816", "0.57228863", "0.5710403", "0.5708734", "0.5708734", "0.5708734", "0.5708734", "0.5700494", "0.5679631", "0.56689656", "0.56649995", "0.5655929", "0.5652069", "0.56473094", "0.5646189", "0.56362087", "0.5631405", "0.5625741", "0.56169313", "0.5615909", "0.5586173", "0.5573805", "0.5573027", "0.5557039", "0.55557066", "0.55496216", "0.5546913", "0.5537968", "0.5537025", "0.55347204", "0.55331606", "0.5518344", "0.5516948", "0.5516826", "0.55157995", "0.5512156", "0.5507589", "0.5503958", "0.549881", "0.5497655", "0.54912347", "0.54910445", "0.5475089", "0.54710937", "0.54673105", "0.54670763", "0.5466513", "0.5456522", "0.5443944", "0.54313684", "0.5431037", "0.54184324", "0.5416114", "0.5415507", "0.5408435", "0.54060113", "0.54054666", "0.5403054", "0.5393196", "0.5391069", "0.5388643", "0.5387537", "0.5384561", "0.53799754" ]
0.5720673
38
Disables the ListView, notifies the User the Appointment has been saved
@Override protected void onPostExecute(Void result) { listView.setVisibility(View.INVISIBLE); Toast.makeText(getActivity(), getResources().getString(R.string.saved), Toast.LENGTH_LONG).show(); update.setVisibility(View.VISIBLE); update.setText(getResources().getString(R.string.saved)); mProgressDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unsetAppointmentsToIgnore();", "void setNilAppointmentsToIgnore();", "@Override\n public void onYesClicked() {\n // Find the appointment in Firestore and delete.\n final AppointmentModel deleteAppt = appointmentList.get(deletePos);\n final String deleteApptDate = deleteAppt.getDate();\n final String deleteApptTime = deleteAppt.getTime();\n final String deleteApptAddress = deleteAppt.getAddress();\n\n // Delete the patient's appointment\n apptListRef.addSnapshotListener(this, new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(QuerySnapshot queryApptSnapshots, FirebaseFirestoreException e) {\n if (e != null) {\n return;\n }\n\n for (QueryDocumentSnapshot deleteApptSnapshot : queryApptSnapshots) {\n AppointmentModel apptDelete = deleteApptSnapshot.toObject(AppointmentModel.class);\n String daDateCheck = apptDelete.getDate(); String daTimeCheck = apptDelete.getTime();\n DocumentReference deleteA = deleteApptSnapshot.getReference();\n if (deleteApptDate.equals(daDateCheck) && deleteApptTime.equals(daTimeCheck)) {\n deleteA.delete();\n Toast.makeText(AdminCalendar.this, \"Appointment Successfully Canceled!\", Toast.LENGTH_SHORT).show();\n\n // Send a cancellation email\n String tempAMorPM = deleteApptTime.substring(0, 2);\n String tempTime = deleteApptTime.substring(3);\n String emailSubject = \"Cancellation of appointment set for \" + deleteApptDate + \" at \" + deleteApptAddress;\n String emailMessage = \"Hello \" + name + \",\\n\\n\" +\n \"Your appointment scheduled for \" + deleteApptDate + \" at \" + tempTime + ' ' + tempAMorPM + \" at \"\n + deleteApptAddress + \" has been cancelled...\" + \"\\n\\nThank you,\\n\" + \"TT&T Scheduling\";\n JavaMailAPI sendEmail = new JavaMailAPI(AdminCalendar.this, deleteAppt.getEmail(), emailSubject, emailMessage);\n sendEmail.execute();\n\n break;\n }\n }\n }\n });\n\n appointmentList.remove(deletePos);\n adapter.notifyItemRemoved(deletePos);\n }", "boolean isSetAppointmentsToIgnore();", "@Override\n public void onClick(DialogInterface dialog, int which) {\n removedatFeed(datposition);\n\n //enable ListView clicks\n listfeed.setEnabled(true);\n\n }", "public void onPowerSaveUnwhitelisted(AppStateTracker sender) {\n updateAllJobs();\n unblockAllUnrestrictedAlarms();\n }", "@Override\n public void onDelectFlightInfo(ServResrouce info)\n {\n info.setChecked(false);\n mAirListViewAdapter.notifyDataSetChanged();\n }", "@Override\r\n public void onClick(View view) {\n entries.remove(position);\r\n notifyItemRemoved(position);\r\n notifyItemRangeChanged(position, entries.size());\r\n Toast.makeText(mContext, \"Rejected : \" + u, Toast.LENGTH_SHORT).show();\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t\t\t}", "public void clearAppointments(){\n appointments.clear();\n }", "@Override\r\n\tpublic void onDetach() {\n\t\tif(!operFlag&&task.getAlarmTime()<=Calendar.getInstance().getTimeInMillis())\r\n\t\t\ttaskMgr.overdueTask(task);\r\n\t\tsuper.onDetach();\r\n\t\tGlobalVar.todoAdapter.refreshAdapter();\r\n\t\tgetActivity().finish();\r\n\t}", "void disableNotifications();", "@Override\r\n public void onClick(View v) {\n Call call1 = callList.get(position);\r\n callList.remove(position);\r\n notifyDataSetChanged();\r\n //making Ui changes\r\n\r\n if (callList!= null) {\r\n if (callList.size() == 0) {\r\n CallFragment.textViewNoCalls.setVisibility(View.VISIBLE);\r\n CallFragment.recyclerViewCalls.setVisibility(View.GONE);\r\n }\r\n } else {\r\n Toast.makeText(context, \"CallList is null.\", Toast.LENGTH_SHORT).show();\r\n CallFragment.textViewNoCalls.setVisibility(View.VISIBLE);\r\n CallFragment.recyclerViewCalls.setVisibility(View.GONE);\r\n }\r\n //updating the changes in the sqlite\r\n updateCallList();\r\n //cancelling the alarm\r\n cancelAlarm(call1);\r\n }", "void setAppointmentsToIgnore(com.microsoft.schemas.crm._2011.contracts.ArrayOfAppointmentsToIgnore appointmentsToIgnore);", "void disableAddContactButton();", "protected void onDiscard() {\r\n this.setActive(false);\r\n }", "private void invalidate() {\n\r\n\t\tadapter = new ArrayAdapter<String>(this,\r\n\t\t\t\tandroid.R.layout.simple_list_item_1, jobItems);\r\n\r\n\t\tListView listview = (ListView) findViewById(R.id.ls_01);\r\n\t\tlistview.setAdapter(adapter);\r\n\r\n\t}", "public void addAppointmentComponentClosed(ScheduledAppointment appointment);", "protected void exitEditMode(){\n editName.setEnabled(false);\n editEmail.setEnabled(false);\n saveButton.setVisibility(View.INVISIBLE);\n }", "@Override\n public void onPause() {\n super.onPause();\n\n groceryList.setVisibility(View.GONE);\n groceryListHeader.setVisibility(View.GONE);\n addButton.setVisibility(View.GONE);\n }", "void onStopEditingItem(E itemElementView);", "@Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n cancelAppointment(staffid);\n }", "@Override\n public void onDisabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }", "@Override\n\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t \t\t\tcontacts.setVisibility(View.GONE);\n\t\t\t\t}", "boolean isNilAppointmentsToIgnore();", "@Override\n public void onDisable() {\n }", "public void reject(){\n ArrayList<User> u1 = new ArrayList<User>();\n u1.addAll(Application.getApplication().getNonValidatedUsers());\n u1.remove(this);\n\n Application.getApplication().setNonValidatedUsers(u1);\n }", "public void onDisable() {\r\n }", "public void onExemptChanged(AppStateTracker sender) {\n updateAllJobs();\n unblockAllUnrestrictedAlarms();\n }", "@Override\r\n public boolean canDisapprove(Document document) {\n return false;\r\n }", "public void userClickedOnTable()\r\n {\r\n this.detailedStudentViewButton.setDisable(false);\r\n }", "@Override\n public void onClick(View view) {\n ((MainActivity)parent.getContext()).removeAlarm(position);\n }", "private void cancelAppointment()\n {\n new AlertDialog.Builder(mCtx)\n .setTitle(mCtx.getResources().getString(R.string.cancel_heading))\n .setMessage(mCtx.getResources().getString(R.string.cancle_alert))\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int which)\n {\n\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int which)\n {\n\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "public void clearWeeklyView(){\n\t\tthis.weeklyView=false;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}", "public void onCancelClicked(View view) {\n\n if(mEditMode){\n //remove the item from database\n getContentResolver().delete(SavingsContentProvider.CONTENT_URI, SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit Mode, delete existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n //Go back to Dashboard\n Utils.gotoDashBoard(this);\n finish();\n }else{\n finish();\n }\n }", "public void onClick(View v) \n {\n mEnabled = true;\n saveAlarm();\n finish();\n }", "public boolean updateAppintment(Appointment appointment) {\n\t\treturn false;\r\n\t}", "@Override\n public void clickNegative() {\n Toast.makeText(this, \"Cancelled\", Toast.LENGTH_SHORT).show();\n viewList();\n\n\n }", "public void cancelSelect(View v){\n isCancel = true;\n isStart = false;\n mySave.setVisibility(View.INVISIBLE);\n myCancel.setVisibility(View.INVISIBLE);\n myEdit.setVisibility(View.VISIBLE);\n myViewFilter.setVisibility(View.VISIBLE);\n adapter.notifyDataSetChanged();\n }", "@FXML\r\n\tpublic void deleteItem() {\r\n\t\tcontroller.deleteWishlistItem(listView.getSelectionModel().getSelectedItem().getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t}", "void disableEdit() {\n\t\tnameField.setEditable(false);\n\t\tssnField.setEditable(false);\n\t\ttakenDateField.setEditable(false);\n\t\ttotalScoreField.setEditable(false);\n\t\tadvisorField.setEditable(false);\n\t\t\n\t}", "public void deleteItem() {\n\t\tIntent intent = new Intent(this, AlarmActivity.class);\n\t\tint alarmId = itemsAdapter.getSelectedItem().getId();\n\t\tLog.d(TAG, \"Cancelling Alarm with ID \" + alarmId); \n\t\tPendingIntent sender = PendingIntent.getBroadcast(this, alarmId, intent, 0);\n\t\tAlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n\t\talarmManager.cancel(sender);\n\t\t\n\t\titemsAdapter.remove(itemsAdapter.getSelectedPosition());\n\t\titemsAdapter.unsetSelectedPosition();\n\t\tgetActionBar().hide();\n\t}", "public void dontCompleteBooking(){\r\n\t\ttempBookings.clear();\r\n\t}", "@Override\n\t\t\tpublic void onShow(DialogInterface dialog) {\n\t\t\t\tsetActivityInvisible();\n\t\t\t}", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "public void onDisable() {\n }", "public void onDisable() {\n }", "public void onDisable() {\n }", "public void onDisable()\n {\n }", "public void btnShowUnpaid_onClick(View view) {\n setTitle(R.string.title_booklist_unpaid);\n\n mBookingList = mDataSource.getAllBookings();\n ArrayList<Booking> mUnpaidBookings = new ArrayList<>();\n\n for(int i=0;i<mBookingList.size();i++){\n if(mBookingList.get(i).isPaid()==0)\n mUnpaidBookings.add(mBookingList.get(i));\n }\n\n mAdapter = new BookingListAdapter(this, mUnpaidBookings);\n mRV.setAdapter(mAdapter);\n mRV.setLayoutManager(new LinearLayoutManager(this));\n }", "public void cancelTask() {\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save?\", null,\r\n JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTask();\r\n }\r\n todoListGui();\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n res.setReservationStatus(2);\n reserAdap.notifyDataSetChanged();\n }", "com.microsoft.schemas.crm._2011.contracts.ArrayOfAppointmentsToIgnore addNewAppointmentsToIgnore();", "@Override\r\n\tpublic void onDisable() {\n\t}", "@Override\n\tpublic void onDisable() {\n\n\t}", "@Override\r\n\tpublic void onClick(View v) {\n\t\tif (v == mOk) {\r\n\t\t\tif (mCheckTable != null && mList != null) {\r\n\t\t\t\tAppDrawerControler appDrawerControler = AppDrawerControler.getInstance(GoLauncher.getContext());\r\n\t\t\t\tfor (int i = 0; i < mCheckTable.length && i < mList.size(); i++) {\r\n\t\t\t\t\tif (mModifyCheckTable[i] != mCheckTable[i]) {\r\n\t\t\t\t\t\tAppItemInfo info = mList.get(i);\r\n\t\t\t\t\t\tif (mModifyCheckTable[i]) {\r\n//\t\t\t\t\t\t\tAppCore.getInstance().getTaskMgrControler()\r\n//\t\t\t\t\t\t\t\t\t.addIgnoreAppItem(info.mIntent);\r\n\t\t\t\t\t\t\tappDrawerControler.addIgnoreAppItem(info.mIntent);\r\n\t\t\t\t\t\t} else {\r\n//\t\t\t\t\t\t\tAppCore.getInstance().getTaskMgrControler()\r\n//\t\t\t\t\t\t\t\t\t.delIgnoreAppItem(info.mIntent);\r\n\t\t\t\t\t\t\tappDrawerControler.delIgnoreAppItem(info.mIntent);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinish();\r\n\t\t} else if (v == mCancle) {\r\n\t\t\tfinish();\r\n\t\t}\r\n\t}", "@Override\n public void onDestroyActionMode(ActionMode mode) {\n for (int i = 0; i < mListView.getCount(); i++) {\n mListView.setItemChecked(i, false);\n }\n }", "@Override\n public void onDestroyActionMode(ActionMode mode) {\n for (int i = 0; i < mListView.getCount(); i++) {\n mListView.setItemChecked(i, false);\n }\n }", "@Override\n public void onDelectComfireInfo(ServResrouce info)\n {\n info.setChecked(false);\n removeResourceIdPrice(info.getServId());\n mNoAirAdapter.notifyDataSetChanged();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdgView.stopEditMode();\n\t\t\t\tbtn_edit_com.setVisibility(View.GONE);\n\t\t\t}", "@Override\n\tpublic void onBackPressed() {\n\n\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t}", "public void disableRemoveFromList() {\n System.out.println(\"disable remove from list\");\n members_addToList.setDisable(false);\n members_removeFromList.setDisable(true);\n teams_addToList.setDisable(false);\n teams_removeFromList.setDisable(true);\n \n }", "@Override\n public void onDelectComfireInfo(ServResrouce info)\n {\n info.setChecked(false);\n removeResourceIdPrice(info.getServId());\n mHotelAdapter.notifyDataSetChanged();\n }", "public void discardUserAction() {\n\t\tshowAnimalList();\n\t}", "public void hideNoNotifications(){\n noNotificationsTitle.setVisibility(View.GONE);\n noNotificationsText.setVisibility(View.GONE);\n noNotificationsImage.setVisibility(View.GONE);\n }", "public void onClick(DialogInterface dialog,int id) {\n todoList.remove(pos);\n listAdapter.notifyDataSetChanged();\n }", "public void unlockAdd(){\n\t\tthis.canAdd = true;\n\t}", "void onInvalidatedModel();", "@Override\n\tpublic void onDisable() {\n\t\t\n\t}", "public boolean deleteAppintment(Appointment appointment) {\n\t\treturn false;\r\n\t}", "private void removeTimeFromList(int position) {\n final int index = position;\n AlertDialog.Builder alert = new AlertDialog.Builder(\n AddMedicationActivity.this);\n \n alert.setTitle(\"Delete\");\n alert.setMessage(\"Do you want delete this item?\");\n alert.setNegativeButton(\"YES\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TOD O Auto-generated method stub\n \n // main code on after clicking yes\n //list.remove(deletePosition);\n //adapter.notifyDataSetChanged();\n //adapter.notifyDataSetInvalidated();\n \t\tif (index == 4) \n \t\t\tcurrentTimes[4] = \" \";\n \t\telse {\n \t\t\tfor (int a = index + 1; a <= 4; a++)\n {\n \t\t\t\tcurrentTimes[a-1] = currentTimes[a];\n }\n \t\t\tcurrentTimes[4] = \" \";\n \t\t}\n \n \n timeCount--;\n setTimes();\n \n \n }\n });\n alert.setPositiveButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n dialog.dismiss();\n }\n });\n \n alert.show();\n \n }", "private void disableAlarm() {\r\n\t\tsetStyle(null);\r\n\t\tmediaPlayer.stop();\r\n\t}", "@Override\n\t\t\tpublic void onPause() {\n\t\t\t\t try{\n\t\t\t\t getActivity().unregisterReceiver(dateSetReceiver);\n\t\t\t\t }catch (Exception a)\n\t\t\t\t {\n\t\t\t\t\t a.printStackTrace();\n\t\t\t\t }\n\t\t\t\tsuper.onPause();\n\t\t\t}", "private void loadAppointmentList(){\n try {\n MyDBHandler dbHandler = new MyDBHandler(this);\n appointments.clear();\n ArrayList<String> myApps = new ArrayList<String>();\n\n appointments.addAll(dbHandler.getAllAppointmentFromServiceProvider(companyID));\n\n for(Appointment appointment: appointments)\n myApps.add(dbHandler.getServiceTypeName(appointment.getServiceType_id()) + \" / \" +\n getDayName(appointment.getDay_id()) + \" at \" +\n appointment.getStart_time() + \" to \" +\n appointment.getEnd_time()\n );\n\n if(myApps.size()==0) {\n myApps.add(EMPTY_TEXT_LV2);\n }\n ArrayAdapter<String> data = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myApps);\n lv_Appointment.setAdapter(data);\n\n }catch(Exception ex){\n Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n subjectDAO.deleteFridayEntry(employee);\r\n subjectListAdapter.remove(employee);\r\n Toast.makeText(getActivity(), \"Subject Deleted\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }", "protected void removeAppointment(Appointment a) {\n appointments.remove(a);\n }", "@Override\r\n public void onClick(View view) {\n acceptedJobsAdapter.restoreItem(deletedItem, deletedIndex);\r\n }", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "@Override\n public void onDisabled() {\n }", "public void afterClickedEdit(View view) {\n GlobalUtils.showOpdtionDialog(this, new OptionDialogCallback() {\n @Override\n public void onActionHistory() {\n Intent intent = new Intent(MainActivity.this, HistoryActivity.class);\n startActivity(intent);\n }\n\n @Override\n public void onActionChangeTime() {\n if (GlobalUtils.TARGET_TREATMENT_TIME.equals(\"0\")) {\n GlobalUtils.showInfoDialog(MainActivity.this, \"Error\", \"You have not entered your total treatment time yet\", \"OK\", new SCDialogCallback() {\n @Override\n public void onAction1() {\n\n }\n\n @Override\n public void onAction2() {\n\n }\n\n @Override\n public void onAction3() {\n\n }\n\n @Override\n public void onAction4() {\n\n }\n });\n } else {\n aftererClickTarget();\n }\n }\n\n @Override\n public void onActionClear() {\n //show confirmation dialog\n GlobalUtils.showConfirmDialog(MainActivity.this, \"Confirmation\", \"Are you sure you want to clear all data?\", \"Yes\", \"No\", new SCDialogCallback() {\n @Override\n public void onAction1() {\n db.deleteSchedule(GlobalUtils.getCurrentDate().getFormattedDate());\n mListScheduleData.clear();\n GlobalUtils.calculated_schedule = new Schedule();\n initScheduleList();\n reset_Views();\n GlobalUtils.no_counting = true;\n GlobalUtils.TARGET_TREATMENT_TIME = \"0\";\n }\n\n @Override\n public void onAction2() {\n\n }\n\n @Override\n public void onAction3() {\n\n }\n\n @Override\n public void onAction4() {\n\n }\n });\n }\n\n @Override\n public void onActionSave() {\n\n }\n\n @Override\n public void onActionCancel() {\n\n }\n\n @Override\n public void onActionHelp() {\n Intent intent = new Intent(MainActivity.this,HelpActivity.class);\n startActivity(intent);\n }\n });\n\n\n }", "@Override\n public void onFailedToReceiveSetting() {\n showAdButton.setEnabled(false);\n Toast.makeText(this, \"onFailedToReceiveSetting\", Toast.LENGTH_SHORT).show();\n }", "private void onCancelEditing() {\n setResponsePage(responsePage);\n }", "public void disable();", "@Override\n public void onItemDismiss(int position) {\n taskAndTurnpointsViewModel.deleteTaskTurnpoint(position);\n notifyDataSetChanged();\n }", "@Override\n public void onClick(View view) {\n Location loc = (Location) finalUser.get(location);\n String addy = loc.getString(\"address\");\n\n /* build schedule and generate appointments TODO: actually remove appointments */\n LocationSchedule locationSchedule = new LocationSchedule(addy, 1);\n ArrayList dailyList = locationSchedule.generateAppointmentsDaily(6);\n\n Integer day = Integer.valueOf(mDate.substring(4, 6));\n ArrayList appointmentList = (ArrayList) dailyList.get(day - 1);\n Integer[] randNums = new Integer[5];\n String[] strings1 = new String[5];\n\n for (int i = 0; i < 5; i++) {\n final int random = new Random().nextInt(10);\n if (Arrays.asList(randNums).contains(random) == false) {\n randNums[i] = random;\n } else {\n randNums[i] = random + 1;\n }\n }\n for (int i = 0; i < 5; i++) {\n potentialAppointments[i] = (PotentialAppointment) appointmentList.get(Integer.valueOf(randNums[i]));\n strings1[i] = potentialAppointments[i].start.toString();\n }\n\n app1.setText(mDate + \" at \" + strings1[0]);\n app2.setText(mDate + \" at \" + strings1[1]);\n app3.setText(mDate + \" at \" + strings1[2]);\n app4.setText(mDate + \" at \" + strings1[3]);\n app5.setText(mDate + \" at \" + strings1[4]);\n\n mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.parseColor(\"#515050\")));\n next.setBackgroundColor(Color.parseColor(\"#EB5E55\"));\n }", "public void removeAppointment(Appointment a)\n {\n this.agenda.remove(a);\n }", "void markInactive();", "public void onClick(DialogInterface dialog,int id) {\n \n\n bookMarkList.remove(selectedItem);\n iadapter.notifyDataSetChanged();\n // Toast.makeText(getApplicationContext(),\"delete\"+ valuebpage+ \" name is \"+ valuebname,Toast.LENGTH_LONG).show();\n // dialogBookmark.dismiss();\n dialog.cancel();\n }", "public void disableAddToList() {\n members_addToList.setDisable(true);\n members_removeFromList.setDisable(false);\n teams_addToList.setDisable(true);\n teams_removeFromList.setDisable(false);\n }", "private void disableTable() {\n for (Button button : seatsArray) {\n button.setDisable(true);\n }\n confirmChange.setDisable(true);\n deleteBooking.setDisable(true);\n noBookingsLabel.setText(\"You have no bookings\");\n noBookingsLabel.setVisible(true);\n }", "public void clear() {\r\n\t\tboolean enabled = isEnabled() ;\r\n\t\tif (enabled) {\r\n\t\t\tsetEnabled(false);\r\n\t\t}\r\n\t\tlistModel.clear();\r\n\t\tif (enabled) {\r\n\t\t\tsetEnabled(true);\r\n\t\t}\r\n\t}", "public void deactivateInterArrivalTimeTally() {\n\t\tthis._interArrivalTimeActivated = false;\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.playSoundEffect(Sounds.DISALLOWED);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.playSoundEffect(Sounds.DISALLOWED);\n }", "private void invalidateData() {\n mDashboardListAdapter.invalidateData();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.del_bkmarks) {\n\n final Button bkdeletebtn=(Button)findViewById(R.id.bkmrk_delete_btn);\n final Button bkcancelbtn=(Button)findViewById(R.id.bkmrk_cancel_btn);\n\n bkcancelbtn.setVisibility(View.VISIBLE);\n bkdeletebtn.setVisibility(View.VISIBLE);\n\n\n Myapp2.setCheckboxShown(true);\n //bkMarkList.deferNotifyDataSetChanged();\n bkMarkList.setAdapter(adapter);\n\n\n bkcancelbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Myapp2.setCheckboxShown(false);\n //checkboxShown=false;\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n\n bkdeletebtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n for(int i=0;i<Myapp2.getChecks().size();i++){\n\n if(Myapp2.getChecks().get(i)==1){\n\n int index=i+1;\n\n //remove items from the list here for example from ArryList\n Myapp2.getChecks().remove(i);\n PgNoOfBkMarks.remove(i);\n paraName.remove(i);\n SuraName.remove(i);\n //similarly remove other items from the list from that particular postion\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor =settings.edit();\n\n editor.remove(\"bookmark_\"+index);\n editor.putInt(\"bookmark_no\",settings.getInt(\"bookmark_no\",0)-1);\n editor.apply();\n\n\n\n i--;\n }\n }\n Myapp2.setCheckboxShown(false);\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@FXML\n void showIncompleteTasksClicked(ActionEvent event)\n {\n ObservableList<Item> incompleteTasks = FXCollections.observableArrayList();\n\n if(showIncompleteTasks.isSelected())\n {\n // Have it display in listView\n // First need to remove all the items in listView and then display only incomplete\n showCompletedTasks.setSelected(false);\n\n listView.getItems().clear();\n\n createList(false, incompleteTasks);\n\n listView.refresh();\n }\n\n listView.setItems(incompleteTasks);\n\n if(!showIncompleteTasks.isSelected())\n {\n // Uncheck the checkbox\n listView.getItems().clear();\n\n // Add all items to the table\n for(Item item : Item.getToDoList())\n {\n listView.getItems().add(Item.getToDoList().get(Item.getToDoList().indexOf(item)));\n }\n\n listView.refresh();\n }\n }", "public Appointments(){\n\t\tsetDate(0);\n\t\tsetTime(0);\n\t\tsetClient(null);\n\t\tappointmentStatus = false;\n\t}", "public void onPause() {\n super.onPause();\n nfcAdapter.disableForegroundDispatch(this);\n }", "public void marksCancel(View view) {\n }", "@Override\n\t\t\t\tpublic boolean onCancel() {\n\t\t\t\t\treturn false;\n\t\t\t\t}" ]
[ "0.63965803", "0.6396285", "0.5982803", "0.59711117", "0.59217095", "0.5872265", "0.58468074", "0.5802843", "0.5770678", "0.569619", "0.567992", "0.56554353", "0.5655134", "0.556987", "0.556443", "0.5560935", "0.5553365", "0.5549238", "0.5532732", "0.5516887", "0.55005366", "0.54983497", "0.54721564", "0.54601103", "0.5409419", "0.5398877", "0.53869355", "0.5383751", "0.53804106", "0.5376707", "0.53762496", "0.5375064", "0.5371067", "0.5354116", "0.53508866", "0.5350006", "0.53455603", "0.53421456", "0.5334035", "0.53302544", "0.5325579", "0.5319623", "0.53122544", "0.53085226", "0.530772", "0.5304987", "0.53015524", "0.53015524", "0.52799165", "0.52704173", "0.52501434", "0.52369505", "0.52351445", "0.5233993", "0.5231987", "0.52296203", "0.52229", "0.52229", "0.52203345", "0.52195334", "0.52192634", "0.52165896", "0.52076733", "0.52046627", "0.5190623", "0.51836216", "0.51835287", "0.5183173", "0.5177713", "0.5176066", "0.5169712", "0.516859", "0.51645523", "0.5144946", "0.51425344", "0.51386595", "0.51316977", "0.51172954", "0.5113548", "0.5111324", "0.51087016", "0.5102666", "0.50986946", "0.50968933", "0.50892603", "0.50889724", "0.50872904", "0.5086318", "0.50856125", "0.5083015", "0.5082302", "0.507841", "0.5077233", "0.5077233", "0.50701874", "0.5069573", "0.5067012", "0.5065374", "0.5057519", "0.5054135", "0.5054015" ]
0.0
-1
~ Methods ////////////////////////////////////////////////////////////////// / Retorna o metodo padrao usado pelo classificador
public ClassificationMethod getDefaultMethod() { return defaultMethod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Objet getObjetAlloue();", "@Override\n protected void getExras() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "protected RespostaFormularioPreenchido() {\n // for ORM\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private DittaAutonoleggio(){\n \n }", "Object getClass_();", "Object getClass_();", "private UsineJoueur() {}", "protected T getManusia(){\r\n return Manusia;\r\n }", "@Override\n public String cualquierMetodo2() {\n return \"Método implementado en la clase hija viaje de incentivo\";\n }", "public contrustor(){\r\n\t}", "protected FanisamBato(){\n\t}", "public String getTipo(){\r\n return Tipo;\r\n }", "@Override\n public String getName(){\n return Name; \n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract Class getEntidadPrincipal();", "public abstract String getNomClasse();", "private ControleurAcceuil(){ }", "Documento getDocumento();", "public Punto getCentro() {\r\n\treturn centro;\r\n}", "@Override\n public String getModu() {\n return null;\n }", "public String getEtiqueta()\n/* 27: */ {\n/* 28:41 */ return this.etiqueta;\n/* 29: */ }", "public String getTipo();", "public String getTipo();", "@Override\n public void memoria() {\n \n }", "Petunia() {\r\n\t\t}", "public FiltroMicrorregiao() {\r\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "Object getTipo();", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "public Sistema(){\r\n\t\t\r\n\t}", "private TMCourse() {\n\t}", "protected Doodler() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\t/**\n\t * returns the class Id for selected class\n\t * \n\t * @return the class id for the class \n\t */\n\tpublic int getClassID() {\n\t\treturn ID;\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public Plato(){\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public Propuestas() {}", "public void consulterClassement() {\n\t\t\n\t}", "private stendhal() {\n\t}", "private QuadradoPerfeito() {\n }", "public String getTipo(){\r\n return tipo;\r\n }", "public abstract Object getCustomData();", "com.soa.SolicitarServicioDocument.SolicitarServicio getSolicitarServicio();", "@Override\n\tpublic void recreo() {\n\n\t}", "@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}", "public abstract String getNombre();", "public Troco() {\n }", "@Override\n String getName();", "private RepositorioOrdemServicoHBM() {\n\n\t}", "public String getTipo(){\n return tipo;\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "protected EmpleadoPlantilla(com.matisse.reflect.MtClass mtCls) {\n super(mtCls);\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public TdRuspHijo() { }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public String getName(){return this.name;}", "default String getTodo(){\n\t\treturn getPerimetro() + \" - \"+ getNombre();\n\t}", "public void buscarGestor(){\r\n\t\t\r\n\t}", "private static String getStyleClass(Object obj) { return ((MetaData)obj).getStyle(); }", "public void Ordenamiento() {\n\n\t}", "public OOP_207(){\n\n }", "public Alojamiento() {\r\n\t}", "@Override\n public String getType(){\n return Type;\n }", "@Override\n public void perish() {\n \n }", "public Ejercicio getEjercicio()\r\n/* 145: */ {\r\n/* 146:183 */ return this.ejercicio;\r\n/* 147: */ }", "public Propiedad(){\n\t}", "public VotacaoSegundoDia() {\n\n\t}", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "private ReadProperty()\r\n {\r\n\r\n }", "@Override\r\n\t\tpublic String getClassName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "private MApi() {}", "@Override\n void init() {\n }", "@Override\n protected int getCodigoJuego() {\n return 5;\n }", "@Override\n protected void init() {\n }", "@Override\n protected void prot() {\n }", "private IngenicoDisplay(){\n\n }", "public MorteSubita() {\n }", "public FiltroCreditoTipo() {\r\n\t}", "protected String getName(){\r\n return this.name;\r\n }", "public int getTipoDocumento();", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "public Genero getGenero()\r\n/* 143: */ {\r\n/* 144:261 */ return this.genero;\r\n/* 145: */ }", "public Unidadmedida() {\r\n\t}", "protected void agregarUbicacion(){\n\n\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }" ]
[ "0.6311656", "0.6256966", "0.6234219", "0.6192888", "0.61777544", "0.60843885", "0.6029465", "0.6029465", "0.6014396", "0.60131705", "0.5922746", "0.58956283", "0.58831084", "0.5838936", "0.5814527", "0.5803195", "0.58012605", "0.57777745", "0.57720774", "0.57715565", "0.5754783", "0.574763", "0.57464814", "0.57331413", "0.57215154", "0.57215154", "0.57044244", "0.5695304", "0.5687002", "0.5672162", "0.5671651", "0.56649953", "0.5645877", "0.56455284", "0.56408817", "0.5633496", "0.5615882", "0.5612094", "0.56042784", "0.5604045", "0.5601855", "0.5587948", "0.55840856", "0.55812305", "0.5580334", "0.55794376", "0.5563774", "0.5558895", "0.55584586", "0.55566907", "0.55508596", "0.5546636", "0.5545346", "0.5539567", "0.5538242", "0.55370957", "0.5536257", "0.5530131", "0.5518848", "0.5513561", "0.55115306", "0.5511479", "0.5504494", "0.5503808", "0.5503419", "0.5502988", "0.55004376", "0.5494884", "0.5494769", "0.5494341", "0.5494148", "0.5492128", "0.54919124", "0.5486726", "0.54854804", "0.548102", "0.5478339", "0.54758805", "0.5475464", "0.5470441", "0.5466178", "0.5465737", "0.5461532", "0.5457578", "0.5454287", "0.5450225", "0.5448826", "0.5447491", "0.5446276", "0.5445139", "0.5441942", "0.544164", "0.54396534", "0.54394525", "0.5435446", "0.5435446", "0.54352397", "0.54343605", "0.54288113", "0.542459", "0.5424047" ]
0.0
-1
/ Altera parametros sobre o conjunto de treinamento.
public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }", "public Tipo visitParameter(DECAFParser.ParameterContext ctx){\r\n\t\tVarDec var =new VarDec(ctx.ID().getText(),tablaSimbolos.searchTipo(ctx.parameterType().getText()),0,position);\r\n\t\tfirmaA.addParam(var);\r\n\t\taddComment(\"paramname: \"+var.getNombre()+\"-position: \"+position);\r\n\t\tposition+=var.getByteSize();\r\n\t\treturn tablaSimbolos.correct();\r\n\t}", "private static void variosParametros(String nombre, int ... numeros){\n System.out.println(\"nombre = \" + nombre);\n imprimirNumeros(numeros);\n }", "public void setValues(RutaParams params){\n this.costo = params.costo;\n this.tiempoVuelo = params.tiempoVuelo;\n this.piloto =encriptar(params.piloto);\n }", "private void recogerParametros(HttpServletRequest request) {\r\n\t\tif (request.getParameter(\"op\") != null) {\r\n\t\t\top = Integer.parseInt(request.getParameter(\"op\"));\r\n\t\t} else {\r\n\t\t\top = 0;\r\n\t\t}\r\n\t\t\r\n\t\tsearch = (request.getParameter(\"search\") != null) ? request.getParameter(\"search\") : \"\";\r\n\r\n\t\tif (request.getParameter(\"id\") != null) {\r\n\t\t\tid = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\t} else {\r\n\t\t\tid = -1;\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"nombre\") != null) {\r\n\t\t\t\r\n\t\t\tnombre = request.getParameter(\"nombre\");\r\n\t\t\tnombre = Utilidades.limpiarEspacios(nombre);\r\n\t\t\tnombre = nombre.substring(0, Math.min(nombre.length(), 44));\r\n\t\t} else {\r\n\t\t\tnombre = \"\";\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"precio\") != null) {\r\n\t\t\ttry{\r\n\t\t\t\tprecio = Float.parseFloat(request.getParameter(\"precio\"));\r\n\t\t\t}\r\n\t\t\tcatch( Exception e){\r\n\t\t\t\tprecio=PRECIO_EN_LETRA;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} else {\r\n\t\t\tprecio = 0;\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario_cambio\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario_cambio\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t}", "public void setParametroVarredura(Integer parametroVarredura) {\n this.parametroVarredura = parametroVarredura;\n }", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "public String getObtieneParametrosReformaTribu()throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n String result = new String();\n\n try {\n\n conn = this.getConnection();\n\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n call = conn.prepareCall(\"{? =call PKG_OBTIENE_PARAM.obtieneParametroReformaTribu}\");\n call.registerOutParameter(1, OracleTypes.VARCHAR);\n call.execute();\n\n result = call.getObject(1).toString();\n \n call.close(); \n \n }catch (Exception e) {\n e.printStackTrace();\n }\n finally{\n this.closeConnection();\n }\n\t\treturn result;\n }", "public void param(int direccionValorParam, int numeroParam){\n String valorParam = \"\";\n //traduce casos de direccionamiento indirecto\n direccionValorParam = traduceDirIndirecto(direccionValorParam);\n // obtener la direccion de la variable parametrizada en el procedimiento llamado\n int dirParamRegistro = this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getDireccionParametros().get(numeroParam);\n\n if (ManejadorMemoria.isGlobal(direccionValorParam)){\n // obtener el valor del parametro enviado\n valorParam = this.registroGlobal.getValor(direccionValorParam);\n\n } else if (ManejadorMemoria.isConstante(direccionValorParam)){\n // REVISAR QUE NO SEA UN PARAMETRO POR REFERENCIA\n if (this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getIndicadorPorReferencia().get(numeroParam)){\n // ERROR\n throw new IllegalArgumentException();\n }\n // obtener el valor del parametro enviado\n valorParam = this.directorioProcedimientos.getConstantes().get(direccionValorParam).getValorConstante();\n\n } else { // VARIABLE LOCAL\n // obtener el valor del parametro enviado\n valorParam = this.pilaRegistros.peek().getValor(direccionValorParam);\n }\n // asignar el valor del parametro a su variable correspondiente\n this.pilaEras.peek().guardaValor(dirParamRegistro, valorParam);\n }", "public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }", "public void tipoDatos() {\n\t\tint num = 10;\n\t\t// Texto STring\n\t\tString cadena = \"cadena\";\n\n\t\t// Decimale O flotante\n\t\tdouble decimal = 12.16;\n\t\tfloat fl = new Float(10);\n\t\t// Bolean\n\t\tboolean bl = true;\n\n\t\t// ARREGLOS\n\t\t// string\n\t\tString[] veString = new String[5];\n\t\tveString[0] = \"hola mundo\";\n\t\tveString[1] = \"hola mundo\";\n\t\tveString[2] = \"hola mundo\";\n\t\tveString[3] = \"hola mundo\";\n\t\tveString[4] = \"hola mundo\";\n\n\t\tint[] varNum = new int[] { 0, 1, 2, 3, 4, 5 };\n\n\t}", "protected void initParametros ( int numParametros ) {\n if ( numParametros > 0 )\n parametros = new Parametro[ numParametros ];\n }", "static public void verificaParametros()\r\n \r\n {\r\n SynthesizerModeDesc synthesizerModeDescTemp = (SynthesizerModeDesc)synthesizer.getEngineModeDesc();\r\n System.out.println(\"Nome do engine utilizado: \"+synthesizerModeDescTemp.getEngineName());\r\n System.out.println(\"Nome do modo de funcionamento utilizado: \"+synthesizerModeDescTemp.getModeName());\r\n \tSystem.out.println(\"Nome da localidade utilizada: \"+synthesizerModeDescTemp.getLocale().toString());\r\n \t\t//verifica a flag de controle\r\n if(synthesizerModeDescTemp.getRunning()!=null)\r\n if(synthesizerModeDescTemp.getRunning().booleanValue())\r\n System.out.println(\"Engine rodando.\");\r\n else\r\n System.out.println(\"Engine parado.\");\r\n else\r\n System.out.println(\"A flag de controle não foi setada e tem valor nulo.\");\r\n \t\t//mostra as vozes suportadas\r\n Voice[] VoiceTemp = synthesizerModeDescTemp.getVoices();\r\n for(int i=0;i<VoiceTemp.length;i++)\r\n {\r\n System.out.println(\"Voz numero \"+(i+1)+\" : \"+VoiceTemp[i].getName());\r\n }\r\n }", "private void getParameters(HttpServletRequest request) {\n\t\t// Recoger datos\n\t\tconcepto = request.getParameter(\"concepto\");\n\t\tString importeTexto = request.getParameter(\"importe\");\n\t\ttry {\n\t\t\timporte = Double.parseDouble(importeTexto);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\timporte = (double) 0;\n\t\t}\n\t\tLong idCoche = Long.parseLong(request.getParameter(\"id_coche\"));\n\t\tc = daoCoche.getBYId(idCoche);\n\t\tidAgente = Long.parseLong(request.getParameter(\"id_agente\"));\n\t}", "public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }", "public Final_parametre() {\r\n\t}", "public ifrmParametros(EntityManagerFactory factory,frmMain frm,BglTbUsuario user) {\n initComponents();\n PropertyConfigurator.configure(\"log4j.properties\");\n this.factory=factory;\n this.main=frm;\n this.usuario=user;\n \n llenarDatos();\n \n }", "public ReformaTributariaOutput getComporConv(boolean comportamiento, ReformaTributariaInput reformaTributaria)throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n int inComportamiento=0; \n int inTipoConvenio=0;\n int inEmbargo=0;\n int inPyme=0;\n String ContextoAmbienteParam = null;\n ReformaTributariaOutput reformaTributariaOut = new ReformaTributariaOutput();\n try {\n\n conn = this.getConnection();\n String beneficio = this.getBeneficio();\n \n System.out.println(\"Estoy adentro con parametro beneficio---------------------->\"+beneficio);\n \n if (beneficio.equalsIgnoreCase(\"S\")){\n\t if (reformaTributaria.getContextoAmbienteParam().endsWith(\"CNV_INTRA\")){\n\t \t ContextoAmbienteParam=\"CNV_INTRA\";\n\t }else{\n\t \t ContextoAmbienteParam=\"CNV_BENEFICIO_INTER\";\n\t }\n }else{\n \t ContextoAmbienteParam=reformaTributaria.getContextoAmbienteParam(); \n }\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n /*\n --------------------------------------------------------------\n ------- Las variables determinantes --------------------\n ------- para condiciones de convenios --------------------\n --------------------------------------------------------------\n ------- v_tipo_valor\n ------- v_tipo_convenio\n ------- v_comportamiento\n ------- v_embargo\n ------- v_canal\n --------------------------------------------------------------\n -------------------------------------------------------------- \n */\n if (comportamiento){\n \t inComportamiento=1;\n }else{\n \t inComportamiento=2;\n }\n \n //String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia()+\";\"+reformaTributaria.canal();\n String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia();\n \n //System.out.println(\"tipo reforma condonacion--->\"+reformaTributaria.getCodConvenios());\n //System.out.println(\"***************************estoy en comportamiento****************************************\");\n //System.out.println(\"reformaTributaria.garantia()--->\"+reformaTributaria.garantia());\n //System.out.println(\"param getComporConv---> \"+parametros);\n //call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?)}\");\n call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?,?,?)}\");\n call.setLong(1,inComportamiento);/*tipo comporamiento � condonaci�n */\n call.setString(2,parametros);/*tipo convenio */\n call.registerOutParameter(3, OracleTypes.INTEGER);/*max_cuotas*/\n call.registerOutParameter(4, OracleTypes.INTEGER);/*min_pie*/\n call.registerOutParameter(5, OracleTypes.INTEGER);/*por_condonacion*/ \n call.registerOutParameter(6, OracleTypes.INTEGER);/*error*/ \n /*se agrega nueva forma de servicio*/\n if (reformaTributaria.getCodConvenios()!=null){//si no es nulo quiere decir que es transitoria\n \t call.setLong(7,reformaTributaria.getCodConvenios().intValue());/*codigo condonacion si es transitoria*/\n }else{//si es null quiere decir que es convenio permanente\n \t call.setNull(7, OracleTypes.INTEGER);\n }\n //call.setString(8,reformaTributaria.getContextoAmbienteParam());/*ambiente Intranet � internet*/ \n System.out.println(\"ContextoAmbienteParam---> \"+ContextoAmbienteParam);\n call.setString(8,ContextoAmbienteParam);/*ambiente Intranet � internet*/\n call.execute();\n \n int maxCuotas = Integer.parseInt(call.getObject(3).toString());\n int minCuotaContado = Integer.parseInt(call.getObject(4).toString());\n \n\n int codError = Integer.parseInt(call.getObject(6).toString());\n \n reformaTributariaOut.setCodError(new Integer(codError));\n reformaTributariaOut.setMaxCuota(new Integer(maxCuotas));\n reformaTributariaOut.setMinCuotaContado(new Integer(minCuotaContado));\n call.close(); \n \n }catch (Exception e) {\n \te.printStackTrace();\n \t//throw new RemoteException(\"No tiene valor de comportamiento convenios:\" + e.getMessage());\n }\n finally{\n this.closeConnection();\n }\n\t\treturn reformaTributariaOut;\n }", "public void limpiarListaParametro() throws Exception;", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }", "public void datos(Temperatura t1){\n //Pizarra x = new Pizarra();\n //Dialog d = new Dialog();\n String v;\n float numero;\n //char n; \n //x.setVisible(true);\n //n = r.charAt(0);\n \n switch(opc){\n case 1:\n do\n v = d.readString(\"Ingresa la temperatura en grados Farenheit\");\n while(!isNum(v));\n numero=Float.parseFloat(v);\n t1.setFaren(numero);\n break;\n case 2:\n do\n v = d.readString(\"Ingresa la temperatura en grados Celsius\");\n while(!isNum(v));\n numero=Float.parseFloat(v);\n t1.setCelsius(numero);\n break;\n }\n }", "public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }", "@Test\n\tpublic void probandoParametrosDevuelta() {\n\n\t\tString outFolder = ArbolFileSources.userFolder + \"/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_2_dm_finanzas/entregable/historia/\";\n\t\ttry {\n\n\t\t\t// String[] seed = { \"101723\", \"208403\", \"663552\", \"826668\",\n\t\t\t// \"980641\" };\n\t\t\t// Integer[] maximaProfundidadList = { 6,7 };\n\t\t\t// Integer[] minParentSizeList = {300, 400, 500 };\n\t\t\t// // cuenta que va a ser el porcentaje variable del current padre\n\t\t\t// Integer[] minChildSizeList = { 65,70,90 };\n\n\t\t\t// String[] seed = { \"101723\", \"208403\", \"663552\", \"826668\",\n\t\t\t// \"980641\" };\n\t\t\t// Integer[] maximaProfundidadList = { 6,7 };\n\t\t\t// Integer[] minParentSizeList = {300, 400 };\n\t\t\t// // cuenta que va a ser el porcentaje variable del current padre\n\t\t\t// Integer[] minChildSizeList = { 65,70 };\n\n\t\t\tString[] seed = { \"101723\", \"208403\", \"663552\", \"826668\", \"980641\" };\n\t\t\tInteger[] maximaProfundidadList = { 7 };\n\t\t\tInteger[] minParentSizeList = { 300, 350, 400 };\n\t\t\t// cuenta que va a ser el porcentaje variable del current padre\n\t\t\tInteger[] minChildSizeList = { 65, 70 };\n\n\t\t\t// para cada semilla correr los arboles\n\n\t\t\tString resultSyntax = ArbolesSQLEjecutador.generaSyntaxSpssIterativoVarsYHisto(outFolder, maximaProfundidadList, minParentSizeList, minChildSizeList, seed);\n\t\t\tString timeStampFolder = UtilidadesGenerales.getTimeStamp(null, null);\n\t\t\tUtilidadesGenerales.writeToFile(resultSyntax, \"UTF-8\", outFolder + timeStampFolder + \"_syntax.txt\");\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail(e.getMessage());\n\t\t}\n\t}", "void setParameters() {\n\t\t\n\t}", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "public void setMotivoRechazo(biz.belcorp.www.canonico.ffvv.vender.TMotivoRechazo param){\n \n this.localMotivoRechazo=param;\n \n\n }", "private void iniciarTela() {\n\t\tsetValorPagar(getValorTotal());\n\t\tgetjPanelVendasProsseguir().getjTFieldValorTotCompra().setText(String.format(\" R$ %.2f\", getValorTotal()));\n\t\tgetjPanelVendasProsseguir().getjTFieldValorPagar().setText(String.format(\" R$ %.2f\", getValorPagar()));\n\t\tgetjPanelVendasProsseguir().getjTFieldDesconto().requestFocus();\n\t}", "private void llamarFormulario(String ruta, Map<String, Object> parametros){\n\t\tcrearModal(BasePackageSistemaMaest+ruta, parametros);\n\t}", "@Override\n\tprotected void prepare() {\n\t\tfor(ProcessInfoParameter parameter :getParameter()){\n\t\t\tString name = parameter.getParameterName();\n\t\t\tif(parameter.getParameter() == null){\n\t\t\t\t;\n\t\t\t}else if(name.equals(\"XX_TipoRetencion\")){\n\t\t\t\tp_TypeRetention = (String) parameter.getParameter();\n\t\t\t}\n\t\t\telse if(name.equals(\"C_Invoice_From_ID\"))\n\t\t\t\tp_Invoice_From = parameter.getParameterAsInt();\t\n\t\t\telse if(name.equals(\"C_Invoice_To_ID\"))\n\t\t\t\tp_Invoice_To = parameter.getParameterAsInt();\t\n\t\t\telse if(name.equals(\"DateDoc\"))\n\t\t\t\tp_DateDoc = (Timestamp) parameter.getParameter();\t\t\n\t\t}\n\t}", "public void setParamReformaTributaria(String paramReformaTributaria)\n {\n this.paramReformaTributaria=paramReformaTributaria;\n }", "@Override\n\tprotected void setParameterValues() {\n\t}", "java.lang.String getParameterValue();", "ParameterList getParameters();", "private void agregarFiltrosAdicionales() {\r\n if ((Utilidades.validarNulo(parametroUsuario) == true) && (!parametroUsuario.isEmpty())) {\r\n filtros.put(\"parametroUsuario\", parametroUsuario);\r\n }\r\n if ((Utilidades.validarNulo(parametroNombre) == true) && (!parametroNombre.isEmpty())) {\r\n filtros.put(\"parametroNombre\", parametroNombre);\r\n }\r\n if ((Utilidades.validarNulo(parametroApellido) == true) && (!parametroApellido.isEmpty())) {\r\n filtros.put(\"parametroApellido\", parametroApellido);\r\n }\r\n if ((Utilidades.validarNulo(parametroDocumento) == true) && (!parametroDocumento.isEmpty())) {\r\n filtros.put(\"parametroDocumento\", parametroDocumento);\r\n }\r\n if ((Utilidades.validarNulo(parametroCorreo) == true) && (!parametroCorreo.isEmpty())) {\r\n filtros.put(\"parametroCorreo\", parametroCorreo);\r\n }\r\n if (1 == parametroEstado) {\r\n filtros.put(\"parametroEstado\", \"true\");\r\n } else {\r\n if (parametroEstado == 2) {\r\n filtros.put(\"parametroEstado\", \"false\");\r\n }\r\n }\r\n if (1 == parametroGenero) {\r\n filtros.put(\"parametroGenero\", \"M\");\r\n } else {\r\n if (parametroGenero == 2) {\r\n filtros.put(\"parametroGenero\", \"F\");\r\n }\r\n }\r\n if (!\"TODOS\".equalsIgnoreCase(parametroTipoDocumento)) {\r\n filtros.put(\"parametroTipoDocumento\", parametroTipoDocumento);\r\n }\r\n }", "public void limpiarCampos(){\n\n\t\tcampoInicio.setText(\"yyyy-mm-dd\");\n\t\tcampoInicio.setForeground(new Color(111,111,111));\n\t\tcampoFinal.setText(\"yyyy-mm-dd\");\n\t\tcampoFinal.setForeground(new Color(111,111,111));\n\n\t}", "public Editor(Par<?, Tipo> valor) {\n _par = valor;\n }", "public void mostrarEstadisticas(String promedio, int rechazados, String caracteristicas){\n System.out.println(\"El tiempo promedio es de: \" + promedio);\n System.out.println(\"La cantidad de carros rechazados es de: \" + rechazados);\n System.out.println(\"El modelo mas usado en parqueos es: \" + caracteristicas);\n }", "public Vector<Integer> GetTreatParameters(int id)\n {\n GetParams(id);\n Vector<Integer> params = new Vector<Integer>();\n int iStatus, iTemperature, iSpeed, iSwing;\n \n\t if(get_Estado.equals(\"ligado\"))\n\t iStatus = 1;\n else\n\t\tiStatus = 0;\n\t\t \n\t if (get_Fan.equals(\"auto\"))\n\t\tiSpeed = 0;\n\t else if(get_Fan.equals(\"fraco\"))\n\t\tiSpeed = 1;\n\t else if(get_Fan.equals(\"medio\"))\n\t\tiSpeed = 2;\n\t else if(get_Fan.equals(\"forte\"))\n\t\tiSpeed = 3;\n\t else\n\t\tiSpeed = 0;\n \n if(get_Swing.equals(\"2\"))\n\t\tiSwing = 1;\n\t else\n\t\tiSwing = 0;\n\n params.add(iStatus);\n params.add(Integer.parseInt(get_Temp));\n params.add(iSpeed);\n params.add(iSwing);\n return params;\n }", "public void Tarifa(String tipoTarifa){\n Tarifa = tipoTarifa;\n Regular = \"R\";\n Comercial = \"C\";\n\n }", "public void readParameters()\n {\n readParameters(getData());\n }", "private void getParameters() {\r\n\t\ttry {\r\n\t\t\tp_encoding = \"ISO-8859-1\";\r\n\t\t\tp_page_encoding = \"utf-8\";\r\n\t\t\tp_labels_data_file = \"resources/units/labels.txt\";\r\n\t\t\tp_multiplier_data_file = \"resources/units/muldata.txt\";\r\n\t\t\tp_category_data_file = \"resources/units/catdata.txt\";\r\n\t\t\tp_unit_data_file = \"resources/units/unitdata.txt\";\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treadDataFile(0, p_multiplier_data_file); //read data from external text file\r\n\t\treadDataFile(1, p_category_data_file); //read data from external text file\r\n\t\treadDataFile(2, p_unit_data_file); //read data from external text file\r\n\t\treadDataFile(3, p_labels_data_file); //read data from external text file\r\n\t}", "public Variable[] getParameters();", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"fecha\", fecha);\n params.put(\"hInicio\", inicio);\n params.put(\"hFin\", fin);\n params.put(\"cantCompas\", cantidad);\n params.put(\"id\", id);\n params.put(\"correo\", correo);\n params.put(\"min\",m);\n return params;\n }", "@Override\n\tprotected void prepare() {\n\t\t\n\t\t\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null);\n\t\t\t\n\t\t\telse if(name.equals(\"AD_Client_ID\"))\n\t\t\t\tp_AD_Client_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"AD_Org_ID\"))\n\t\t\t\tp_AD_Org_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param01\"))\n\t\t\t\tparam_01 = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param02\"))\n\t\t\t\tparam_02 = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param03\"))\n\t\t\t\tparam_03 = (String)para[i].getParameterAsString();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param04\"))\n\t\t\t\tparam_04 = (String)para[i].getParameterAsString();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param05\"))\n\t\t\t\tparam_05 = (Timestamp)para[i].getParameterAsTimestamp();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param06\"))\n\t\t\t\tparam_06 = (Timestamp)para[i].getParameterAsTimestamp();\n\t\t\t\n\t\t\telse if(name.equals(\"AD_User_ID\"))\n\t\t\t\tp_AD_User_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"Report\"))\n\t\t\t\tp_Report = (int)para[i].getParameterAsInt();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\t\n\t\t\n\t}", "protected abstract Object getConsequenceParameter(Object consequence);", "public String getParamReformaTributaria()\n {\n return this.paramReformaTributaria;\n }", "public Parametro[] getParametros() {\n return parametros;\n }", "public DTOGenerico(String nombreDTO, String[][] parametros) {\n this.nombreDTO = nombreDTO;\n this.parametros = parametros;\n }", "public void iniciarValores(){\r\n //Numero de campos da linha, do arquivo de saida filtrado\r\n this.NUM_CAMPOS = 106;\r\n this.ID = 0; //numero da ficha\r\n this.NUM_ARQUIVOS = 2070;\r\n\r\n this.MIN_INDICE = 1; //indice do cadastro inicial\r\n this.MAX_INDICE = 90; //indice do cadastro final\r\n this.NUM_INDICES = 90; //quantidade de cadastros lidos em cada arquivo\r\n }", "void setPosiblesValores(int[] valores);", "public static void asignarFuncionCeroParametros(Token id) {\t \n\t\ttablafunc1.put(id.image, 0);\n\t\tSystem.out.println(\"Se guardo la funcion '\" + id.image + \"' sin parametros \");\n\t}", "public void Metodo1(String valor1){\r\n\r\n }", "public static void MostrarPerroSegunCodigo( Perro BaseDeDatosPerros[]){\n int codigo;\r\n System.out.println(\"Ingrese el codigo del perro del cual decea saber la informacion\");\r\n codigo=TecladoIn.readLineInt();\r\n System.out.println(\"____________________________________________\");\r\n System.out.println(\"El nombre del Dueño es: \"+BaseDeDatosPerros[codigo].getNombreDuenio());\r\n System.out.println(\"El telefono del Dueño es :\"+BaseDeDatosPerros[codigo].getTelefonoDuenio());\r\n System.out.println(\"____________________________________________\");\r\n \r\n }", "private void handleParameters(Node node, ParamType paramType) {\n\n Parameters parameters = new Parameters();\n parameters.setName(node.attributes().get(\"name\").toString());\n Map<String, Object> parameter = new HashMap<String, Object>();\n\n Iterator<Node> itr = node.childNodes();\n while (itr.hasNext()) {\n Node childNode = itr.next();\n String key = childNode.attributes().get(\"name\").toString();\n String value = childNode.attributes().get(\"value\").toString();\n parameter.put(key, value);\n }\n parameters.setParameter(parameter);\n switch (paramType) {\n\n case TESTSUITE:\n testSuite.addParameters(parameters);\n break;\n case TESTCASE:\n currentTestCase.addParameters(parameters);\n break;\n case TESTSTEP:\n currentTestStep.addParameters(parameters);\n break;\n case PERMUTATION:\n currentPermutation.addParameters(parameters);\n break;\n }\n\n }", "private void modifierParametre() {\n if (getSelectedParamatre() == null) return;\n FenetreModifierParametre fenetreModifierParametre = new FenetreModifierParametre(getSelectedParamatre());\n fenetreModifierParametre.showAndWait();\n if (fenetreModifierParametre.getParametre() == null) return;\n Parametre temp = fenetreModifierParametre.getParametre();\n getSelectedParamatre().setNom(temp.getNom());\n getSelectedParamatre().setType(temp.getType());\n parametreListView.refresh();\n }", "String [] getParameters();", "INDArray getParams();", "public void setDefaultParameters() {\n\tsetParameterValue(\"genie.param.x\",\"genie.dfwx\");\n\tsetParameterValue(\"genie.param.x.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.x.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.x.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.x.end\",\"0.3\");\n\tsetParameterValue(\"genie.param.y\",\"genie.dfwy\");\n\tsetParameterValue(\"genie.param.y.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.y.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.y.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.y.end\",\"0.3\");\n\tsetParameterValue(\"genie.nsteps\",\"1001\");\n\tsetParameterValue(\"genie.npstp\",\"1000\");\n\tsetParameterValue(\"genie.iwstp\",\"1000\");\n\tsetParameterValue(\"genie.itstp\",\"10\");\n\tsetParameterValue(\"genie.restart\",\"n\");\n\tsetParameterValue(\"genie.tv\",\"3.65\");\n\tsetParameterValue(\"genie.ndta\",\"5\");\n\tsetParameterValue(\"genie.temp0\",\"5.0\");\n\tsetParameterValue(\"genie.temp1\",\"5.0\");\n\tsetParameterValue(\"genie.rel\",\"0.9\");\n\tsetParameterValue(\"genie.scf\",\"2.0\");\n\tsetParameterValue(\"genie.diff1\",\"2000.0\");\n\tsetParameterValue(\"genie.diff2\",\"1e-5\");\n\tsetParameterValue(\"genie.adrag\",\"2.5\");\n\tsetParameterValue(\"genie.diffamp1\",\"8111000\");\n\tsetParameterValue(\"genie.diffamp2\",\"79610\");\n\tsetParameterValue(\"genie.betaz1\",\"0.1111\");\n\tsetParameterValue(\"genie.betam1\",\"0.0\");\n\tsetParameterValue(\"genie.betaz2\",\"0.2626\");\n\tsetParameterValue(\"genie.betam2\",\"0.2626\");\n\tsetParameterValue(\"genie.scl_co2\",\"1.0\");\n\tsetParameterValue(\"genie.pc_co2_rise\",\"0.0\");\n\tsetParameterValue(\"genie.diffsic\",\"2000.0\");\n\tsetParameterValue(\"genie.tatm\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_ocean\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_land\",\"0.0\");\n\tsetParameterValue(\"genie.dfwx\",\"0.0\");\n\tsetParameterValue(\"genie.dfwy\",\"0.0\");\n\tsetParameterValue(\"genie.lout\",\"0000\");\n\tsetParameterValue(\"genie.lin\",\"0000.1\");\n }", "public void generarCuestionario() {\n setLayout(null);\n \n setTitle(\"Cuestionario de Fin de Curso\"); \n \n //Con el modelo construido debemos representar uestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n \n Opcion op1 = new Opcion();\n op1.setTitulo(\"Londres\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"Roma\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Paris\");\n op3.setCorrecta(true);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Oslo\");\n op4.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Cual es la capital de Francia\");\n p1.setOpciones(opciones);\n \n //Opiciones de la pregumta Numero 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Atlantico\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Indico\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Artico\");\n op23.setCorrecta(false);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Pacifico\");\n op24.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Cual es el oceano más grande del mundo?\");\n p2.setOpciones(opciones2);\n \n //Opiciones de la pregumta Numero 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"Cristobal Colon\");\n op31.setCorrecta(true);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Cristobal Nodal\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Cuahutemoc blanco\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Cuahutemoc\");\n op34.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien descubrio América?\");\n p3.setOpciones(opciones3);\n \n //Opiciones de la pregumta Numero 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"Fernanflo\");\n op41.setCorrecta(false);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Polinesios\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"Eh vegeta\");\n op43.setCorrecta(true);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Willyrex\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Quien es el mejor youtuber?\");\n p4.setOpciones(opciones4);\n \n //Opiciones de la pregumta Numero 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Amarillo patito\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Verde Sherec\");\n op52.setCorrecta(false);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Rojo me faltas tú\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Azul\");\n op54.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5 = {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿De que color es el cielo?\");\n p5.setOpciones(opciones5);\n \n //Opiciones de la pregumta Numero 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"200\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"100\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"45\");\n op63.setCorrecta(true);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"13\");\n op64.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿De cuantas localidades se compone una memoria de 8x5?\");\n p6.setOpciones(opciones6);\n \n //Opiciones de la pregumta Numero 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Try - Catch\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"IF\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Switch - Case\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"For anidado\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que estructura condicional se recomienda usar menos en una interfaz de usuario?\");\n p7.setOpciones(opciones7);\n \n //Opiciones de la pregumta Numero 8\n Opcion op81 = new Opcion();\n op81.setTitulo(\"Access\");\n op81.setCorrecta(false);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Oracle\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"MySQL\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Mongo DB\");\n op84.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Es una base de datos no relacional de uso moderno?\");\n p8.setOpciones(opciones8);\n \n //Opiciones de la pregumta Numero 9\n Opcion op91 = new Opcion();\n op91.setTitulo(\"GitHub\");\n op91.setCorrecta(true);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"MIcrosoft teams\");\n op22.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Zoom\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"Collaborate\");\n op94.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿Es una plataforma para trabajo en línea?\");\n p9.setOpciones(opciones9);\n\n //Opiciones de la pregumta Numero 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Prog. a nivel maquina\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Prog. orientada a objetos\");\n op102.setCorrecta(true);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"MySQL\");\n op103.setCorrecta(false);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"C++\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que aprendi en este curso?\");\n p10.setOpciones(opciones10);\n\n\n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n\n //Se agrega a este list la unica prgunta que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n c.setPreguntas(preguntas);\n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la preunta\n mostrarPregunta(preguntaActual);\n \n Salir.setVisible(false);\n siguiente.setEnabled(false);\n \n }", "Tarifas(int tipoTarifa, double costeMinuto, String nombreTarifa)\n {\n this.tipoTarifa = tipoTarifa;\n this.costeMinuto = costeMinuto;\n this.nombreTarifa = nombreTarifa;\n }", "@Override\n\tpublic void setParametri(Grafica grafica, GameStateDTO gameStateDTO) {\n\t\tgrafica.mostraMessaggio(\"Hai vinto un bonus tessera permesso!\\nScegli una tessera permesso\\n\");\n\n\t\tTesseraPermessoDTO tesseraPermessoDTO = grafica.scegliTesseraPermessoUsataONonUsata(\n\t\t\t\tgameStateDTO.getGiocatoreDTO().getTesserePermesso(),\n\t\t\t\tgameStateDTO.getGiocatoreDTO().getTesserePermessoUsate());\n\t\tbonusTesseraAcquistataNDTO.setTesseraPermesso(tesseraPermessoDTO);\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "public void setParametr(double p) {\n parametr = p; // додано 26.12.2011\n timeServ = parametr; // 20.11.2012\n\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }", "@Override\n\tpublic void prepare() throws Exception {\n\t\tsuper.prepare();\n\t\t//setto il titolo:\n\t\tthis.model.setTitolo(\"Quote ordinativo\");\n\t\t\n }", "public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }", "public Parametros() {\r\n semilla = SEMILLA_DEFECTO;\r\n numeroPistas = NUMERO_PISTAS_DEFECTO;\r\n duracionSlot = DURACION_SLOT_DEFECTO;\r\n frecuencia = FRECUENCIA_DEFECTO;\r\n duracionMedia = DURACION_MEDIA_DEFECTO;\r\n duracionDesviacion = DURACION_DESVIACION_DEFECTO;\r\n duracionMinima = DURACION_MINIMA_DEFECTO;\r\n demoraMedia = DEMORA_MEDIA_DEFECTO;\r\n demoraDesviacion = DEMORA_DESVIACION_DEFECTO;\r\n }", "public Valor(Integer id_valor, String valor){\n\n //A variavel da classe Construtora vai receber a variavel que está vindo por parametro (This faz referencia a classe)\n this.id_valor = id_valor ;\n this.valor = valor ;\n }", "private void parametrosLayout(Map<String, Object> iReportParameter) throws RuntimeException {\r\n\t\ttry {\r\n\t\t\tiReportParameter.put(\"imgLogoImss\",\"imagenesReportes/logoImss.jpg\");\r\n\t\t\tiReportParameter.put(\"imgGobiernoRepublica\",\"imagenesReportes/gobiernoRepublica.png\");\r\n\t\t\tiReportParameter.put(\"imgEscudoNacional\",\"imagenesReportes/escudoNacional.jpg\");\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.info(\"ERROR: Al obtener los parametros del Layaout del reporte.\", ex);\r\n\t\t\tthrow new RuntimeException(\"ERROR: Al obtener los parametros del Layaout del reporte.\", ex);\r\n\t\t}\r\n\t}", "public Map getParameters();", "public Veiculo(int numPassageiros, String modeloVeiculo, String tipo){\n this.numPassageiros = numPassageiros;\n this.tipo = tipo;\n this.modeloVeiculo = modeloVeiculo;\n }", "void setTitolo(String titolo);", "public void setValuesJTableResultados(){\n int alternativas = views.useController().getProblema().getAlternativas();\n TableModelPersonalizado modelo = new TableModelPersonalizado(alternativas, 1);\n jTableVectorResultados.setModel(modelo);\n jTableVectorResultados.setEnabled(false);\n jTableVectorResultados.getTableHeader().setResizingAllowed(false);\n jTableVectorResultados.getTableHeader().setReorderingAllowed(false);\n //HEADERS DE LA TABLA\n jTableVectorResultados.getColumnModel().getColumn(0).setHeaderValue(\" \"); \n //CONTENIDO DE LA TABLA\n for(int f = 0; f < alternativas; f++){\n modelo.setValueAt(df.format(views.useController().getProblema().getResult().getPriorityVector().get(f, 0)), f, 0);\n } \n }", "public void setMontoDescuento(double param){\n \n this.localMontoDescuento=param;\n \n\n }", "@Override\n public void asignaParametros() {\n paso = request.getParameter(\"pasoSig\")!=null?request.getParameter(\"pasoSig\"):\"0\";\n String paginaSig = \"\";\n HashMap param = new HashMap();\n Documento doc = new Documento();\n switch (Integer.parseInt(paso)){\n case 0:\n //paso inicial: obtener la vista de los parametros\n datos.clear();\n String vista = request.getParameter(\"vista\")!=null?request.getParameter(\"vista\"):\"\";\n String idoperacion = request.getParameter(\"operacion\")!=null?request.getParameter(\"operacion\"):\"\";\n //cargar los parametros al hash de datos\n datos.put(\"idoperacion\", idoperacion);\n sesion.setPaginaSiguiente(vista);\n break;\n case 1: case 6: case 50: case 51: case 52: case 53: case 97: case 98: case 99:\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 3: case 5: case 7:\n //editar documento(3) || baja de documentos(5) || activar documento(7)\n doc.setId(Integer.parseInt(request.getParameter(\"idDoc\")));\n datos.put(\"documento\", doc);\n datos.put(\"varios\", request.getParameter(\"varios\"));\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 8:\n //imprimir los docs seleccionados\n datos.put(\"reporte\", application.getRealPath(\"WEB-INF/Reportes/Nomina/Personal/documentosemple.jasper\"));\n //parametros\n param = new HashMap();\n param.put(\"LOGO\", application.getRealPath(\"/Imagenes/\"+datos.get(\"logo\").toString()));\n param.put(\"RUTAIMGS\", application.getRealPath(\"/Imagenes/Personal/Documentos\"));\n Empleado empl = (Empleado)datos.get(\"empleado\");\n param.put(\"EMPLEADO\", new Integer(empl.getNumempleado()));\n param.put(\"DOCS\", request.getParameter(\"dato1\"));\n datos.put(\"parametros\", param);\n break;\n }\n datos.put(\"paso\", paso);\n }", "private Map<String,Object> getParams(String nombre , int id){\n\t\t\tMap <String,Object> mapa;\n\t\t\tmapa = new HashMap<String,Object>();\n\t\t\t//Pasar parametros en de JasperReport\n\t\t\tmapa.put(\"alumnoNombre\", nombre);\n\t\t\tmapa.put(\"alumnoId\", id);\n\t\t\t\n\t\t\treturn mapa;\n\t\t\t\n\t\t}", "public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }", "public void restablecerParametro(String parametro, int ntp, Map<String, String> h) {\n \n if (parametro.compareTo(\"placa\") == 0) {\n \n // Reportes que necesitan placa\n int rpt_placa[] = {1,2,3,4,5,6,17};\n boolean rpt_con_placa = false;\n \n for (int rpt : rpt_placa) {\n if (rpt == ntp) {\n rpt_con_placa = true;\n break;\n }\n }\n \n if (!rpt_con_placa) {\n h.put(\"placa\", \"\");\n }\n } \n }", "public void setMarca(String marcaParametru)\n {\n this.marca = marcaParametru;\n }", "public Conta(String numero, String agencia, Double saldo) { // Construtor 1\n this.numero = numero;\n this.agencia = agencia;\n this.saldo = saldo;\n }", "public void editPAParameters() {\r\n \t\tdialogFactory.getDialog(new ParametricAnalysisPanel(model, model, model, this), \"Define What-if analysis parameters\");\r\n \t}", "public ParametroPorParametroPK(Integer idpadre, Integer idhijo) {\r\n\t\tparametroIdParametroPadre = idpadre;\r\n\t\tparametroIdParametroHijo = idhijo;\r\n\t}", "@Override\r\n\tpublic <T> EktParam creatParam(T t) {\n\t\todo = (ODO) t;\r\n\t\todo.setEktSql(null);\r\n\t\tif (EKTIO.getInstance().ektSwitch()) {\r\n\t\t\t\r\n\t\t\tReg reg = ektParam.getReg();\r\n\t\t\tPat pat = ektParam.getPat();\r\n\t\t\t\r\n\t\t\tTParm orderOldParm = ektParam.getOrderOldParm();\r\n\t\t\tTParm orderParm = ektParam.getOrderParm();\r\n\r\n\t\t\tif (odo == null) {\r\n\t\t\t\todoMainControl.messageBox(\"E0115\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tektParam.setOpType(\"\");\r\n\t\t\t\r\n\t\t\tTParm unParm = new TParm();\r\n\t\t\tif (orderOldParm == null) {\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tif(orderParm.getValue(\"OP_FLG\").length()>0 && orderParm.getInt(\"OP_FLG\")==5){\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTParm updateParm=orderParm.getParm(\"updateParm\");\r\n\t\t\t//TODO\r\n\t\t\tboolean unFlg = odoMainControl.updateOrderParm(updateParm, orderOldParm, unParm);\r\n\t\t\tTParm parm = new TParm();\r\n\t\t\t isDelOrder = false;// 执行删除医嘱\r\n\t\t\t//boolean exeDelOrder = false;// 执行删除医嘱\r\n\t\t\tString delFlg=orderParm.getValue(\"DEL_FLG\");\r\n\t\t\t// 如果出现所有医嘱删除也会出现IS_NEW = false 状态 所有需要在执行方法时先查询当前所有医嘱\r\n\t\t\t// 校验是否发送删除检验检查接口\r\n\t\t\tif(delFlg.equals(\"Y\")){\r\n\t\t\t\tisDelOrder = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\torderParm.setData(\"BUSINESS_TYPE\", \"ODO\");\r\n\t\t\tparm.setData(\"CASE_NO\",reg.caseNo());\r\n\t\t\torderParm.setData(\"REGION_CODE\", Operator.getRegion());\r\n\t\t\torderParm.setData(\"MR_NO\", pat.getMrNo());\r\n\t\t\torderParm.setData(\"NAME\", pat.getName());\r\n\t\t\torderParm.setData(\"IDNO\", pat.getIdNo());\r\n\t\t\torderParm.setData(\"SEX\", pat.getSexCode() != null\r\n\t\t\t\t\t&& pat.getSexCode().equals(\"1\") ? \"男\" : \"女\");\r\n\t\t\t// 送医疗卡,返回医疗卡的回传值\r\n\t\t\torderParm.setData(\"INS_FLG\", \"N\");// 医保卡操作\r\n\t\t\torderParm.setData(\"UN_FLG\", unFlg ? \"Y\" : \"N\");// 医生修改的医嘱超过医疗卡金额执行的操作\r\n\t\t\torderParm.setData(\"unParm\", unParm.getData());// 获得执行修改的医嘱\r\n\t\t\tif (null != orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t&& orderOldParm.getValue(\"OPBEKTFEE_FLG\").equals(\"Y\")) {\r\n\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\t//直接收费操作如果有修改的收费医嘱 不能执行取消操作\r\n\t\t\tif(null == orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t|| orderOldParm.getValue(\"OPBEKTFEE_FLG\").length()<=0){\r\n\t\t\t\tif(unFlg)\r\n\t\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\tif (odoMainControl.resultData.getCount(\"CASE_NO\")>0) {//====pangben 2014-1-20 建行卡校验\r\n\t\t\t\todoMainControl.messageBox(\"P0001\");\r\n//\t\t\t\tparm.setData(\"OP_TYPE\", 5);\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}else{\r\n\t\t\t\todoMainControl.ektReadParm = EKTIO.getInstance().TXreadEKT();\r\n\t\t\t\tif (null == odoMainControl.ektReadParm || odoMainControl.ektReadParm.getErrCode() < 0\r\n\t\t\t\t\t\t|| null == odoMainControl.ektReadParm.getValue(\"MR_NO\")) {\r\n\t\t\t\t\todoMainControl.messageBox(\"医疗卡读卡有误。\");\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"未读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(red);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\t\treturn ektParam;\r\n\t\t\t\t}else{\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"已读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(green);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!odoMainControl.ektReadParm.getValue(\"MR_NO\").equals(odoMainControl.getValue(\"MR_NO\"))) {\r\n\t\t\t\todoMainControl.messageBox(\"病患信息不符,此医疗卡病患名称为:\"\r\n\t\t\t\t\t\t+ odoMainControl.ektReadParm.getValue(\"PAT_NAME\"));\r\n\t\t\t\todoMainControl.ektReadParm = null;\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tint type=0;\r\n\t\t\t//parm.setData(\"BILL_FLG\", \"Y\");\r\n\t\t\torderParm.setData(\"ektParm\", odoMainControl.ektReadParm.getData()); // 医疗卡数据\r\n\t\t\t\r\n\t\t\t\tboolean isNull = true;\r\n\t\t\t\tOpdOrder opdOrder = odo.getOpdOrder();\r\n\t\t\t\tString lastFilter = opdOrder.getFilter();\r\n\t\t\t\topdOrder.setFilter(\"\");\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\tfor (int i = 0; i < opdOrder.rowCount(); i++) {\r\n\t\t\t\t\tif(opdOrder.getItemString(i, \"ORDER_CODE\").length() > 0){\r\n\t\t\t\t\t\tisNull = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\topdOrder.setFilter(lastFilter);\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\r\n\t\t\tektParam.setNull(isNull);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\todoMainControl.messageBox_(\"医疗卡接口未开启\");\r\n\t\t\treturn null;\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\treturn ektParam;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void codigo(String cadena, String codigo,int codigos,Reserva2 reserva,JDateChooser dateFechaIda,JDateChooser dateFechaVuelta,JTextField DineroFaltante) {\n\t\tcadena=codigo.split(\",\")[1];\n\t\tubicacion=codigo.split(\",\")[5];\n\t\tnombre=codigo.split(\",\")[3];\n\t\tprecio=codigo.split(\",\")[8];\n\t\tcodigos=Integer.parseInt(cadena);\n\t\tSystem.out.println(\"hola\");\n\t\tSystem.out.println(Modelo1.contador);\n\t\t\n\t\tif(Modelo1.contador==1) {\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigohotel(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==2) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigocasa(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigocasa());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==3) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigoapatamento(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigoapatamento());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t}\n\t\t\n\t}", "public ParamShoppingCartTest(int precio1, int precio2) {\n \n this.precio1 = precio1;\n this.precio2 = precio2; \n }", "public Map<String,Object> generaParametrosRegistroContador (NdtContadorPublicoAutDTO ndtContadorPublicoAutDTO) throws RuntimeException {\r\n\t\tfinal Map<String, Object> iReportParameter = new HashMap<String, Object>();\r\n\t\t\r\n\t\tparametrosLayout(iReportParameter);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (ndtContadorPublicoAutDTO != null) {\r\n\t\t\t\tiReportParameter.put(\"fecha\", UtileriaFechas.parseDateToString(new Date(), \"dd/MM/yyyy\"));\r\n\t\t\t\tiReportParameter.put(\"numTramiteNotaria\", ndtContadorPublicoAutDTO.getListNdtCpaTramites() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0) != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0).getNumTramiteNotaria() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0).getNumTramiteNotaria() : \"\" : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"nombreCompleto\", ndtContadorPublicoAutDTO.getUsuarioSesion() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getNombreCompleto() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getNombreCompleto() : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"RFC\", ndtContadorPublicoAutDTO.getUsuarioSesion() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getRfc() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getRfc() : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"CURP\", ndtContadorPublicoAutDTO.getUsuarioSesion() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getCurp() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getCurp() : \"\" : \"\");\r\n\t\t\t\tStringBuilder domicilioFiscal = null;\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal() != null && ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal() != null) {\r\n\t\t\t\t\tdomicilioFiscal = new StringBuilder();\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCalle() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCalle() +\" \" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExterior1() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExterior1() +\"\" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExteriorAlf() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExteriorAlf() +\" \" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInterior() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInterior() +\" \" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInteriorAlf() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInteriorAlf() +\" \" : \"\");\r\n\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento() != null) {\r\n\t\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad() != null && \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio() != null && \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getEntidadFederativa() != null) {\r\n\t\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getEntidadFederativa().getNombre() != null ?\r\n\t\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getEntidadFederativa().getNombre() +\" \" : \"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad() != null && \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio() != null) {\r\n\t\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getNombre() != null ?\r\n\t\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getNombre() +\" \" : \"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getNombre() != null ? \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getNombre() +\" \" : \"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCodigoPostal() != null) {\r\n\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCodigoPostal().getCodigoPostal() != null ?\r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCodigoPostal().getCodigoPostal() : \"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"domicilioFiscal\", domicilioFiscal.toString() != null ? domicilioFiscal.toString() : \"\");\r\n\t\t\t\t\r\n\t\t\t\tString numeroCedula = \"\";\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getListNdtR1DatosPersonales() != null && !ndtContadorPublicoAutDTO.getListNdtR1DatosPersonales().isEmpty()) {\r\n\t\t\t\t\tnumeroCedula = ndtContadorPublicoAutDTO.getListNdtR1DatosPersonales().get(0).getCedulaProfesional();\r\n\t\t\t\t\tif (numeroCedula == null) {\r\n\t\t\t\t\t\tnumeroCedula = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"numeroCedulaProfesional\", numeroCedula);\r\n\t\t\t\tiReportParameter.put(\"razonSocialDespacho\", ndtContadorPublicoAutDTO.getNdtDespachosDTO() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtDespachosDTO().getRazonSocial() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtDespachosDTO().getRazonSocial() : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"razonSocialColegio\", ndtContadorPublicoAutDTO.getNdtColegioDTO() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtColegioDTO().getRazonSocial() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtColegioDTO().getRazonSocial() : \"\" : \"\");\r\n\t\t\t\tString tipoCurp = \"\";\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getUsuarioSesion() != null && ndtContadorPublicoAutDTO.getUsuarioSesion().getCurp() != null) {\r\n\t\t\t\t\ttipoCurp = ndtContadorPublicoAutDTO.getUsuarioSesion().getCurp().substring(12, 13);\r\n\t\t\t\t\tif (tipoCurp != \"NE\") {\r\n\t\t\t\t\t\ttipoCurp = \"Mexicana\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttipoCurp = \"Extranjera\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"nacionalidad\", tipoCurp);\r\n\t\t\t\tiReportParameter.put(\"cadenaOriginal\", ndtContadorPublicoAutDTO.getCadenaOriginal() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getCadenaOriginal() : \"\");\r\n\t\t\t\tString selloDigitalIMSS = \"\";\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getListNdtCpaTramites() != null && !ndtContadorPublicoAutDTO.getListNdtCpaTramites().isEmpty()) {\r\n\t\t\t\t\tselloDigitalIMSS = ndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0).getSelloDigitalImss();\r\n\t\t\t\t\tif (selloDigitalIMSS == null) {\r\n\t\t\t\t\t\tselloDigitalIMSS = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"selloDigitalIMSS\", selloDigitalIMSS);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"ERROR: al generar los par\\u00e1metros preliminares del reporte de solicitud de registro de un contador publico.\", ex);\r\n\t\t\tthrow new RuntimeException(\"ERROR: al generar los par\\u00e1metros preliminares del reporte de solicitud de registro de un contador publico.\", ex);\r\n\t\t}\r\n\t\treturn iReportParameter;\r\n\t}", "public ChConj(String metodo)\n {\n vtn = this;\n initComponents();\n setLocationRelativeTo(null);\n Shape forma = new RoundRectangle2D.Double(0, 0, this.getBounds().width, this.getBounds().height, 30, 30);\n vtn.setShape(forma);\n RSEffectFade.setFadeWindowIn(this, 30, 0.1f);\n lblMod.setText(\"Modo seleccionado: \" + metodo);\n // 248 limite de frente\n // 6 limite atras\n if (metodo.equals(\"auto\"))\n {\n lblMod.setText(\"Modo seleccionado: automatico\");\n lblTitulo.setText(\"Aleatorizando conjunto de numeros\");\n txtConjunto.setEditable(false);\n }\n if (metodo.equals(\"manual\"))\n {\n btnHiloR.setVisible(false);\n btnHiloRKill.setVisible(false);\n }\n }", "protected String paramString() {\n return super.paramString() + \",\" + \"caretColor=\" + caretColor + \",\"\n + \"disabledTextColor=\" + disabledTextColor + \",\" + \"editable=\"\n + isEditable + \",\" + \"margin=\" + margin + \",\"\n + \"selectedTextColor=\" + selectedTextColor + \",\"\n + \"selectionColor=\" + selectionColor;\n\n }", "void datos(ConversionesCapsula c) {\n String v;\n\n\n v = d.readString(\"Selecciona opcion de conversion\"\n + \"\\n1 ingles a metrico\"\n + \"\\n2 metrico a ingles\"\n + \"\\n3 metrico a metrico\"\n + \"\\n4 ingles a ingles\");\n c.setopc((Integer.parseInt(v)));\n int opc = (int) conversion.getopc();\n switch (opc) {\n case 1:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a metros\"\n + \"\\n2 Pies a centimetros\"\n + \"\\n3 Pies a Metros y Centimetros\"\n + \"\\n4 Pulgadas a metros\"\n + \"\\n5 Pulgadas a centimetros\"\n + \"\\n6 Pulgadas a Metros y Centimetros\"\n + \"\\n7 Pies y Pulgadas a metros\"\n + \"\\n8 Pies y Pulgadas a centimetros\"\n + \"\\n9 Pies y Pulgadas a Metros y Centimetros\");\n c.setopc1((Integer.parseInt(v)));\n\n\n break;\n case 2:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Pies\"\n + \"\\n2 Metros a Pulgadas\"\n + \"\\n3 Metros a Pies y Pulgadas\"\n + \"\\n4 Centimetros a Pies\"\n + \"\\n5 Centimetros a Pulgadas\"\n + \"\\n6 Centimetros a Pies y Pulgadas\"\n + \"\\n7 Metros y Centimetros a Pies\"\n + \"\\n8 Metros y Centimetros a Pulgadas\"\n + \"\\n9 Metros y Centimetros a Pies y Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 3:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Centimetros\"\n + \"\\n2 Metros a Metros y Centimetros\"\n + \"\\n3 Centimetros a Metros\"\n + \"\\n4 Centimetros a Metros y Centimetros\"\n + \"\\n5 Metros y Centimetros a Centimetros\"\n + \"\\n9 Metros y Centimetros a Metros\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 4:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a Pulgadas\"\n + \"\\n2 Pies a Pies y Pulgadas\"\n + \"\\n3 Pulgadas a Pies\"\n + \"\\n4 Pulgadas a Pies y Pulgadas\"\n + \"\\n5 Pies y Pulgadas a Pies\"\n + \"\\n9 Pies y Pulgadas a Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n }\n\n do v = d.readString(\"\\n Ingrese el valor: \\n\");\n while (!isNum(v));\n c.setvalor((Double.parseDouble(v)));\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id_pelanggan\", id_pelanggan);\n params.put(\"isi_pengaduan\", isi);\n return params;\n }", "public void setParametroArqRemessa(Integer parametroArqRemessa) {\n this.parametroArqRemessa = parametroArqRemessa;\n }", "public static void asignarFuncionDosParametros(Token id, Token param1, Token param2) {\t\n\t\tHashtable variables = tabla.getTable(); \n\t\ttablafunc1.put(id.image, tablafunc2);\n\t\tString parametros = param1.image + \", \" + param2.image;\n\t\tint valorParam1 = (Integer)variables.get(param1.image);\n\t\tint valorParam2 = (Integer)variables.get(param2.image);\n\t\t//el valor que se le da es la suma de los valores que ya tenian esos parametros\n\t\ttablafunc2.put(parametros, valorParam1 + valorParam2);\n\t\tSystem.out.println(\"Se guardo la funcion '\" + id.image + \"' con los parametros '\" + parametros + \"'\");\n\t}", "public static String formatarCampoParaConcatenacao(Object parametro) {\r\n\t\tif (parametro == null) {\r\n\t\t\treturn \"|\";\r\n\t\t} else {\r\n\t\t\treturn parametro + \"|\";\r\n\t\t}\r\n\t}", "public void solicitarDatos() {\n Scanner scanner = new Scanner(System.in);\n Terreno terreno = new Terreno();\n Vivienda vivienda = new Vivienda();\n\n //preguntamos datos:\n System.out.println(\"Metros cuadrados: \");\n Integer m2 = scanner.nextInt();\n\n System.out.println(\"Precio: \");\n Double precio = scanner.nextDouble();\n\n System.out.println(\"Nombre del pueblo: \");\n String nombrePueblo = scanner.next();\n\n System.out.println(\"ID: \");\n Integer id = scanner.nextInt();\n\n //escogemos opción:\n\n System.out.println(\"Estás creando un Terreno(t) o una Vivienda(v)?: \");\n String opcion = scanner.next();\n //controlamos que la opción introducida sea válida y el precio mayor que 0 en ambos casos:\n //(si el precio es menor a 0, directamente no se crea el objeto a la hora de añadir)\n if (opcion.equals(\"t\") && precio > 0) {\n terreno.solicitarDatos(m2, precio, nombrePueblo, id);\n } else if (opcion.equals(\"v\") && precio > 0) {\n vivienda.solicitarDatos(m2, precio, nombrePueblo, id);\n } else {\n System.out.println(\"El precio es menor a 0 o no has introducido una opción correcta\");\n }\n }", "public abstract void setearEstadosPropuests(String estado, String propuesta, String fechaCambio) throws ParseException;", "public ImpresionTermica(String fecha,String numero,String mensajero,String cliente,String telefono, String direccion, String municipio,String nota,String productos,String total,String puntos) {\n this.contenidoFactura = this.contenidoFactura.replace(\"{{date}}\", fecha);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{numped}}\", numero);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{mensa}}\", mensajero);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{client}}\", cliente);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{tel}}\", telefono);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{dir}}\", direccion);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{mun}}\", municipio);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{note}}\", nota);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{items}}\", productos);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{total}}\", total);\n this.contenidoFactura = this.contenidoFactura.replace(\"{{puntos}}\", puntos);\n \n }", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Parametres\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\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\tnew FEN_Param();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "List<FichaDocente> listarDocentesxParametroxFacultad(String parametro, Integer integer);", "public void configurarTermino() {\n System.out.println(\"......................\");\n System.out.println(\"Seleccionar Termino Academico para el juego\");\n int i = 1;\n if (Termino.terminos.size() != 0) {\n for (Termino t : Termino.terminos) {\n System.out.println(i + \". \" + t);\n i++;\n }\n Entrada entrada = new Entrada();\n int opc;\n do {\n opc = entrada.Entera(\"Ingrese opcion(1-\" + (i - 1) + \"): \");\n if (!(opc >= 1 && opc <= (i - 1))) {\n System.out.println(\"opcion no valida\");\n }\n } while (!(opc >= 1 && opc <= (i - 1)));\n this.t = Termino.terminos.get(opc - 1);\n Juego juego = new Juego(t);\n PrcTermino.juego = juego;\n } else {\n System.out.println(\"No hay terminos academicos registrados\");\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\tFile arxiu = null;\r\n\tFileReader fr = null; //el pipe (tub de lectura)\r\n\tBufferedReader br = null; //on emmagatzem la informació del pipe\r\n\t\r\n\t//Creem cada un dels treballadors, ja que són de tipus diferents\r\n\tAlumne_DUAL alumnedual = new Alumne_DUAL();\r\n\tTreballador_Parcial treballadorParcial = new Treballador_Parcial();\r\n\tTreballador_TempsComplet treballadorTempsComplet = new Treballador_TempsComplet();\r\n\t\r\n\tString tipus_treballador = \"\"; //Aqui guardarem el tipus de trebllador, ex: alumnedual, temps parcial...\r\n\tString agafar_preu_hora = \"\"; //Agafem el preu per hora que tenen els treballadors tipus alumnedual i temps parcial (variable tipus String que convertirem a double)\r\n\tdouble preu_hora = 0.0; //Aquí guardem el preu per hora que tenen els treballadors tipus alumnedual i temps parcial (després de convertir-lo a double) \r\n\tString agafar_hores_totals = \"\"; //Agafem les hores totals que tenen els treballadors tipus alumnedual i temps parcial (variable tipus String que convertirem a int)\r\n\tint hores_totals = 0; //Aquí guardem les hores totals que tenen els treballadors tipus alumnedual i temps parcial (després de convertir-les a int)\r\n\tString nom_treballador = \"\"; //Agafem el nom de cada treballador\r\n\tString nom_feina = \"\"; //Agafem l'ofici de cada treballador\r\n\r\n\t\r\n\ttry{\r\n\t\t//Obrim el fitxer\r\n\t arxiu = new File(\"nomines.txt\"); //el fitxer es diu nomines.txt\r\n\t fr = new FileReader(arxiu);\r\n\t br = new BufferedReader(fr);\r\n\t \r\n\t //Amb el bucle llegirem linia a linia\r\n\t String linia;\r\n\t\twhile((linia = br.readLine())!=null){//mentre hi ha linies per llegir\t\t\t\r\n\t\t\tint i = 0;\r\n\t \tString [] paraula = linia.split(\" \"); //dividim el text en paraula per paraula\r\n\t \twhile(i<paraula.length){\r\n\t \t\tnom_treballador = paraula[1]; //la segona paraula que llegim correspon al nom del treballador\r\n\t \t\tnom_feina = paraula[2]; //la tercera paraula que llegim correspon al nom del treball del treballador\r\n\t \t\tagafar_preu_hora = paraula[3]; //la quarta paraula que llegim correspon al preu per hora del treballador menys en el tipus de treballador TEMPS_COMPLET, que equival al salari setmanal\r\n\t \t\tagafar_hores_totals = paraula[4]; //la cinquena paraula que llegim correspon a les hores totals del treballador menys en el tipus de treballador TEMPS_COMPLET, que equival a les deduccions fiscals\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t\t \t\r\n\t \tpreu_hora = Double.parseDouble(agafar_preu_hora); //convertim la variable string preu_hora a tipus double per poder fer els càlculs\r\n\t \thores_totals = Integer.parseInt(agafar_hores_totals); //convertim la variable string hores_totals a numero enter per poder fer els càlculs\r\n\t \t \r\n\t \tif(linia.startsWith(\"1\")){ //si al començament de la línia hi ha un 1 es tracta del tipus de treballador temps_complet\r\n\t\t \ttipus_treballador = \"TREBALLADOR A TEMPS COMPLET\";\r\n\t\t \ttreballadorTempsComplet.setsalariSetmanal(Double.parseDouble(paraula[3])); //li assignem el salari setmanal per poder calcular quan li correspon a pagar\r\n\t\t \ttreballadorTempsComplet.deduccioFiscal(Double.parseDouble(paraula[4])); //li assignem les deduccions fiscals per poder calcular quan li correspon a pagar\r\n\t\t \t//quantitat a pagar correspon a la resta del salari setmanal - deduccions fiscals\r\n\t\t \tSystem.out.println(\"Al treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+treballadorTempsComplet.quantitatAPagar()+\" €\"); \r\n\t \t}else{\r\n\t \t\tif(linia.startsWith(\"2\")){ //si al començament de la línia hi ha un 2 es tracta del tipus de treballador temps_parcial\r\n\t \t\t\ttipus_treballador = \"TREBALLADOR A TEMPS PARCIAL\";\r\n\t \t\t\ttreballadorParcial.setPreuHora(preu_hora);\r\n\t \t\t\tSystem.out.println(\"\\nAl treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+treballadorParcial.quantitatAPagar(hores_totals)+\" €\");\r\n\t \t\t}\r\n\t \t\telse{\r\n\t \t\t\ttipus_treballador = \"ALUMNE DUAL\"; //si al començament de la línia hi ha un 3 es tracta del tipus de treballador alumne_dual\r\n\t \t\t\talumnedual.setPreuHora(preu_hora); \t\r\n\t\t\t \tSystem.out.println(\"\\nAl treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+alumnedual.quantitatAPagar(hores_totals)+\" €\");\r\n\t \t\t}\r\n\t \t}\t\r\n\t\t}\r\n\t \t\r\n\t }catch(Exception e){\r\n\t \t\tSystem.out.println(e.getMessage());\r\n\t }finally{\r\n\t \t//Entrarà al finally tant si falla com si no, per tal de tancar el fitxer\r\n\t \ttry{\r\n\t \t\tif(null!=fr){\r\n\t \t\t\tfr.close();\r\n\t \t\t}\r\n\t \t}catch(Exception e){\r\n\t \t\tSystem.out.println(e.getMessage());\r\n\t \t}\r\n\t }\r\n\t\r\n\t\t\r\n\t}" ]
[ "0.7264469", "0.6193878", "0.6159213", "0.6151153", "0.61139256", "0.602584", "0.601017", "0.59767133", "0.5925222", "0.5893322", "0.5831159", "0.5830932", "0.57233274", "0.57007414", "0.5687425", "0.5622903", "0.55916023", "0.5586486", "0.55829436", "0.55816", "0.5563801", "0.5557105", "0.5529502", "0.55271465", "0.5493003", "0.5489766", "0.54895604", "0.5486988", "0.5476373", "0.5474611", "0.5465664", "0.5459728", "0.5447789", "0.54231375", "0.5399051", "0.5391828", "0.5391336", "0.53886646", "0.53827333", "0.5380364", "0.537524", "0.5370401", "0.53394395", "0.53310525", "0.53204316", "0.531649", "0.5315976", "0.53070515", "0.5299671", "0.52966267", "0.5294472", "0.5282829", "0.5278577", "0.52766037", "0.52715546", "0.52540064", "0.52531797", "0.5250387", "0.52482957", "0.5224814", "0.522172", "0.52203023", "0.52154446", "0.5215265", "0.5212115", "0.52049303", "0.5204819", "0.5184133", "0.51749825", "0.51571834", "0.5156916", "0.5154244", "0.5152133", "0.5149966", "0.514854", "0.513715", "0.5135739", "0.51316047", "0.51303726", "0.5129069", "0.51277196", "0.5127546", "0.51240396", "0.5123865", "0.512345", "0.5123236", "0.51046044", "0.51044595", "0.51033056", "0.5100851", "0.5091141", "0.5088123", "0.50878716", "0.5083958", "0.5081297", "0.5078749", "0.50764704", "0.5070184", "0.5064662", "0.5062685", "0.5055532" ]
0.0
-1
/ Faz uma consulta de texto ao classificador e retorna as classes de treino rankeadas por similaridade.
public abstract Rank<String,String> query(String input) throws ClassificationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList getClassList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n int adjectiveExist = 0;\n int adjectiveNoun = 0;\n String adj = \"\";\n String storingClass = \"\";\n HashSet classWithAttr = new HashSet();\n storingClassWithAttr = new HashMap<String, HashSet>();\n\n List<Tree> leaves;\n String phraseNotation = \"(NP([<NNS|NN|NNP]$VP))\";//@\" + phrase + \"! << @\" + phrase;\n\n /*For the single Tree */\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n String tempClass = \"\";\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n adjectiveExist = 0;\n adjectiveNoun = 0;\n int separator = 0;\n\n if (innerChild.length > 1) {\n int count = 1;\n int loopCount = 1;\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).yieldWords().get(0).word();\n if (dictionaryForClassList.contains(adj)) {\n adj = \"\";\n }\n }\n //if adjective exist store the classes and attributes separately\n if (adjectiveExist == 1) {\n storeClassesAndAttributesWhenAdjectiveExistToIdentifyClasses(inChild, adjectiveNoun, adj);\n } else {\n //storeClassesAndAttributesWhenAdjectiveNotExistToIdentifyClasses(inChild, loopCount, innerChild, separator, tempClass, count);\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\") || (inChild.value().equals(\"NNP\")))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (separator == 0) {\n if (loopCount == innerChild.length) {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n String word = \"\";\n word = stemmingForAWord(identifiedWord);\n if (!dictionaryForClassList.contains(word)) {\n nounList.remove(tempClass);\n nounList.add(word);\n attributeLists.add(tempClass);\n \n }\n\n } else if (count == 1) {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n String word = stemmingForAWord(identifiedWord);\n nounList.add(word);\n tempClass = word;\n storingClass = word;\n\n } else {\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n if (tempClass.contains(\"_\")) {\n nounList.remove(tempClass);\n } else {\n nounList.remove(morphology.stem(tempClass));\n nounList.remove(tempClass);\n }\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n\n tempClass += \" \" + identifiedWord;\n nounList.add(tempClass);\n storingClass = tempClass;\n }\n\n count++;\n } else {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n String word = stemmingForAWord(identifiedWord);\n nounList.add(word);\n tempClass = word;\n storingClass = word;\n }\n }\n\n }\n loopCount++;\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n nounList.add(morphology.stem(identifiedWord));\n } else {\n nounList.add(identifiedWord);\n }\n }\n if (inChild.value().equals(\"JJ\")) {\n //leaves correspond to the tokens\n leaves = inChild.getLeaves();\n nounList.add(((leaves.get(0).yieldWords()).get(0).word()));\n }\n }\n }\n }\n System.out.println(\"NOUN LIST :\" + nounList);\n return nounList;\n }", "public static void partC() throws IOException {\n\t\tString filePath = \"C:\\\\eclipse-workspace\\\\Regular Expressions\\\\2021_ClassAvailability.txt\";\n\t\t\n\t\t//Converting the text file into a single string.\n\t\tString contents = Files.readString(Path.of(filePath));\n\t\t\n\t\tString RegEx1 = \"[A-Z]{2,4}-\\\\d{3}[A-Z]?-[\\\\d|A-Z]1\"; //Pattern for finding class ID\n\n\t\t//Creating pattern object r\n\t\tPattern r = Pattern.compile(RegEx1);\n\t\t\n\t\t//Creating matcher object m\n\t\tMatcher m = r.matcher(contents);\n\t\t\t\t\n\t\t//Creating an array list used to store the various pattern matches found by the RegEx\n\t\tArrayList<String> uniqueClasses = new ArrayList<String>();\n\t\t\n\t\t//while the matcher continues to find matches, these matches are printed and a counter is tallied up.\n\t\twhile (m.find())\n\t\t{\n\t\t\tuniqueClasses.add(m.group());\n\t\t\t\n\t\t}\t\n//\t\tSystem.out.println(uniqueClasses); //Used to print out the list of all unique classes\n\t\t\n\t\t\n\t\t//Converting the array list uniqueClasses into a string so that RegEx can be used on it\n\t\tString listString = String.join(\",\", uniqueClasses);\n\t\n\t\tString RegEx3 = \"[A-Z]{2,4}\"; //RegEx for finding the class type\n\t\t\n\t\t//Creating pattern object o\n\t\tPattern o = Pattern.compile(RegEx3);\n\t\t\n\t\t//Creating matcher object p\n\t\tMatcher p = o.matcher(listString);\n\t\t\n\t\t//Creating hashmap for storing the unique classes\n\t\tHashMap<String, Integer> uniqueClassCounter = new HashMap<String, Integer>();\n\t\t\n\t\t//While the matcher continues to find matching patterns in the listString string...\n\t\twhile (p.find())\n\t\t{\n//\t\t\tSystem.out.println(p.group()); //Prints out the type of each unique class found in the array list above\n\t\t\t\n\t\t\t//checking the hashmap to determine if the key (class department code) being checked already exists\n\t\t\tif (uniqueClassCounter.containsKey(p.group())) {\n int uniqueClassCount = (int)uniqueClassCounter.get(p.group());\n uniqueClassCount++;//increases the value stored with the department code key to keep track of the number of times that department key is found \n uniqueClassCounter.put(p.group(), uniqueClassCount );\n } else {\n uniqueClassCounter.put(p.group(), 1);//Stores new department code keys\n }//end if else\n\t\t}//end while\n\t\t\n\t\t\n\t\t//for loop used to print out the hashmap.\n\t\tfor (HashMap.Entry<String, Integer> entry :uniqueClassCounter.entrySet()) {\n String uniqueClassString = entry.getKey();\n int uniqueClassInt = entry.getValue();\n System.out.println(uniqueClassString + \" : \" + uniqueClassInt);\n }//end for loop\n\t\tSystem.out.println();\n\t\t\n\t}", "public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}", "public static Set<Classification> getClassifications() throws Exception {\r\n String xmlRequest = \"<request><request-header><protocol-version>2</protocol-version></request-header></request>\";\r\n try {\r\n String responseXML = FSHelperLibrary.sendRequest(null, RequestType.RT_GET_CLASSIFICATIONS, xmlRequest);\r\n LoggerUtil.logDebug(\"Get Classificatios Response XML: \" + responseXML);\r\n\r\n Node rootNode = XMLUtil.getRootNode(responseXML);\r\n Node requestStatusNode = XMLUtil.parseNode(\"request-status\", rootNode);\r\n String returnValue = XMLUtil.parseString(\"return-value\", requestStatusNode);\r\n\r\n if (!\"1\".equals(returnValue)) {\r\n LoggerUtil.logError(\"Get Classificatios Response XML: \" + responseXML);\r\n String errorMsg = XMLUtil.parseString(\"error-message\", requestStatusNode);\r\n String dispMsg = XMLUtil.parseString(\"display-message\", requestStatusNode);\r\n if (dispMsg == null || dispMsg.trim().isEmpty()) {\r\n dispMsg = errorMsg;\r\n }\r\n throw new Exception(dispMsg);\r\n }\r\n\r\n NodeList lNodeList = XMLUtil.parseNodeList(\"classifications/classification\", rootNode);\r\n if (lNodeList != null && lNodeList.getLength() > 0) {\r\n Set<Classification> lClassifications = new LinkedHashSet<Classification>();\r\n for (int i = 0; i < lNodeList.getLength(); i++) {\r\n Node lNode = lNodeList.item(i);\r\n String lstrClassId = XMLUtil.parseString(\"id\", lNode);\r\n String lstrClassName = XMLUtil.parseString(\"name\", lNode);\r\n String lstrClassDesc = XMLUtil.parseString(\"description\", lNode);\r\n String lstrStatus = XMLUtil.parseString(\"status\", lNode);\r\n // Take only active classification\r\n if (\"1\".equals(lstrStatus)) {\r\n Classification lClassification = new Classification();\r\n lClassification.setId(lstrClassId);\r\n lClassification.setName(lstrClassName);\r\n lClassification.setDescription(lstrClassDesc);\r\n lClassifications.add(lClassification);\r\n }\r\n }\r\n XMLDBService.updateClassifications(lClassifications);\r\n return lClassifications;\r\n }\r\n } catch (FSHelperException e) {\r\n throw e;\r\n }\r\n return null;\r\n }", "public FindResult findClass(String className);", "private void classify(final String text) {\n executorService.execute(\n () -> {\n // TODO 7: Run sentiment analysis on the input text\n List<Category> results = textClassifier.classify(text);\n\n // TODO 8: Convert the result to a human-readable text\n String textToShow = \"Input: \" + text + \"\\nOutput:\\n\";\n for (int i = 0; i < results.size(); i++) {\n Category result = results.get(i);\n textToShow +=\n String.format(\" %s: %s\\n\", result.getLabel(), result.getScore());\n }\n textToShow += \"---------\\n\";\n\n // Show classification result on screen\n showResult(textToShow);\n });\n }", "String getResultClass();", "List<CabinClassModel> findCabinClasses();", "java.util.List<org.landxml.schema.landXML11.ClassificationDocument.Classification> getClassificationList();", "public FuzzyNodeClassif( String buffer, int nb_class ) throws Exception {\n super( buffer );\n this.nb_class = nb_class;\n // lecture du noeud\n this.Variables.add(new Integer(st.nextToken().trim()) ); // lecture de la classe majoritaire\n for( int i=0 ; i<nb_class ; i++ )\n this.Variables.add(new Double(st.nextToken().trim())); // lecture des effectifs par classe\n }", "abstract String classify(Instance inst);", "public static ArrayList<String> getResultatNoms() throws IOException{\n return ctrl_Persistencia.llistaFitxers(\"@../../Dades\",\"resultats\");\n }", "public void classify() {\n\t\ttry {\n\t\t\tdouble pred = classifier.classifyInstance(instances.instance(0));\n\t\t\tSystem.out.println(\"===== Classified instance =====\");\n\t\t\tSystem.out.println(\"Class predicted: \" + instances.classAttribute().value((int) pred));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Problem found when classifying the text\");\n\t\t}\t\t\n\t}", "public String[] readClasses();", "public List<TagPregunta> findMatchingTags(String parcial);", "public List<Models.Class> showClasses() {\n // Get from all levels\n List<Models.Class> results = em.createNativeQuery(\"select c.* from class c, classparticipant cpa, participant p where c.classid = cpa.classid and cpa.participantid = p.participantid and p.userid = ?\", Models.Class.class).setParameter(1, user.getUserid()).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" classes were found.\");\n\n for (Models.Class classroom : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Class?id=\" + classroom.getClassid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>CLASS</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + classroom.getClassid() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }", "public int classify(String doc){\n\t\tint label = 0;\n\t\tint vSize = vocabulary.size();\n\t\tdouble[] score = new double[numClasses];\n\t\tfor(int i=0;i<score.length;i++){\n\t\t\tscore[i] = Math.log(classCounts[i]*1.0/trainingDocs.size());\n\t\t}\n\t\tString[] tokens = doc.split(\" \");\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tfor(String token: tokens){\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tscore[i] += Math.log(condProb[i].get(token));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tscore[i] += Math.log(1.0/(classTokenCounts[i]+vSize));\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"token: \"+token+\" \"+score[i]);\n\t\t\t}\n\t\t}\n\t\tdouble maxScore = score[0];\n\t\t//System.out.println(\"class 0: \"+score[0]);\n\t\tfor(int i=1;i<score.length;i++){\n\t\t\t//System.out.println(\"class \"+i+\": \"+score[i]);\n\t\t\tif(score[i]>maxScore){\n\t\t\t\tlabel = i;\n\t\t\t}\n\t\t}\n\t\treturn label;\n\t}", "org.landxml.schema.landXML11.ClassificationDocument.Classification[] getClassificationArray();", "public static LinkedList<String> constructorSearch(Class enteredClass){\n LinkedList<String> result = new LinkedList<>();//array with result\n Class classNoteBook = enteredClass;\n\n /* get amount of modifiers */\n int modifiers = classNoteBook.getModifiers();\n\n /* find modifiers for class */\n if (Modifier.isPublic(modifiers)) {\n result.add(\"Class is public\");\n }\n\n else if (Modifier.isAbstract(modifiers)) {\n MyWriter.show(\"Class is abstract\");\n }\n\n else if (Modifier.isFinal(modifiers)) {\n result.add(\"Class is final\");\n }\n\n /* get all constructors of class */\n Constructor[] allConstructors = classNoteBook.getDeclaredConstructors();\n\n for (Constructor constructor : allConstructors) {\n int number = 0;\n result.add(\"Constructor: \" + constructor.toGenericString());\n\n /* get all type of parameters of constructor */\n Class[] parameterTypes = constructor.getParameterTypes();\n\n for (Class param : parameterTypes) {\n result.add(\" GenericParameterType [\" + number++ + \"]: \" + param);\n }\n }\n return result;\n }", "public static ArrayList<Result> findMatches(Query query, DataManager myVocab){\n\n\t\t//Uncomment this for logging in this class\t\n//\t\tmyLogger.setLevel(Level.INFO); \n\n\t\t// get the term we're going to search for and\n\t\t// take out any leading or trailing whitespaces\n\t\tString querystr = query.getQuery();\n\t\tquerystr = querystr.trim();\n\t\tString uncleaned = querystr;\n\t\t\n\t\t// This is in case of numeric entries. Google Refine doesn't seem\n\t\t// to have int cell types, instead it adds an invisible .0 to all\n\t\t// numbers. This fixes that issue, as it sometimes causes false negatives.\n\t\tif (querystr.endsWith(\".0\")){\n\t\t Pattern p = Pattern.compile(\"[^0-9\\\\.]+\");\n\t\t Matcher m = p.matcher(querystr);\n\t\t boolean result = m.find();\n\t\t if (!result){\n\t\t \t querystr = querystr.substring(0, querystr.length()-2);\n\t\t }\n\t\t}\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\n\t\tif (myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\t\t\n\t\t// Clean up the query string if it isn't case/punctuation sensitive\n\t\tif (!myVocab.capsSensitive()){\t\t\n\t\t\tquerystr = querystr.toLowerCase();\n\t\t}\n\t\tif (! myVocab.punctSensitive()){\t\t\n\t\t\tquerystr = querystr.replaceAll(\"[\\\\W_]\", \"\");\n\t\t}\n\t\t\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\t\tif(myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\n\t\tString type = query.getType();\n\n\t\t// This ArrayList is the results that are going to be returned. \n\t\tArrayList<Result> results = getDirectMatches(myVocab, querystr, uncleaned, type);\n\t\t\n\t\t// If there's a perfect match return it.\n\t\tif (results.size() == 1 && results.get(0).match){\n\t\t\treturn results;\n\t\t}else{\n\t\t\t// Otherwise, add the initial ones and try matching\n\t\t\t// based on distance to vocabulary terms.\n\t\t\tresults.addAll(distanceMatching(query, myVocab));\n\t\t\t\n\t\t\t// Split the original query term by space and non-alphanumeric characters \n\t\t\t// to find how many words there are.\n\t\t\t//querystr = query.getQuery().replaceAll(\"[\\\\W_]\", \" \");\n\t\t\tString [] termList = querystr.split(\" \");\n\t\t\t\n\t\t\t// if there's more than one, run bagOfWords\n\t\t\t// which tries to find a match for each of the words.\n\t\t\tif (termList.length > 1){\n\t\t\t\tresults.addAll(bagOfWords(query, myVocab));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Clean the results: no duplicates\n\t\t// no extra results to return, and sorted\n\t\t// them by score before returning them\n\t\tresults = removeDuplicates(results);\n\t\t\n\t\t// They do not need to be reduced in \n\t\t// number if there are fewer than \n\t\t// the max results.\n\t\t// The pruneResults sorts them\n\t\t// by score already.\n\t\tif(query.getLimit()!=null){\n\t\t\tresults = pruneResults(results,Integer.parseInt(query.getLimit()));\n\t\t}else{\n\t\t\tresults = pruneResults(results,MAX_RESULTS);\n\t\t}\n\t\t\t\n\t\tresults = sortByScore(results);\n\t\tfor (int i = 0; i< results.size(); i++){\n//\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+ \" is bigger than 100?\");\n\t\t\tif(results.get(i).getScore() > (double)100){\n\t\t\t\tresults.get(i).setScore((double)100 - (results.get(i).getScore()-(double)100));\n//\t\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+\" is bigger than 100! and was set to \"+\n//\t\t\t\t\t\t((double)100 - (results.get(i).getScore()-(double)100)));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "List<Corretor> search(String query);", "public String toString(){\n\n String s;\n Exemplar cur = m_Exemplars;\n int i;\t\n\n if (m_MinArray == null) {\n return \"No classifier built\";\n }\n int[] nbHypClass = new int[m_Train.numClasses()];\n int[] nbSingleClass = new int[m_Train.numClasses()];\n for(i = 0; i<nbHypClass.length; i++){\n nbHypClass[i] = 0;\n nbSingleClass[i] = 0;\n }\n int nbHyp = 0, nbSingle = 0;\n\n s = \"\\nNNGE classifier\\n\\nRules generated :\\n\";\n\n while(cur != null){\n s += \"\\tclass \" + m_Train.attribute(m_Train.classIndex()).value((int) cur.classValue()) + \" IF : \";\n s += cur.toRules() + \"\\n\";\n nbHyp++;\n nbHypClass[(int) cur.classValue()]++;\t \n if (cur.numInstances() == 1){\n\tnbSingle++;\n\tnbSingleClass[(int) cur.classValue()]++;\n }\n cur = cur.next;\n }\n s += \"\\nStat :\\n\";\n for(i = 0; i<nbHypClass.length; i++){\n s += \"\\tclass \" + m_Train.attribute(m_Train.classIndex()).value(i) + \n\t\" : \" + Integer.toString(nbHypClass[i]) + \" exemplar(s) including \" + \n\tInteger.toString(nbHypClass[i] - nbSingleClass[i]) + \" Hyperrectangle(s) and \" +\n\tInteger.toString(nbSingleClass[i]) + \" Single(s).\\n\";\n }\n s += \"\\n\\tTotal : \" + Integer.toString(nbHyp) + \" exemplars(s) including \" + \n Integer.toString(nbHyp - nbSingle) + \" Hyperrectangle(s) and \" +\n Integer.toString(nbSingle) + \" Single(s).\\n\";\n\t\n s += \"\\n\";\n\t\n s += \"\\tFeature weights : \";\n\n String space = \"[\";\n for(int ii = 0; ii < m_Train.numAttributes(); ii++){\n if(ii != m_Train.classIndex()){\n\ts += space + Double.toString(attrWeight(ii));\n\tspace = \" \";\n }\n }\n s += \"]\";\n s += \"\\n\\n\";\n return s;\n }", "public static String calculate(String path) throws IOException {\n initialize();\n double spam = 0.0;\n double ham = 0.0;\n int spamCount = 0;\n int hamCount = 0;\n\n Get g1 = new Get(\"spam\".getBytes());\n Result r = wordFreTable.get(g1);\n spam += Math.log(bytes2Double(r.getValue(\"spam\".getBytes())));\n Get g2 = new Get(\"ham\".getBytes());\n r = wordFreTable.get(g2);\n ham += Math.log(bytes2Double(result.getValue(\"ham\".getBytes())));\n\n BufferedWriter writer = new BufferedWriter(new FileWriter(path));\n writer.write(\"doc_id,class_id\");\n\n for (int i = 0; i < Document.size(); i++) {\n String[] doc = Document.get(i).split(\"\\t| \");\n for (String word : doc) {\n Get get = new Get(word.getBytes());\n if (!get.isCheckExistenceOnly()) {\n Result result = wordFreTable.get(get);\n for (Cell cell : result.rawCells()) {\n String colName = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());\n String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());\n if (colName.equals(\"spam\")) {\n spam += Math.log(Double.valueOf(value));\n } else if (colName.equals(\"ham\")) {\n ham += Math.log(Double.valueOf(value));\n }\n }\n } else {\n //word not exist\n get = new Get(\"SpamSpam\".getBytes());\n Result result = wordFreTable.get(get);\n spam += Math.log(bytes2Double(result.getValue(\"spam\".getBytes())));\n get = new Get(\"HamHam\".getBytes());\n result = wordFreTable.get(get);\n ham += Math.log(bytes2Double(result.getValue(\"ham\".getBytes())));\n }\n }\n if (spam > ham) {\n writer.write(i + \"1\");\n spamCount++;\n } else {\n writer.write(i + \"0\");\n hamCount++;\n }\n }\n writer.close();\n return spamCount * 1.0 / Document.size() + \", \" + hamCount * 1.0 / Document.size();\n }", "@SuppressWarnings(\"unchecked\")\n private Optional<Match> classMatchSearch(Class declaringClass) {\n// return memoizer.classMatches(result, declaringClass, () -> {\n List<Match> matches = new ArrayList<>();\n Stack<Class> classes = new Stack<>();\n classes.push(declaringClass);\n while(!classes.isEmpty()) {\n Class cls = classes.pop();\n Match match = result.getMatch(cls);\n\n if(match != null) {\n matches.add(match);\n }\n if(cls.getInterfaces() != null) {\n Stream.of(cls.getInterfaces()).forEach(c -> classes.push(c));\n }\n if(cls.getSuperclass() != null && !cls.getSuperclass().equals(Object.class)) {\n classes.push(cls.getSuperclass());\n }\n }\n\n if(matches.size() == 1) {\n return Optional.of(matches.get(0));\n } else if(matches.size() > 1) {\n // Join all the includes and excludes\n Match unionMatch = new Match();\n matches.forEach(m -> {\n unionMatch.getExcludes().addAll(m.getExcludes());\n unionMatch.getIncludes().addAll(m.getIncludes());\n unionMatch.getTransforms().putAll(m.getTransforms());\n });\n return Optional.of(unionMatch);\n } else {\n return Optional.empty();\n }\n// });\n }", "public abstract List<String> scanAllClassNames();", "public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }", "public List<com.platform.chorus.db.tables.pojos.ClassModel> fetchByDescription(String... values) {\n return fetch(ClassModel.CLASS_MODEL.DESCRIPTION, values);\n }", "public void classify() throws IOException\n {\n TrainingParameters tp = new TrainingParameters();\n tp.put(TrainingParameters.ITERATIONS_PARAM, 100);\n tp.put(TrainingParameters.CUTOFF_PARAM, 0);\n\n DoccatFactory doccatFactory = new DoccatFactory();\n DoccatModel model = DocumentCategorizerME.train(\"en\", new IntentsObjectStream(), tp, doccatFactory);\n\n DocumentCategorizerME categorizerME = new DocumentCategorizerME(model);\n\n try (Scanner scanner = new Scanner(System.in))\n {\n while (true)\n {\n String input = scanner.nextLine();\n if (input.equals(\"exit\"))\n {\n break;\n }\n\n double[] classDistribution = categorizerME.categorize(new String[]{input});\n String predictedCategory =\n Arrays.stream(classDistribution).filter(cd -> cd > 0.5D).count() > 0? categorizerME.getBestCategory(classDistribution): \"I don't understand\";\n System.out.println(String.format(\"Model prediction for '%s' is: '%s'\", input, predictedCategory));\n }\n }\n }", "@Override\n\tpublic ClassifyResult classify(String[] words) {\n\n\t\t// Sum up the log probabilities for each word in the input data, and the\n\t\t// probability of the label\n\t\t// Set the label to the class with larger log probability\n\t\tClassifyResult ret = new ClassifyResult();\n\t\tret.label = Label.SPORTS;\n\t\tret.log_prob_sports = 0;\n\t\tret.log_prob_business = 0;\n\n\t\tfor (String w : words) {\n\t\t\tret.log_prob_sports += Math.log(p_w_given_l(w, Label.SPORTS));\n\t\t\tret.log_prob_business += Math.log(p_w_given_l(w, Label.BUSINESS));\n\t\t}\n\n\t\tret.log_prob_sports += Math.log(p_l(Label.SPORTS));\n\t\tret.log_prob_business += Math.log(p_l(Label.BUSINESS));\n\n\t\tif (ret.log_prob_business > ret.log_prob_sports) {\n\t\t\tret.label = Label.BUSINESS;\n\t\t}\n\n\t\treturn ret;\n\t}", "List<Cemetery> search(String query);", "public List<Models.Class> showClasses(String from) {\n // Get from all levels\n List<Models.Class> fromInstitution = em.createNativeQuery(\"select c.* from class c, course cr, programme pg, institution i, institutionparticipant ipa, participant p where c.coursecode = cr.coursecode and cr.programmecode = pg.programmecode and pg.institutioncode = i.institutioncode and ipa.institutioncode = i.institutioncode and ipa.participantid = p.participantid and p.userid = ? and i.institutioncode = ?\", Models.Class.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n List<Models.Class> fromProgramme = em.createNativeQuery(\"select c.* from class c, course cr, programme pg,programmeparticipant ppa, participant p where c.coursecode = cr.coursecode and cr.programmecode = pg.programmecode and ppa.programmecode = pg.programmecode and ppa.participantid = p.participantid and p.userid = ? and pg.programmecode = ?\", Models.Class.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n List<Models.Class> fromCourse = em.createNativeQuery(\"select c.* from class c, course cr, courseparticipant cpa, participant p where c.coursecode = cr.coursecode and cpa.coursecode = cr.coursecode and cpa.participantid = p.participantid and p.userid = ? and cpa.coursecode = ?\", Models.Class.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n\n // Combine the results\n List<Models.Class> results = new ArrayList<Models.Class>();\n results.addAll(fromInstitution);\n results.addAll(fromProgramme);\n results.addAll(fromCourse);\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" classes were found.\");\n\n for (Models.Class classroom : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Class?id=\" + classroom.getClassid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>CLASS</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + classroom.getClassid() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n\n return results;\n }", "public void findDeclaredClassesAndObjects(String currentLine) {\n\t\tPattern p = Pattern.compile(\"([A-Z]+[a-zA-Z]*\\\\s[a-zA-Z0-9]+)\");\n\t\tMatcher m = p.matcher(currentLine);\n\t\twhile (m.find()) {\n\t\t\tString c1 = refineClassAndObject(m.group());\n\t\t\tSystem.out.println(c1);\n\t\t\tif (isValidClassAndObject((c1))) {\n\t\t\t\tsetClassAndObject(c1.toString());\n\t\t\t}\n\t\t}\n\t\tcurrentLine = m.replaceAll(\" \");\n\n\t}", "public List<String> useTreeOnData() {\n\t\tList<String> classifierWithData = new ArrayList<String>();\n\t\tString header = \"LEARND\\tACTUAL\";\n\t\tfor (String s : attributeNames) {\n\t\t\tchar[] truncated = Arrays.copyOf(s.toCharArray(),5);\n\t\t\tString tr = \"\";\n\t\t\tfor (int i = 0; i < 5 && Character.isAlphabetic(truncated[i]); i++) {\n\t\t\t\ttr += truncated[i];\n\t\t\t}\n\t\t\theader += \"\\t\"+ tr +\".\";\n\t\t}\n\t\tclassifierWithData.add(header);\n\t\tif (root == null || data == null || attributeNames.size() == 0) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (Instance inst : data) {\n\t\t\tString s = root.classify(inst) +\"\\t\"+ inst.toString();\n\t\t\tclassifierWithData.add(s);\n\t\t}\n\t\treturn classifierWithData;\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "public String[] findModelsByClassAndMpg(String inputVehicleClass, int inputMPG) {\n\t\tString[] list = new String[count];\n\t\tNode current = head;\n\t\tint i = 0;\n\n\t\twhile (current != null) {\n\t\t\tif (current.getCar() instanceof GasCar) {\n\t\t\t\tif (current.getCar().getVehicleClass().equals(inputVehicleClass) && ((GasCar)current.getCar()).getMPG() > inputMPG) {\n\t\t\t\t\tString match = current.getCar().getModel();\n\t\t\t\t\tlist[i] = match;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\tString[] newlist = new String[i];\n\t\tfor (int j = 0; j < i; j++) {\n\t\t\tnewlist[j] = list[j];\n\t\t}\n\t\treturn newlist;\n\t}", "public String getClassification() {\n return classification;\n }", "public String getClassification() {\n return classification;\n }", "public static Rule getDefaultRule(JavaRDD<String> data, String filePath){\n\n\t\tRuleGenerator generator = RuleGenerator.getInstance();\n\t\tgenerator.findClassName(filePath);\n\t\tString className = RuleGenerator.getClassName();\n\t\tint classPos = RuleGenerator.getClassPos();\n\t\tArrayList<ArrayList<String>> classValues = RuleGenerator.getClassValues();\n\t\t\n\t\tJavaRDD<String> flattenedLines = data.flatMap(new FlatMapFunction<String, String>(){\n\n\t\t\tpublic Iterable<String> call(String line) throws Exception {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn Arrays.asList(line.split(\",\"));\n\t\t\t}\n\n\t\t});\n\t\t\n\t\t//Create Key/Value pairs with word as key and count as value and then sum them up using reduceByKey\n\t\tJavaPairRDD<String,Integer> classCounts = flattenedLines.mapToPair(\n\t\t\t\tnew PairFunction<String, String, Integer>(){\n\n\t\t\t\t\tpublic Tuple2<String, Integer> call(String x)\n\t\t\t\t\t\t\tthrows Exception {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\treturn new Tuple2(x, 1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}).reduceByKey(new Function2<Integer, Integer, Integer>(){\n\t\t\t\t\tpublic Integer call(Integer x, Integer y){\n\t\t\t\t\t\treturn x + y;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t/*Confirm Output */\n\t\tArrayList<Tuple2<String, Integer>> holderForClasses = new ArrayList<Tuple2<String, Integer>>();\n\t\tfor(Tuple2<String, Integer> tuple1 : classCounts.take((int) classCounts.count())){\n\t\t\tfor(int i = 0; i < classValues.size(); i++){\n\t\t\t\tArrayList<String> values = classValues.get(i);\n\t\t\t\tfor(String value : values){\n\t\t\t\t\tif(tuple1._1.equals(value)){\n\t\t\t\t\t\tholderForClasses.add(tuple1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}\n\t\t\n\t\tInteger largestCount = 0;\n\t\tfor(int i = 0; i < holderForClasses.size(); i++){\n\t\t\tTuple2<String, Integer> tuple1 = holderForClasses.get(i);\n\t\t\t\n\t\t\t/*\n\t\t\t * Important: Does not handle situations where there are more than one majority class yet (Last one to be majority class is selected for now).\n\t\t\t * Check which class has the largest count and that class will be the majority class.\n\t\t\t */\n\t\t\tif(tuple1._2 >= largestCount){\n\t\t\t\tlargestCount = tuple1._2;\n\t\t\t\tmajorityClassValue = tuple1._1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Debugging and Troubleshooting */\n\t\t/* for(String line : data.take(10)){\n\t\t\tSystem.out.println(line);\n\t\t}*/\n\t\t//System.out.println(data);\n\t\t\n\n\t\t/* System.out.println(className);\n\t\tSystem.out.println(majorityClassValue);\n\t\tSystem.out.println(classPos); */\n\t\treturn new Rule(className ,majorityClassValue, classPos);\n\t\t\n\t}", "public List<String> getClassList_(final String title,\n\t\t\t\t\t\t\t\t\t final String text) {\n\t\tList<String> classList = null;\n\t\tString classes = getClassList(title, text);\n\n\t\tif (classes != null) {\n\t\t\t// Class names are linefeed separated\n\t\t\tclassList = Arrays.asList(classes.split(\"\\n\"));\n\t\t}\n\n\t\treturn classList;\n\t}", "public static void demo_SimilarityMetrics(RoWordNet RoWN, String textCorpus_FilePath) throws Exception {\n boolean allowAllRelations = true;\n\n Literal l1 = new Literal(\"salvare\");\n Literal l2 = new Literal(\"dotare\");\n String id1 = RoWN.getSynsetsFromLiteral(l1).get(0).getId();\n String id2 = RoWN.getSynsetsFromLiteral(l2).get(0).getId();\n Synset s1, s2;\n\n s1 = RoWN.getSynsetById(id1);\n s2 = RoWN.getSynsetById(id2);\n\n IO.outln(\"Computed IC for synset_1: \" + s1.getInformationContent());\n IO.outln(\"Computed IC for synset_2: \" + s2.getInformationContent());\n IO.outln(\"Custom distance: \" + SimilarityMetrics.distance(RoWN, s1\n .getId(), s2.getId(), true, null));\n IO.outln(\"Custom hypernymy distance: \" + SimilarityMetrics\n .distance(RoWN, s1.getId(), s2.getId()));\n\n IO.outln(\"Sim Resnik: \" + SimilarityMetrics.Resnik(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim Lin: \" + SimilarityMetrics.Lin(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim JCN: \" + SimilarityMetrics.JiangConrath(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Dist JCN: \" + SimilarityMetrics\n .JiangConrath_distance(RoWN, s1.getId(), s2.getId(), allowAllRelations));\n }", "public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}", "public FuzzyNodeFuzzyOutput( String buffer, int nb_class ) throws Exception {\n super( buffer );\n this.nb_class = nb_class;\n // lecture du noeud\n this.Variables.add(new String(st.nextToken().trim())); // lecture sef majoritaire\n for( int i=0 ; i<nb_class ; i++ )\n this.Variables.add(new Double(st.nextToken().trim())); // lecture de l'effectif par sef\n }", "public String getClassList(final String title, final String text) {\n\t\tfinal int bufSize = WIN_GET_CLASS_LIST_BUF_SIZE;\n\t\tfinal CharBuffer retText = CharBuffer.allocate(bufSize);\n\t\tAutoItXImpl.autoItX.AU3_WinGetClassList(AutoItUtils.stringToWString(AutoItUtils.defaultString(title)),\n\t\t\t\tAutoItUtils.stringToWString(text), retText, bufSize);\n\n\t\treturn LocalInstances.autoItX.hasError() ? null : Native.toString(retText.array());\n\t}", "public static void main(String[] args) throws IOException \r\n\t{\r\n\t\tString s1 = \"THE SALVADORAN GOVERNMENT TODAY DEPLORED THE DISAPPEARANCE OF SOCIAL DEMOCRATIC LEADER HECTOR OQUELI COLINDRES THIS MORNING IN GUATEMALA.\";\r\n\t\tString soln = classifier.classifyToString(s1);\r\n\t\tSystem.out.println(soln);\r\n\t\tNER n = new NER();\r\n\t\tn.getPersons(s1);\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tn.getOrgs(s1);\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tn.getLocations(s1);\r\n\t}", "public String getClassification() {\n return classification;\n }", "public int classify(Gesture g) {\n\t\tLog.write(\"Gestenerkenung...\");\n\t\t\n\t\t/* Wert im Nenner berechnen, nach Bayes */\n\t\tdouble sum = 0;\n\t\tfor(int i=0; i<types.size(); i++) {\n\t\t\tsum+=types.get(i).getDefaultProbability()*types.get(i).matches(g);\n\t\t}\n\t\t\n\t\tint recognized = -1; // erkannter Gestentyp\n\t\tdouble recogProb = Integer.MIN_VALUE; // Wahrscheinlichkeit der gefundenen Geste\n\t\tdouble foundGestureProb = 0; // Wahrscheinlichkeit der Geste unter Annahme des Modells\n\t\tdouble foundModelProb = 0; // Wahrscheinlichkeit des Modells\n\t\t\n\t\tfor(int i=0; i<this.types.size(); i++) {\n\t\t\tdouble gestureProb = types.get(i).matches(g);\n\t\t\tdouble modelProb = types.get(i).getDefaultProbability();\n\t\t\t\n\t\t\t/* Beobachtungswahrscheinlichkeit im derzeitigen Modell */\n\t\t\tdouble prob=(modelProb*gestureProb)/sum;\n\t\t\t\n\t\t\t/* Vergleich */\n\t\t\tif(prob>recogProb) {\n\t\t\t\tfoundGestureProb=gestureProb;\n\t\t\t\tfoundModelProb=modelProb;\n\t\t\t\trecogProb=prob;\n\t\t\t\trecognized=i;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Geste konnte klassifiziert werden\n\t\tif(recogProb>0 && foundModelProb>0 && foundGestureProb>0 && sum>0) {\n\t\t\t//this.lastprob=recogProb;\n\t\t\treturn recognized;\n\t\t} else {\n\t\t\t// Geste konnte nicht klassifiziert werden\n\t\t\treturn -1;\n\t\t}\n\t}", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "public List<ClassId> getThirdClasses() {\n\t\tList<ClassId> classes = new ArrayList<>();\r\n\r\n\t\t/*\r\n\t\t * classes.add(ClassId.EVAS_SAINT); classes.add(ClassId.SHILLIEN_TEMPLAR);\r\n\t\t * classes.add(ClassId.SPECTRAL_DANCER); classes.add(ClassId.GHOST_HUNTER);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DREADNOUGHT); classes.add(ClassId.PHOENIX_KNIGHT);\r\n\t\t * classes.add(ClassId.HELL_KNIGHT);\r\n\t\t * \r\n\t\t * classes.add(ClassId.HIEROPHANT); classes.add(ClassId.EVAS_TEMPLAR);\r\n\t\t * classes.add(ClassId.SWORD_MUSE);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DOOMCRYER); classes.add(ClassId.FORTUNE_SEEKER);\r\n\t\t * classes.add(ClassId.MAESTRO);\r\n\t\t */\r\n\r\n\t\t// classes.add(ClassId.ARCANA_LORD);\r\n\t\t// classes.add(ClassId.ELEMENTAL_MASTER);\r\n\t\t// classes.add(ClassId.SPECTRAL_MASTER);\r\n\t\t// classes.add(ClassId.SHILLIEN_SAINT);\r\n\r\n\t\tclasses.add(ClassId.SAGGITARIUS);\r\n\t\tclasses.add(ClassId.ARCHMAGE);\r\n\t\tclasses.add(ClassId.SOULTAKER);\r\n\t\tclasses.add(ClassId.MYSTIC_MUSE);\r\n\t\tclasses.add(ClassId.STORM_SCREAMER);\r\n\t\tclasses.add(ClassId.MOONLIGHT_SENTINEL);\r\n\t\tclasses.add(ClassId.GHOST_SENTINEL);\r\n\t\tclasses.add(ClassId.ADVENTURER);\r\n\t\tclasses.add(ClassId.WIND_RIDER);\r\n\t\tclasses.add(ClassId.DOMINATOR);\r\n\t\tclasses.add(ClassId.TITAN);\r\n\t\tclasses.add(ClassId.CARDINAL);\r\n\t\tclasses.add(ClassId.DUELIST);\r\n\r\n\t\tclasses.add(ClassId.GRAND_KHAVATARI);\r\n\r\n\t\treturn classes;\r\n\t}", "public String getSearchClass() {\r\n return searchClass;\r\n }", "private static List<TextAnnotation> getInstancesFromDb(Configuration runConfig) {\n String datasetName = runConfig.dataset;\n POSReader posReader = new POSReader();\n System.out.println(\"Retrieving instances from db\");\n List<TextAnnotation> TextAnnotations = posReader.getTextAnnotationsFromDB(runConfig.dataset);\n return TextAnnotations;\n }", "public static void loadCharGerKeyWordToClassTable() {\n CharGerXMLTagNameToClassName.setProperty( \"Graph\", \"Graph\" );\n CharGerXMLTagNameToClassName.setProperty( \"Concept\", \"Concept\" );\n CharGerXMLTagNameToClassName.setProperty( \"Relation\", \"Relation\" );\n CharGerXMLTagNameToClassName.setProperty( \"Actor\", \"Actor\" );\n CharGerXMLTagNameToClassName.setProperty( \"TypeLabel\", \"TypeLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"CGType\", \"TypeLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"RelationLabel\", \"RelationLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"CGRelType\", \"RelationLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"Arrow\", \"Arrow\" );\n CharGerXMLTagNameToClassName.setProperty( \"GenSpecLink\", \"GenSpecLink\" );\n CharGerXMLTagNameToClassName.setProperty( \"Coref\", \"Coref\" );\n CharGerXMLTagNameToClassName.setProperty( \"Note\", \"Note\" );\n\n CharGerXMLTagNameToClassName.setProperty( \"graph\", \"Graph\" );\n CharGerXMLTagNameToClassName.setProperty( \"concept\", \"Concept\" );\n CharGerXMLTagNameToClassName.setProperty( \"relation\", \"Relation\" );\n CharGerXMLTagNameToClassName.setProperty( \"actor\", \"Actor\" );\n CharGerXMLTagNameToClassName.setProperty( \"typelabel\", \"TypeLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"relationlabel\", \"RelationLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"arrow\", \"Arrow\" );\n CharGerXMLTagNameToClassName.setProperty( \"genspeclink\", \"GenSpecLink\" );\n CharGerXMLTagNameToClassName.setProperty( \"coref\", \"Coref\" );\n CharGerXMLTagNameToClassName.setProperty( \"customedge\", \"CustomEdge\" );\n CharGerXMLTagNameToClassName.setProperty( \"note\", \"Note\" );\n }", "@Override\n\tpublic List<TClassInfo> getClazzs(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TClassInfo> clazzs=new ArrayList<TClassInfo>();\n\t\tclazzs=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn clazzs;\n\t}", "public List<ScoredObject<Tree>> getBestParses();", "private String getSuggestions() {\r\n\t\tDbHandler dbHandler = new DbHandler(new AndroidFileIO(this));\r\n\t\tTable data;\r\n\t\ttry {\r\n\t\t\tdata = dbHandler.generateDataTable(\"mentalrate\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tRulesFinder finder = new RulesFinder(data);\r\n\t\tIterator<Rule> rulesIter = finder.findRules().iterator();\r\n\r\n\t\tString msg = \"\";\r\n\t\twhile (rulesIter.hasNext()) {\r\n\t\t msg += RuleTranslator.humanReadable(rulesIter.next())+\"\\n\";\r\n\t\t}\r\n\t System.out.println(msg);\r\n\t\treturn msg;\r\n\t}", "@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }", "public int classify(String tweet){\n\t\t//Each word is classified indenpendtly, whichever one has the most wins. \n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Compute the leading term of category probability:\n\t\tfloat[] catProb = new float[categories.length];\n\t\tint i = 0;\n\t\tfor(int cat : categories){\n\t\t\tcatProb[i] = category_count.get(cat).size()/(float)total_training_size;\n\t\t\ti++;\n\t\t}\n\n\t\t//Compute the number of times a word appears in all categories:\n\t\tHashMap<String, Integer> total_all_classes = new HashMap<String, Integer>();\n\t\tfor(String pt : parsedTweet){\n\t\t\tfor(int cat : categories){\n\t\t\t\tif(!total_all_classes.containsKey(pt)){\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\ttotal_all_classes.put(pt,category_count.get(cat).get(pt));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//What happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//If we've seen the word before:\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\tint additional = total_all_classes.get(pt) + category_count.get(cat).get(pt);\n\t\t\t\t\t\ttotal_all_classes.put(pt, additional);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//I'm skeptical if this will ever be execuated, but what happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Create something to hold the probabilities in\n\t\tfloat[] class_probability = new float[categories.length];\n\t\t//Initalize:\n\t\tfor(int c = 0; c < categories.length; c++){\n\t\t\tclass_probability[c] = 1;\n\t\t}\n\n\t\t//Compute the prodcut of the toals with priors and weights and assumed prob.\n\t\t//product of ( #word appears in all class * (#word appears in class c/#words in class c) )+ weight*assumed probability all divided by weight + #words appeared in all classes\n\t\tfor(int cat : categories){\n\t\t\tfor(String pt : parsedTweet){\n\t\t\t\tif(category_count.get(cat).containsKey(pt) && total_all_classes.containsKey(pt)){ \n\t\t\t\t\t//This is going to be a terribly long expression sadly.\n\t\t\t\t\tclass_probability[cat] *= ((total_all_classes.get(pt)*(category_count.get(cat).get(pt)/(float)category_count.get(cat).size())) + weight*assumed_prob)/(float)(weight + total_all_classes.get(pt));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Multiply the whole term by the leading term of catProb:\n\t\tfor(int cat : categories){\n\t\t\tclass_probability[cat] = catProb[cat]*class_probability[cat];\n\t\t}\n\n\t\t//Figure out which class/category is the highest and return the best fitting one.\n\t\tint bestFit = CAT_SAFE; //If can't figure, return that its SAFE? Dunno if this is the best choice\n\t\tfloat bestProb = -1;\n\t\tfor(int cat : categories){\n\t\t\tif(class_probability[cat] > bestProb){\n\t\t\t\tbestFit = cat;\n\t\t\t}\n\t\t\tSystem.out.println(class_probability[cat]);\n\t\t}\n\t\tSystem.out.println(bestProb < threshold);\n\t\tif(bestProb < threshold){\n\t\t\tbestFit = DEFAULT_CATEGORY;\n\t\t}\n\n\n\n\t\treturn bestFit;\n\n\t}", "EmailClass findClass(Email email,boolean noStopWordsRemoval) {\n //email.preprocessEmail(trainingData.stopwords,noStopWordsRemoval);\n double hamProbability = 0;\n double spamProbability = 0;\n\n for (String s : email.processedMessage.keySet()) {\n long n = email.processedMessage.get(s);\n long hc, sc;\n if (words.containsKey(s)) {\n LexiconCount lcTemp = words.get(s);\n hc = lcTemp.numberOfOccurencesInHamDocuments;\n sc = lcTemp.numberOfOccurencesInSpamDocuments;\n } else {\n hc = 0;\n sc = 0;\n }\n double cProbabilityForHam = (hc + 1) / (double) (totalNumberOfWordsInHamDocuments + words.size());\n cProbabilityForHam = Math.pow(cProbabilityForHam, n);\n hamProbability += (Math.log(cProbabilityForHam)) / Math.log(2);\n\n double cProbabilityForSpam = (sc + 1) / (double) (totalNumberOfWordsInSpamDocuments + words.size());\n cProbabilityForSpam = Math.pow(cProbabilityForSpam, n);\n spamProbability += (Math.log(cProbabilityForSpam)) / Math.log(2);\n }\n double priorProbabilityForHam = trainingData.numberOfHamDocuments / (double) (trainingData.numberOfHamDocuments + trainingData.numberOfSpamDocuments);\n hamProbability += (Math.log(priorProbabilityForHam)) / Math.log(2);\n\n double priorProbabilityForSpam = trainingData.numberOfSpamDocuments / (double) (trainingData.numberOfHamDocuments + trainingData.numberOfSpamDocuments);\n spamProbability += (Math.log(priorProbabilityForSpam)) / Math.log(2);\n if (hamProbability > spamProbability) {\n return EmailClass.ham;\n } else {\n return EmailClass.spam;\n }\n }", "public static String saberTipo(Expediente c1) {\n\n\t\tif (c1 instanceof Multa_Trafico) {\n\t\t\treturn \"Eres multa de tráfico\";\n\t\t}\n\t\tif (c1 instanceof Multa_Covid) {\n\t\t\treturn \"Eres multa de Covid\";\n\t\t}\n\t\tif (c1 instanceof Multa) {\n\t\t\treturn \"Eres multa\";\n\t\t}\n\t\tif (c1 instanceof Expediente) {\n\t\t\treturn \"Eres Expediente\";\n\t\t}\n\n\t\treturn \"No lo sé\";\n\t}", "private void readDocQueriesRelevance(){\n File f = new File(\"cranfield.query.relevance.txt\");\n if(f.exists() && !f.isDirectory()){\n try {\n FileReader fileReader=null;\n try {\n fileReader = new FileReader(f);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EvaluationQueries.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n String[] querieDocRel;\n List<QuerieDocRelevance> tempQueriesRelevance;\n while ((line = bufferedReader.readLine()) != null) {\n querieDocRel = line.split(\"\\\\s+\");\n int querieNumber = Integer.parseInt(querieDocRel[0]);\n if(queriesRelevanceMap.containsKey(querieNumber)){\n tempQueriesRelevance = queriesRelevanceMap.get(querieNumber);\n tempQueriesRelevance.add(new QuerieDocRelevance(Integer.parseInt(querieDocRel[1]),Integer.parseInt(querieDocRel[2])));\n queriesRelevanceMap.put(querieNumber,tempQueriesRelevance);\n \n }else{\n tempQueriesRelevance = new ArrayList<>();\n tempQueriesRelevance.add(new QuerieDocRelevance(Integer.parseInt(querieDocRel[1]),Integer.parseInt(querieDocRel[2])));\n queriesRelevanceMap.put(querieNumber,tempQueriesRelevance); \n }\n \n }\n \n } catch (IOException ex) {\n Logger.getLogger(EvaluationQueries.class.getName()).log(Level.SEVERE, null, ex);\n } \n } \n \n }", "@Override\n\tpublic ClassifyResult classify(List<String> words) {\n\t\t// TODO : Implement\n\t\t// Sum up the log probabilities for each word in the input data, and the\n\t\t// probability of the label\n\t\t// Set the label to the class with larger log probability\n\t\tdouble log_POSITIVE = Math.log(p_l(Label.POSITIVE));\n\t\tfor (String word : words)\n\t\t\tlog_POSITIVE += Math.log(p_w_given_l(word, Label.POSITIVE));\n\n\t\tdouble log_NEGATIVE = Math.log(p_l(Label.NEGATIVE));\n\t\tfor (String word : words)\n\t\t\tlog_NEGATIVE += Math.log(p_w_given_l(word, Label.NEGATIVE));\n\n\t\t// Create the ClassifyResult\n\t\tClassifyResult result = new ClassifyResult();\n\t\tresult.logProbPerLabel = new HashMap<Label, Double>();\n\t\tresult.logProbPerLabel.put(Label.POSITIVE, log_POSITIVE);\n\t\tresult.logProbPerLabel.put(Label.NEGATIVE, log_NEGATIVE);\n\t\t\n\t\tif (log_POSITIVE > log_NEGATIVE)\n\t\t\tresult.label = Label.POSITIVE;\n\t\telse\n\t\t\tresult.label = Label.NEGATIVE;\n\n\t\treturn result;\n\t}", "CabinClassModel findCabinClass(String cabinCode);", "private AtualizarContaPreFaturadaHelper parserRegistroTipo2(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\t\tSystem.out.println(\"Tipo de Retorno: \" + retorno.tipoRegistro);\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\t\tSystem.out.println(\"Matricula do Imovel: \" + retorno.matriculaImovel);\r\n\r\n\t\t// Codigo da Categoria\r\n\t\tretorno.codigoCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CODIGO_CATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_2_CODIGO_CATEGORIA;\r\n\r\n\t\t// Codigo da Subcategoria\r\n\t\tretorno.codigoSubCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CODIGO_SUBCATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_2_CODIGO_SUBCATEGORIA;\r\n\r\n\t\t// Valor faturado agua\r\n\t\tretorno.valorFaturadoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_FATURADO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_FATURADO_AGUA;\r\n\r\n\t\t// Consumo faturado de agua\r\n\t\tretorno.consumoFaturadoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_FATURADO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_FATURADO_AGUA;\r\n\r\n\t\t// Valor tarifa minima de agua\r\n\t\tretorno.valorTarifaMinimaAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_AGUA;\r\n\r\n\t\t// Consumo Minimo de Agua\r\n\t\tretorno.consumoMinimoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_MINIMO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_MINIMO_AGUA;\r\n\r\n\t\t// Valor faturado esgoto\r\n\t\tretorno.valorFaturadoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_FATURADO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_FATURADO_ESGOTO;\r\n\r\n\t\t// Consumo faturado de esgoto\r\n\t\tretorno.consumoFaturadoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_FATURADO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_FATURADO_ESGOTO;\r\n\r\n\t\t// Valor tarifa minima de esgoto\r\n\t\tretorno.valorTarifaMinimaEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_ESGOTO;\r\n\r\n\t\t// Consumo Minimo de esgoto\r\n\t\tretorno.consumoMinimoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_MINIMO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_MINIMO_ESGOTO;\r\n\t\t\r\n\t\t// Consumo Minimo de esgoto \r\n\t\t/*\r\n\t\tretorno.subsidio = linha.substring(index + 2, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_SUBSIDIO_AGUA_PARA);\r\n\t\tindex += REGISTRO_TIPO_2_SUBSIDIO_AGUA_PARA;\r\n\t\t*/\r\n\t\treturn retorno;\r\n\t}", "private static ArrayList<Classification> getClassifications(HttpResponse<String> response){\n\t\tArrayList<Classification> classifications;\n\t\ttry {\n\t\t\tclassifications = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<Classification>>(){});\n\t\t\treturn classifications;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//return null;\n\t\treturn new ArrayList<Classification>();\n\t}", "public Match matchClasses(OWLClass class1, OWLClass class2) {\n\n if (class1 == null || class2 == null) {\n return Match.OWLCLASSNOTFOUND;\n } else if (class1.equals(class2)) {\n return Match.SAMECLASS;\n } else if (checkSuperClass(class1, class2)) {\n return Match.SUPERCLASS;\n } else if (checkSubClass(class1, class2)) {\n return Match.SUBCLASS;\n } else if (checkEquivalent(class1, class2)) {\n return Match.EQUIVALENTCLASS;\n } else if (checkIntersect(class1, class2)) {\n return Match.INTERSECTINGCLASS;\n } else {\n return Match.NONINTERSECTING;\n }\n }", "@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}", "Classifier getClassifier();", "public String getBestClassByClassification(Features features,\r\n\t\t\tFileOneByOneLineWriter writer) {\r\n\t\tdouble[] categoryProb = getClassProbByClassification(features, writer);\r\n\t\tdouble maximumProb = -Double.MAX_VALUE;\r\n\t\tint maximumIndex = -1;\r\n\t\tfor (int i = 0; i < categoryProb.length; ++i) {\r\n\t\t\tif (maximumProb < categoryProb[i]) {\r\n\t\t\t\tmaximumProb = categoryProb[i];\r\n\t\t\t\tmaximumIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mCategories[maximumIndex];\r\n\t}", "@Override\n\tpublic List<Classes> findAllClasses() {\n\t\tString sql = \"select * from classes\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tList<Classes> classesList = (List<Classes>) querys.getResultList();\n\t\treturn classesList;\n\t}", "public <T extends Serializable> List<T> reader(String readPath, String splitChareckter,\n Class<T> clazz) {\n List<T> lstData = new LinkedList<>();\n String line = \"\";\n\n try (BufferedReader br = new BufferedReader(new FileReader(readPath))) {\n while ((line = br.readLine()) != null) {\n\n String[] readerArray = line.split(splitChareckter);\n int sayac = 0;\n T data = clazz.newInstance();\n for (Field field : clazz.getDeclaredFields()) {\n try {\n if (field.isAnnotationPresent(DataMatch.class)) {\n // elimizde bulunan datadaki bazı colomnları kullanmak istemiyorum\n // fakat datayı da bozmak istemediğim için kendi custom anotationumu yazdım\n DataMatch dataMatch = field.getAnnotation(DataMatch.class);\n int tempCount = 0;\n // burada da esas işlemi yaptık :) bunu anlayığ yaznana ladar 9 ayım geçmişti eferinnnnn\n\n\n // hemen nasıl anladın ya :))) b\n\n //uuuuuuuuuuuuuuuuuuuuuuuu //sorgulamayacaksın :D şaka yapıyom ya şuan kulağımın ağrısından kafm pek almıyo açıkcası\n //inşallah bi sorun çıkmaz abi git ya doktora devam ederse mecbur gidecem tabi\n\n // dusdan çıkınca iyice kulağını temizle su kalmasın :) //olur abisi :D\n\n\n ////boğazımda aprıyo toptan bi grip olucam anlaşılan gel vatandaş batan geminin malları bunlar :)) :)\n // şimdi ne drumdayız son olarak dur bi bakayım\n\n\n // son datayı yazarken bi problem olmuş onun dışında uçusa hazır :D\n if (dataMatch.index() != -1) {\n tempCount = dataMatch.index();\n } else {\n tempCount = sayac;\n }\n if (readerArray[tempCount].contains(\"K\")) {\n String valueOfNoneK = readerArray[tempCount].replace(\".\", \"\").replace(\"K\", \"\");\n Double realValue = Double.valueOf(valueOfNoneK) * 1000;\n readerArray[tempCount] = Double.toString(realValue);\n }\n setField(data, field.getName(), readerArray[tempCount]);\n }\n sayac++;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n lstData.add(data);\n\n }\n\n return lstData;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }", "public RTTIClass select(ClassFilter filter);", "public List<com.platform.chorus.db.tables.pojos.ClassModel> fetchByLabel(String... values) {\n return fetch(ClassModel.CLASS_MODEL.LABEL, values);\n }", "@Override\n public List<ArrayList<String>> queryClass(int courseID, String courseName, String location, String term,\n String department, String classType, String instructorName) {\n\n List<ArrayList<String>> result = new ArrayList<>();\n try {\n result = queryClass2(courseID, courseName, location, term, department, classType, instructorName);\n } catch (SCRSException e) {\n System.out.println(e.getMessage());\n }\n return result;\n }", "@Override\n\tpublic Classes findClasses(String cls_id) {\n\t\tString sql = \"select * from classes where cls_id='\" + cls_id + \"'\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tClasses classes = querys.getBean();\n\t\treturn classes;\n\t}", "public String getResult(){\n \tString result = \"OK\";\n System.out.print(this.mainQuery);\n Query query = QueryFactory.create(this.mainQuery);\n Query querycount = QueryFactory.create(this.countQuery);\n //System.out.println(this.countQuery);\n QueryExecution qexecCount = QueryExecutionFactory.create(querycount, Initialisation.getModel());\n QueryExecution qexec = QueryExecutionFactory.create(query, Initialisation.getModel());\n try{\n \torg.apache.jena.query.ResultSet results = qexec.execSelect();\n //////////////////////////\n org.apache.jena.query.ResultSet resultsCount = qexecCount.execSelect();\n \tint compteur = 0;\n while (resultsCount.hasNext()){\n QuerySolution soln = resultsCount.nextSolution();\n compteur = soln.getLiteral(\"count\").getInt();\n }\n //System.out.println(\"Compteur = \"+compteur );\n if(compteur>1){\n return \"NONE\";\n }\n else if (compteur==0){\n return \"NF\";\n }\n /////////////////////////\n \twhile (results.hasNext()){\n \t\tcompteur++;\n \t\tQuerySolution soln = results.nextSolution();\n \t\tLiteral title = soln.getLiteral(\"label\");\n \t\tLiteral comment = soln.getLiteral(\"comment\");\n \t\tthis.title = title.getString().replace(\"-\",\" \");\n \t\ttry{\n \t\tthis.comment = comment.getString();\n \t\t}\n \t\tcatch(NullPointerException e){\n \t\t\tthis.comment = \"There is not any summary available for this film.\";\n \t\t}\n \t}\n\n }\n finally{\n \tqexec.close();\n }\n \n return result;\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public Set<String> calculateDistance() throws IOException {\n booleanSearch();\n\n Set<String> words = invertedIndexForQuerryWords.keySet();\n Map<String, Double> tfidfQuerry = new TreeMap<>();\n\n //load idf\n char c='a';\n char prC = 'v';\n for (String word : words){\n c = word.charAt(0);\n if(c != prC) {\n String path = Constants.PATH_TO_IDF + c + \"IDF.idf\";\n prC = c;\n idfMap.putAll(objectMapper.readValue(new File(path), new TypeReference<TreeMap<String, Double>>(){}));\n }\n }\n\n Map<String, Double> distanceMap = new HashMap<>();\n double sum = 0.0;\n //calculez norma interogarii\n for(String word:words){\n double idf, tf;\n if(idfMap.containsKey(word)) {\n idf = idfMap.get(word);\n tf = 1.0 / words.size();\n tfidfQuerry.put(word, tf * idf);\n\n sum += (tf * idf) * (tf * idf);\n } else {\n sum += 0.0;\n }\n }\n\n double normQuerry = Math.sqrt(sum);\n\n //iau toate documentele rezultate din boolean search\n Set<String> docs = new TreeSet<>();\n for(List<MyPair> list : invertedIndexForQuerryWords.values()) {\n if (list != null) {\n docs.addAll(list.stream().map(p -> p.getKey()).collect(Collectors.toSet()));\n }\n }\n\n List<File> documents = FileLoader.getFilesForInternalPath(\"Norms\", \".norm\");\n\n Map<String, Double> norms = new HashMap<>();\n for(File file : documents) {\n norms.putAll(objectMapper.readValue(file, new TypeReference<TreeMap<String, Double>>(){}));\n }\n\n //pentru fiecare document din boolean search calculez distanta cosinus\n for(String doc : docs) {\n\n String fileName = Paths.get(doc).getFileName().toString();\n\n String filePath = Constants.PATH_TO_TF + fileName.replaceFirst(\"[.][^.]+$\", \".tf\");\n\n Map<String, Double> tf = objectMapper.readValue(new File(filePath), new TypeReference<TreeMap<String, Double>>(){});\n double wordTF, wordIDF;\n double vectorialProduct = 0.0;\n double tfidfForQueryWord;\n\n for(String word : words) {\n if (tf.containsKey(word)) {\n wordTF = tf.get(word);\n wordIDF = idfMap.get(word);\n tfidfForQueryWord = tfidfQuerry.get(word);\n\n vectorialProduct += tfidfForQueryWord * wordIDF * wordTF;\n }\n }\n\n double normProduct = normQuerry * norms.get(Paths.get(doc).getFileName().toString());\n\n distanceMap.put(doc, vectorialProduct / normProduct);\n }\n\n //sortare distance map\n distanceMap = distanceMap.entrySet().stream()\n .sorted(Map.Entry.comparingByValue(Collections.reverseOrder()))\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n Map.Entry::getValue,\n (e1, e2) -> e1,\n LinkedHashMap::new));\n\n// System.out.println(\"Cos distance:\");\n// for(Map.Entry entry : distanceMap.entrySet()){\n// System.out.println(entry);\n// }\n\n return distanceMap.keySet();\n }", "public Set<? extends OWLEntity> getMatchingOWLClasses(String searchString,\r\n\t\t\tboolean b, int caseInsensitive) {\n\t\treturn null;\r\n\t}", "org.landxml.schema.landXML11.ClassificationDocument.Classification getClassificationArray(int i);", "private static String getClassName (String label)\n {\n\tchar c;\n\tfor (int i = 0; i < label.length (); i++) {\n\t c = label.charAt (i);\n\t if (Character.isDigit (c)) {\n\t\treturn label.substring (0, i);\n\t }; // if\n\t}; // for\n\n\treturn label;\n\n }", "private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }", "public String execFuzzySearchGWASFunc(){\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(this.searchParam );\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n map.put(\"species\",this.searchSpecies);\n }\n\n\n List<GwasAssociationBean> t_gwasAssociationList =(List<GwasAssociationBean>) baseService.findResultList(\"cn.big.gvk.dm.GwasAssociation.selecTraitByFuzzySearch\",map);\n\n if(t_gwasAssociationList != null && t_gwasAssociationList.size()>0) {\n\n List traitlist = new ArrayList();\n for (GwasAssociationBean gwas : t_gwasAssociationList) {\n traitlist.add(gwas.getTraitId());\n }\n Map t = new HashMap();\n t.put(\"traitlist\",traitlist);\n this.gwasAssociationViewList = (List<GwasAssociationView>) baseService.findResultList(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewInfo\",t);\n\n if(this.gwasAssociationViewList != null ){\n for(GwasAssociationView gview : gwasAssociationViewList){\n List<GenotypeAnnotateGeneView> gagvlist = (List<GenotypeAnnotateGeneView>)baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeById\",gview.getGenotypeId());\n\n List<GenotypeAnnotateGeneView> ttlist = new ArrayList<GenotypeAnnotateGeneView>();\n if(gagvlist != null ){\n Map gmap = new HashMap();\n\n for(GenotypeAnnotateGeneView gagv: gagvlist){\n String key = gagv.getMapGeneId()+\",\"+gagv.getConseqtype();\n if(gmap.get(key) == null ){\n ttlist.add(gagv);\n gmap.put(key,key);\n }\n }\n\n\n }\n\n gview.setGenotypeAnnotateViewList(ttlist);\n\n\n List<ReportGeneBean> grglist = (List<ReportGeneBean>)baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectReportGeneById\",gview.getGaId());\n if(grglist != null ){\n String s = \"\";\n for(ReportGeneBean grg: grglist){\n if(grg.getReportGeneId() != null ){\n s += grg.getReportGeneId();\n }\n if(grg.getEntrezGeneSymbol() != null ){\n s+= \"( \"+grg.getEntrezGeneSymbol()+\" );\";\n }\n }\n if(s.length()>0){\n s= s.substring(0,s.length()-1);\n }\n gview.setGwasReportGene(s);\n }\n }\n }\n }\n\n\n\n return SUCCESS;\n }", "public void parseAndRankQuery(String stringNumber) throws Exception {\n\n if (this.semantics) { //if the user choose semantic\n semantic=new ArrayList<>();\n Word2VecModel model = Word2VecModel.fromTextFile(new File(\"word2vec.c.output.model.txt\"));\n com.medallia.word2vec.Searcher semanticSearchrt = model.forSearch();\n int num = 10;\n String[] semanQuery = query.split(\" \");\n for (String s : semanQuery)\n {\n try {\n List<com.medallia.word2vec.Searcher.Match> matches = semanticSearchrt.getMatches(s.toLowerCase(), num);\n for (com.medallia.word2vec.Searcher.Match match : matches) {\n match.match();\n }\n if(matches.get(0).equals(s)) {\n query = query + \" \" + matches.get(1);\n String dd=\"\"+matches.get(1);\n semantic.add(dd);\n }\n else {\n query = query + \" \" + matches.get(0); //add to query the high semantics 3 top words score\n String dd=\"\"+matches.get(0);\n semantic.add(dd);\n }\n } catch(com.medallia.word2vec.Searcher.UnknownWordException e){\n }\n }\n }\n\n ranker = new Ranker(this.indexer,stringNumber,path,originalString); // new ranker\n ArrayList<String> cleanQuery;\n ArrayList<String> parsedQueryList;\n ReadFile rd=new ReadFile();\n cleanQuery=rd.cleanLine(stemming,query); //clean the query from dots and other signs\n HashMap<String, Pair<Integer,String>> parsedQuery=new HashMap<>();\n parsedQuery=parser.Tokenizer(cleanQuery,\"\",stemming); //parse the query\n Iterator it = parsedQuery.entrySet().iterator();\n parsedQueryList=new ArrayList<>();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry)it.next();\n parsedQueryList.add((String)pair.getKey());\n it.remove(); // avoids a ConcurrentModificationException\n }\n ranker.setParseredQuery(parsedQueryList);\n try {\n ranker.orgByPostFile();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "public ArrayList<GrammarMatch> extract(String text) {\n text = text.replaceAll(\"\\\\s+\", \" \");\n\n ArrayList<GrammarMatch> bigResult = new ArrayList();\n\n List<ParserToken> stream = this.tokenizer.transform(text);\n\n /**\n * Get morfological data for whole list of tokens\n */\n // TODO make this flexible \n // provide tagger as a parameter to parser\n // add posibility to skip tagging to boost performance\n List<AnalyzedTokenReadings> tags = null;\n\n try {\n UkrainianTagger ut = new UkrainianTagger();\n List<String> sentence = new ArrayList();\n\n stream.forEach(t -> {\n sentence.add(t.value);\n });\n\n tags = ut.tag(sentence);\n\n } catch (IOException ex) {\n Logger.getLogger(GrammarMatch.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n // merge pos tags with ParserTokens\n int currentIndex = 0;\n for (ParserToken token : stream) {\n AnalyzedTokenReadings forms = tags.get(currentIndex);\n\n if (forms != null) {\n token.setRawForms(forms);\n }\n currentIndex++;\n }\n\n // preprocess tokens\n for (ParserTokenPreprocessor preprocessor : this.preprocessors) {\n stream = preprocessor.proceed(stream);\n }\n\n // match with grammars\n// int tokenIndex = 0;\n// int lastInsertTokenIndex = 0;\n this.currentTokens = stream;\n\n for (ParserToken token : stream) {\n for (GrammarRuleI grule : this.grammars) {\n\n // TODO get rid of this. use based on interface implementation\n ParserGrammar grammar = (ParserGrammar) grule;\n\n boolean recheck = grammar.shift(token);\n // TODO substitute ParserMatch with parserToken\n ArrayList<ParserMatch> match = grammar.reduce();\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n }\n\n if (recheck) {\n grammar.shift(token);\n match = grammar.reduce();\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n }\n\n }\n\n }\n\n }\n\n // shift repeatable rules to the terminal symbol if any\n// for (GrammarRuleI gr : this.grammars) {\n//\n// visitAllRules(null,gr, (rule,parent) -> {\n// if (!rule.isSimple()) {\n//\n// ParserGrammar pg = (ParserGrammar) rule;\n// System.out.print(\" %%% -> [\"+parent+\"]\" + ((ParserGrammar) rule).getName());\n// if (pg.isRepeatable()) {\n// System.out.print(\" repeatable\");\n// if (pg.isInserted()) {\n// System.out.print(\" is_inserted\");\n// } else {\n// System.out.print(\" not_inserted\");\n//\n// if (!pg.isFirstRun() && pg.getCurrentIndex() == 0) {\n// System.out.print(\" dirty\");\n// \n// pg.setCurrentIndex(pg.rulesCount());\n// \n// if (parent != null) {\n// ParserGrammar pgp = (ParserGrammar) parent;\n// \n// \n// pgp.setCurrentIndex(pgp.getCurrentIndex()+1);\n// System.out.print(\" shift_head[\"+pgp.getCurrentIndex()+\"->\"+(pgp.getCurrentIndex()+1)+\"]\");\n// }\n// \n// \n// }\n// \n// }\n//\n// }\n// System.out.println(\"\");\n//\n// } else {\n//// System.out.println(\" [%%%] -> \");\n// }\n// });\n// }\n\n for (GrammarRuleI grule : this.grammars) {\n\n ParserGrammar grammar = (ParserGrammar) grule;\n\n ArrayList<ParserMatch> match = grammar.reduce(true, false);\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n\n }\n grammar.reset();\n }\n\n return bigResult;\n }", "public String[] findClassesByCylinders(int inputCylinders) {\n\t\tString[] list = new String[count];\n\t\tNode current = head;\n\t\tint i = 0;\n\n\t\twhile (current != null) {\n\t\t\tif (current.getCar() instanceof GasCar) {\n\t\t\t\tif ( ((GasCar)current.getCar()).getNumberCylinders() == inputCylinders) {\n\t\t\t\t\tString match = current.getCar().getVehicleClass();\n\t\t\t\t\tif (!ifDuplicated(match, list)) {\n\t\t\t\t\t\tlist[i] = match;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\t//saving them into a sorted array\n\t\tString[] newlist = new String[i];\n\t\tfor (int j = 0; j < i; j++) {\n\t\t\tnewlist[j] = list[j];\n\t\t}\n\n\t\tfor (int a = 0; a < i; a++) {\n\t\t\tfor (int b = 0; b < i; b++) {\n\t\t\t\tif (newlist[a].compareTo(newlist[b]) < 0) {\n\t\t\t\t\tString s = newlist[a];\n\t\t\t\t\tnewlist[a] = newlist[b];\n\t\t\t\t\tnewlist[b] = s;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn newlist;\n\t}", "private String getMajorityClass(List<Instance> instances) {\r\n\r\n\t\tint[] counters = countClasses(instances);\r\n\r\n\t\tint max = 0;\r\n\t\tint index = 0;\r\n\t\tfor(int i = 0;i<counters.length;++i){\r\n\t\t\tif(max<counters[i]){\r\n\t\t\t\tmax=counters[i];\r\n\t\t\t\tindex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn classes.get(index);\r\n\t}", "public interface Text {\n \n /**\n * Method find name of class which object are instance\n * @return \n */\n String getStringClass();\n\n @Override\n public String toString();\n \n \n \n}", "String getStringClass();", "private String executarRegras(EntidadeDominio entidade, String operacao) {\n String nmClasse = entidade.getClass().getName();\r\n //para construção de String de mensagens\r\n StringBuilder msg = new StringBuilder();\r\n //mapeando classes com lista de estrategies\r\n Map<String, List<IStrategy>> regrasOperacao = rns.get(nmClasse);\r\n //caso tenha regras de negocio associada à classe\r\n if (!regrasOperacao.isEmpty()) {\r\n List<IStrategy> regras = regrasOperacao.get(operacao);\r\n //caso tenha regras de negocio associada à operação da classe\r\n if (!regras.isEmpty()) {\r\n for (IStrategy s : regras) {\r\n //checando mensagens de regras de negocio\r\n String m = s.processar(entidade);\r\n if (!m.isEmpty()) {\r\n //adicionando mensagens na StringBuilder\r\n msg.append(m);\r\n }\r\n }\r\n }\r\n }\r\n if (msg.length() > 0) {\r\n return msg.toString();\r\n } else {\r\n return \"\";\r\n }\r\n }", "public List<com.platform.chorus.db.tables.pojos.ClassModel> fetchByName(String... values) {\n return fetch(ClassModel.CLASS_MODEL.NAME, values);\n }", "static String classificacao(ArrayList<Musica> musicas, Musica proxima, int k){\n String classeResultado = \"\";\n\n int qtdeMusicas = musicas.size();\n //System.out.println(\"Quantidade de musicas \" + qtdeMusicas);\n double distAmostra[] = new double[qtdeMusicas];\n int vetorOrdenado[] = new int[qtdeMusicas];\n\n for(int i=0; i<qtdeMusicas;i++){\n double dist = distancia(musicas.get(i), proxima);\n distAmostra[i] = dist; \n } \n System.out.println(\"ANTES\");\n for(int i = 0; i < distAmostra.length; i++){\n System.out.println(distAmostra[i]);\n }\n \n selectionSort(distAmostra,vetorOrdenado);\n \n System.out.println(\"DEPOIS\");\n for(int i = 0; i < distAmostra.length; i++){\n System.out.println(distAmostra[i]);\n }\n \n int contadorDeClasse[] = new int[6];\n int vizinhos = 0;\n for(int i=0; i < distAmostra.length; i++){\n if(vizinhos > k){\n break;\n }\n \n String classe = musicas.get(vetorOrdenado[i]).getClasse();\n //System.out.println(\"musica classe \" + classe); //Para Teste\n\n switch (classe) {\n case \"rap\":\n contadorDeClasse[0]++;\n break;\n case \"axe\":\n contadorDeClasse[1]++;\n break;\n case \"sertanejo\":\n contadorDeClasse[2]++;\n break;\n case \"samba\":\n contadorDeClasse[3]++;\n break;\n case \"forro\":\n contadorDeClasse[4]++;\n break;\n case \"bossa_nova\":\n contadorDeClasse[5]++;\n break; \n }\n vizinhos++;\n } \n /*\n for(int i = 0; i < contadorDeClasse.length; i++){\n System.out.println(contadorDeClasse[i]);\n }\n */\n int maior = 0;\n int indiceMaior = -1;\n for (int i = 0; i < contadorDeClasse.length; i++) {\n if (contadorDeClasse[i] > maior) {\n maior = contadorDeClasse[i];\n indiceMaior = i;\n }\n }\n \n switch (indiceMaior) {\n case 0:\n classeResultado = \"rap\";\n break;\n case 1:\n classeResultado = \"axe\";\n break;\n case 2:\n classeResultado = \"sertanejo\";\n break;\n case 3:\n classeResultado = \"samba\";\n break;\n case 4:\n classeResultado = \"forro\";\n break;\n case 5:\n classeResultado = \"bossa_nova\";\n break; \n }\n return classeResultado;\n }", "public void testRecognizer() {\n\t\tfinal int TIPO_COLUMN_NUMBER = 4;\n\t\tfinal int INSEGNA_COLUMN_NUMBER = 3;\n\t\tfinal String FUSION_CR_ID = \"fusion\";\n\t\tfinal String CSV_PATH = \"/tables/Elenco_osterie_tipiche_civici.1386925759.csv\";\n\t\tfinal char COLUMN_SEPARATOR = ';';\n\n\t\t// Load CSV file\n//\t\tFile csvFile = new File(CSV_PATH); \n\t\tFile csvFile = FileUtils.getResourceFile(CSV_PATH);\n\t\tRowTable rowTable = RowTable.loadFromCSV(csvFile, COLUMN_SEPARATOR);\n\t\trowTable.removeHeaders();\n\t\t\n\t\t// Create recognizer\n\t\tSet<String> inputRecognizers = new HashSet<String>();\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\t\tFile modelFile = FileUtils.getSVMModelFile(TWO_FEATURES_OSTERIE_CR_NAME);\n\t\tClassifierFusionCR fusionCR \n\t\t\t= new ClassifierFusionCR(FUSION_CR_ID, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\trowTable, \n\t\t\t\t\tmodelFile, \n\t\t\t\t\tinputRecognizers);\n\t\t\n\t\t// Make list of candidates\n\t\tList<ColumnConceptCandidate> candidates = new ArrayList<ColumnConceptCandidate>();\n\t\tColumnConceptCandidate tipoCandidate\n\t\t\t= new ColumnConceptCandidate(TIPO_COLUMN_NUMBER, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tTIPO_SIMILARITY_SCORE,\n\t\t\t\t\tINPUT_RECOGNIZER_ID);\n\t\tcandidates.add(tipoCandidate);\n\t\tColumnConceptCandidate insegnaCandidate\n\t\t\t= new ColumnConceptCandidate(INSEGNA_COLUMN_NUMBER, \n\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\tINSEGNA_SIMILARITY_SCORE,\n\t\t\t\tINPUT_RECOGNIZER_ID);\n\t\tcandidates.add(insegnaCandidate);\n\t\t\n\t\t// Run recognizer\n\t\tfusionCR.computeScoredCandidates(candidates);\n\t\t\n\t\t// Make sure input candidates are gone...\n\t\tassertTrue(candidates.size() == 1);\n\t\t// ... and replaced with a new fusion candidate\n\t\tColumnConceptCandidate resultingCandidate = candidates.get(0);\n\t\tassertTrue(resultingCandidate.getOriginator().equals(FUSION_CR_ID));\n\t\t\n\t\t// Verify the score of the fusion candidate\n\t\tassertTrue(resultingCandidate.getScore() > 0.7);\n\t}", "public static ArrayList<MatHang_DTO> search(String text) throws ClassNotFoundException, SQLException {\n\t\treturn MatHang_DAL.search(text);\n\t}", "public ArrayList<String> getClassesToClassify(Instance instanceSelected, InfModel infModel) {\n\t\tArrayList<String> listClassesMembersTmpWithoutRepeat = new ArrayList<String>();\r\n\t\tfor (DtoCompleteClass dto : instanceSelected.ListCompleteClasses) {\r\n\t\t\tfor (String clsComplete : dto.Members) {\r\n\t\t\t\tif(! listClassesMembersTmpWithoutRepeat.contains(clsComplete))\r\n\t\t\t\t{\r\n\t\t\t\t\tlistClassesMembersTmpWithoutRepeat.add(clsComplete);\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Remove disjoint subclasses from some super class\r\n\t\tArrayList<String> listClassesMembersTmp = new ArrayList<String>();\r\n\t\tfor (DtoCompleteClass dto : instanceSelected.ListCompleteClasses) \r\n\t\t{\r\n\t\t\tArrayList<String> listDisjoint = search.GetDisjointClassesOf(dto.CompleteClass, infModel);\r\n\t\t\tfor (String clc : listClassesMembersTmpWithoutRepeat) \r\n\t\t\t{\r\n\t\t\t\tif(! listDisjoint.contains(clc))\r\n\t\t\t\t{\r\n\t\t\t\t\tlistClassesMembersTmp.add(clc);\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\treturn listClassesMembersTmp;\r\n\t}", "@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}", "public Classifier loadClassifier() throws FileNotFoundException, IOException, ClassNotFoundException {\n\n Classifier classifier;\n\n File file = new File(getServletContext().getRealPath(\"/WEB-INF/tweets.classifier\"));\n ObjectInputStream ois = new ObjectInputStream (new FileInputStream (file));\n classifier = (Classifier) ois.readObject();\n ois.close();\n\n return classifier;\n }", "private static ImmutableSet<String> categorizeText(String text) throws IOException {\n ImmutableSet<String> categories = ImmutableSet.of();\n\n try (LanguageServiceClient client = LanguageServiceClient.create()) {\n Document document = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build();\n ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(document).build();\n\n ClassifyTextResponse response = client.classifyText(request);\n\n categories = response.getCategoriesList()\n .stream()\n .flatMap(ReceiptAnalysis::parseCategory)\n .collect(ImmutableSet.toImmutableSet());\n } catch (ApiException e) {\n // Return empty set if classification request failed.\n return categories;\n }\n\n return categories;\n }", "private Map<String, Entity> parseJavaClasses(List<Path> classFiles) {\r\n logger.trace(\"parseJavaClass\");\r\n\r\n // Instantiate walker and listener\r\n ParseTreeWalker walker = new ParseTreeWalker();\r\n Java8CustomListener listener = new Java8CustomListener();\r\n\r\n classFiles.forEach(path -> {\r\n logger.trace(\"========== Parse: \" + path.toFile().getName() + \" ==========\");\r\n\r\n try {\r\n ParseTree tree = getTree(path);\r\n\r\n // walk through class\r\n walker.walk(listener, tree);\r\n } catch (IOException e) {\r\n logger.error(\"Error while reading creating tree for: {}\", path, e);\r\n }\r\n });\r\n\r\n return listener.getEntityMap();\r\n }", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "String tomar_decisiones(String decision);" ]
[ "0.6420132", "0.5693007", "0.54214406", "0.5391878", "0.53440577", "0.53380066", "0.53282964", "0.53170186", "0.52497566", "0.5196631", "0.51899666", "0.51744753", "0.5123479", "0.5110548", "0.50803566", "0.5072153", "0.5071871", "0.50340575", "0.5007779", "0.50064296", "0.49952742", "0.4970719", "0.4966844", "0.49651447", "0.4951498", "0.49410838", "0.4938937", "0.49168548", "0.490704", "0.4872508", "0.48698688", "0.4868182", "0.4845303", "0.4841374", "0.48366877", "0.48347828", "0.48347828", "0.48305076", "0.4826972", "0.4819337", "0.4818265", "0.4817048", "0.4810727", "0.47997272", "0.47842866", "0.47831088", "0.47741482", "0.47741336", "0.47532177", "0.4753147", "0.47381824", "0.47317642", "0.47238854", "0.4705721", "0.47039998", "0.47037858", "0.4698585", "0.46956447", "0.46915424", "0.46858633", "0.46753395", "0.46736586", "0.46678466", "0.46677658", "0.46675083", "0.4661664", "0.4648966", "0.46456772", "0.46429327", "0.46410888", "0.46386525", "0.4628974", "0.46211663", "0.46154344", "0.46130592", "0.46101645", "0.46055323", "0.46049538", "0.45961213", "0.45930466", "0.4588095", "0.45867887", "0.45849255", "0.45848253", "0.45847645", "0.4584537", "0.45833316", "0.45808193", "0.45785636", "0.45780438", "0.45738396", "0.4572913", "0.45634025", "0.45558804", "0.45554936", "0.4553709", "0.45529503", "0.4546334", "0.45433503", "0.4542646" ]
0.46769357
60
/ Verifica se o classificador suporta um dado metodo
public abstract boolean supports(ClassificationMethod method);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean semelhante(Assemelhavel obj, int profundidade) {\n\t\treturn false;\n\t}", "public boolean isPorDescuento();", "@Override\n\tpublic boolean podeReceber(Fornecivel e) {\n\t\treturn (e instanceof Agua || e instanceof Cereal) ? true : false;\n\t}", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "@Override\n\tpublic boolean shouldSkipClass(Class<?> classe) {\n\t\t\n\t\t \n\t\treturn false;\n\t}", "public NodoDoble(NodoDoble<E> anterior, E elemento, NodoDoble<E> siguiente){//a ver si no te da problema el nodo por no estar especigicando su tipo... puesto que esta clase es genérica y aquí estas creando uno sin saber, asi que creo que debería de especificarselo\n contenido = elemento;\n nodoSiguiente = siguiente;\n nodoAnterior = anterior;\n }", "public boolean checaTipo(AmbienteCompilacaoOO2 ambiente)\n\t\t\tthrows VariavelJaDeclaradaException, VariavelNaoDeclaradaException,\n\t\t\tClasseJaDeclaradaException, ClasseNaoDeclaradaException,\n\t\t\tProcedimentoNaoDeclaradoException,\n\t\t\tProcedimentoJaDeclaradoException, ConstrutorNaoDeclaradoException {\n\t\tif (nomeSuperClasse != null) {\n\t\t\tambiente.mapSuperClasse(nomeClasse, nomeSuperClasse);\n\t\t}\n\n\t\tDefClasseOO3 defClass = new DefClasseOO3(nomeClasse, nomeSuperClasse,\n\t\t\t\tatributos, construtor, metodos, listaInclude, listaExtends);\n\n\t\t// Adiciona a classe no mapeameento de classes\n\t\tambiente.mapDefClasse(nomeClasse, defClass);\n\n\t\tboolean resposta = false;\n\n\t\t// chega tipo dos modulos inclusos\n\t\tchecaTipoListaModulo((AmbienteCompilacaoOO3) ambiente, defClass);\n\n\t\tambiente.incrementa();\n\n\t\tDecVariavel atr = (DecVariavel) this.atributos;\n\t\tif (atr.checaTipo(ambiente)) {\n\t\t\tambiente.map(new Id(\"this\"), new TipoClasse(nomeClasse));\n\n\t\t\tif (nomeSuperClasse != null) {\n\t\t\t\tthis\n\t\t\t\t\t\t.checaTipoVariaveisClasseMae(ambiente,\n\t\t\t\t\t\t\t\tthis.nomeSuperClasse);\n\t\t\t}\n\t\t\tresposta = metodos.checaTipo(ambiente);\n\t\t}\n\n\t\t// Verifica se construtor esta declarado corretamente\n\t\tresposta = resposta && construtor.checaTipo(ambiente);\n\n\t\tambiente.restaura();\n\n\t\treturn resposta;\n\t}", "@Override\n protected void checkSubclass() {\n }", "public abstract boolean comprobar(Articulo articulo);", "@Override\n\tpublic void tipoComunicacao() {\n\t\tSystem.out.println(super.getNome() + \" se comunica miando.\");\n\t}", "@Override\n public boolean isTipoValido() {\n return true;\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n public boolean equals(Object otro) {\n if (otro.getClass().getName().equals(this.getClass().getName())) {\n return true;\n } else {\n return false;\n }\n }", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tpublic boolean shouldSkipField(FieldAttributes classe) {\n\t\t\n\t\tfinal Expose expose = classe.getAnnotation(Expose.class);\n return expose != null && !expose.serialize();\n\t\t\n/*\t\tString className = classe.getDeclaringClass().getName();\n\t\tString fieldName = classe.getName();\n\t\t\n\t\t\t\n\t\t\n\t\treturn \n\t className.equals(Produto.class.getName())\n\t && (fieldName.equals(\"versoes\") || fieldName.equals(\"clientes\"));*/\n\t}", "@Override\n\tprotected boolean isValidaInserir(ContatoTipo entity) {\n\t\treturn false;\n\t}", "public boolean issimpleClassFacadeMetaType();", "@Override\n\tpublic boolean adicionar(Veiculo veiculo) {\n\t\treturn false;\n\t}", "public boolean isClass() {\n return operation == null;\n }", "@Override\n public TipoBase check(TipoBase tipo) throws Exception {\n Clase c = analizadorsintactico.AnalizadorSintactico.getTs().getClase(tipo.getNombre());\n String nombreVar = id.getLexema();\n VarInstancia v;\n\n if (tipo.getNombre().equals(\"int\") || tipo.getNombre().equals(\"boolean\") || tipo.getNombre().equals(\"char\") || tipo.getNombre().equals(\"String\")) {\n throw new Exception(\"La variable \" + id.getLexema() + \" en la linea \" + id.getLineNumber() + \" no puede llamar metodos ya que es de tipo primitivo\");\n }\n if (c == null) {\n throw new Exception(\"Se trata de acceder a un metodo void en la linea \" + id.getLineNumber());\n }\n\n if (cadena == null) {\n\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n if (this.ladoIzq) {\n GenCode.gen().write(\"SWAP\");\n GenCode.gen().write(\"STOREREF \" + v.getOffset() + \" # Guardo el valor en la variable \" + v.getNombre());\n\n } else {\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n }\n\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n\n return v.getTipoVar();\n } else { //con encadenado\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n Tipo aux = v.getTipoVar();\n\n return cadena.check(aux);\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n }\n }", "public interface DokeosLxitClassDAO {\r\n\r\n boolean isClassNameExist(String name);\r\n\r\n void add(DokeosLxitClass dokeosLxitClass);\r\n\r\n}", "default boolean isClass() {\n return false;\n }", "public boolean isMostrarBasesDetalle()\r\n/* 592: */ {\r\n/* 593:638 */ return this.mostrarBasesDetalle;\r\n/* 594: */ }", "@Override\n\tpublic boolean supports(Class<?> arg0) {\n\t\treturn Competence.class.equals(arg0);\n\t\t\t\t\n\t}", "public boolean isEliminable(VOUsuario us) {\n return true;\n }", "boolean hasClassname();", "@Override\n public boolean predicate2(Object dm, Designer dsgr) {\n if (!(Model.getFacade().isAClassifier(dm))) {\n return NO_PROBLEM;\n }\n if (!(Model.getFacade().isPrimaryObject(dm))) {\n return NO_PROBLEM;\n }\n\n // If the classifier does not have a name,\n // then no problem - the model is not finished anyhow.\n if ((Model.getFacade().getName(dm) == null)\n\t || (\"\".equals(Model.getFacade().getName(dm)))) {\n return NO_PROBLEM;\n\t}\n\n // Abstract elements do not necessarily require associations\n if (Model.getFacade().isAGeneralizableElement(dm)\n\t && Model.getFacade().isAbstract(dm)) {\n return NO_PROBLEM;\n }\n\n // Types can probably have associations, but we should not nag at them\n // not having any.\n // utility is a namespace collection - also not strictly required\n // to have associations.\n if (Model.getFacade().isType(dm)) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().isUtility(dm)) {\n return NO_PROBLEM;\n }\n\n // See issue 1129: If the classifier has dependencies,\n // then mostly there is no problem. \n if (Model.getFacade().getClientDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().getSupplierDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n \n // special cases for use cases\n // Extending use cases and use case that are being included are\n // not required to have associations.\n if (Model.getFacade().isAUseCase(dm)) {\n Object usecase = dm;\n Collection includes = Model.getFacade().getIncludes(usecase);\n if (includes != null && includes.size() >= 1) {\n return NO_PROBLEM;\n }\n Collection extend = Model.getFacade().getExtends(usecase);\n if (extend != null && extend.size() >= 1) {\n return NO_PROBLEM;\n }\n }\n \n \n\n //TODO: different critic or special message for classes\n //that inherit all ops but define none of their own.\n\n if (findAssociation(dm, 0)) {\n return NO_PROBLEM;\n }\n return PROBLEM_FOUND;\n }", "@Override\r\n\tpublic boolean supports(Class miClass) {\n\t\treturn Asignatura.class.isAssignableFrom(miClass);\r\n\t}", "@Override\n public String cualquierMetodo2() {\n return \"Método implementado en la clase hija viaje de incentivo\";\n }", "@Override\r\n\tprotected boolean puedeExtraer(double monto) {\n\t\treturn ((super.getSaldo() - monto) >= 0) ? true : false;\r\n\t}", "@Override\n\tpublic boolean puedoAtacar(ElementoSoldado a) {\n\t\treturn false;\n\t}", "public boolean supports(Class clazz) {\r\n\t\treturn clazz.equals(ProcesEntradaOlivaTaulaCommand.class);\r\n\t}", "@Override\n\tpublic void exibitQtadeBancoDados() {\n\t\tSystem.out.println(\"Existem \"+qtadeBancoDadosMetodos+\" Bancos de dados de Métodos.\");\n\t}", "public static void main(String[] args) {\n ClasseA a = new ClasseB();\n // System.out.println(b instanceof ClasseA);\n // System.out.println(a instanceof ClasseB);\n System.out.println(a.metodo1());\n }", "@Override // solo para declarar que clase entity o pojo vamos a validar\r\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn Usuario.class.isAssignableFrom(clazz); // si la clase Usuario es la clase que se esta psando por argumento a ese tipo devuelve true\r\n\t}", "@Override\r\n public Resultado excluir(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"EXCLUIR\");\r\n if (msg.isEmpty()) {\r\n IDAO dao = daos.get(nmClass);\r\n dao.excluir(entidade);\r\n resultado.setMsg(\"Dados excluidos\");\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "@Override\r\n\tpublic boolean buscar(T elemento) {\n\t\treturn false;\r\n\t}", "@Override\n public boolean shouldSkipClass(Class<?> arg0) {\n return false;\n }", "public void incluirDescendiente(INodo INodo) {\n\t\tif (this.getDescendientes().size() > numArg) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.incluirDescendiente(INodo);\n\t}", "public boolean isMostrarBaseImponible()\r\n/* 602: */ {\r\n/* 603:657 */ return this.mostrarBaseImponible;\r\n/* 604: */ }", "public boolean getDOMClassDisposition(boolean isFromProtege) {\r\n // get disposition identifier - if isFromProtege, then the identifier is set else it is not\r\n // since it is from an LDD.\r\n String lDispId =\r\n this.subModelId + \".\" + DMDocument.registrationAuthorityIdentifierValue + \".\" + this.title;\r\n if (!isFromProtege) {\r\n lDispId = \"LDD_\" + lDispId;\r\n }\r\n DispDefn lDispDefn = DMDocument.masterClassDispoMap2.get(lDispId);\r\n if (lDispDefn != null) {\r\n this.used = lDispDefn.used;\r\n this.section = lDispDefn.section;\r\n String lDisp = lDispDefn.disposition;\r\n this.steward = lDispDefn.intSteward;\r\n String lClassNameSpaceIdNC = lDispDefn.intNSId; // needed below for identifier\r\n this.nameSpaceIdNC = lClassNameSpaceIdNC;\r\n this.nameSpaceId = lClassNameSpaceIdNC + \":\";\r\n\r\n // if from protege, the identifier needs to be set; if from LDD it cannot be set here.\r\n if (isFromProtege) {\r\n this.identifier = DOMInfoModel.getClassIdentifier(lClassNameSpaceIdNC, this.title);\r\n set11179Attr(this.identifier);\r\n // System.out.println(\"debug getDOMClassDisposition this.identifier:\" + this.identifier);\r\n }\r\n this.isMasterClass = true;\r\n if (lDisp.indexOf(\"V\") > -1) {\r\n this.isVacuous = true;\r\n }\r\n if (lDisp.indexOf(\"S\") > -1) {\r\n this.isSchema1Class = true;\r\n }\r\n if (lDisp.indexOf(\"R\") > -1) {\r\n this.isRegistryClass = true;\r\n }\r\n if (lDisp.indexOf(\"T\") > -1) {\r\n this.isTDO = true;\r\n }\r\n if (lDisp.indexOf(\"d\") > -1) {\r\n this.isDataType = true;\r\n }\r\n if (lDisp.indexOf(\"u\") > -1) {\r\n this.isUnitOfMeasure = true;\r\n }\r\n return true;\r\n }\r\n return false;\r\n }", "protected boolean isInDerivedClass() {\n\t\treturn (getClass() != Main.class);\n\t}", "protected boolean isMoreDerivedThan( Bootstrapper other )\n {\n return other.getClass().isAssignableFrom( getClass() );\n }", "@Override\n\tpublic void checkBotonEliminar() {\n\n\t}", "@Override\n\tpublic boolean puedoAtacar(ElementoFuente a) {\n\t\treturn true;\n\t}", "private boolean jaTemDono(int posicao) {\n String nomeDono = Donos.get(posicao).toString();\n return (this.isUmJogador(nomeDono));\n\n }", "private boolean precedeOnlyUtilities(Node node) {\n NodeList children;\n boolean precedeU;\n\n children = diag.children(node);\n\n //It can´t be a barren node, i.e. it must have some children\n if (children.size() > 0) {\n precedeU = true;\n //All its children must be utilities\n for (int i = 0; (i < children.size()) && precedeU; i++) {\n if (children.elementAt(i).getKindOfNode() != Node.UTILITY) {\n precedeU = false;\n }\n }\n } else {\n precedeU = false;\n }\n return precedeU;\n }", "private boolean esDeMipropiedad(Casilla casilla){\n boolean encontrado = false;\n \n for(TituloPropiedad propiedad: this.propiedades){\n if(propiedad.getCasilla() == casilla){\n encontrado = true;\n break;\n }\n }\n return encontrado; \n }", "private boolean isMemberOfIdClass(PropertyDescriptor property)\n throws Exception {\n return false; // TODO see comments below\n// to be replaced by following code once support for IdClass in schema.\n// ClassDescriptor declaringClass = property.parent();\n// ClassDescriptor idClassDescriptor = null;\n// AccessType idClassAccessType = AccessType.PROPERTY;\n// FieldOrProperty fieldOrPropertyInIdClass = du.getJavaModel().getProperty(idClassDescriptor.getName(), idClassAccessType, property.getName())\n// return fieldOrPropertyInIdClass != null;\n }", "boolean isTodo();", "@Override\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn false;\n\t}", "public boolean supports(Class<?> clazz) {\n\t\treturn AuthorDTO.class == clazz;\n\t}", "private boolean noTipoPrimitivo(String tipo) {\r\n\t\tif (tipo.equals(\"arregloBoolean\")|| tipo.equals(\"arregloChar\")|| tipo.equals(\"arregloInt\")|| tipo.equals(\"boolean\")|| \r\n\t\t\t\ttipo.equals(\"char\")|| tipo.equals(\"int\")|| tipo.equals(\"string\")|| tipo.equals(\"void\"))\r\n\t\t\t\treturn false;\r\n\t\telse\r\n\t\t\t\treturn true;\t\r\n\t}", "public abstract boolean isUsable();", "public boolean isClass () throws java.io.IOException, com.linar.jintegra.AutomationException;", "@Test\n\tpublic void testDarMotivoIngreso()\n\t{\n\t\tassertEquals(\"El motivo de ingreso esperado es: Accidente\", Motivo.ACCIDENTE, paciente.darMotivoIngreso());\n\t}", "public void test_inheritence() {\n assertTrue(\"invalid inheritence.\", Task.class.getSuperclass() == BaseTaskEntity.class);\n }", "@Override\n public boolean supports(Class<?> clazz) {\n return false;\n }", "@Override\n public boolean supports(Class<?> clazz) {\n return false;\n }", "default boolean isChild(@NotNull Type type, @NotNull Meta element, @NotNull List<Object> parents) {\r\n return false;\r\n }", "public boolean hasCustom();" ]
[ "0.61938894", "0.6105324", "0.60492164", "0.5867845", "0.5852899", "0.5852899", "0.5852899", "0.5828405", "0.5806432", "0.57939774", "0.57422334", "0.57411283", "0.5721123", "0.5712791", "0.56720465", "0.56720465", "0.56720465", "0.56715024", "0.56715024", "0.56715024", "0.5667491", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.5659907", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.56515396", "0.5625371", "0.5596225", "0.559407", "0.55728364", "0.5560216", "0.55579025", "0.55224955", "0.5508775", "0.55065376", "0.54967034", "0.5469182", "0.54599184", "0.5455605", "0.54489857", "0.54438454", "0.5440337", "0.5438227", "0.5428361", "0.54269195", "0.5413393", "0.54120976", "0.53996", "0.53954655", "0.53932047", "0.5379894", "0.5351653", "0.53208756", "0.53000224", "0.528325", "0.5276779", "0.52726257", "0.5269226", "0.52665573", "0.52597487", "0.52593476", "0.5256772", "0.52489394", "0.52489394", "0.52489394", "0.5242982", "0.5225733", "0.522235", "0.52198404", "0.52177805", "0.52137387", "0.5209459", "0.5209459", "0.5202398", "0.519033" ]
0.0
-1
/ Fecha o classificador, liberando quaisquer recursos associados, como conexoes de rede e de banco de dados
public abstract void close();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object buscaRegistro(BaseJDBC baseJDBC, Class<?> classe, Object id, int profundidade, Class<?>[] classes, int classesVerifica, List<OMObtido> jaObtidos) throws Exception\r\n\t{\r\n\t\tObject objetoAux, idAux;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor(int i=0; i<jaObtidos.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tobjetoAux = jaObtidos.get(i).getOm();\r\n\t\t\t\tif(objetoAux!=null && objetoAux.getClass()==classe)\r\n\t\t\t\t{\r\n\t\t\t\t\tidAux = getIdValue(objetoAux);\r\n\t\t\t\t\tif(idAux!=null && idAux.equals(id))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(jaObtidos.get(i).getProfundidade()>=profundidade) \t{ return objetoAux; }\r\n\t\t\t\t\t\telse \t\t\t\t\t\t\t\t\t\t\t\t\t{ break; }\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogs.addWarn(\"Nao foi possivel buscar o registro\", e);\r\n\t\t}\r\n\t\t\r\n\t\tobjetoAux = obtemUnico(baseJDBC, classe, id, profundidade, classes, classesVerifica, jaObtidos);\r\n\t\tjaObtidos.add(new OMObtido(objetoAux, profundidade));\r\n\t\treturn objetoAux;\r\n\t}", "public void consulterClassement() {\n\t\t\n\t}", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Banco\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tBanco entity = new Banco();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,BancoDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Tesoreria.Banco.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\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\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\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\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseBanco(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Empresa\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tEmpresa entity = new Empresa();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,EmpresaDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Seguridad.Empresa.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\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\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\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\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseEmpresa(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public void instalarBaseDatos()\r\n\t{\r\n\t\tString nombrebuscado = \"information_schema\";\r\n\t\tArrayList parametrosbd = parametrosConectorBaseDatos();\r\n\t\tif(parametrosbd != null)\r\n\t\t{\r\n\t\t\tif(parametrosbd.size()>0)\r\n\t\t\t{\r\n\t\t\t\tnombrebuscado =(String)parametrosbd.get(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString nombrebd = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector(\"information_schema\");\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tnombrebd = CrearBD.buscarBaseDatos(nombrebuscado, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(nombrebd == null)\r\n\t\t{\r\n\t\t\tint numerotablascreadas = 0;\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conectora = new Conector(\"information_schema\");\r\n\t\t\t\tconectora.iniciarConexionBaseDatos();\r\n\t\t\t\tCrearBD.crearBaseDatos(nombrebuscado, conectora);\r\n\t\t\t\tconectora.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 1; i < 20; i++) \r\n\t\t\t\t{\r\n\t\t\t\t\tString nombretabla = i+\".sql\";\r\n\t\t\t\t\tString contenidotabla = ejecutarCodigoSQLtablas(nombretabla);\r\n\t\t\t\t\tif(!contenidotabla.equalsIgnoreCase(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tConector conectorb = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorb.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(contenidotabla, conectorb);\r\n\t\t\t\t\t\tconectorb.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tnumerotablascreadas++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tConector conectorg = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorg.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(\"DROP DATABASE \"+nombrebuscado, conectorg);\r\n\t\t\t\t\t\tconectorg.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el archivo \"+nombretabla,\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numerotablascreadas == 19)\r\n\t\t\t\t{\r\n\t\t\t\t\tejecutarCodigoSQLdatos(nombrebuscado);\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\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //LiquidacionImpor\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tLiquidacionImpor entity = new LiquidacionImpor();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=LiquidacionImporDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=LiquidacionImporDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,LiquidacionImporDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Importaciones.LiquidacionImpor.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\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\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\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\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseLiquidacionImpor(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }", "private void CreateSelectDeputy(String[] p) {\n int count = Integer.parseInt(p[1]);\n String classname = p[2];//代理类的名字\n String bedeputyname = p[4*count+3];//代理的类的名字\n classt.maxid++;\n int classid = classt.maxid;//代理类的id\n int bedeputyid = -1;//代理的类的id\n String[] attrname=new String[count];\n String[] bedeputyattrname=new String[count];\n int[] bedeputyattrid = new int[count];\n String[] attrtype=new String[count];\n int[] attrid=new int[count];\n for(int j = 0;j<count;j++){\n attrname[j] = p[4*j+6];\n attrid[j] = j;\n bedeputyattrname[j] = p[4*j+3];\n }\n\n String attrtype1;\n for (int i = 0; i < count; i++) {\n\n for (ClassTableItem item:classt.classTable) {\n if (item.classname.equals(bedeputyname)&&item.attrname.equals(p[3+4*i])) {\n bedeputyid = item.classid;\n bedeputyattrid[i] = item.attrid;\n\n classt.classTable.add(new ClassTableItem(classname, classid, count,attrid[i],attrname[i], item.attrtype,\"de\"));\n //swi\n if(Integer.parseInt(p[4+4*i]) == 1){\n switchingT.switchingTable.add(new SwitchingTableItem(item.attrname,attrname[i],p[5+4*i]));\n }\n if(Integer.parseInt(p[4+4*i])==0){\n switchingT.switchingTable.add(new SwitchingTableItem(item.attrname,attrname[i],\"0\"));\n }\n break;\n }\n };\n }\n\n\n\n String[] con =new String[3];\n con[0] = p[4+4*count];\n con[1] = p[5+4*count];\n con[2] = p[6+4*count];\n deputyt.deputyTable.add(new DeputyTableItem(bedeputyid,classid,con));\n\n\n TupleList tpl= new TupleList();\n\n int conid = 0;\n String contype = null;\n for(ClassTableItem item3:classt.classTable){\n if(item3.attrname.equals(con[0])){\n conid = item3.attrid;\n contype = item3.attrtype;\n break;\n }\n }\n List<ObjectTableItem> obj = new ArrayList<>();\n for(ObjectTableItem item2:topt.objectTable){\n if(item2.classid ==bedeputyid){\n Tuple tuple = GetTuple(item2.blockid,item2.offset);\n if(Condition(contype,tuple,conid,con[2])){\n //插入\n //swi\n Tuple ituple = new Tuple();\n ituple.tupleHeader = count;\n ituple.tuple = new Object[count];\n\n for(int o =0;o<count;o++){\n if(Integer.parseInt(p[4+4*o]) == 1){\n int value = Integer.parseInt(p[5+4*o]);\n int orivalue =Integer.parseInt((String)tuple.tuple[bedeputyattrid[o]]);\n Object ob = value+orivalue;\n ituple.tuple[o] = ob;\n }\n if(Integer.parseInt(p[4+4*o]) == 0){\n ituple.tuple[o] = tuple.tuple[bedeputyattrid[o]];\n }\n }\n\n topt.maxTupleId++;\n int tupid = topt.maxTupleId;\n\n int [] aa = InsertTuple(ituple);\n //topt.objectTable.add(new ObjectTableItem(classid,tupid,aa[0],aa[1]));\n obj.add(new ObjectTableItem(classid,tupid,aa[0],aa[1]));\n\n //bi\n biPointerT.biPointerTable.add(new BiPointerTableItem(bedeputyid,item2.tupleid,classid,tupid));\n\n }\n }\n }\n for(ObjectTableItem item6:obj) {\n topt.objectTable.add(item6);\n }\n }", "public void refrescarForeignKeysDescripcionesTipoDireccion() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tTipoDireccionConstantesFunciones.refrescarForeignKeysDescripcionesTipoDireccion(this.tipodireccionLogic.getTipoDireccions());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tTipoDireccionConstantesFunciones.refrescarForeignKeysDescripcionesTipoDireccion(this.tipodireccions);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//tipodireccionLogic.setTipoDireccions(this.tipodireccions);\r\n\t\t\ttipodireccionLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public PresuTipoProyectoLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.presutipoproyectoDataAccess = new PresuTipoProyectoDataAccess();\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectos= new ArrayList<PresuTipoProyecto>();\r\n\t\t\tthis.presutipoproyecto= new PresuTipoProyecto();\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectoObject=new Object();\r\n\t\t\tthis.presutipoproyectosObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectoDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.presutipoproyectoDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "Jugador consultarGanador();", "private void createClassVariables(){ \n //--------------------------------------------------------------------------- \n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n buffer=new StringBuffer();\n //buffer.append(\" private Connection connection;\\n\"); \n //buffer.append(\" private ConnectionTag connectionObject;\\n\"); \n //buffer.append(\" private Vector primaryKeyVector=new Vector();\\n\"); \n buffer.append(\" private String tableName=\\\"\"+tableName+\"\\\";\\n\"); \n\n for(;enum.hasMoreElements();){\n String foreignKeyName=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(foreignKeyName);\n String importTable=object.getImportTableName();\n String exportTable=object.getExportTableName();\n String fkName=object.getFkName();\n buffer.append(\" private \"+exportTable+\" \"+fkName+\"_PARENT;\\n\");\n }\n\n table=sqlTagsGeneratorTable.getExportedForeignKeyHash();\n enum=table.keys();\n\n for(;enum.hasMoreElements();){\n String foreignKeyName=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(foreignKeyName);\n String exportTable=object.getImportTableName();\n String fkName=object.getFkName();\n buffer.append(\" private \"+exportTable+\" \"+fkName+\"_CHILD;\\n\");\n }\n }", "public void sousClasseAnnoce()\n {\n try {\n Class c = Class.forName(\"lpae.entites.Annonce\");\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(GestionnaireSecurite.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private void buildGraph(Classes classes) {\n \t\n\tadjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n\t//add primitives to the children of object\n ArrayList<String> objectlist = adjacencyList.get(TreeConstants.Object_.getString());\n objectlist.add(TreeConstants.IO.getString());\n objectlist.add(TreeConstants.Int.getString());\n objectlist.add(TreeConstants.Bool.getString());\n objectlist.add(TreeConstants.Str.getString());\n adjacencyList.put(TreeConstants.Object_.getString(), objectlist);\n \tfor (Enumeration e = classes.getElements(); e.hasMoreElements(); ) {\n \t class_c currentClass = ((class_c)e.nextElement());\n \n \t // If the same class name is already present, that's a redefinition error\n \t String className = currentClass.getName().toString();\n \t if (!nameToClass.containsKey(className)) {\n \t \tnameToClass.put(currentClass.getName().toString(), currentClass);\n \t } else {\n \t \tsemantError(currentClass).println(\"Class \" + className + \" was previously defined\");\n \t \tcontinue;\n \t }\n \t // if parent already present in HashMap, append child to list of children\n \t String parent = currentClass.getParent().toString();\n \t if ( !adjacencyList.containsKey(parent) ) {\n \t\tadjacencyList.put(parent, new ArrayList<String>() );\n \t }\n \t adjacencyList.get(parent).add(currentClass.getName().toString());\n \t}\n \n // Check if each parent in a parent-child inheritance is a valid class\n HashSet<String> bogusClasses = new HashSet<String>();\n for (String parent : adjacencyList.keySet()) {\n \tif (!nameToClass.containsKey(parent)) {\n \t\tfor (String child: adjacencyList.get(parent)) {\n \t\t\tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" inherits from an undefined class \" + parent);\n \t\t}\n \t\t// Remove the bogus parent class from the graph\n \t\tbogusClasses.add(parent);\n \t}\n }\n // Remove the bogus parent class from the graph\n for (String bogus : bogusClasses) {\n \tadjacencyList.remove(bogus);\n }\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Pruned out unreachable classes\");\n }\n \n // Also check if someone's inheriting from the Basic classes other than Object & IO\n for (String child : adjacencyList.get(TreeConstants.Int.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Int\");\n }\n for (String child : adjacencyList.get(TreeConstants.Str.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Str\");\n }\n for (String child : adjacencyList.get(TreeConstants.Bool.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Bool\");\n }\n // No point in continuing further. The above classes are going to propagate more errors\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Checked for simple inheritance errors\");\n }\n if (errors()) {\n \treturn;\n }\n \n \t// Now check for cycles\n \t// Do the depth first search of this adjacency list starting from Object\n \tHashMap<String, Boolean> visited = new HashMap<String, Boolean>();\n \tfor (String key : adjacencyList.keySet() ) {\n \t\tvisited.put(key, false);\n \t\tfor ( String value : adjacencyList.get(key) ) {\n \t\t\tvisited.put(value, false);\n \t\t}\n \t}\n \tdepthFirstSearch(visited, TreeConstants.Object_.toString());\n \t// It is legal to inherit from the IO class. So mark classes down that tree as well\n\t\n\t/*depthFirstSearch(visited, TreeConstants.IO.getString());\n \t// Check for unreachable components - unreachable classes are cycles\n \t// Except the Bool, IO, Int and String. Hack - set them to true\n \tvisited.put(TreeConstants.IO.getString(), true);\n \tvisited.put(TreeConstants.Bool.getString(), true);\n \tvisited.put(TreeConstants.Str.getString(), true);\n \tvisited.put(TreeConstants.Int.getString(), true);\n\t*/\n \tfor (String key : visited.keySet()) {\n \t\tif (!visited.get(key)) {\n \t\t\tsemantError(nameToClass.get(key)).println(\"Class \" + key + \" or an ancestor is involved in an inheritance cycle.\");\n \t\t}\n \t} \n \n \tif (Flags.semant_debug) {\n \t\tSystem.out.println(\"Checked for cycles\");\n \t}\n \t}", "private void limpiarDatos() {\n\t\t\n\t}", "public Conserto buscarCodigo(int codigo) throws SQLException{\r\n Conserto conserto = null;\r\n conecta = FabricaConexao.conexaoBanco();\r\n sql = \"select * from conserto join carro on carchassi = concarchassi join modelo on oficodigo = conoficodigo where concodigo = ? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, codigo);\r\n rs = pstm.executeQuery();\r\n \r\n if(rs.next()){\r\n conserto = new Conserto();\r\n conserto.setCodigo(rs.getInt(\"concodigo\"));\r\n conserto.setDataEntrada(rs.getDate(\"condataentrada\"));\r\n conserto.setDataSaida(rs.getDate(\"condatasaida\"));\r\n \r\n //instanciando o carro\r\n Carro carro = new Carro();\r\n carro.setChassi(rs.getString(\"carchassi\"));\r\n carro.setPlaca(rs.getString(\"carplaca\"));\r\n carro.setAno(rs.getInt(\"carano\"));\r\n carro.setCor(rs.getString(\"carcor\"));\r\n carro.setStatus(rs.getInt(\"carstatus\"));\r\n conserto.setCarro(carro);\r\n \r\n //instanciando a oficina\r\n Oficina oficina = new Oficina();\r\n oficina.setCodigo(rs.getInt(\"oficodigo\"));\r\n oficina.setNome(rs.getString(\"ofinome\"));\r\n conserto.setOficina(oficina);\r\n }\r\n FabricaConexao.fecharConexao();\r\n \r\n return conserto;\r\n }", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "public void carregar(DadosGrafico dados){\r\n \r\n }", "private void populaDiasTreinoCat()\n {\n DiasTreinoCat dias1 = new DiasTreinoCat(\"1 vez por semana\", 1);\n diasTreinoCatDAO.insert(dias1);\n DiasTreinoCat dias2 = new DiasTreinoCat(\"2 vez por semana\", 2);\n diasTreinoCatDAO.insert(dias2);\n DiasTreinoCat dias3 = new DiasTreinoCat(\"3 vez por semana\", 3);\n diasTreinoCatDAO.insert(dias3);\n DiasTreinoCat dias4 = new DiasTreinoCat(\"4 vez por semana\", 4);\n diasTreinoCatDAO.insert(dias4);\n DiasTreinoCat dias5 = new DiasTreinoCat(\"5 vez por semana\", 5);\n diasTreinoCatDAO.insert(dias5);\n DiasTreinoCat dias6 = new DiasTreinoCat(\"6 vez por semana\", 6);\n diasTreinoCatDAO.insert(dias6);\n DiasTreinoCat dias7 = new DiasTreinoCat(\"7 vez por semana\", 7);\n diasTreinoCatDAO.insert(dias7);\n\n }", "public static void cargarRecursos(String carpetaArchivosConf, AdministradorRecursosNvjItf recursosProyecto) \n \t\tthrows CargadorRecursosException, MapeoException, IOException{\n System.out.println(\"Comenzando la carga de NavajaFW\");\n //Listo los archivos de configuracion\n String[] listaDeArchivos = new File(carpetaArchivosConf).list();\n \n if (listaDeArchivos == null) {\n throw new CargadorRecursosCarpetaConfVaciaException(carpetaArchivosConf);\n }\n\n //Se listan los archivos de la carpeta indicada\n ArrayList<String> archivosConf = new ArrayList<String>(Arrays.asList(listaDeArchivos));\n\n //Se los itera\n for (String archivoNombre : archivosConf){\n //Si algun archivo termina con _or.xml es un mapeo\n if (archivoNombre.endsWith(NavajaConstantes.GUION_BAJO_OR_PUNTO_XML)) {\n //Muestro que el archivo se esta leyendo\n System.out.println(\"Mapeando \" + archivoNombre + \"...\");\n //Comienzo el mapeo\n Mapeador.mapearXml(carpetaArchivosConf + archivoNombre);\n System.out.println(\"Mapeado correctamente \"); \n }\n }\n \n if (Mapeador.getRaizMapeo() == null || Mapeador.getRaizMapeo().getTablas().isEmpty()) {\n throw new CargadorRecursosNoExistenArchivosMapeoException(); \t\n }\n \n //Se setea la instancia NavajaConector de la app el mapeo recien generado\n NavajaConector.getInstance().setMapeoRaiz(Mapeador.getRaizMapeo());\n \n //Se inicializa los recursos segun lo implementado en el metodo sobrescrito\n recursosProyecto.iniciarRecursos();\n \n //Se setea la instancia NavajaConector de la app el DataSource para conectarse\n DataSource dataSource = recursosProyecto.proveerDataSource();\n \n if(dataSource == null) {\n throw new org.calevin.navaja.excepciones.core.CargadorRecursosDataSourceNuloException();\n }\n\n Connection conexion = null;\n\t\ttry {\n\t\t\tconexion = dataSource.getConnection();\n\t\t\t\n\t\t\tif (conexion == null){\n\t\t\t\tthrow new CargadorRecursosConexionFallidaException(\n\t\t\t\t\t\tNavajaStringUtil.conmutarCaseChar(NavajaConstantes.CONEXION_NULA, 0)\n\t\t\t\t\t\t+ NavajaConstantes.PUNTO);\n\t\t\t} else if (!conexion.isValid(0)) {\n\t\t\t\tthrow new CargadorRecursosConexionFallidaException(\n\t\t\t\t\t\tNavajaStringUtil.conmutarCaseChar(NavajaConstantes.CONEXION_INVALIDA, 0)\n\t\t\t\t\t\t+ NavajaConstantes.COMA_ESPACIO\n\t\t\t\t\t\t+ NavajaConstantes.CONEXION\n\t\t\t\t\t\t+ NavajaConstantes.ESPACIO_COMILLA\n\t\t\t\t\t\t+ conexion\n\t\t\t\t\t\t+ NavajaConstantes.COMILLA\n\t\t\t\t\t\t+ NavajaConstantes.PUNTO);\t\t\t\t\n\t\t\t} else {\n\t\t NavajaConector.getInstance().setDataSource(dataSource);\t\t\t\t\n\t\t\t}\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CargadorRecursosConexionFallidaException(e);\n\t\t} finally {\n\t\t\tif (conexion != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconexion.close(); \n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new CargadorRecursosConexionFallidaException(e);\n\t\t\t\t} \n\t\t\t}\n\t\t}\n }", "public abstract Class<?>[] getCoClasses();", "public GrupoBodegaLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.grupobodegaDataAccess = new GrupoBodegaDataAccess();\r\n\t\t\t\r\n\t\t\tthis.grupobodegas= new ArrayList<GrupoBodega>();\r\n\t\t\tthis.grupobodega= new GrupoBodega();\r\n\t\t\t\r\n\t\t\tthis.grupobodegaObject=new Object();\r\n\t\t\tthis.grupobodegasObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.grupobodegaDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.grupobodegaDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "@Override\n\tvoid geraDados() {\n\n\t}", "public Diccionario(){\r\n rz=new BinaryTree<Association<String,String>>(null, null, null, null);\r\n llenDic();\r\n tradOra();\r\n }", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "@Override\r\n public void parar(Conexion conexion){\n }", "public void PrepararBaseDatos() { \r\n try{ \r\n conexion=DriverManager.getConnection(\"jdbc:ucanaccess://\"+this.NOMBRE_BASE_DE_DATOS,this.USUARIO_BASE_DE_DATOS,this.CLAVE_BASE_DE_DATOS);\r\n \r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al realizar la conexion \"+e);\r\n } \r\n try { \r\n sentencia=conexion.createStatement( \r\n ResultSet.TYPE_SCROLL_INSENSITIVE, \r\n ResultSet.CONCUR_READ_ONLY); \r\n \r\n System.out.println(\"Se ha establecido la conexión correctamente\");\r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al crear el objeto sentencia \"+e);\r\n } \r\n }", "ConjuntoTDA claves();", "public void refrescarForeignKeysDescripcionesPlantillaFactura() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tPlantillaFacturaConstantesFunciones.refrescarForeignKeysDescripcionesPlantillaFactura(this.plantillafacturaLogic.getPlantillaFacturas());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tPlantillaFacturaConstantesFunciones.refrescarForeignKeysDescripcionesPlantillaFactura(this.plantillafacturas);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(CuentaContable.class));\r\n\t\tclasses.add(new Classe(TipoRetencion.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//plantillafacturaLogic.setPlantillaFacturas(this.plantillafacturas);\r\n\t\t\tplantillafacturaLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "private void formatoCirculos(Connection conex){\r\n circulos(hlQuirugi, pQuirugicos.listaAntePatoQuir(conex, paci.getId_paciente()));\r\n circulos(hlAlergias, pAlergias.listaAntePaAlergias(conex, paci.getId_paciente()));\r\n circulos(hlPadMedicos, pMedicos.listaAntePatoMedico(conex, paci.getId_paciente()));\r\n circulosObjetos(hlNoPatologicos, antNopato.cargaSoloUno(paci.getId_paciente(), conex));\r\n circulosObjetos(hlHeredo, masAnteHere.cargaSoloUno(paci.getId_paciente(), conex));\r\n circulos(hlTransfuncionales, pTransfucion.listaAntePaTransfucion(conex, paci.getId_paciente()));\r\n circulos(hlTraumaticos, pTraumaticos.listaAntePaTrauma(conex, paci.getId_paciente()));\r\n circulos(hlAdiciones, pAdicciones.listaAntePaAdicciones(conex, paci.getId_paciente()));\r\n }", "private static void classificar(int idUser, int index, int idApp) {\n int pontuacao;\n String comentario;\n Scanner teclado = new Scanner(System.in);\n \n System.out.println(\"Que pontuação dá a esta aplicação? 1-5\");\n pontuacao = teclado.nextInt();\n String str1 = teclado.nextLine(); // necessário para não fazer com que o comentário faça skip a uma linha\n \n System.out.println(\"Escreva um comentário sobre esta aplicação: \");\n comentario = teclado.nextLine();\n \n if( pontuacao > 0 && pontuacao <= 5) {\n utilizadores.get(idUser).getCarrinhoCompras().getCompras().get(index).getClassificacao().setClassificacao(pontuacao);\n utilizadores.get(idUser).getCarrinhoCompras().getCompras().get(index).getClassificacao().setComentario(comentario);\n \n for (int i = 0; i < apps.size(); i++) {\n if(apps.get(i).getIdApp() == idApp)\n {\n apps.get(i).setAvaliacaoApp(pontuacao); // calcular o valor da pontuacao de uma app\n apps.get(i).setNumAvs();\n }\n }\n \n } \n else {\n System.out.println(\"Pontuação inválida.\");\n classificar(idUser, index, idApp);\n }\n \n }", "public <T> List<T> obtem(BaseJDBC baseJDBC, Class<T> classe, Object condicao, int profundidade, Class<?>[] classes, int classesVerifica, List<OMObtido> jaObtidos) throws Exception\r\n\t{\r\n\t\tObject objeto;\r\n\t\tAnnotation[] annotations;\r\n\t\tAnnotation annotation;\r\n\t\tField[] fields;\r\n\t\tField field;\r\n\t\tObject id;\r\n\t\tboolean consideraIgnora = classesVerifica==CONSIDERAR_CLASSES;\r\n\t\t\r\n\t\tResultSQL resultSQL=null;\r\n\t\tif(condicao instanceof String)\r\n\t\t{ \r\n\t\t\tresultSQL = baseJDBC.executaSelect((String)condicao, false);\r\n\t\t}\r\n\t\telse if(condicao instanceof QuerySQL)\r\n\t\t{\r\n\t\t\tresultSQL = baseJDBC.executaSelect(((QuerySQL)condicao).toString(baseJDBC), false); \r\n\t\t}\r\n\t\telse if(condicao instanceof Long)\r\n\t\t{\r\n\t\t\tQuerySQL querySQL = BaseDAOSQL.classeToSelectRegistroSQL(classe, (Long)condicao, baseJDBC);\r\n\t\t\tresultSQL = baseJDBC.executaSelect(querySQL.toString(baseJDBC), false);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new Exception(\"Parametro desconhecido: 'condicao' em obtem, BaseDAO: \" + condicao);\r\n\t\t}\r\n\t\t\r\n\t\tList<T> lista = BaseDAOSQL.resultSQLToList(classe, resultSQL);\r\n\t\t//jaObtidos.addAll(lista);\r\n\t\tif(profundidade>-1)\r\n\t\t{\r\n\t\t\tfor(int i=0; i<lista.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tobjeto = lista.get(i);\r\n\t\t\t\tfields = getFields(objeto.getClass());\r\n\t\t\t\tfor(int j=0; j<fields.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfield = fields[j];\r\n\t\t\t\t\tannotations = getAnnotations(field);\r\n\t\t\t\t\tfor(int k=0; k<annotations.length; k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tannotation = annotations[k];\r\n\t\t\t\t\t\tif(annotation instanceof JoinColumn)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tid = resultSQL.get(i, ((JoinColumn)annotation).name());\r\n\t\t\t\t\t\t\tif(id!=null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfield.setAccessible(true);\r\n\t\t\t\t\t\t\t\tif((classes==null && classesVerifica==CONSIDERAR_CLASSES) || (classes!=null && contem(field.getType(), classes)==consideraIgnora))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tfield.set(objeto, buscaRegistro(baseJDBC, field.getType(), id, profundidade-1, classes, classesVerifica, jaObtidos));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public void refrescarForeignKeysDescripcionesFacturaPuntoVenta() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tFacturaPuntoVentaConstantesFunciones.refrescarForeignKeysDescripcionesFacturaPuntoVenta(this.facturapuntoventaLogic.getFacturaPuntoVentas());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tFacturaPuntoVentaConstantesFunciones.refrescarForeignKeysDescripcionesFacturaPuntoVenta(this.facturapuntoventas);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(Usuario.class));\r\n\t\tclasses.add(new Classe(Vendedor.class));\r\n\t\tclasses.add(new Classe(Cliente.class));\r\n\t\tclasses.add(new Classe(Caja.class));\r\n\t\tclasses.add(new Classe(TipoPrecio.class));\r\n\t\tclasses.add(new Classe(Mesa.class));\r\n\t\tclasses.add(new Classe(Formato.class));\r\n\t\tclasses.add(new Classe(TipoFacturaPuntoVenta.class));\r\n\t\tclasses.add(new Classe(EstadoFacturaPuntoVenta.class));\r\n\t\tclasses.add(new Classe(AsientoContable.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//facturapuntoventaLogic.setFacturaPuntoVentas(this.facturapuntoventas);\r\n\t\t\tfacturapuntoventaLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public void addDicas(){\n\t\tMetaDica metaDicaOac = new MetaDica(oac, \"user1\", \"Não falte as aulas, toda aula tem ponto extra!\");\n\t\tmetaDicaOac.setConcordancias(5);\n\t\tdao.persist(metaDicaOac);\n\n\t\tdicaExerciciosOac = new DicaConselho(\"Os exercicios extras valem muitos pontos, nao deixe de fazer\");\n\t\tdicaExerciciosOac.setTema(temaOacExercicios);\n\t\ttemaOacExercicios.setDisciplina(oac);\n\t\tdicaExerciciosOac.setUser(\"user5\");\n\t\tdicaExerciciosOac.addUsuarioQueVotou(\"user1\");\n\t\tdicaExerciciosOac.addUsuarioQueVotou(\"user2\");\n\n\t\t//adiciona pontos a dica\n\t\tfor (int i = 0; i < 20;i++){\n\t\t\tdicaExerciciosOac.incrementaConcordancias();\n\t\t}\n\t\tfor (int i = 0; i < 5;i++){\n\t\t\tdicaExerciciosOac.incrementaDiscordancias();\n\t\t}\n\n\t\t//adiciona pontos a dica\n\t\tfor (int i = 0; i < 5;i++){\n\t\t\tdicaExerciciosOac.incrementaConcordancias();\n\t\t}\n\t\tfor (int i = 0; i < 25;i++){\n\t\t\tdicaExerciciosOac.incrementaDiscordancias();\n\t\t}\n\t\tdao.persist(dicaExerciciosOac);\n\n\t\tdicaRevisaoIcOac = new DicaAssunto(\"Antes das aulas faça uma boa revisao de IC\");\n\t\ttemaOacRevisaoIC.setDisciplina(oac);\n\t\tdicaRevisaoIcOac.setTema(temaOacRevisaoIC);\n\t\tdicaRevisaoIcOac.setUser(\"user4\");\n\t\tdicaRevisaoIcOac.addUsuarioQueVotou(\"user5\");\n\t\tdicaRevisaoIcOac.addUsuarioQueVotou(\"user1\");\n\t\tdicaRevisaoIcOac.incrementaConcordancias();\n\t\tdicaRevisaoIcOac.incrementaConcordancias();\n\n\t\t//cria meta dica em si\n\t\tMetaDica metaDicaSi1 = new MetaDica(si1, \"user2\", \"Seja autodidata! Procure por cursos online\");\n\t\tdao.persist(metaDicaSi1);\n\n\t\tdicaLabSi = new DicaConselho(\"Faça todo os labs, não deixe acumular\");\n\t\ttemaMinitestesSi.setDisciplina(si1);\n\t\tdicaLabSi.setTema(temaMinitestesSi);\n\t\tdicaLabSi.setUser(\"user1\");\n\t\tdicaLabSi.addUsuarioQueVotou(\"user2\");\n\t\tdicaLabSi.addUsuarioQueVotou(\"user3\");\n\t\tdicaLabSi.incrementaConcordancias();\n\t\tdicaLabSi.incrementaConcordancias();\n\t\tdao.persist(dicaLabSi);\n\n\t\tdicaPlaySi = new DicaConselho(\"Comece a configurar o Play no primeiro dia de aula, pois dá muuuito trabalho\");\n\t\ttemaPlaySi.setDisciplina(si1);\n\t\tdicaPlaySi.setTema(temaPlaySi);\n\t\tdicaPlaySi.setUser(\"user2\");\n\t\tdicaPlaySi.addUsuarioQueVotou(\"user5\");\n\t\tdicaPlaySi.addUsuarioQueVotou(\"user4\");\n\t\tdicaPlaySi.incrementaConcordancias();\n\t\tdicaPlaySi.incrementaConcordancias();\n\t\tdao.persist(dicaPlaySi);\n\n\t\tdicaMaterialSi = new DicaMaterial(\"http://www.wthreex.com/rup/process/workflow/ana_desi/co_swarch.htm\");\n\t\ttemaMaterialSi.setDisciplina(si1);\n\t\tdicaMaterialSi.setTema(temaMaterialSi);\n\t\tdicaMaterialSi.setUser(\"user2\");\n\t\tdicaMaterialSi.addUsuarioQueVotou(\"user5\");\n\t\tdicaMaterialSi.addUsuarioQueVotou(\"user4\");\n\t\tdicaMaterialSi.incrementaConcordancias();\n\t\tdicaMaterialSi.incrementaConcordancias();\n\t\tdao.persist(dicaMaterialSi);\n\n\n\t\t//cria meta dica logica\n\t\tMetaDica metaDicaLogica = new MetaDica(logica, \"user3\", \"Copie para o seu caderno tudo que o professor copiar no quadro, TUDO!\");\n\t\tdao.persist(metaDicaLogica);\n\n\t\tdicaListasLogica = new DicaConselho(\"Faça todas as listas possíveis\");\n\t\ttemaListasLogica.setDisciplina(logica);\n\t\tdicaListasLogica.setTema(temaListasLogica);\n\t\tdicaListasLogica.setTema(temaListasLogica);\n\t\tdicaListasLogica.setUser(\"user6\");\n\t\tdicaListasLogica.addUsuarioQueVotou(\"user3\");\n\t\tdicaListasLogica.addUsuarioQueVotou(\"user5\");\n\t\tdicaListasLogica.incrementaConcordancias();\n\t\tdicaListasLogica.incrementaConcordancias();\n\t\tdao.persist(dicaListasLogica);\n\n\t\tdicaProjetoLogica = new DicaAssunto(\"Peça ajuda ao monitor responsável por seu grupo, começe o projeto assim que for lançado!\");\n\t\ttemaProjetoLogica.setDisciplina(logica);\n\t\tdicaProjetoLogica.setTema(temaProjetoLogica);\n\t\tdicaProjetoLogica.setTema(temaProjetoLogica);\n\t\tdicaProjetoLogica.setUser(\"user4\");\n\t\tdicaProjetoLogica.addUsuarioQueVotou(\"user1\");\n\t\tdicaProjetoLogica.addUsuarioQueVotou(\"user2\");\n\t\tdicaProjetoLogica.incrementaConcordancias();\n\t\tdicaProjetoLogica.incrementaConcordancias();\n\t\tdao.persist(dicaProjetoLogica);\n\n\t\tdao.flush();\n\n\t}", "private String executarRegras(EntidadeDominio entidade, String operacao) {\n String nmClasse = entidade.getClass().getName();\r\n //para construção de String de mensagens\r\n StringBuilder msg = new StringBuilder();\r\n //mapeando classes com lista de estrategies\r\n Map<String, List<IStrategy>> regrasOperacao = rns.get(nmClasse);\r\n //caso tenha regras de negocio associada à classe\r\n if (!regrasOperacao.isEmpty()) {\r\n List<IStrategy> regras = regrasOperacao.get(operacao);\r\n //caso tenha regras de negocio associada à operação da classe\r\n if (!regras.isEmpty()) {\r\n for (IStrategy s : regras) {\r\n //checando mensagens de regras de negocio\r\n String m = s.processar(entidade);\r\n if (!m.isEmpty()) {\r\n //adicionando mensagens na StringBuilder\r\n msg.append(m);\r\n }\r\n }\r\n }\r\n }\r\n if (msg.length() > 0) {\r\n return msg.toString();\r\n } else {\r\n return \"\";\r\n }\r\n }", "public void desconectar() {\n\t\ttry {\n\t\t\tconexao.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tconectar();\n\t\tthis.controlelogin = new ControleLogin();\n\t\tthis.controlfuncionario = new ControlFuncionario();\n\t\tthis.cadastroReqExame = new CadastroReqExame();\n\t\tthis.pdfControl = new ControlPdf();\n\t\tthis.controlPaciente = new ControlPaciente();\n\t\tthis.controlRegistro = new ControlResultadoExame();\n\t\tthis.cadastroDisp = new CadastroDisponibilidade();\n\t\tthis.cadastroConsulta = new CadastroConsulta();\n\t\tconexao = null;\n\t}", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "private void cargarContrarreferencia() {\r\n\t\tif (admision_seleccionada != null\r\n\t\t\t\t&& !admision_seleccionada.getAtendida()) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTRAREFERENCIA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTRAREFERENCIA, parametros);\r\n\t\t}\r\n\r\n\t}", "private GestionBD(){\r\n\t\tlineConnection=SingleDBConnection.getConexionBD().conectarBD();\r\n\t}", "public PlantillaFacturaLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.plantillafacturaDataAccess = new PlantillaFacturaDataAccess();\r\n\t\t\t\r\n\t\t\tthis.plantillafacturas= new ArrayList<PlantillaFactura>();\r\n\t\t\tthis.plantillafactura= new PlantillaFactura();\r\n\t\t\t\r\n\t\t\tthis.plantillafacturaObject=new Object();\r\n\t\t\tthis.plantillafacturasObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.plantillafacturaDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.plantillafacturaDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public void librosPorCategorian() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<LibroVO> resultado = new ArrayList();\n\t\t\tOwlDAO.actualizarCategorian(mysql);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "public synchronized static ConectorBBDD saberEstado() throws SQLException{\n\t\tif(instancia==null){\n\t\t\tinstancia=new ConectorBBDD();\n\t\t\t\n\t\t}\n\t\treturn instancia;\n\t}", "public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }", "public void byClass(HashSet<String> relatedClasses, String searchClass) {\n for (String callee : callerRelation.keySet()) {\n if (callee.split(\" \")[0].equals(searchClass)) {\n for (String caller : callerRelation.get(callee)) {\n relatedClasses.add(caller.split(\" \")[0]);\n if (relatedClasses.contains(caller.split(\" \")[0]))\n continue;\n // recursive to find caller related class,find\n byClass(relatedClasses, caller.split(\" \")[0]);\n }\n }\n }\n }", "private void grabarProyectoCarrerasOferta() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : sessionProyecto.getCarrerasSeleccionadasTransfer()) {\r\n Carrera c = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE));\r\n \r\n Long pcoId = devuelveProyectoCarreraId(proyectoCarreraOfertas, proyectoCarreraOferta);\r\n proyectoCarreraOferta = proyectoCarreraOfertaService.buscarPorId(new ProyectoCarreraOferta(pcoId));\r\n if (proyectoCarreraOferta == null) {\r\n proyectoCarreraOferta = new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), c.getId(), sessionProyecto.getOfertaAcademicaSeleccionada().getId(),\r\n Boolean.TRUE);\r\n if (contieneCarrera(proyectoCarreraOfertas, proyectoCarreraOferta) == false) {\r\n proyectoCarreraOfertaService.guardar(proyectoCarreraOferta);\r\n this.grabarIndividuoPCO(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"CREAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId() + \"|Proyecto= \"\r\n + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n }\r\n proyectoCarreraOferta.setEsActivo(true);\r\n proyectoCarreraOfertaService.actualizar(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"EDITAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId()\r\n + \"|Proyecto= \" + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }", "public void refrescarForeignKeysDescripcionesAnalisisTransaCliente() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tAnalisisTransaClienteConstantesFunciones.refrescarForeignKeysDescripcionesAnalisisTransaCliente(this.analisistransaclienteLogic.getAnalisisTransaClientes());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tAnalisisTransaClienteConstantesFunciones.refrescarForeignKeysDescripcionesAnalisisTransaCliente(this.analisistransaclientes);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Modulo.class));\r\n\t\tclasses.add(new Classe(Transaccion.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//analisistransaclienteLogic.setAnalisisTransaClientes(this.analisistransaclientes);\r\n\t\t\tanalisistransaclienteLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public void casdastrar(RelatorioDAO obj) throws SQLException {\n\t\t\n\t}", "void processInheritanceAssociations() {\n\t\tFamixAssociation foundInheritance;\n\t\tHashSet<String> foundInheritanceList;\n\t\tHashSet<String> alreadyIncludedInheritanceList;\n\t\tinheritanceAssociationsPerClass = new HashMap<String, HashSet<String>>();\n\t\ttry{\n\t\t\tIterator<FamixAssociation> iterator = theModel.waitingAssociations.iterator();\n\t for (Iterator<FamixAssociation> i=iterator ; i.hasNext();) {\n\t \tboolean inheritanceAssociation = false;\n\t \tboolean fromExists = false;\n \tboolean toExists = false;\n \tboolean toHasValue = false;\n\t \tFamixAssociation association = (FamixAssociation) i.next();\n\t\t String uniqueNameFrom = association.from;\n\n \t/* Test helper\n \tif (association.from.startsWith(\"Limaki.Actions.Command\")){\n \t\tboolean breakpoint = true;\n \t} */\n\n\t\t if (association instanceof FamixInheritanceDefinition){\n\t\t \tinheritanceAssociation = true;\n\t\t }\n \tif (inheritanceAssociation) {\n\t\t\t if (theModel.classes.containsKey(uniqueNameFrom)) {\n\t\t\t \tfromExists = true;\n\t\t\t }\n \t}\n \tif (inheritanceAssociation && fromExists) {\n\t\t\t if ((association.to != null) && (!association.to.equals(\"\"))) {\n\t\t\t \ttoHasValue = true;\n\t\t\t\t if (theModel.classes.containsKey(association.to) || theModel.classes.containsKey(\"xLibraries.\" + association.to)) {\n\t\t\t\t \ttoExists = true;\n\t\t\t\t }\n\t\t\t }\n \t}\n\t\t // If association.to is not a unique name of an existing type, try to replace it by the complete unique name.\n\t \t// Determine the type of association.to, first based on imports, and second based on package contents.\n\t \tif (inheritanceAssociation && fromExists && !toExists && toHasValue) {\n String to = findClassInImports(association.from, association.to);\n if (!to.equals(\"\")) {\n association.to = to;\n }\n else {\n\t \tString belongsToPackage = theModel.classes.get(association.from).belongsToPackage;\n\t to = findClassInPackage(association.to, belongsToPackage);\n\t if (!to.equals(\"\")) { // So, in case association.to shares the same package as association.from \n\t association.to = to;\n\t }\n }\n \t\t if (theModel.classes.containsKey(association.to) || theModel.classes.containsKey(\"xLibraries.\" + association.to)) {\n \t\t \ttoExists = true;\n \t\t }\n \t}\n\t \tif (inheritanceAssociation && fromExists && toExists && !theModel.associations.contains(association)) {\n\t\t \t// Add the inheritance association to the FamixModel, but only if to and from are equal. \n\t \tif (!association.from.equals(association.to)) { \n\t \t\taddToModel(association);\n\t \t}\n\n\t \t// Fill the HashMap inheritanceAccociationsPerClass with inheritance dependencies to super classes or interfaces \n\t \talreadyIncludedInheritanceList = null;\n\t \tfoundInheritance = null;\n\t \tfoundInheritanceList = null;\n\t \talreadyIncludedInheritanceList = null;\n\t \tfoundInheritance = association;\n\t \tif(inheritanceAssociationsPerClass.containsKey(uniqueNameFrom)){\n\t \t\talreadyIncludedInheritanceList = inheritanceAssociationsPerClass.get(uniqueNameFrom);\n\t \t\tif (!alreadyIncludedInheritanceList.contains(association.to)) {\n\t \t\t\talreadyIncludedInheritanceList.add(foundInheritance.to);\n\t \t\t}\n\t \t\tinheritanceAssociationsPerClass.put(uniqueNameFrom, alreadyIncludedInheritanceList);\n\t \t}\n\t \telse{\n\t\t \tfoundInheritanceList = new HashSet<String>();\n\t\t \tfoundInheritanceList.add(foundInheritance.to);\n\t\t \tinheritanceAssociationsPerClass.put(uniqueNameFrom, foundInheritanceList);\n\t \t}\n\t \t\n\t \t// Remove from waitingAssociations afterwards, to enhance the performance. \t\n\t\t\t i.remove();\n\t \t}\n\t }\n\t\t} catch(Exception e) {\n\t this.logger.debug(new Date().toString() + \"Exception may result in incomplete dependency list. Exception: \" + e);\n\t //e.printStackTrace();\n\t\t}\n\t\tindirectAssociations_DeriveIndirectInheritance();\n this.logger.info(new Date().toString() + \" Finished: processInheritanceAssociations()\");\n }", "public controladorCategorias() {\r\n }", "public Gestionnaire_Bdd(){\n\t\ttry {\n\t\t\t//Chargement driver hsqldb\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\").newInstance();\n\t\t\t\n\t\t\tconnexion = DriverManager.getConnection(\"jdbc:hsqldb:file:BiblioBDD\", \"sa\", \"\");\n\t\t\trequete = connexion.createStatement();\n\t\t\tcreerTables();\n\t\t\t\n\t\t\tselection(new String[]{\"niveau\", \"professeur\"}, \"classes\");\n\t\t\trafraichir_tableau();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\n public void run(String... strings) throws Exception {\n \n Usuario u= new Usuario(1521L, \"Viridiana Hernandez\",\"ndzmviridiana@hotmail.com\");\n \n //la guardamos\n \n // repoUsu.save(u);\n \n //GENERAMOS LA DIRECCION QUE VAMOS A GUARDAR\n \n Direccion d = new Direccion(new Usuario(1521L),\"Calle 13\", 55120, \"Ecatepec\");\n //repoDir.save(d);\n \n \n //AQUI HAREMOS EL JOIN\n \n \n Direccion d2= repoDir.findOne(2L);\n System.out.println(\"Correo:\"+d2.getU().getEmail()+ \" municipio \"+d2.getMunicipio());\n \n \n \n \n \n \n //repoMensa.save (new Mensajito(\"Primero\",\"Mi primera vez con hibernate\"))\n /*\n Mensajito m= repoMensa.findOne(1);\n System.out.println(m.getTitulo());\n \n \n \n // repoMensa.save(new Mensajito(\"17 de octubre\",\"No temblo\"));\n System.out.println(\"vamos a uscar todos\");\n \n for (Mensajito mensa:repoMensa.findAll()){\n System.out.println(mensa);\n \n }\n \n //para buscar por id FINDONE\n System.out.println(\"vamos a buscar por id\");\n System.out.println(repoMensa.findOne(1));\n \n \n // Actualizar \n repoMensa.save(new Mensajito(1,\"nuevo titulo\",\"nuevo cuerpo\"));\n System.out.println(repoMensa.findOne(1));\n*/\n }", "public void refrescarForeignKeysDescripcionesTipoDetalleMovimientoInventario() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tTipoDetalleMovimientoInventarioConstantesFunciones.refrescarForeignKeysDescripcionesTipoDetalleMovimientoInventario(this.tipodetallemovimientoinventarioLogic.getTipoDetalleMovimientoInventarios());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tTipoDetalleMovimientoInventarioConstantesFunciones.refrescarForeignKeysDescripcionesTipoDetalleMovimientoInventario(this.tipodetallemovimientoinventarios);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//tipodetallemovimientoinventarioLogic.setTipoDetalleMovimientoInventarios(this.tipodetallemovimientoinventarios);\r\n\t\t\ttipodetallemovimientoinventarioLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public void chequearDeclaraciones() throws Exception{\n\t\tfor (EntradaVarInst v: entradaVar.values()) {\r\n\t\t\t\t//si es de tipo idClase,\r\n\t\t\t\tif (noTipoPrimitivo(v.getTipo().getTipo())) {\r\n\t\t\t\t\t\t//ahora si veo si esa clase esta declarada\r\n\t\t\t\t\t\t// si no es asi -> error\r\n\t\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(v.getTipo().getTipo())==null)\r\n\t\t\t\t\t\t\tthrow new claseNoDeclarada(v.getTipo().getTipo(), v.getToken().getNroLinea(), v.getToken().getNroColumna());\r\n\t\t\t\t}\t\r\n\t\t}//fin for\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Chequeo cada Ctor de mi clase\r\n\t\tfor (EntradaCtor c: entradaCtor.values()) {\t\r\n\t\t\t//chequeo parametros del Ctor...\r\n\t\t\t//para cada parametro de mi metodo\r\n\t\t\tfor (EntradaPar p: c.getEntradaParametros()) {\r\n\t\t\t\t//si es de tipo idClase, chequeo que ese idClase exista\r\n\t\t\t\tif (noTipoPrimitivo(p.getTipo().getTipo())) {\r\n\t\t\t\t\t\t// si no es asi -> error\r\n\t\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(p.getTipo().getTipo())==null)\r\n\t\t\t\t\t\t\tthrow new claseNoDeclarada(p.getTipo().getTipo(), p.getToken().getNroLinea(), p.getToken().getNroColumna());\r\n\t\t\t\t}\r\n\t\t\t}//fin for\r\n\t\t}//fin for\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Chequeo metodos de mi clase:\r\n\t\t//para cada metodo de mi clase\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t\r\n\t\t\t// si no es un tipo de dato primitivo, chequeo que esa clase/tipo de dato exista\r\n\t\t\tif (noTipoPrimitivo(m.getTipoRetorno().getTipo())) {\r\n\t\t\t\t\t//si no es clase declarada -> error\r\n\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(m.getTipoRetorno().getTipo())==null)\r\n\t\t\t\t\t\tthrow new claseNoDeclarada(m.getTipoRetorno().getTipo(), m.getToken().getNroLinea(), m.getToken().getNroColumna());\t\t\r\n\t\t\t}//fin if\r\n\t\t\t\r\n\t\t\t//para cada parametro de mi metodo\r\n\t\t\tfor (EntradaPar p: m.getEntradaParametros()) {\r\n\t\t\t\t\t//si es de tipo idClase, chequeo que ese idClase exista\r\n\t\t\t\t\tif (noTipoPrimitivo(p.getTipo().getTipo())) {\r\n\t\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(p.getTipo().getTipo())==null)\r\n\t\t\t\t\t\t\tthrow new claseNoDeclarada(p.getTipo().getTipo(), p.getToken().getNroLinea(), p.getToken().getNroColumna());\t\r\n\t\t\t\t\t}\r\n\t\t\t}//fin for p\r\n\t\t\t\r\n\t\t\tif (m.getModificador().equals(\"dynamic\"))\r\n\t\t\t\tmetodosDyn.add(m);\r\n\t\t\r\n\t\t}//fin for m\r\n\t\t\r\n\t\t\r\n\t}", "public void refrescarForeignKeysDescripcionesCostoGastoImpor() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tCostoGastoImporConstantesFunciones.refrescarForeignKeysDescripcionesCostoGastoImpor(this.costogastoimporLogic.getCostoGastoImpors());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tCostoGastoImporConstantesFunciones.refrescarForeignKeysDescripcionesCostoGastoImpor(this.costogastoimpors);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(TipoCostoGastoImpor.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//costogastoimporLogic.setCostoGastoImpors(this.costogastoimpors);\r\n\t\t\tcostogastoimporLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "private void scanClassMap() {\n Set<Class<?>> classSet = reflections.getTypesAnnotatedWith(Redis.class);\n for (Class cl : classSet) {\n RedisInfo redisInfo = new RedisInfo();\n Redis redis = (Redis) cl.getAnnotation(Redis.class);\n redisInfo.setCls(cl);\n redisInfo.setTableName(redis.name());\n redisInfo.setIncrName(redis.IncrName());\n redisInfo.setDbName(redis.dbName());\n redisInfo.setImmediately(redis.immediately());\n redisInfo.setIncr(redis.incrId());\n redisInfo.setDelete(redis.delete());\n try {\n classMap.put(redis.name(), redisInfo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\n}", "public void refrescarForeignKeysDescripcionesTablaAmortiDetalle() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tTablaAmortiDetalleConstantesFunciones.refrescarForeignKeysDescripcionesTablaAmortiDetalle(this.tablaamortidetalleLogic.getTablaAmortiDetalles());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tTablaAmortiDetalleConstantesFunciones.refrescarForeignKeysDescripcionesTablaAmortiDetalle(this.tablaamortidetalles);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(Ejercicio.class));\r\n\t\tclasses.add(new Classe(Periodo.class));\r\n\t\tclasses.add(new Classe(Tasa.class));\r\n\t\tclasses.add(new Classe(Factura.class));\r\n\t\tclasses.add(new Classe(TipoIntervalo.class));\r\n\t\tclasses.add(new Classe(Anio.class));\r\n\t\tclasses.add(new Classe(Mes.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//tablaamortidetalleLogic.setTablaAmortiDetalles(this.tablaamortidetalles);\r\n\t\t\ttablaamortidetalleLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "private Obj myFindForClass(String name, DesignatorIdent desIdent) {\n \tObj rez = findInMyScope(name); // provera da li je lokalna promenljiva trenutne funkcije\r\n \tif(rez!= Tab.noObj) {\r\n \t\treturn rez;\r\n \t}\r\n \t\r\n \tStruct classStruct = null;\r\n \tif(currentClass != null) {\r\n \t\tclassStruct = currentClass;\r\n \t}\r\n \telse {\r\n \t\tclassStruct = currentAbsClass;\r\n \t}\r\n \t\r\n \tObj resultObj = null;\r\n \tSymbolDataStructure members = Tab.currentScope().getOuter().getLocals(); // nisu dodati u classStruct, ali se nalaze u scope, vec su sig svi navedeni\r\n \t\r\n \twhile (classStruct != null) { // u sebi ga trazis ...ako si ga nasao pristupas preko implicitnog this!\r\n \t\tif (members != null) {\r\n \t\t\tresultObj = members.searchKey(name);\r\n \t\t\tif (resultObj != null) break;\r\n \t\t}\r\n \t\t\r\n \t\tclassStruct = classStruct.getElemType();\r\n \t\tif (classStruct != null) {\r\n \t\t\tmembers = classStruct.getMembersTable();\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (resultObj != null) {\r\n \t\tStruct trenutna = null;\r\n \t\tif (currentClass != null)\r\n \t\t\ttrenutna = currentClass;\r\n \t\tif (currentAbsClass != null)\r\n \t\t\ttrenutna = currentAbsClass;\r\n// \t\tif (trenutna == null) // dal je moguce? ---> jeste u main-u npr ---> ovde nece moci jel sig zovem iz klase...\r\n// \t\t\treturn;\r\n \t\t// znaci polje sam klase \"klasa\" ; zovem se sa . nesto...sig sam polje ili metoda klase\r\n \t\tif (resultObj.getKind() == Obj.Fld || resultObj.getKind() == Obj.Meth) { \r\n \t\t\tif (resultObj.getFpPos() == 1 || resultObj.getFpPos() == -9) { // public\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 2 || resultObj.getFpPos() == -8) { // protected\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 3 || resultObj.getFpPos() == -7) { // private\r\n \t\t\t\tif (trenutna != classStruct) {\r\n \t\t\t\t\treport_error(\"Greska na liniji \" + desIdent.getLine()+ \" : polju \"+desIdent.getName()+\" se ne sme pristupati na ovom mestu, private je!\", null);\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t\t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t\t \t\t\tcallFunctionClassField = 1;\r\n \t\t \t\t\treturn resultObj;\r\n \t\t \t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n// \t\tif (resultObj.getKind() == Obj.Meth) {\r\n// \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n// \t\t\tcallFunctionClassField = 1;\r\n// \t\t}\r\n \t\treturn resultObj;\r\n \t}\r\n \t\r\n \tObj meth = Tab.find(name); // ako je global...\r\n \tif (meth.getKind() == Obj.Meth) {\r\n \t\treport_info(\"Detektovan poziv globalne f-je: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n\t\t\tcallFunctionClassField = 0;\r\n \t}\r\n \t\r\n \treturn meth;\r\n\t}", "public DatoGeneralEmpleadoLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.datogeneralempleadoDataAccess = new DatoGeneralEmpleadoDataAccess();\r\n\t\t\t\r\n\t\t\tthis.datogeneralempleados= new ArrayList<DatoGeneralEmpleado>();\r\n\t\t\tthis.datogeneralempleado= new DatoGeneralEmpleado();\r\n\t\t\t\r\n\t\t\tthis.datogeneralempleadoObject=new Object();\r\n\t\t\tthis.datogeneralempleadosObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.datogeneralempleadoDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.datogeneralempleadoDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public void rescanRepository() { // recree les liste de classes connues a partir du depot\n // cette methode peut etre invoquee si on sait que le depot a ete modifie\n for (int i=0; i<types.length; i++) {\n classesDisponibles[i] = new HashMap<String, String>();\n scanRepository(types[i], classesDisponibles[i]);\n }\n }", "public void BuscarGrupo() {\r\n try {\r\n // Inicializamos la tabla para refrescar todos los datos contenidos.\r\n InicializarTabla(_escuchador.session);\r\n Transaction tx = _escuchador.session.beginTransaction();\r\n List<Cursos> tabla=rsmodel.lista;\r\n List<Cursos> borrados = new <Cursos>ArrayList();\r\n if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Todos los campos\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase()) && !obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Código del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Nombre del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n tabla.removeAll(borrados);\r\n tx.commit();\r\n if(tabla.isEmpty()){tabla.add(new Cursos(null));}\r\n rs=tabla;\r\n ControladorTabla registrosBuscados = new ControladorTabla(tabla);\r\n menuCursos.getTablaCursos().setModel(registrosBuscados);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, e, \"Excepción\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public int buscarCuenta (String cuenta){// busca el dni de los jugadores pasando un parametro cuenta valido\r\n\t\tString cadena=\"SELECT Dni_Jugador FROM jugadores where Cuenta_Bancaria='\"+cuenta+\"'\";\r\n\t\ttry{\r\n\t\t\tthis.abrir();\r\n\t\t\ts=c.createStatement(); // similar al anterior\r\n\t\t\treg=s.executeQuery(cadena);\r\n\t\t\twhile(reg.next()){ //mientras exista un próximo registro, retorna 1 o 0 si no hay mas registros\r\n\t\t\t\ts.close();\r\n\t\t\t\tthis.cerrar();\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\ts.close();\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tcatch ( SQLException e){\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\tCategorie a = new Categorie(\"cat a\");\n\t\t/*----------------*/\n\t\tCategorie a1 = new Categorie(\"cat a1\");\n\t\tCategorie a2 = new Categorie(\"cat a2\");\n\t\tCategorie a3 = new Categorie(\"cat a3\");\n\t\ta.getSousCategorie().add(a1);\n\t\ta1.setParentCategorie(a);\n\t\ta.getSousCategorie().add(a2);\n\t\ta2.setParentCategorie(a);\n\t\ta.getSousCategorie().add(a3);\n\t\ta3.setParentCategorie(a);\n\t\t/*----------------*/\n\t\tCategorie a11 = new Categorie(\"cat a11\");\n\t\ta1.getSousCategorie().add(a11);\n\t\ta11.setParentCategorie(a1);\n\t\tCategorie a12 = new Categorie(\"cat a12\");\n\t\ta1.getSousCategorie().add(a12);\n\t\ta12.setParentCategorie(a1);\n\t\tCategorie a13 = new Categorie(\"cat a13\");\n\t\ta1.getSousCategorie().add(a13);\n\t\ta13.setParentCategorie(a1);\n\t\tCategorie a14 = new Categorie(\"cat a14\");\n\t\ta1.getSousCategorie().add(a14);\n\t\ta14.setParentCategorie(a1);\n\t\t\n\t\t\n\t\tdao.save(a);\n\t\tdao.save(a1);\n\t\tdao.save(a2);\n\t\tdao.save(a3);\n\t\t\n\t\tdao.save(a11);\n\t\tdao.save(a12);\n\t\tdao.save(a13);\n\t\tdao.save(a14);\n\t}", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "@Override\n\tpublic void AdiconarCarrinho(EntidadeDominio entidade) throws SQLException {\n\t}", "private List<ClassNode> createClsRelList(ClassNode clsNode, Map classes) {\n ClassNode currClsNode = clsNode;\n Map<String, ClassNode> classMap = classes;\n\n List<ClassNode> clsRel = new LinkedList<ClassNode>();\n clsRel.add(clsNode);\n\n while(currClsNode instanceof ClassWithParentNode) {\n ClassNode nextClsNode = classMap.get(((ClassWithParentNode)\n currClsNode).getParent());\n clsRel.add(0, nextClsNode);\n currClsNode = nextClsNode;\n }\n return clsRel;\n }", "public paciente()\n {\n con = new bdconexion(); //instancia la clase bdconexion\n }", "private boolean recuperaDadosInseridos() throws SQLException, GrupoUsuarioNaoSelecionadoException{\n \n GrupoUsuarios grupoUsuarios = new GrupoUsuarios();\n Usuarios usuarios = new Usuarios();\n boolean selecao = false;\n \n try{\n \n if(this.optUsuariosGerente.isSelected()){\n grupoUsuarios.setGerente(1);\n selecao = true;\n }\n if(this.optUsuariosGestorEstoque.isSelected()){\n grupoUsuarios.setGestorEstoque(1);\n selecao = true;\n }\n if(this.optUsuariosGestorCompras.isSelected()){\n grupoUsuarios.setGestorCompras(1);\n selecao = true;\n }\n if(this.optUsuariosCaixeiro.isSelected()){\n grupoUsuarios.setCaixeiro(1);\n selecao = true;\n }\n \n if(selecao!=true)\n throw new GrupoUsuarioNaoSelecionadoException();\n else usuarios.setGrupoUsuarios(grupoUsuarios); \n \n }catch(TratarMerciExceptions e){\n System.out.println(e.getMessage());\n }\n return selecao;\n }", "public void refrescarForeignKeysDescripcionesCierreCaja() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tCierreCajaConstantesFunciones.refrescarForeignKeysDescripcionesCierreCaja(this.cierrecajaLogic.getCierreCajas());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tCierreCajaConstantesFunciones.refrescarForeignKeysDescripcionesCierreCaja(this.cierrecajas);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(Usuario.class));\r\n\t\tclasses.add(new Classe(TipoFormaPago.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//cierrecajaLogic.setCierreCajas(this.cierrecajas);\r\n\t\t\tcierrecajaLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "public void generTirarDados() {\n\r\n\t}", "public List<Models.Class> showClasses(String from) {\n // Get from all levels\n List<Models.Class> fromInstitution = em.createNativeQuery(\"select c.* from class c, course cr, programme pg, institution i, institutionparticipant ipa, participant p where c.coursecode = cr.coursecode and cr.programmecode = pg.programmecode and pg.institutioncode = i.institutioncode and ipa.institutioncode = i.institutioncode and ipa.participantid = p.participantid and p.userid = ? and i.institutioncode = ?\", Models.Class.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n List<Models.Class> fromProgramme = em.createNativeQuery(\"select c.* from class c, course cr, programme pg,programmeparticipant ppa, participant p where c.coursecode = cr.coursecode and cr.programmecode = pg.programmecode and ppa.programmecode = pg.programmecode and ppa.participantid = p.participantid and p.userid = ? and pg.programmecode = ?\", Models.Class.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n List<Models.Class> fromCourse = em.createNativeQuery(\"select c.* from class c, course cr, courseparticipant cpa, participant p where c.coursecode = cr.coursecode and cpa.coursecode = cr.coursecode and cpa.participantid = p.participantid and p.userid = ? and cpa.coursecode = ?\", Models.Class.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n\n // Combine the results\n List<Models.Class> results = new ArrayList<Models.Class>();\n results.addAll(fromInstitution);\n results.addAll(fromProgramme);\n results.addAll(fromCourse);\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" classes were found.\");\n\n for (Models.Class classroom : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Class?id=\" + classroom.getClassid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>CLASS</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + classroom.getClassid() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n\n return results;\n }", "public void registraPoliticasCond (Long codPropuesta, ReformaTributariaInput reformaIn, Collection deudas, ReformaTributariaOutput reformaOut)throws Exception{\n \t\n Connection conn = null;\n CallableStatement call = null;\n try{ \n conn = this.getConnection();\n //codPropuesta=null;//prueba que pasa\n //reformaIn=null;\n \t int canal=0;\n \t int tipoConvenio=0;\n \t int garantia=0;\n\t\t \tIterator itera = deudas.iterator();\n\t\t \t//System.out.println(\"<-------------------------------------Ingreso a registrar opciones--------------------------------------->\");\n\t\t while(itera.hasNext()) {\n\t\t \t\n\t\t \tDeudaWeb elemento = (DeudaWeb) itera.next();\n\t\t \t\n\t\t \t/*System.out.println(\"codPropuesta--->\"+codPropuesta);\n\t\t \tSystem.out.println(\"getIsIntranet--->\"+reformaIn.getIsIntranet());\n\t\t \tSystem.out.println(\"getPagoTotalConvenio--->\"+reformaIn.getPagoTotalConvenio());\n\t\t \tSystem.out.println(\"getComportamientoConvenio--->\"+reformaIn.getComportamientoConvenio());\n\t\t \tSystem.out.println(\"getRutContribuyente--->\"+reformaIn.getRutContribuyente());\n\t\t \tSystem.out.println(\"getTieneGarantia--->\"+reformaIn.getTieneGarantia());\n\t\t \tSystem.out.println(\"getTipoContribuyente--->\"+elemento.getTipoContribuyente());\n\t\t \tSystem.out.println(\"getTipoFormulario--->\"+elemento.getTipoFormulario());\n\t\t \tSystem.out.println(\"getRutRol--->\"+elemento.getRutRol());\n\t\t \tSystem.out.println(\"getFolio--->\"+elemento.getFolio());\n\t\t \tSystem.out.println(\"getFechaVencimiento--->\"+elemento.getFechaVencimiento());\n\t\t \tSystem.out.println(\"getFechaAntiguedad--->\"+elemento.getFechaAntiguedad());\n\t\t \tSystem.out.println(\"getPorcentajeCondonacionMultas--->\"+elemento.getPorcentajeCondonacionMultas());\n\t\t \tSystem.out.println(\"getPorcentajeCondonacionIntereses--->\"+elemento.getPorcentajeCondonacionIntereses());\n\t\t \tSystem.out.println(\"getBeneficioPp--->\"+reformaOut.getBeneficioPp());\n\t\t \tSystem.out.println(\"getMinCuotaContado--->\"+reformaOut.getMinCuotaContado());\n\t\t \tSystem.out.println(\"getMaxCuota--->\"+reformaOut.getMaxCuota());*/\n\t\t \t\n\t\t \tcall = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.INSERTA_CONDICION_CNV(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t//obtengo canal\n\t\t \tif (reformaIn.getIsIntranet().booleanValue()){\n\t\t \t\tcanal=1;//presencial\n\t\t \t}else {\n\t\t \t\tcanal=2;//internet\n\t\t \t}\n\t\t \t\n\t\t \t//obtengo tipo convenio\n\t\t \tif (reformaIn.getPagoTotalConvenio().booleanValue()){\n\t\t \t\ttipoConvenio=1;//total\n\t\t \t}else{\n\t\t \t\ttipoConvenio=2;//parcial\n\t\t \t}\n\t\t \t\n\t\t \t//obtengo garantia\n\t\t \tif (reformaIn.getTieneGarantia().booleanValue()){\n\t\t \t\tgarantia=1;//con garatia\n\t\t \t}else{\n\t\t \t\tgarantia=2;//sin garantia\n\t\t \t}\n\t\t \t\n\t\t \t\n\t\t \tcall.setLong(1, codPropuesta.longValue());\n\t\t \tcall.setLong(2, canal);//canal;\n\t\t \tcall.setLong(3, tipoConvenio);//Tipo convenio Pago total-pago parcial\n\t\t \tcall.setLong(4, reformaIn.getComportamientoConvenio().longValue());//comportamiento Bueno=1 / Regular=2 / Malo=3\n\t\t \tcall.setLong(5, reformaIn.getRutContribuyente().longValue());//rut evaluado;\n\t\t \tcall.setLong(6, garantia);//embargo / o garantia\n\t\t \tcall.setLong(7, elemento.getTipoContribuyente());//cliente_tipo;\n\t\t \tcall.setLong(8, elemento.getTipoFormulario());//tipo_forulario;\n\t\t \tcall.setLong(9, elemento.getRutRol());//rut_rol;\n\t\t \tcall.setLong(10, elemento.getFolio());//form_folio;\n\t\t \tcall.setDate(11,elemento.getFechaVencimiento());//fecha_vcto;\n\t\t \tcall.setDate(12,elemento.getFechaAntiguedad());//fecha_antiguedad;\n\t\t \tcall.setLong(13, elemento.getPorcentajeCondonacionMultas());//porcentaje condonacion multas\n\t\t \tcall.setLong(14, elemento.getPorcentajeCondonacionIntereses());//porcentaje condonacion intereses\n\t\t \tcall.setLong(15, reformaOut.getBeneficioPp().longValue());//beneficio pronto pago o incentivo al pago;\n\t\t \tcall.setLong(16, reformaOut.getMinCuotaContado().longValue());//porcentaje minimo cuota contado\n\t\t \tcall.setLong(17, reformaOut.getMaxCuota().longValue());//porcentaje maximo cuotas\n\t\t \tcall.setNull(18, OracleTypes.VARCHAR);//error\n\t\t \t\n\t\t \tcall.execute();\n\t\t \t\n\t }\n\t\t \n\t\t call.close(); \n }catch (Exception e) {\n e.printStackTrace();\n }finally{\n this.closeConnection();\n }\t\t \n \t\n }", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "public static Estudiante buscarEstudiante(String Nro_de_ID) {\r\n //meter este método a la base de datos\r\n Estudiante est = new Estudiante();\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n ResultSet necesario = sentencia.executeQuery(\"select * from estudiante where Nro_de_ID ='\" + Nro_de_ID + \"'\");\r\n\r\n while (necesario.next()) {\r\n\r\n String ced = necesario.getString(\"Nro_de_ID\");\r\n String nomb = necesario.getString(\"Nombres\");\r\n String ape = necesario.getString(\"Apellidos\");\r\n String lab = necesario.getString(\"Laboratorio\");\r\n String carr = necesario.getString(\"Carrera\");\r\n String mod = necesario.getString(\"Modulo\");\r\n String mta = necesario.getString(\"Materia\");\r\n String fecha = necesario.getString(\"Fecha\");\r\n String HI = necesario.getString(\"Hora_Ingreso\");\r\n String HS = necesario.getString(\"Hora_Salida\");\r\n\r\n est.setNro_de_ID(ced);\r\n est.setNombres(nomb);\r\n est.setApellidos(ape);\r\n est.setLaboratorio(lab);\r\n est.setCarrera(carr);\r\n est.setModulo(mod);\r\n est.setMateria(mta);\r\n est.setFecha(fecha);\r\n est.setHora_Ingreso(HI);\r\n est.setHora_Salida(HS);\r\n\r\n }\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n return est;\r\n }", "@Override\r\n public void inserirConcursando(Concursando concursando) throws Exception {\n rnConcursando.inserir(concursando);\r\n }", "public abstract Class getEntidadPrincipal();", "public List<Faturamento> gerarFaturamento(Banco banco,Date competenciaBase,\tint dataLimite, UsuarioInterface usuario, Date dataGeracaoPlanilha, Collection<TetoPrestadorFaturamento> tetos) throws Exception {\n\t\tSession session = HibernateUtil.currentSession();\n\t\tsession.setFlushMode(FlushMode.COMMIT);\n\t\tCriteria criteria = session.createCriteria(Prestador.class);\n\t\tList<Faturamento> faturamentos = new ArrayList<Faturamento>();\n\t\tList<AbstractFaturamento> todosFaturamentos = new ArrayList<AbstractFaturamento>();\n\t\tif (banco != null)\n\t\t\tcriteria.add(Expression.eq(\"informacaoFinanceira.banco\",banco));\n//\t\t\tcriteria.add(Expression.not(Expression.in(\"idPrestador\", AbstractFinanceiroService.getIdsPrestadoresNaoPagos())));\n\t\t\tcriteria.add(Expression.eq(\"idPrestador\",528079L));\n\t\t\t\n\t\tList<Prestador> prestadores = criteria.list();\n\n//\t\tsaveImpostos();\n\t\tint quantPrest = prestadores.size();\n\t\tint countPrest = 0;\n\t\tDate competenciaAjustada = ajustarCompetencia(competenciaBase);\n\t\t\n//\t\talimentaLista();\n\t\t\n\t\tfor (Prestador prestador : prestadores) {\n\t\t\tSystem.out.println(++countPrest + \"/\" + quantPrest + \" - Prestador: \" + prestador.getPessoaJuridica().getFantasia());\n\t\t\tif(!prestador.getTipoPrestador().equals(Prestador.TIPO_PRESTADOR_ANESTESISTA)){\n//\t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, prestador, usuario, dataGeracaoPlanilha, tetos);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Gerando os faturamentos dos procedimentos...\");\n \t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, (PrestadorAnestesista)prestador, usuario);\n\t\t\t\tSystem.out.println(\"Gerando os faturamentos das guias...\");\n//\t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, prestador, usuario, dataGeracaoPlanilha, tetos);\n\t\t\t\tSystem.out.println(\"Concluído Coopanest!\");\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\treturn faturamentos;\n\t}", "private static void Relatorio() throws Exception \r\n {//Inicio menuRelatorio\r\n byte opcao;\r\n boolean fecharMenu = false;\r\n int idCliente, idProduto, quant;\r\n Produto p = null;\r\n Cliente c = null;\r\n do{\r\n System.out.println(\r\n \"\\n\\t*** MENU RELATORIO ***\\n\" +\r\n \"0 - Mostrar os N produtos mais Vendidos\\n\" +\r\n \"1 - Mostrar os N melhores clientes\\n\" +\r\n \"2 - Mostrar os produtos comprados por um cliente\\n\" +\r\n \"3 - Mostrar Clientes que compraram um produto\\n\" +\r\n \"4 - Sair\"\r\n );\r\n System.out.print(\"Digite sua opcao: \");\r\n opcao = read.nextByte();\r\n switch(opcao){\r\n case 0:\r\n ArrayList<Produto> listP = arqProdutos.toList();\r\n if(listP.isEmpty()) System.out.println(\"\\nNão tem produtos em nosso sistema ainda!\");\r\n else{\r\n System.out.print(\"Digite a quantidade de produtos que deseja saber: \");\r\n quant = read.nextInt();\r\n System.out.println();\r\n //Ordena a lista de forma decrescente:\r\n listP.sort((p1,p2) -> - Integer.compare(p1.getQuantVendidos(), p2.getQuantVendidos()));\r\n for(Produto n: listP){\r\n System.out.println(\"Produto de ID: \" + n.getID() + \" Nome: \" + n.nomeProduto + \"\\tQuantidade vendida: \" + n.getQuantVendidos());\r\n quant--;\r\n if(quant == 0) break;\r\n }\r\n }\r\n break;\r\n case 1:\r\n ArrayList<Cliente> listC = arqClientes.toList();\r\n if(listC.isEmpty()) System.out.println(\"Não ha clientes para mostrar!\");\r\n else{\r\n System.out.print(\"Digite a quantidade de Clientes: \");\r\n quant = read.nextInt();\r\n System.out.println();\r\n //Ordena a lista de forma decrescente:\r\n listC.sort((c1,c2) -> - Float.compare(c1.getTotalGasto(), c2.getTotalGasto()));\r\n for(Cliente n: listC){\r\n System.out.println(\"Cliente de ID: \" + n.getID() + \" Nome: \" + n.nomeCliente + \"\\tGasto total: \" + tf.format(n.getTotalGasto()));\r\n quant--;\r\n if(quant == 0) break; \r\n }\r\n }\r\n break;\r\n case 2:\r\n System.out.print(\"Digite o id do cliente: \");\r\n idCliente = read.nextInt();\r\n c = arqClientes.pesquisar(idCliente - 1);\r\n if (c != null){\r\n int[] idsProdutos = indice_Cliente_Produto.lista(idCliente);\r\n System.out.println(\"\\nO cliente \" + c.nomeCliente + \" de ID \" + c.getID() + \" comprou: \");\r\n for(int i = 0; i < idsProdutos.length; i++){\r\n p = arqProdutos.pesquisar(idsProdutos[i] - 1);\r\n System.out.println(\r\n \"\\n\\tProduto \" + i + \" -> \" + \r\n \" ID: \" + p.getID() + \r\n \" Nome: \" + p.nomeProduto + \r\n \" Marca: \" + p.marca\r\n );\r\n }\r\n }\r\n else {\r\n System.out.println(\"\\nID Invalido!\");\r\n Thread.sleep(1000);\r\n }\r\n break;\r\n case 3:\r\n System.out.print(\"Digite o id do Produto a consultar: \");\r\n idProduto = read.nextInt();\r\n p = arqProdutos.pesquisar(idProduto - 1);\r\n if(p != null){\r\n int[] idsClientes = indice_Produto_Cliente.lista(idProduto);\r\n System.out.println(\"\\nO produto '\" + p.nomeProduto + \"' de ID \" + p.getID() + \" foi comprado por: \");\r\n for(int i = 0; i < idsClientes.length; i++){\r\n c = arqClientes.pesquisar(idsClientes[i] - 1);\r\n System.out.println();\r\n System.out.println(c);\r\n }\r\n }\r\n else{\r\n System.out.println(\"\\nProduto Inexistende!\");\r\n Thread.sleep(1000);\r\n }\r\n break;\r\n case 4:\r\n fecharMenu = true;\r\n break; \r\n default:\r\n System.out.println(\"Opcao invalida!\\n\");\r\n Thread.sleep(1000);\r\n break;\r\n }\r\n }while(!fecharMenu); \r\n }", "private void registrarBaseDatosRedis()\n {\n \tConexionBaseDatosRedis registrar = new ConexionBaseDatosRedis();\n \tregistrar.insertarDatos(categoriaPregunta, pregunta, respuesta.getRespuesta());\n\n }", "public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }", "public Collection<Transferencia> traerTodasLasTransferencias() {\n Collection<Transferencia> resultado = null;\n try {\n controlTransferencia = new ControlTransferencia();\n bitacora.info(\"Registro Transferencia Iniciado correctamente\");\n resultado = controlTransferencia.traerTodasLasTransferencias();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro Transferencia por \" + ex.getMessage());\n }\n return resultado;\n }", "public ClienteArchivoLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.clientearchivoDataAccess = new ClienteArchivoDataAccess();\r\n\t\t\t\r\n\t\t\tthis.clientearchivos= new ArrayList<ClienteArchivo>();\r\n\t\t\tthis.clientearchivo= new ClienteArchivo();\r\n\t\t\t\r\n\t\t\tthis.clientearchivoObject=new Object();\r\n\t\t\tthis.clientearchivosObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.clientearchivoDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.clientearchivoDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public void registrarClasificacion() {\n Clasificacion clasifi;\n Estado estado;\n // clasifi = data.getClasificaList().get(numClasif);\n // estado = data.getEstadoList().get(numEstado);\n\n /*Toast.makeText(this, \"REG-\" + numClasif,\n Toast.LENGTH_SHORT).show();\n System.out.println(\"REG-\" + numEstado);*/\n\n\n AdmSQLiteOpenHelper admin = new AdmSQLiteOpenHelper(this.context);\n\n try {\n admin.createDataBase();\n //admin.openDataBase();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // \"lesvena3\", null, 1)\n //AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(this,\n // \"lesvena3\", null, 1);\n SQLiteDatabase bd = admin.getWritableDatabase();\n /* String cod = et3_comun.getText().toString();\n String descri = et4_cientifico.getText().toString();\n String pre = et7_descripcion.getText().toString();\n String est = et8_estado.getText().toString();*/\n\n // Estado estado = new Estado();\n //Clasificacion clasifica = new Clasificacion();\n/* estado.setEstado(est);\n clasifica.setNombre_comun(cod);\n clasifica.setNombre_cientifico(descri);\n clasifica.setDescripcion(pre);\n data.setEstado(estado);\n data.setClasifica(clasifica);\n */\n\n ContentValues registro = new ContentValues();\n //registro.put(\"id\", 2);\n registro.put(\"nombre_comun\", \"FLOR\");\n registro.put(\"nombre_cientifico\", \"silvestre\");\n registro.put(\"descripcion\", \"AMARI\");\n bd.insert(\"clasificacion\", null, registro);\n bd.close();\n /* et3_comun.setText(\"\");\n et4_cientifico.setText(\"\");\n et7_descripcion.setText(\"\");\n et8_estado.setText(\"\");*/\n Toast.makeText(this.context, \"Se cargaron los datos de Clasificacion\",\n Toast.LENGTH_SHORT).show();\n/*\n Intent k = new Intent(this, Summary.class);\n startActivity(k);\n */\n }", "private String addClassAssociations() {\n\n symplifyClassRelationMap();\n\n String result = \"\";\n Set<String> keys = classRelationMap.keySet(); // get all keys\n\n for (String key : keys) {\n\n String[] classes = key.split(\"-\");\n\n if (mapIfInterface.get(classes[0])) result += \"[<interface>;\" + classes[0] + \"]\";\n else result += \"[\" + classes[0] + \"]\";\n\n result += classRelationMap.get(key); // Add connection\n\n if (mapIfInterface.get(classes[1])) result += \"[<interface>;\" + classes[1] + \"]\";\n else result += \"[\" + classes[1] + \"]\";\n\n result += \",\";\n }\n return result;\n }", "private DatosDeSesion() throws ExcepcionArchivoDePropiedadesNoEncontrado {\r\n this.poolDeConexiones = new PoolDeConexiones();\r\n }", "private static void getClassHierarchyRecurs(Class clazz, boolean flag) {\n Class classFirst = null;\n if (flag) {\n classFirst = clazz;\n }\n if (clazz != null) {\n clazz = clazz.getSuperclass();\n getClassHierarchyRecurs(clazz, false);\n }\n if (clazz != null) {\n System.out.println(clazz.getName());\n System.out.println(\" ^\");\n System.out.println(\" |\");\n }\n if (classFirst != null) {\n System.out.println(classFirst.getName());\n }\n }", "public void cargarPantalla() throws Exception {\n Long oidCabeceraMF = (Long)conectorParametroSesion(\"oidCabeceraMF\");\n\t\tthis.pagina(\"contenido_matriz_facturacion_consultar\");\n\n DTOOID dto = new DTOOID();\n dto.setOid(oidCabeceraMF);\n dto.setOidPais(UtilidadesSession.getPais(this));\n dto.setOidIdioma(UtilidadesSession.getIdioma(this));\n MareBusinessID id = new MareBusinessID(\"PRECargarPantallaConsultarMF\"); \n Vector parametros = new Vector();\n \t\tparametros.add(dto);\n parametros.add(id);\n \t\tDruidaConector conector = conectar(\"ConectorCargarPantallaConsultarMF\", parametros);\n if (oidCabeceraMF!=null)\n asignarAtributo(\"VAR\",\"varOidCabeceraMF\",\"valor\",oidCabeceraMF.toString());\n\t\t asignar(\"COMBO\", \"cbTiposOferta\", conector, \"dtoSalida.resultado_ROWSET\");\n\t\t///* [1]\n\n\n\n\t\ttraza(\" >>>>cargarEstrategia \");\n\t\t//this.pagina(\"contenido_catalogo_seleccion\"); \n\t\t \n\t\tComposerViewElementList cv = crearParametrosEntrada();\n\t\tConectorComposerView conectorV = new ConectorComposerView(cv, this.getRequest());\n\t\tconectorV.ejecucion();\n\t\ttraza(\" >>>Se ejecuto el conector \");\n\t\tDruidaConector resultados = conectorV.getConector();\n\t\tasignar(\"COMBO\", \"cbEstrategia\", resultados, \"PRECargarEstrategias\");\n\t\ttraza(\" >>>Se asignaron los valores \");\n\t\t// */ [1]\n\t\t\n\n }", "public void refrescarForeignKeysDescripcionesUtilidadTipoPrecio() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tUtilidadTipoPrecioConstantesFunciones.refrescarForeignKeysDescripcionesUtilidadTipoPrecio(this.utilidadtipoprecioLogic.getUtilidadTipoPrecios());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tUtilidadTipoPrecioConstantesFunciones.refrescarForeignKeysDescripcionesUtilidadTipoPrecio(this.utilidadtipoprecios);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(TipoPrecio.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//utilidadtipoprecioLogic.setUtilidadTipoPrecios(this.utilidadtipoprecios);\r\n\t\t\tutilidadtipoprecioLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }", "private Hashtable<String, String> cargarRecursos() {\n Hashtable<String, String> recursosTemp = new Hashtable<String, String>(); \n \n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA, ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA);\n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB, ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB);\n return recursosTemp;\n }", "public void refrescarForeignKeysDescripcionesLibroContable() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tLibroContableConstantesFunciones.refrescarForeignKeysDescripcionesLibroContable(this.librocontableLogic.getLibroContables());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tLibroContableConstantesFunciones.refrescarForeignKeysDescripcionesLibroContable(this.librocontables);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//librocontableLogic.setLibroContables(this.librocontables);\r\n\t\t\tlibrocontableLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "private void populaNoticiaCat()\n {\n NoticiaCat n1 = new NoticiaCat(\"Avisos\", \"Help\");\n noticiaCatDAO.insert(n1);\n NoticiaCat n2 = new NoticiaCat(\"Noticias\", \"Document Notes\");\n noticiaCatDAO.insert(n2);\n NoticiaCat n3 = new NoticiaCat(\"Dicas\", \"Tag\");\n noticiaCatDAO.insert(n3);\n }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "public void inserisci(NodoAlbero dove, String contenuto, String tipo){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, tipo);\n n_nodi++;\n return;\n }\n //se il nodo padre non ha un figlio, lo creiamo\n if (dove.getFiglio() == null)\n dove.setFiglio(new NodoAlbero(contenuto, dove, tipo));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = dove.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), tipo));\n }\n n_nodi++;\n }", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "private static <V> void recorridoProf(Graph<V> graph, V pInicio, Set<V> pRevisado, Graph<V> grafoNuevo) {\n grafoNuevo.addNode(pInicio);\n pRevisado.put(pInicio);\n List<V> adyacencias = graph.getAdjacentNodes(pInicio);\n for (int x = 1; x <= adyacencias.size(); x++) {\n V adyacencia = adyacencias.get(x);\n if (!pRevisado.isMember(adyacencia)) {\n recorridoProf(graph, adyacencia, pRevisado, grafoNuevo);\n }\n grafoNuevo.addEdge(pInicio, adyacencia, graph.getWeight(pInicio, adyacencia));\n }\n }", "public FlujoDetalleDTO cargarRegistro(int codigoFlujo, int secuencia) {\n/* */ try {\n/* 201 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.enviar_hermana,t.enviar_si_hermana_cerrada,t.ind_cliente_inicial,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" and t.secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 243 */ boolean rtaDB = this.dat.parseSql(s);\n/* 244 */ if (!rtaDB) {\n/* 245 */ return null;\n/* */ }\n/* 247 */ this.rs = this.dat.getResultSet();\n/* 248 */ if (this.rs.next()) {\n/* 249 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 252 */ catch (Exception e) {\n/* 253 */ e.printStackTrace();\n/* 254 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarFlujoDetalle\", e);\n/* */ } \n/* 256 */ return null;\n/* */ }", "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}", "public void adicionarCaracteristicasEscala(String nombredigitado)\r\n\t{\r\n\t\tEscala existeescala = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conectora = new Conector();\r\n\t\t\tconectora.iniciarConexionBaseDatos();\r\n\t\t\texisteescala = EscalaBD.buscarNombre(nombredigitado, conectora);\r\n\t\t\tconectora.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(existeescala != null)\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < caracteristicasescal.size(); i++) \r\n\t\t\t{\r\n\t\t\t\tCaracteristica caractaux = (Caracteristica)caracteristicasescal.get(i);\r\n\t\t\t\tcaractaux.setIdescala(existeescala.getIdescala());\r\n\t\t\t\ttry \r\n\t \t\t{\r\n \t\t\t\tConector conectorc = new Conector();\r\n\t \t\t\tconectorc.iniciarConexionBaseDatos();\r\n\t \t\t\tCaracteristicaBD.insertar(caractaux, conectorc);\r\n \t\t\t\tconectorc.terminarConexionBaseDatos();\r\n\t \t\t}\r\n\t \t\tcatch (Exception e)\r\n\t \t\t{\r\n\t \t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t \t\t}\r\n\t\t\t}\r\n\t\t\tcaracteristicasescal.clear();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"La escala con el nombre \"+nombredigitado+\" no existe.\",\"Adicionar Caracteristicas\", JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t}\r\n\t}" ]
[ "0.6042955", "0.5945645", "0.5934166", "0.56540596", "0.56423986", "0.5622452", "0.5542873", "0.552419", "0.54863644", "0.5395291", "0.53906995", "0.53854156", "0.5353121", "0.53522885", "0.5348898", "0.5336185", "0.5315386", "0.5301353", "0.52576095", "0.52554345", "0.52544606", "0.52508664", "0.52369946", "0.5224245", "0.52167153", "0.52057266", "0.52038616", "0.5203727", "0.5185404", "0.51849544", "0.51844347", "0.51750857", "0.51749426", "0.5167316", "0.51665723", "0.51663387", "0.51499045", "0.51454467", "0.513334", "0.51281023", "0.5120292", "0.5111746", "0.51108575", "0.51075983", "0.510485", "0.51030266", "0.5097404", "0.5094071", "0.50840724", "0.50819206", "0.50808364", "0.50705165", "0.50685066", "0.5064718", "0.50636655", "0.506011", "0.5051327", "0.50503725", "0.50503397", "0.50486845", "0.5040496", "0.5032125", "0.5029214", "0.50244915", "0.50184816", "0.50160855", "0.49906674", "0.4988918", "0.49881047", "0.4987512", "0.4986853", "0.4985144", "0.4980452", "0.49775237", "0.49775144", "0.49738646", "0.49631175", "0.4960827", "0.49602476", "0.4958452", "0.49494222", "0.4949369", "0.49443606", "0.49342495", "0.49333856", "0.4931905", "0.49289492", "0.49270648", "0.49265647", "0.4925826", "0.4924601", "0.4916349", "0.49138802", "0.49082482", "0.4903836", "0.49007764", "0.48766658", "0.4874323", "0.48736715", "0.4872604", "0.48702112" ]
0.0
-1
public static final String MyPREFERENCES = "MyPrefs"; SharedPreferences sharedPreferences;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_question); // try { // Uri path = Uri.parse("android.resource://"+getPackageName()+"/raw/alarm.mp3"); // // The line below will set it as a default ring tone replace // // RingtoneManager.TYPE_RINGTONE with RingtoneManager.TYPE_NOTIFICATION // // to set it as a notification tone // RingtoneManager.setActualDefaultRingtoneUri( // getApplicationContext(), RingtoneManager.TYPE_RINGTONE, // path); // Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), path); // r.play(); // } // catch (Exception e) { // e.printStackTrace(); // } subject=getIntent().getStringExtra("Subject"); String question="[\n" + "{\n" + " \"Question\": \"What are the indirect Direct subclasses of Services?\",\n" + "\"Q1\": \"recognitionService\",\n" + "\"Q2\": \" remoteViewsService\",\n" + "\"Q3\": \"spellCheckerService\",\n" + "\"Q4\": \"inputMethodService\",\n" + "\"A\": \"inputMethodService\"\n" + "},\n" + "{\n" + " \"Question\": \"How many ways to start services?\",\n" + "\"Q1\": \"started\",\n" + "\"Q2\": \" bound\",\n" + "\"Q3\": \"a & b\",\n" + "\"Q4\": \"messenger\",\n" + "\"A\": \"a & b\"\n" + "},\n" + "{\n" + " \"Question\": \"Which of the important device characteristics that you should consider as you design and develop your application?\",\n" + "\"Q1\": \"screen size and density\",\n" + "\"Q2\": \" input configurations\",\n" + "\"Q3\": \" device features\",\n" + "\"Q4\": \"all the above\",\n" + "\"A\": \"all the above\"\n" + "},\n" + "{\n" + " \"Question\": \"Parent class of Service?\",\n" + "\"Q1\": \"Object\",\n" + "\"Q2\": \" Context\",\n" + "\"Q3\": \" ContextWrapper\",\n" + "\"Q4\": \"ContextThemeWrapper\",\n" + "\"A\": \"ContextWrapper\"\n" + "},\n" + "{\n" + " \"Question\": \"What are the indirect Direct subclasses of Activity?\",\n" + "\"Q1\": \" launcherActivity\",\n" + "\"Q2\": \" preferenceActivity\",\n" + "\"Q3\": \" tabActivity\",\n" + "\"Q4\": \"all the above\",\n" + "\"A\": \"all the above\"\n" + "},\n" + "{\n" + " \"Question\": \"What are the Direct subclasses of Activity?\",\n" + "\"Q1\": \"ListActivity\",\n" + "\"Q2\": \" ActivityGroup\",\n" + "\"Q3\": \" FragmentActivity\",\n" + "\"Q4\": \"all the above\",\n" + "\"A\": \"all the above\"\n" + "},\n" + "{\n" + " \"Question\": \"Parent class of Activity?\",\n" + "\"Q1\": \"object\",\n" + "\"Q2\": \" Context\",\n" + "\"Q3\": \" activityGroup\",\n" + "\"Q4\": \"contextThemeWrapper\",\n" + "\"A\": \"contextThemeWrapper\"\n" + "},\n" + "{\n" + " \"Question\": \" Layouts in android?\",\n" + "\"Q1\": \"Frame Layout\",\n" + "\"Q2\": \" Linear Layout\",\n" + "\"Q3\": \" Relative Layout\",\n" + "\"Q4\": \"all of the above\",\n" + "\"A\": \"all the above\"\n" + "}\n" + "]"; al=new ArrayList<>(); // alA=new ArrayList<>(); // set=new HashSet<>(); // set1=new HashSet<>(); try { JSONArray question1=new JSONArray(question); for(int i=0;i<question1.length();i++) { Map<String,String> map=new HashMap<>() ; JSONObject object = question1.getJSONObject(i); String Questionobject=object.getString("Question"); String q1=object.getString("Q1"); String q2=object.getString("Q2"); String q3=object.getString("Q3"); String q4=object.getString("Q4"); String A=object.getString("A"); map.put("Question",Questionobject); map.put("q1",q1); map.put("q2",q2); map.put("q3",q3); map.put("q4",q4); map.put("A",A); al.add(map); } } catch (JSONException e) { e.printStackTrace(); } // sharedPreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE); q=findViewById(R.id.question); time=findViewById(R.id.time); b1=findViewById(R.id.b1); b2=findViewById(R.id.b2); b3=findViewById(R.id.b3); b4=findViewById(R.id.b4); p1=findViewById(R.id.p1); qno1=findViewById(R.id.qno); qno1.setText("Question " + (j+1) + " of 8"); q.setText(al.get(j).get("Question")); b1.setText(al.get(j).get("q1")); b2.setText(al.get(j).get("q2")); b3.setText(al.get(j).get("q3")); b4.setText(al.get(j).get("q4")); dataBaseClass = new DataBaseClass(Question.this); String q1 = q.getText().toString(); String A =al.get(j).get("A"); dataBaseClass.insertValues1(q1, A); if(j<al.size()-1) { new CountDownTimer(9000, 1000) { public void onTick(long millisUntilFinished) { time.setText("Seconds remaining:" + millisUntilFinished / 1000); b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(b1.getText().equals(al.get(j).get("A"))) { count++; } dataBaseClass.updateData1(b1.getText().toString(),q.getText().toString()); // alA.add(b1.getText().toString()); // alA.add( al.get(j).get("Question")); // alA.add(al.get(j).get("A")); // set.add(b1.getText().toString()); Intent i = getIntent(); i.putExtra("Subject",subject); b1.setBackgroundColor(Color.GREEN); j++; startActivity(i); } }); b2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(b2.getText().equals(al.get(j).get("A"))) { count++; } dataBaseClass.updateData1(b2.getText().toString(),q.getText().toString()); // alA.add(b2.getText().toString()); // alA.add(al.get(j).get("Question")); // alA.add(al.get(j).get("A")); Intent i=getIntent(); j++; b2.setBackgroundColor(Color.GREEN); startActivity(i); } }); b3.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(b3.getText().equals(al.get(j).get("A"))) { count++; } dataBaseClass.updateData1(b3.getText().toString(),q.getText().toString()); // alA.add(b3.getText().toString()); // alA.add(al.get(j).get("Question")); // alA.add(al.get(j).get("A")); Intent i=getIntent(); j++; b3.setBackgroundColor(Color.GREEN); startActivity(i); } }); b4.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(b4.getText().equals(al.get(j).get("A"))) { count++; } dataBaseClass.updateData1(b4.getText().toString(),q.getText().toString()); // alA.add(b4.getText().toString()); // alA.add(al.get(j).get("Question")); // alA.add(al.get(j).get("A")); Intent i=getIntent(); j++; b4.setBackgroundColor(Color.GREEN); startActivity(i); } }); } public void onFinish() { Intent i = getIntent(); i.putExtra("Subject",subject); j++; startActivity(i); } }.start(); } else { new CountDownTimer(9000, 1000) { public void onTick(long millisUntilFinished) { time.setText("Seconds remaining:" + millisUntilFinished / 1000); b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // editor = sharedPreferences.edit(); // // set.addAll(alA); // editor.putStringSet("selected",set); // editor.apply(); j=0; dataBaseClass.updateData1(b1.getText().toString(),q.getText().toString()); Intent i=new Intent(Question.this,Congratulation.class); // i.putExtra("json",al); // i.putExtra("slectedAnswer",alA); i.putExtra("Subject",subject); i.putExtra("score",String.valueOf(count)); startActivity(i); } }); b2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // editor = sharedPreferences.edit(); // set.addAll(alA); // editor.putStringSet("selected",set); // editor.apply(); j=0; dataBaseClass.updateData1(b2.getText().toString(),q.getText().toString()); Intent i=new Intent(Question.this,Congratulation.class); // i.putExtra("json",al); // i.putExtra("slectedAnswer",alA); i.putExtra("Subject",subject); i.putExtra("score",String.valueOf(count)); startActivity(i); } }); b3.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { j=0; // editor = sharedPreferences.edit(); // set.addAll(alA); // Log.e("alA", alA.toString() ); // editor.putStringSet("selected",set); // editor.apply(); dataBaseClass.updateData1(b3.getText().toString(),q.getText().toString()); Intent i=new Intent(Question.this,Congratulation.class); // i.putExtra("json",al); // i.putExtra("slectedAnswer",alA); i.putExtra("Subject",subject); i.putExtra("score",String.valueOf(count)); startActivity(i); } }); b4.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { j=0; // editor = sharedPreferences.edit(); // set.addAll(alA); // editor.putStringSet("selected",set); // editor.commit(); dataBaseClass.updateData1(b4.getText().toString(),q.getText().toString()); Intent i=new Intent(Question.this,Congratulation.class); // i.putExtra("json",al); // i.putExtra("slectedAnswer",alA); i.putExtra("Subject",subject); i.putExtra("score",String.valueOf(count)); startActivity(i); } }); } public void onFinish() { Intent i =new Intent(Question.this,Congratulation.class); i.putExtra("Subject",subject); i.putExtra("score",String.valueOf(count)); j=0; startActivity(i); } }.start(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "SharedPreferences mo117960a();", "private static SharedPreferences getSharedPreference(Context context){\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "private SharedPreferences getSharedPrefs() {\n return Freelancer.getContext().getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);\n }", "private static SharedPreferences getSharedPrefs(final Context context) {\n final String prefsName = context.getString(R.string.sharedprefs_name);\n return context.getSharedPreferences(prefsName, Context.MODE_PRIVATE);\n }", "public static String getSharedPrefs() {\n return SHARED_PREFS;\n }", "private static SharedPreferences getSharedPreferences() {\n Context ctx = AppUtils.getAppContext();\n return ctx.getSharedPreferences(\"pref_user_session_data\", Context.MODE_PRIVATE);\n }", "private static SharedPreferences getSharedPreferences(Context context) {\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "private static SharedPreferences getSharedPreferences(Context context) {\n return context.getSharedPreferences(SMILE_PREFERENCES, Context.MODE_PRIVATE);\n }", "public static SharedPreferences getSharedPrefs() {\n return App.getAppContext().getSharedPreferences(PREFS_LABEL, Context.MODE_PRIVATE);\n }", "public SharedPreferences getPrefs() { return this.prefs; }", "public SharePref(Context context) {\n sPrefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n }", "private void readSharedPreferences() {\n SharedPreferences sharedPref = getActivity().getSharedPreferences(SETTINGS_FILE_KEY, MODE_PRIVATE);\n currentDeviceAddress = sharedPref.getString(SETTINGS_CURRENT_DEVICE_ADDRESS, \"\");\n currentDeviceName = sharedPref.getString(SETTINGS_CURRENT_DEVICE_NAME, \"\");\n currentFilenamePrefix = sharedPref.getString(SETTINGS_CURRENT_FILENAME_PREFIX, \"\");\n currentSubjectName = sharedPref.getString(SETTINGS_SUBJECT_NAME, \"\");\n currentShoes = sharedPref.getString(SETTINGS_SHOES, \"\");\n currentTerrain = sharedPref.getString(SETTINGS_TERRAIN, \"\");\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "public static interface Prefs{\n /**\n * The key-value pair stores the name of the file\n */\n public static final String FILE_NAME = \"game_preferences\";\n\n /**\n * The key that stores the field name: the best score\n */\n public static final String KEY_BEST_SCORE = \"best_score\";\n }", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "private SharedPreferences GetPreferences( Context context )\n\t{\n\t\treturn context.getSharedPreferences( CACHE_NAME, Context.MODE_PRIVATE );\n\t}", "public static SharedPreferences getSharedPreferences(Context ctx) {\n return ctx.getSharedPreferences(Const.SHARED_PREFERENCES_FILE_NAME, Context.MODE_PRIVATE);\n }", "public SharedPreferences prefs() {\n\n SharedPreferences prefs = context.getSharedPreferences(APP_IDS_PREFS_NAME, Context.MODE_PRIVATE); // Private because it can still be accessed from other apps with the same User ID\n return prefs;\n }", "private void initSharedPreference(){\n mSharedPreferences = Configuration.getContext().getSharedPreferences(\"SessionManager\", Context.MODE_PRIVATE) ;\n }", "@Provides\n @Singleton\n UtilsPrefs providesUtilsPrefs(SharedPreferences sharedPreferences) {\n UtilsPrefs utilsPrefs = new UtilsPrefs(sharedPreferences);\n return utilsPrefs;\n }", "public SharedPref() {\n super();\n }", "@Provides\n @Singleton\n SharedPreferences provideSharedPreferences(Application application) {\n return PreferenceManager.getDefaultSharedPreferences(application);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tthis.prefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t/*\n\t\t * Each app has its own shared preferences available to all components\n\t\t * of the app and this loads the default preferences that are saved on\n\t\t * the phone\n\t\t */\n\t\tthis.prefs.registerOnSharedPreferenceChangeListener(this);\n\t\t/*\n\t\t * Each user can change preferences. So this listener is a mechanism to\n\t\t * notify this activity that the old values are stale\n\t\t */\n\t}", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "private void GetSharedPrefs()\n {\n// SharedPreferences pref = getActivity().getSharedPreferences(\"LoginPref\", 0);\n// UserId = pref.getInt(\"user_id\", 0);\n// Mobile = pref.getString(\"mobile_number\",DEFAULT);\n// Email = pref.getString(\"email_id\",DEFAULT);\n// Username = pref.getString(\"user_name\",DEFAULT);\n// Log.i(TAG, \"GetSharedPrefs: UserId: \"+UserId);\n\n SharedPreferences pref = getActivity().getSharedPreferences(\"RegPref\", 0); // 0 - for private mode\n UserId = pref.getInt(\"user_id\", 0);\n Mobile = pref.getString(\"mobile_number\",DEFAULT);\n Email = pref.getString(\"email_id\",DEFAULT);\n Log.i(TAG, \"GetSharedPrefs: UserId: \"+UserId);\n CallOnGoingRideAPI();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.preferences);\n\n SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n\n //String ip = SP.getString(\"ip\", \"NULL\");\n // Config.ip = SP.getString(\"ip\", \"NULL\");\n // Log.e(\"IP\",Config.ip );\n String language = SP.getString(\"language\",\"NULL\");\n // Toast.makeText(getApplicationContext(),Config.ip,Toast.LENGTH_SHORT).show();\n //Toast.makeText(getApplicationContext(),language,Toast.LENGTH_SHORT).show();\n }", "@Api(1.0)\n @NonNull\n private SharedPreferences getSharedPreferences() {\n return mContext.getSharedPreferences(mPreferencesId, Context.MODE_PRIVATE);\n }", "public void shared() {\n\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n String username = userstring;\n\n SharedPreferences sharedlog = getSharedPreferences(\"usernamelast\" , MODE_PRIVATE);\n SharedPreferences.Editor editorlogin = sharedlog.edit();\n editorlogin.putString(\"usernamelast\", username);\n editorlogin.apply();\n\n SharedPreferences sharedPref = getSharedPreferences(\"email\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"email\", Email);\n editor.apply();\n //Los estados los podemos setear en la siguiente actividad\n SharedPreferences sharedPref2 = getSharedPreferences(\"password\", MODE_PRIVATE);\n SharedPreferences.Editor editor2 = sharedPref2.edit();\n editor2.putString(\"password\", Password);\n editor2.apply();\n\n\n }", "public String getCurrentIdentity(){\n mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n if(mSharedPreference.contains(\"zzxxyz\")) {\n\n return mSharedPreference.getString(\"zzxxyz\", \"\");\n }\n else\n return \"\";\n}", "private void getPreferences() {\n Constants constants = new Constants();\n android.content.SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n\n serverUrl = sharedPreferences.getString(\"LedgerLinkBaseUrl\", constants.DEFAULTURL);\n IsEditing = SharedPrefs.readSharedPreferences(getActivity(), \"IsEditing\", \"0\");\n tTrainerId = SharedPrefs.readSharedPreferences(getActivity(), \"ttrainerId\", \"-1\");\n vslaId = SharedPrefs.readSharedPreferences(getActivity(), \"vslaId\", \"-1\");\n\n vslaName = DataHolder.getInstance().getVslaName();\n representativeName = DataHolder.getInstance().getGroupRepresentativeName();\n representativePost = DataHolder.getInstance().getGroupRepresentativePost();\n repPhoneNumber = DataHolder.getInstance().getGroupRepresentativePhoneNumber();\n grpBankAccount = DataHolder.getInstance().getGroupBankAccount();\n physAddress = DataHolder.getInstance().getPhysicalAddress();\n regionName = DataHolder.getInstance().getRegionName();\n grpPhoneNumber = DataHolder.getInstance().getGroupPhoneNumber();\n grpBankAccount = DataHolder.getInstance().getGroupBankAccount();\n locCoordinates = DataHolder.getInstance().getLocationCoordinates();\n grpSupportType = DataHolder.getInstance().getSupportTrainingType();\n numberOfCycles = DataHolder.getInstance().getNumberOfCycles();\n }", "private SharedPreferencesManager(){}", "public SharedPreferenceStorage(Context context, String prefName) {\n prefs = context.getSharedPreferences(prefName == null ?\n SharedPreferenceStorage.class.getCanonicalName() : prefName, MODE_PRIVATE);\n }", "@Provides\n @Singleton\n SharedPreferences providesDefaultSharedPreferences(Application application) {\n return PreferenceManager.getDefaultSharedPreferences(application);\n }", "static synchronized SharedPreferences m45630a(Context context) {\n synchronized (C7529d.class) {\n if (Build.VERSION.SDK_INT >= 11) {\n f31839a = context.getSharedPreferences(\".tpush_mta\", 4);\n } else {\n f31839a = context.getSharedPreferences(\".tpush_mta\", 0);\n }\n if (f31839a == null) {\n f31839a = PreferenceManager.getDefaultSharedPreferences(context);\n }\n return f31839a;\n }\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "public void writeEncounterNumPreferences(long encounterNum){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putLong(mContext.getString(R.string.encounter),encounterNum);\n editor.commit();\n}", "public interface GeneralPreferenceHelper {\n String PREF_USER_NAME = \"pref_name_user\";\n String PREF_ENABLE_SOCIAL = \"pref_social_recomendation\";\n}", "public interface PreferenceHelper {\r\n // Preference Name\r\n String PREFERENCE_NAME = \"Embedded_Downloads_preference\";\r\n // Preference mode\r\n int PRIVATE_MODE = 0;\r\n String INITIAL_START = \"initial_start\";\r\n String WALLET_ADDRESS = \"wallet_address\";\r\n String WALLET_NAME = \"wallet_name\";\r\n String TRANSACTION_WALLET_ADDRESS = \"transaction_wallet_address\";\r\n String WALLET_POSITION =\"wallet_position\";\r\n String CALL_TRANSACTION_STATUS = \"call_transaction_status\";\r\n String CALL_INCOMING = \"call_incoming\";\r\n String CALL_OUTGOING = \"call_outgoing\";\r\n}", "public interface PreferencesHelper {\r\n\r\n int getUserLoggedInMode();\r\n\r\n void setUserLoggedInMode(DataManager.LoggedInMode mode);\r\n\r\n String getUserName();\r\n\r\n void setUserName(String userName);\r\n\r\n String getAccessToken();\r\n\r\n void setAccessToken(String accessToken);\r\n\r\n String getUserProfilePicUrl();\r\n\r\n void setUserProfilePicUrl(String profilePicUrl);\r\n\r\n String getStoredProfilePicPath();\r\n\r\n void setStoredProfilePicPath(String profilePicPath);\r\n\r\n}", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n //set the driver name and track variables using methods below, which are also called from onSharedPreferencesChanged\n setDriver(sharedPreferences);\n setTrack(sharedPreferences);\n }", "private void saveInPreferences(String gameName) {\n //Store name in shared preferences\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"gameName\", gameName);\n editor.commit();\n\n //Check if gameName stored\n //String storedPreference = preferences.getString(\"gameName\",\"none\");\n //Log.d(\"checkGameName\", storedPreference);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tPreferenceManager prefMgr = getPreferenceManager();\n\t\tprefMgr.setSharedPreferencesName(\"appPreferences\");\n\t\t\n\t\taddPreferencesFromResource(R.xml.mappreference);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n btn_login_dia= findViewById(R.id.btnLogin);\n btn_login_dia.setOnClickListener(this);\n btn_signup_dia= findViewById(R.id.btnSignup);\n btn_signup_dia.setOnClickListener(this);\n mAuth = FirebaseAuth.getInstance();\n sp=getSharedPreferences(\"details1\",0);\n }", "public static SharedPreferences getCommonSharedPrefs(Context context) {\r\n return context.getSharedPreferences(AppConstants.SP_COMMON, Context.MODE_MULTI_PROCESS);\r\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "private SharedPreferences m4028a() {\n SharedPreferences sharedPreferences;\n synchronized (Preferences.class) {\n if (this.f5334b == null) {\n this.f5334b = this.f5333a.getSharedPreferences(\"androidx.work.util.preferences\", 0);\n }\n sharedPreferences = this.f5334b;\n }\n return sharedPreferences;\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onPause() {\n SharedPreferences sharedPreferences = getSharedPreferences(MainActivity.sharedPreferencesKey,MODE_PRIVATE);\n SharedPreferences.Editor edit = sharedPreferences.edit();\n GlobalVariables globalVariables = GlobalVariables.getInstance();\n boolean gameStarted = globalVariables.getGameStarted();\n if (gameStarted) {\n try {\n String serializedGame = globalVariables.toString(\"\");\n edit.putString(\"game\", serializedGame);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n edit.commit();\n super.onPause();\n }", "public Prefs(Activity context){\n this.preferences = context.getSharedPreferences(prefContext, Context.MODE_PRIVATE);\n this.context = context;\n\n }", "public static void initPrefs(){\n prefs = context.getSharedPreferences(PREFS_FILE, 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.remove(Constants.IS_FIRST_RUN);\n editor.putBoolean(Constants.ACTIVITY_SENSE_SETTING,false);\n editor.commit();\n }", "private GlobalPrefs() {\n\t\tprops = new Properties();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_home);\n\n preferences = getSharedPreferences(\"CurrentUser\", MODE_PRIVATE);\n }", "public static void savePreferences(Context context, String strKey, String strValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(strKey, strValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n\n }\n }", "public static SharedPreferences getGlobalSharedPreferences() {\n return mGlobalSharedPreferences;\n }", "public interface Constants {\n String SHARED_PREF = \"SHARED_PREF\";\n String SHARED_PREF_AUTH_CODE = \"SHARED_PREF_AUTH_CODE\";\n String BASE_URL = \"http://pakhi.net\";\n\n String DB_NAME = \"iforgot_db\";\n String FILE_PATH = \"file_path\";\n String FILE_ID = \"file_id\";\n\n int WRITE_EXTERNAL_STORAGE_PERMISSION = 113;\n int REQUEST_CAMERA_PERMISSION = 114;\n}", "public SPHandler(Context context){\n this.context = context;\n sharedPref = context.getSharedPreferences(\n prefName, Context.MODE_PRIVATE);\n\n }", "public void shareData(){\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n //now get Editor\n SharedPreferences.Editor editor = sharedPref.edit();\n //put your value\n editor.putInt(\"score3\", points);\n\n //commits your edits\n editor.commit();\n }", "private void storeKeyWord(String keyWord) {\n SharedPrefsUtils.setStringPreference(application.getApplicationContext(),\"KEY\",keyWord);\n }", "@Override\n\tprotected void onPause() {\n\t\tSharedPreferences.Editor editor = myprefs.edit();\n\t\teditor.putString(\"userN\", userName);\n\t\teditor.putString(\"name\",person_name);\n\t\teditor.commit();\n\t\tsuper.onPause();\n\t}", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.preferences);\n }", "public String getPrefrence(String key) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n String data = prefrence.getString(key, \"\");\n return data;\n }", "public String getPrefrence(String key) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n String data = prefrence.getString(key, \"\");\n return data;\n }", "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n String aaString = sharedPreferences.getString(getString(R.string.pref_antalAktier_key), getString(R.string.pref_antalAktier_default));\n// float aaFloat = Float.parseFloat(aaString);\n editTextAntalAktier.setText(aaString);\n\n String kk = sharedPreferences.getString(getString(R.string.pref_koebskurs_key), getString(R.string.pref_koebskurs__default));\n editTextKoebskurs.setText(kk);\n\n String k = sharedPreferences.getString(getString(R.string.pref_kurtage_key), getString(R.string.pref_kurtage_default));\n editTextKurtage.setText(k);\n\n// float minSize = Float.parseFloat(sharedPreferences.getString(getString(R.string.pref_size_key),\n// getString(R.string.pref_size_default)));\n// mVisualizerView.setMinSizeScale(minSize);\n\n // Register the listener\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "private String getSharedPrefs (String folder, String file, String defaultValue)\t{\n\n\t\tSharedPreferences sp = getSharedPreferences(folder, MODE_PRIVATE);\n\t\treturn sp.getString(file, defaultValue);\n\t}", "private void LoadSavedPreferences() {\n\t\tString value;\n\t\tSharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\t// tab 3 ************************************************\n\t\tvalue = sharedPreferences.getString(\"tempSzad\", \"22\");\n\t\tettempSzad_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempPmaxdop\", \"70\");\n\t\tettempPmaxdop_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempZmaxdop\", \"22\");\n\t\tettempZmaxdop_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempPumpaON\", \"50\");\n\t\tettempPumpaON_.setText(value);\n\n\t\t// tab 1 ************************************************\n\t\tvalue = sharedPreferences.getString(\"tv1\", \"20.20\");\n\t\ttvS1.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tv2\", \"44.22\");\n\t\ttvS2.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tv3\", \"19.22\");\n\t\ttvS3.setText(value);\n\t}", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public PreferencesHelper(Context context) {\n\t\tthis.sharedPreferences = context.getSharedPreferences\n\t\t\t\t(APP_SHARED_PREFS, Activity.MODE_PRIVATE);\n\t\tthis.editor = sharedPreferences.edit();\n\t}", "protected void storeSharedPrefs(String un2, String pwd2) {\n \teditor.putString(\"username\", un2);\n \teditor.putString(\"password\", pwd2); \t\n\t\teditor.commit(); //Commiting changes\n\t}", "public SharedPreferencesModule(){\n //this.application = application;\n }", "public static SharedPreferences.Editor getSharedPrefsEditor() {\n return PreferencesUtils.getSharedPrefs().edit();\n }", "private SharedPreferencesUtils() {\n }", "public void mo23013a(Context context) {\n this.f26122b = context.getSharedPreferences(\"com.judi.base.PREFERENCE_FILE_KEY\", 0);\n }", "private void savePreferences(String key, String value) {\n\t\tSharedPreferences sp = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tEditor edit = sp.edit();\n\t\tedit.putString(key, value);\n\t\tedit.commit();\n\t}", "@SuppressLint(\"CommitPrefEdits\")\n @Override\n public void onLoadFinished(Loader<SharedPreferences> loader,\n SharedPreferences prefs) {\n }", "public static void init(Context context) {\n prefs = context.getSharedPreferences(\"ERS_Prefs\", Context.MODE_PRIVATE);\n }", "public void saveSettings(View v) {\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE); // get shared preferences\n SharedPreferences.Editor editor = sharedPref.edit();\n int seconds_rec = Integer.parseInt(time_recording.getText().toString());\n int notif_occ = Integer.parseInt(time_occurance.getText().toString());\n\n editor.putInt(getString(R.string.time_recording_seconds), seconds_rec); // save values to a sp\n editor.putInt(getString(R.string.time_notification_minutes), notif_occ);\n editor.commit(); // commit the differences\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "public interface Constants {\n /**\n * String representation for the name of the preferences object storing\n * the Parabank connection settings.\n */\n String PREFS_PARABANK = \"parabankConnectionSettings\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the protocol for the HTTP requests.\n */\n @Deprecated\n String PREFS_PARABANK_PROTOCOL = \"protocol\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the host for the HTTP requests.\n */\n String PREFS_PARABANK_HOST = \"host\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the port for the HTTP requests.\n */\n String PREFS_PARABANK_PORT = \"port\";\n\n /**\n * String representation for key within the {@link android.content.Intent}\n * object which stores the {@link com.parabank.parasoft.app.android.adts.User}\n * object data.\n */\n String INTENT_USER = \"user\";\n String INTENT_PARABANK_URI = \"parabankConnection\";\n}", "public synchronized static void init(Context ctx) {\n context = ctx;\n prefs = context.getSharedPreferences(APP, Context.MODE_PRIVATE);\n editor = prefs.edit();\n }", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public void savePreferences(SharedPreferences preferences){\r\n\t\tSharedPreferences.Editor editor = preferences.edit();\r\n editor.putBoolean(\"initialSetupped\", initialSetuped);\r\n editor.putString(\"username\", userName);\r\n editor.putString(\"useremail\", userEmail);\r\n editor.putString(\"recipientemail\", recipientEmail);\r\n editor.putBoolean(\"option\", option.isPound());\r\n\r\n // Commit the edits!\r\n editor.commit();\r\n\t}", "public Preferences getPrefs() {\n return _prefs;\n }", "private void resetSharedPreferences(){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(getString(R.string.pref_genre_key), getString(R.string.pref_genre_any_value));\n editor.putString(getString(R.string.pref_earliest_year_key), getString(R.string.pref_earliest_year_default));\n editor.putString(getString(R.string.pref_latest_year_key), getString(R.string.pref_latest_year_default));\n // Commit the edits\n editor.apply();\n }", "private void getDataFromSharedPrefernce() {\r\n\r\n\t\tprofileImageString = mSharedPreferences_reg.getString(\"ProfileImageString\",\"\");\r\n\t\tpsedoName = mSharedPreferences_reg.getString(\"PseudoName\", \"\");\r\n\t\tprofiledescription = mSharedPreferences_reg.getString(\"Pseudodescription\", \"\");\r\n\r\n\t\tsetDataToRespectiveFields();\r\n\t}", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public static synchronized SharedPreferencesManager getInstance(Context context){\n if(INSTANCE == null){\n // Initialize shared preferences and its editor\n sharedPreferences = context.getSharedPreferences(context.getPackageName(), Activity.MODE_PRIVATE);\n editor = sharedPreferences.edit();\n\n INSTANCE = new SharedPreferencesManager();\n }\n\n return INSTANCE;\n }", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }" ]
[ "0.74758506", "0.74176013", "0.73915184", "0.73158085", "0.7298986", "0.7271099", "0.7128615", "0.7128299", "0.7112983", "0.70345545", "0.7013117", "0.6963434", "0.68871284", "0.6848851", "0.68098545", "0.67744637", "0.67543167", "0.67307675", "0.67276144", "0.67212087", "0.67205673", "0.6652684", "0.6643458", "0.66346383", "0.6632394", "0.6614607", "0.66065496", "0.66065496", "0.66065496", "0.66065496", "0.65941155", "0.6590852", "0.6587839", "0.6584633", "0.65694326", "0.6547328", "0.6536236", "0.6526377", "0.6520791", "0.6512808", "0.6509609", "0.6509609", "0.6495609", "0.64927083", "0.6487587", "0.6473905", "0.6458139", "0.64416957", "0.6437612", "0.6437126", "0.6433569", "0.6429258", "0.6405589", "0.63952357", "0.6378392", "0.637093", "0.63687557", "0.6364893", "0.6361437", "0.63552463", "0.63496846", "0.6347473", "0.6343163", "0.63368165", "0.6298851", "0.6292407", "0.62825197", "0.62819535", "0.6266976", "0.6261917", "0.6246555", "0.6246555", "0.6245206", "0.6242902", "0.624241", "0.6231367", "0.62290114", "0.62087125", "0.62072766", "0.61884254", "0.61678624", "0.6166686", "0.6152208", "0.6147791", "0.61352366", "0.61287045", "0.6117085", "0.61131406", "0.61121", "0.61115015", "0.6109371", "0.60961616", "0.60925823", "0.6074687", "0.6068901", "0.6064343", "0.60640717", "0.60573596", "0.6057232", "0.60544103", "0.60489464" ]
0.0
-1
editor = sharedPreferences.edit(); set.addAll(alA); editor.putStringSet("selected",set); editor.apply();
@Override public void onClick(View v) { j=0; dataBaseClass.updateData1(b1.getText().toString(),q.getText().toString()); Intent i=new Intent(Question.this,Congratulation.class); // i.putExtra("json",al); // i.putExtra("slectedAnswer",alA); i.putExtra("Subject",subject); i.putExtra("score",String.valueOf(count)); startActivity(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void storeDataForCashePrefrenceArray(SharedPreferences spinnerPrefs, Set<String> arrayOFSpinnersValue){//for new version\n SharedPreferences.Editor prefsEditor = spinnerPrefs.edit();\n prefsEditor.putStringSet(\"inputspinner_prefrance_set_for_cashe\",arrayOFSpinnersValue);\n prefsEditor.commit();\n }", "public void updateRegions(SharedPreferences sharedPreferences){\r\n\t regionsSet = sharedPreferences.getStringSet(MainActivity.REGIONS, null);\r\n }", "private void saveSharedPrefs(String a, boolean b) {\n SharedPreferences.Editor editor = sp.edit();\n if (b) editor.putString(\"searchField\", a);\n else editor.putString(\"ingredientsField\", a);\n editor.commit();\n }", "public void saveSearchedCityNames(){\n SharedPreferences.Editor editor = getSharedPreferences(SharedPrefKeys.HISTORY, MODE_PRIVATE).edit();\n Set<String> cityNamesSet = new HashSet<>();\n cityNamesSet.addAll(mSearchedCities);\n editor.putStringSet(\"SearchedCities\", cityNamesSet);\n editor.apply();\n }", "private void saveOption() {\n SharedPreferences filterSetting = getSharedPreferences(\"filterSetting\",0);\n SharedPreferences.Editor editor = filterSetting.edit();\n editor.putBoolean(\"myMostRecent\",myMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"myDisplayAll\",myDisplayAllCheckbox.isChecked());\n editor.putBoolean(\"foMostRecent\",foMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"foDisplayAll\",foDisplayAllCheckbox.isChecked());\n editor.putString(\"myReason\",myReasonEditText.getText().toString());\n editor.putString(\"foReason\",foReasonEditText.getText().toString());\n editor.putInt(\"mySpinner\",myEmotionalStateSpinner.getSelectedItemPosition());\n editor.putInt(\"foSpinner\",foEmotionalStateSpinner.getSelectedItemPosition());\n\n editor.commit();\n }", "private void m29053a(MySharedPreferences bVar, SharedPreferences sharedPreferences) {\n if (bVar != null && sharedPreferences != null) {\n Editor edit = sharedPreferences.edit();\n if (edit != null) {\n edit.clear();\n for (Entry entry : bVar.getAll().entrySet()) {\n String str = (String) entry.getKey();\n Object value = entry.getValue();\n if (value instanceof String) {\n edit.putString(str, (String) value);\n } else if (value instanceof Integer) {\n edit.putInt(str, ((Integer) value).intValue());\n } else if (value instanceof Long) {\n edit.putLong(str, ((Long) value).longValue());\n } else if (value instanceof Float) {\n edit.putFloat(str, ((Float) value).floatValue());\n } else if (value instanceof Boolean) {\n edit.putBoolean(str, ((Boolean) value).booleanValue());\n }\n }\n edit.commit();\n }\n }\n }", "public AppPreferences set(@NonNull String name, Iterable<String> value) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n SharedPreferences.Editor prefsEditor = prefs.edit();\n Set<String> set = new LinkedHashSet<>();\n for (String s : value) {\n set.add(s);\n }\n prefsEditor.putStringSet(name, set);\n prefsEditor.apply(); // or commit();\n return this;\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }", "set.addAll(Arrays.asList(a));", "public void guardarModosTransporteSeleccionados( View view ){\r\n\t\tSet<String> modosTransporteSeleccionados = this.adapterListaModosTransporte.getItemsSeleccionados();\r\n\t\tSet<String> modosTransportePref = this.adapterListaModosTransporte.getItemsPreferencias();\r\n\t\tfor ( String modoTransporteSeleccionado : modosTransporteSeleccionados ){\r\n\t\t\tmodosTransportePref.add( modoTransporteSeleccionado );\r\n\t\t}\r\n\t\t\r\n\t\tSharedPreferences prefActuales = getSharedPreferences( \"com.example.conteos_preferences\", MODE_PRIVATE );\r\n\t\tEditor editor = prefActuales.edit();\r\n\t\teditor.remove( CLAVE_MODOS_TRANSPORTE );\t//(1)\r\n\t\teditor.apply();\t\t\t\t\t\t\t\t//(2)\r\n\t\teditor.putStringSet( CLAVE_MODOS_TRANSPORTE, modosTransportePref );\t//(3)\r\n\t\teditor.commit();\r\n\t\t//Toast.makeText( getApplicationContext(), \"Items Saved: \\n\" + Arrays.toString( modosTransportePref.toArray() ), Toast.LENGTH_LONG ).show();\t\t\r\n\t\t//Toast.makeText( getApplicationContext(), \"Items Restored from pref: \\n\" + Arrays.toString( prefActuales.getStringSet( CLAVE_MODOS_TRANSPORTE, null ).toArray() ), Toast.LENGTH_LONG ).show();\r\n\t\tfinish();\r\n\t}", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public void savingPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n\n //tao doi tuong editer\n SharedPreferences.Editor editor = sharedPreferences.edit();\n String user = txtUserName.getText().toString();\n String pass = txtPassWord.getText().toString();\n\n boolean bchk = chkSave.isChecked();\n\n\n if(!bchk)\n {\n //xoa du lieu luu truoc do\n editor.clear();\n }\n else\n {\n editor.putString(\"user\",user);\n editor.putString(\"pass\",pass);\n editor.putBoolean(\"checked\",bchk);\n }\n\n editor.commit();\n\n\n }", "private void setPreferences(String sw, boolean checked) {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(sw,checked);\n editor.apply();\n\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "public void saveAllNot() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(SW_ALLNOT, allNotifications.isChecked());\n editor.commit();\n }", "public void saveGroups() {\n String listOfCodes = \"\";\n for (Pair<String, Group> groupPair : savedGroups) {\n listOfCodes += \",\" + groupPair.first + \"|\" + groupPair.second.getCode();\n }\n prefs.setString(\"listOfCode\", listOfCodes);\n }", "private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }", "private void saveValues() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n // If the field is disabled, add the DEACTIVATED marker to the value of the field\n if (e.getKey().isEnabled())\n Pref.put(this, e.getValue(), e.getKey().getText().toString());\n else\n Pref.put(this, e.getValue(), Data.DEACTIVATED_MARKER + e.getKey().getText().toString());\n }\n\n }", "public void mo16912a(String str, Set<String> set) {\n try {\n this.f9119b.edit().putStringSet(str, set).apply();\n } catch (Throwable unused) {\n }\n }", "private void saveJSON(String myList, String saveFile, ArrayList<JSONObject> arr) {\n SharedPreferences sharedPreferences = getSharedPreferences(saveFile, MODE_PRIVATE);\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n Gson gson = new Gson();\n String typeList = gson.toJson(arr);\n prefEditor.putString( myList, typeList );\n System.out.println(\"saveJSON myList = \" + myList);\n prefEditor.apply();\n }", "public void storeChoicePrefs(ResultDetail restaurant) {\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(restaurant);\n editor.putString(RESTAURANTS, json);\n //close the file\n editor.apply();\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public AppPreferences set(@NonNull String name, Set<String> value) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n SharedPreferences.Editor prefsEditor = prefs.edit();\n prefsEditor.putStringSet(name, value);\n prefsEditor.apply(); // or commit();\n return this;\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public static void UpdateTripList(Context context, Trip trip, int pos){\n\n\n ArrayList<Trip> allTrips = getTripList(context);\n allTrips.set(pos, trip);\n\n String tripsArray = new Gson().toJson(allTrips);\n\n SharedPreferences sharedPreferences = context.getSharedPreferences(context.getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(context.getString(R.string.trips_array), tripsArray);\n editor.apply();\n System.out.println(tripsArray);\n\n\n }", "private static void setPersistedOSMFilesFromSharedPreferences() {\n Set<String> sharedPrefSet = sharedPreferences.getStringSet(PERSISTED_OSM_FILES, loadedOSMFiles);\n persistedOSMFiles = new HashSet<>();\n for (String path : sharedPrefSet) {\n if ((new File(path).exists())) {\n persistedOSMFiles.add(path);\n }\n }\n updateSharedPreferences();\n }", "public void UniversitySelected(View view) {\n\n SharedPreferences storeduniversity = getSharedPreferences(\"universityfile\",Activity.MODE_PRIVATE);\n SharedPreferences.Editor editor=storeduniversity.edit();\n\n EditText editText = (EditText) findViewById(R.id.enterDescription);\n String uni=editText.getText().toString();\n\n editor.putString(\"university\",uni);\n editor.apply();\n\n\n \n\n\n Intent intent = new Intent(this, ClassAdder.class);\n //String message = String.valueOf(id.UniversitySelect);\n //intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }", "public void saveArrayList(ArrayList<String> list, String key) {\n SharedPreferences preferences = getSharedPreferences(\"itemlist\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(list);\n editor.putString(key, json);\n editor.apply();\n }", "public void shareData(){\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n //now get Editor\n SharedPreferences.Editor editor = sharedPref.edit();\n //put your value\n editor.putInt(\"score3\", points);\n\n //commits your edits\n editor.commit();\n }", "@Override\n public void onClick(View view) {\n String newShopName = etNewname.getText().toString();\n\n\n if (newShopName.isEmpty())\n {\n\n Toast.makeText(getActivity(), \"Please enter a shop name\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.d(TAG, \"Set up the new value for LatestShop in SharedPreferences\");\n Log.d(TAG, \"No need to save or delete anything but need to add to FullShopsList\");\n\n SharedPreferences.Editor myEditor = myPreferences.edit();\n\n currentShop = myPreferences.getString(\"LatestShopList\", \"Default\") ;\n Log.d(TAG, \"Changing currentShop from \" + currentShop + \"to \" + newShopName);\n myEditor.putString(\"LatestShopList\", newShopName);\n\n\n\n\n List<ShopItem> newListOfData = new ArrayList<ShopItem>();\n List<String> shopsHistoryList = new ArrayList<String>();\n shopsHistoryList.add(currentShop);\n Set<String> set = new HashSet<String>();\n Set<String> getset = new HashSet<String>();\n set.addAll(shopsHistoryList);\n\n // add the old shop to the FullShopsList\n\n\n\n if (myPreferences.contains(\"FullShopsList\"))\n {\n Log.d(TAG, \"In newShopFragment get the current set stored for FullShopsList\");\n getset = myPreferences.getStringSet(\"FullShopsList\", set) ;\n Log.d(TAG, \"In newShopFragment saving the old shop to the Shops History = \" + currentShop);\n ArrayList<String> shopList = new ArrayList<>();\n shopList.addAll(getset);\n\n Log.d(TAG, \"In newShopFragment - the current History of shops is :-\");\n for(String s: shopList)\n {\n Log.d(TAG, \"Shop History Item - \" + s);\n\n }\n\n\n shopList.add(currentShop);\n set.clear();\n set.addAll(shopList);\n myEditor.putStringSet(\"FullShopsList\", set);\n myEditor.commit();\n\n\n\n }\n else\n {\n // history does not exist\n myEditor.putStringSet(\"FullShopsList\", set);\n //currentShop = \"Default\";\n Log.d(TAG, \"In saveTheNewShopData - Current shop is not in myPreferences so creating FullShopsList \");\n myEditor.commit();\n }\n\n\n\n\n Intent listActivityIntent = new Intent(getActivity(), ListActivity.class);\n listActivityIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(listActivityIntent);\n\n\n }\n\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n /* I'm using SharedPreferences as a simple way to store key value sets\n */\n SharedPreferences sharedPref = getActivity().getSharedPreferences(\"mesprefs\", Context.MODE_PRIVATE);\n final SharedPreferences.Editor editor = sharedPref.edit();\n\n\n // Set the dialog title\n builder.setTitle(\"My Preferences\")\n // Specify the list array, the items to be selected by default (null for none),\n // and the listener through which to receive callbacks when items are selected\n .setMultiChoiceItems(R.array.prefs_array, null,\n new DialogInterface.OnMultiChoiceClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which,\n boolean isChecked) {\n if (isChecked) {\n // If the user checked the item, add it to the selected items\n mSelectedItems.add(which);\n } else if (mSelectedItems.contains(which)) {\n // Else, if the item is already in the array, remove it\n mSelectedItems.remove(Integer.valueOf(which));\n }\n }\n })\n // Set the action buttons\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK, so save the mSelectedItems results somewhere\n // or return them to the component that opened the dialo\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n\n\n\n return builder.create();\n\n }", "public void shared() {\n\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n String username = userstring;\n\n SharedPreferences sharedlog = getSharedPreferences(\"usernamelast\" , MODE_PRIVATE);\n SharedPreferences.Editor editorlogin = sharedlog.edit();\n editorlogin.putString(\"usernamelast\", username);\n editorlogin.apply();\n\n SharedPreferences sharedPref = getSharedPreferences(\"email\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"email\", Email);\n editor.apply();\n //Los estados los podemos setear en la siguiente actividad\n SharedPreferences sharedPref2 = getSharedPreferences(\"password\", MODE_PRIVATE);\n SharedPreferences.Editor editor2 = sharedPref2.edit();\n editor2.putString(\"password\", Password);\n editor2.apply();\n\n\n }", "private void currentStateSaveToSharedPref() {\n sharedPreferences = getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"nameOfActiveChallenge\", nameOfCurrentChallenge);\n editor.putInt(\"key1OfActiveChallenge\", key1OfActiveChallenge);\n editor.putString(\"dateOfLastEdit\", dateOfLastEdit);\n editor.putFloat(\"goal\", goal);\n editor.putFloat(\"carry\", carry);\n editor.putInt(\"challengeDaysRunning\", challengeDaysRunning);\n editor.commit();\n }", "private void toggleMultiple(final Set<Long> selectedSet, final MultiToggleHelper helper) {\n final Cursor c = mListAdapter.getCursor();\n if (c == null || c.isClosed()) {\n return;\n }\n\n final HashMap<Long, Boolean> setValues = Maps.newHashMap();\n boolean allWereSet = true;\n\n c.moveToPosition(-1);\n while (c.moveToNext()) {\n long id = c.getInt(MessagesAdapter.COLUMN_ID);\n if (selectedSet.contains(id)) {\n boolean value = helper.getField(c);\n setValues.put(id, value);\n allWereSet = allWereSet && value;\n }\n }\n\n if (!setValues.isEmpty()) {\n final boolean newValue = !allWereSet;\n c.moveToPosition(-1);\n // TODO: we should probably put up a dialog or some other progress indicator for this.\n EmailAsyncTask.runAsyncParallel(new Runnable() {\n @Override\n public void run() {\n for (long id : setValues.keySet()) {\n if (setValues.get(id) != newValue) {\n helper.setField(id, newValue);\n }\n }\n }});\n }\n }", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "public Set<Preference> toSet() {\n assert CollectionUtil.elementsAreUnique(internalList);\n return new HashSet<>(internalList);\n }", "public void saveDataToSharedPreference(View view) {\n email = emailEditText.getText().toString();\n name = nameEditText.getText().toString();\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(\"name\",name);\n editor.putString(\"email\",email);\n editor.apply();\n\n Toast.makeText(context, \"Data saved successfully into SharedPreferences!\", Toast.LENGTH_SHORT).show();\n clearText();\n }", "public static void setPreferences (ArrayList<String> ipreferences){\n\t\t\tpreferences = ipreferences;\n\t}", "public void setStocksAtHome(List<String> stockList){\n HashSet<String> hashSet = new HashSet<String>(stockList);\n List<String> stocksAtHome = getStocksAtHome();\n hashSet.addAll(stocksAtHome);\n\n //To proceed with easy storage\n stockList = new ArrayList<String>(hashSet);\n\n Gson gson = new GsonBuilder().create();\n String gsonStockList = gson.toJson(stockList);\n editor.putString(STOCK_HOME_SET, gsonStockList);\n editor.commit();\n }", "public void setActive(String key, int value){\r\n SharedPreferences sp = this.getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "SharedPreferences mo117960a();", "private void toggleFavorite(Set<Long> selectedSet) {\n toggleMultiple(selectedSet, new MultiToggleHelper() {\n\n @Override\n public boolean getField(Cursor c) {\n return c.getInt(MessagesAdapter.COLUMN_FAVORITE) != 0;\n }\n\n @Override\n public void setField(long messageId, boolean newValue) {\n mController.setMessageFavoriteSync(messageId, newValue);\n }\n });\n }", "public void update_storage( ) {\n SharedPreferences sp_file = getPreferences(Context.MODE_PRIVATE); //make shared preferences object\n SharedPreferences.Editor editor = sp_file.edit(); //make editor object\n editor.putInt(\"alarm_set\", alarm_set);\n editor.apply();\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "public static ArrayList getArrayVal( Context dan)\n {\n SharedPreferences WordSearchGetPrefs = dan.getSharedPreferences(\"dbArrayValues\",Activity.MODE_PRIVATE);\n Set<String> tempSet = new HashSet<String>();\n tempSet = WordSearchGetPrefs.getStringSet(\"myArray\", tempSet);\n return new ArrayList<String>(tempSet);\n }", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n String aaString = sharedPreferences.getString(getString(R.string.pref_antalAktier_key), getString(R.string.pref_antalAktier_default));\n// float aaFloat = Float.parseFloat(aaString);\n editTextAntalAktier.setText(aaString);\n\n String kk = sharedPreferences.getString(getString(R.string.pref_koebskurs_key), getString(R.string.pref_koebskurs__default));\n editTextKoebskurs.setText(kk);\n\n String k = sharedPreferences.getString(getString(R.string.pref_kurtage_key), getString(R.string.pref_kurtage_default));\n editTextKurtage.setText(k);\n\n// float minSize = Float.parseFloat(sharedPreferences.getString(getString(R.string.pref_size_key),\n// getString(R.string.pref_size_default)));\n// mVisualizerView.setMinSizeScale(minSize);\n\n // Register the listener\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "public void restoringPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n //lay gia tri checkbook, k co mac dinh la false\n boolean bchk = sharedPreferences.getBoolean(\"checked\",false);\n if(bchk)\n {\n //lay user, pass, neu k co mac dinh gia tri la rong\n String user = sharedPreferences.getString(\"user\",\"\");\n String pass = sharedPreferences.getString(\"pass\",\"\");\n txtUserName.setText(\"user\");\n txtPassWord.setText(\"pass\");\n }\n\n chkSave.setChecked(bchk);\n }", "public void onClicked() {\n mypreference = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor editorpref = mypreference.edit();\n Gson gson = new Gson();\n //retrieve the stored ArrayList of fovorite movies as json format\n String storedJsonList = mypreference.getString(\"storedjsonList\", \"\");\n // get the type of this json format\n Type type = new TypeToken<ArrayList<ItemsClass>>() {\n }.getType();\n ArrayList<ItemsClass> movieArrayList = new ArrayList<ItemsClass>();\n //create array list of the retrieved json\n // store it in my Arraylist\n movieArrayList = gson.fromJson(storedJsonList, type);\n\n// favo.setSelected(va[0]);\n ischecked = va[0];\n if (va[0] == true) {\n\n if (movieArrayList == null) {\n\n favoImageButton.setImageResource(R.drawable.liked);\n\n String loadedPosterString = encodeTobase64(theposterImage);\n\n\n serItems.add(new ItemsClass(loadedPosterString, title, releaseDate, overview, rate, id));\n\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id + \"and you list size is\" + serItems.size(), Toast.LENGTH_SHORT).show();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n\n } else if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n int detectId = serItems.get(i).getId();\n if (serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you already have this movie in favorite list \", Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.liked);\n break;\n } else if (serItems.size() > 0 && detectId != id && i < serItems.size() - 1) {\n\n continue;\n\n } else if (detectId != id && i == serItems.size() - 1 && i > serItems.size() - 2) {\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n serItems.add(new ItemsClass(storedPoster, title, releaseDate, overview, rate, id));\n serItems.size();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n break;\n }\n\n }\n }\n\n } else {\n if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n\n int detectId = serItems.get(i).getId();\n if (i < serItems.size() && serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you have deleted this movie this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n mypreference = getContext().getSharedPreferences(\"moviepref\", Context.MODE_PRIVATE);\n editorpref.putString(\"storedPoster\", \"\");\n editorpref.putString(\"storedTitle\", \"\");\n editorpref.putString(\"storedOverview\", \"\");\n editorpref.putString(\"storedDate\", \"\");\n editorpref.putFloat(\"storedrating\", (float) 0.0);\n editorpref.commit();\n va[0] = !va[0];\n//\n break;\n } else if (detectId != id && i < serItems.size() - 1) {\n continue;\n } else if (detectId == id && i == serItems.size() - 1) {\n Toast.makeText(getContext(), \" actually you don't have this movie in your favorite list \", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }", "private void saveClubList() {\n SharedPreferences sharedPreferences = getSharedPreferences(\"Shared Preferences\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(clubList);\n editor.putString(\"Club List\", json);\n editor.apply();\n }", "private void save(){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(downloadedBooks);\n editor.putString( LISTS_DOWNLOADED, json);\n json = gson.toJson(progress);\n editor.putString( LISTS_PROGRESS, json);\n editor.apply();\n }", "private void loadPreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n\n int entreeIndex = sp.getInt(\"entreeIndex\", 0);\n int drinkIndex = sp.getInt(\"drinkIndex\", 0);\n int dessertIndex = sp.getInt(\"dessertIndex\", 0);\n\n // Setting inputs from SharedPreferences\n spEntree.setSelection(entreeIndex);\n spDrink.setSelection(drinkIndex);\n spDessert.setSelection(dessertIndex);\n\n edtTxtEntreePrice.setText(alEntreePrices.get(entreeIndex));\n edtTxtDrinkPrice.setText(alDrinkPrices.get(drinkIndex));\n edtTxtDessertPrice.setText(alDessertPrices.get(dessertIndex));\n }", "private void storePotList(){\n String tempName;\n int tempWeight;\n SharedPreferences preferences = getSharedPreferences(SHAREDPREF_SET, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n int sizeOfPotList = potList.countPots();\n editor.putInt(SHAREDPREF_ITEM_POTLIST_SIZE, sizeOfPotList);\n for(int i = 0; i < potList.countPots();i++){\n tempWeight = (potList.getPot(i).getWeightInG());\n tempName = (potList.getPot(i).getName());\n editor.putString(SHAREDPREF_ITEM_POTLIST_NAME+i, tempName);\n editor.putInt(SHAREDPREF_ITEM_POTLIST_WEIGHT+i, tempWeight);\n }\n editor.commit();\n }", "private void resetSharedPreferences(){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(getString(R.string.pref_genre_key), getString(R.string.pref_genre_any_value));\n editor.putString(getString(R.string.pref_earliest_year_key), getString(R.string.pref_earliest_year_default));\n editor.putString(getString(R.string.pref_latest_year_key), getString(R.string.pref_latest_year_default));\n // Commit the edits\n editor.apply();\n }", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "@Override\n public void onPause() {\n SharedPreferences.Editor editor = savedValues.edit();\n editor.putInt(\"num1\", num1);\n editor.putInt(\"num2\", num2);\n editor.commit();\n\n super.onPause();\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n sharedPrefManager.setHelathAPI(\"Questions\", \"\");\n sharedPrefManager.setHelathAPI(\"LessionsName\", \"\");\n sharedPrefManager.setHelathAPI(\"LessionsName\", lessionName);\n sharedPrefManager.setHelathAPI(\"Questions\", AngelPitchUtil.toJson(questionsArrayList));\n\n Intent Quiz = new Intent(App.getContext(), QuizActivity.class);\n Quiz.putExtra(\"lessionId\", lessionId);\n Quiz.putExtra(\"topicId\", topicId);\n myServerData.setTestState(\"inProgress\");\n startActivity(Quiz);\n\n /*for (int i = 0; i < questionsArrayList.size(); i++) {\n showQuestionsDialog(getContext(), questionsArrayList.get(i));\n\n }\n*/\n }", "private void getPrefs(){\n SharedPreferences sharedPreferences = getSharedPreferences(LIST_TAG, MODE_PRIVATE);\n Gson gson = new Gson();\n String json = sharedPreferences.getString(PREFS_TAG, null);\n Type type = new TypeToken<ArrayList<String[]>>() {}.getType();\n dataPref = gson.fromJson(json, type);\n\n if(dataPref == null){\n LoadFromCSV();\n }\n else {\n Log.d(\"getPrefs\", \"was called \");\n itemArrAdapt.setList(dataPref);\n }\n\n }", "private void LoadSavedPreferences() {\n\t\tString value;\n\t\tSharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\t// tab 3 ************************************************\n\t\tvalue = sharedPreferences.getString(\"tempSzad\", \"22\");\n\t\tettempSzad_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempPmaxdop\", \"70\");\n\t\tettempPmaxdop_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempZmaxdop\", \"22\");\n\t\tettempZmaxdop_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempPumpaON\", \"50\");\n\t\tettempPumpaON_.setText(value);\n\n\t\t// tab 1 ************************************************\n\t\tvalue = sharedPreferences.getString(\"tv1\", \"20.20\");\n\t\ttvS1.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tv2\", \"44.22\");\n\t\ttvS2.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tv3\", \"19.22\");\n\t\ttvS3.setText(value);\n\t}", "@Override\n public void onBackPressed() {\n spSubject = getSharedPreferences(\"SUBJECT_LIST\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = spSubject.edit();\n editor.clear();\n editor.commit();\n\n for(int i=0; i< dpItems.size(); i++)\n editor.putString(\"subject_\"+i , dpItems.get(i));\n editor.putInt(\"subject_size\", dpItems.size());\n editor.apply();\n\n super.onBackPressed();\n\n }", "private ArrayList<Boolean> createBoolArrayList(String notificationPreferences){\n String[] genres = getResources().getStringArray(R.array.genre);\n ArrayList<Boolean> isCheckedArray = new ArrayList<>();\n String[] arrayNotificationPref = notificationPreferences.split(\",\");\n\n for (int i = 0; i < genres.length; i++){\n isCheckedArray.add(false);\n for (String curNotification: arrayNotificationPref) {\n if (genres[i].equals(curNotification)){\n isCheckedArray.set(i,true);\n }\n }\n }\n\n return isCheckedArray;\n }", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }", "private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public void question4(List<String> input){\n Set<String> s = new HashSet<>(input);\n }", "public void setBoton() {\n SharedPreferences preferences = getSharedPreferences(STRING_PREFERENCES,MODE_PRIVATE);\n preferences.edit().putBoolean(PREFERENCE_ESTADO_BUTTON_SESION,checkBox.isChecked()).apply();\n\n }", "public void salvarDadosNaTela(){\n SharedPreferences sharedPreferences = this.getActivity().getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(TVHORAUM, tvHoraUm.getText().toString());\n editor.putString(TVHORADOIS, tvHoraDois.getText().toString());\n editor.putString(TVHORATRES, tvHoraTres.getText().toString());\n editor.putString(TVHORAQUATRO, tvHoraQuatro.getText().toString());\n\n editor.apply();\n\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "private void loadSettings(){\n SharedPreferences sharedPreferences = getActivity().getSharedPreferences(SHARED_PREF, Context.MODE_PRIVATE);\n notificationSwtich = sharedPreferences.getBoolean(SWITCH, false);\n reminderOnOff.setChecked(notificationSwtich);\n }", "public void saveFavorites(Context context, List<ClassDataGejala> favorites) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(GEJALA,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(favorites);\n\n editor.putString(GEJALA, jsonFavorites);\n\n editor.commit();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n sparseBooleanArray = listview.getCheckedItemPositions();\n\n ValueHolder = \"\" ;\n\n int i = 0 ;\n\n while (i < sparseBooleanArray.size()) {\n\n if (sparseBooleanArray.valueAt(i)) {\n\n ValueHolder += goodlist [ sparseBooleanArray.keyAt(i) ] + \",\";\n }\n\n i++ ;\n }\n\n ValueHolder = ValueHolder.replaceAll(\"(,)*$\", \"\");\n\n Toast.makeText(listforcar.this, \"ListView Selected Values = \" + ValueHolder, Toast.LENGTH_LONG).show();\n\n }", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public void set(boolean[] abol);", "private boolean[] SetSelected(boolean[] selected, JList list) {\n\t\tint[] indices = list.getSelectedIndices();\n\t\tfor (int i = 0; i < selected.length; i++) {\n\t\t\tselected[i] = false;\n\t\t}\n\t\tfor (int i = 0; i < indices.length; i++) {\n\t\t\tselected[indices[i]] = true;\n\t\t}\n\t\treturn selected;\n\t}", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t str1=editText1.getText().toString();\n\t\t\t\t\tSharedPreferences preferences=getSharedPreferences(\"user\",Context.MODE_PRIVATE);\n\t\t\t Editor editor=preferences.edit();\n\t\t\t editor.putString(\"str1\", str1);\n\t\t\t editor.commit();\n\t\t\t \n\t\t\t}", "public void saveSettings(View v) {\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE); // get shared preferences\n SharedPreferences.Editor editor = sharedPref.edit();\n int seconds_rec = Integer.parseInt(time_recording.getText().toString());\n int notif_occ = Integer.parseInt(time_occurance.getText().toString());\n\n editor.putInt(getString(R.string.time_recording_seconds), seconds_rec); // save values to a sp\n editor.putInt(getString(R.string.time_notification_minutes), notif_occ);\n editor.commit(); // commit the differences\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "public void onClick(DialogInterface dialog,int id) {\n collections.remove(position);\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"TestHashMap\", 0);\n SharedPreferences.Editor prefEditor = pref.edit();\n JSONArray result= new JSONArray(collections);\n prefEditor.putString(\"Time\", result.toString());\n prefEditor.commit();\n adapter.notifyDataSetChanged();\n Toast.makeText(OnOffTime.this, \"Data has been Deleted.\", Toast.LENGTH_SHORT).show();\n\n }", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "@Override\n public void onClick(View v) {\n saveRoundSetting();\n saveMembers();\n sharedpreferencesAddname= getSharedPreferences(\"AddFriend\" , MODE_PRIVATE);\n final SharedPreferences.Editor editorFR = sharedpreferencesAddname.edit();\n for(int i =0 ; i<3;i++)\n {\n editorFR.putInt(\"friendid\"+i , -1);\n editorFR.commit();\n }\n\n\n Intent NextScreen = new Intent(RoundSetting.this, AddFriends.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n saveRoundSetting();\n saveMembers();\n sharedpreferencesAddname= getSharedPreferences(\"AddFriend\" , MODE_PRIVATE);\n final SharedPreferences.Editor editorFR = sharedpreferencesAddname.edit();\n for(int i =0 ; i<3;i++)\n {\n editorFR.putInt(\"friendid\"+i , -1);\n editorFR.commit();\n }\n\n\n Intent NextScreen = new Intent(RoundSetting.this, AddFriends.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onPositive(MaterialDialog materialDialog) {\n sharedPrefs.edit()\n .remove(pref.key)\n .putString(pref.key, \"\" + values[numberPicker.getValue()])\n .apply();\n pref.pref.setSummary(values[numberPicker.getValue()]);\n materialDialog.dismiss();\n }", "@Override\n public boolean onSelection(MaterialDialog materialDialog, View view, int which, CharSequence text) {\n sharedPrefs.edit()\n .remove(badgePosition.getKey())\n .putString(badgePosition.getKey(), \"\" + getResources().getStringArray(R.array.notificationbadge_position_values)[which])\n .apply();\n badgePosition.setSummary(text);\n return true;\n }", "public Set<String> getStringSet(@NonNull String name, Set<String> defaultValue) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n return prefs == null ? defaultValue : prefs.getStringSet(name, defaultValue);\n }", "void updatePreferences(List<IPreference> prefs);", "private void savePreferenceData(String role){\n if (getIntent()!=null){\n SharedPreferences preferences = getSharedPreferences(detailPreference, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(preferenceKey, role);\n editor.apply();\n }\n }", "@Override\n public void onClick(View v) {\n SharedPreferences prefs1 = getSharedPreferences(\"configuracoes\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs1.edit();\n\n RadioGroup formatoGroup = (RadioGroup) findViewById(R.id.formatoGroup);\n switch (formatoGroup.getCheckedRadioButtonId()) {\n case R.id.grauDecimal:\n //armazena os valores\n editor.putString(\"grau\", \"Decimal\");\n break;\n case R.id.grauMinuto:\n editor.putString(\"grau\", \"Minuto\");\n break;\n case R.id.grauSegundo:\n editor.putString(\"grau\", \"Segundo\");\n break;\n }\n\n\n RadioGroup unidadeGroup = (RadioGroup) findViewById(R.id.unidadeGroup);\n switch (unidadeGroup.getCheckedRadioButtonId()) {\n case R.id.km:\n //armazena os valores\n editor.putString(\"unidade\", \"km\");\n break;\n case R.id.mph:\n editor.putString(\"unidade\", \"mph\");\n break;\n }\n\n RadioGroup orientacaoGroup = (RadioGroup) findViewById(R.id.orientacaoGroup);\n switch (orientacaoGroup.getCheckedRadioButtonId()) {\n case R.id.nenhuma:\n //armazena os valores\n editor.putString(\"orientacao\", \"Nenhuma\");\n break;\n case R.id.north:\n editor.putString(\"orientacao\", \"North\");\n break;\n case R.id.course:\n editor.putString(\"orientacao\", \"Course\");\n break;\n }\n\n RadioGroup tipoGroup = (RadioGroup) findViewById(R.id.tipoGroup);\n switch (tipoGroup.getCheckedRadioButtonId()) {\n\n case R.id.vetorial:\n //armazena os valores\n editor.putString(\"tipo\", \"Vetorial\");\n break;\n case R.id.imagem:\n editor.putString(\"tipo\", \"Imagem\");\n break;\n\n }\n\n\n SharedPreferences prefs = getSharedPreferences(\"configuracoes\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor2 = prefs.edit();\n if(escolha.isChecked())\n {\n editor2.putString(\"ligado\", \"Sim\");\n\n }else{\n\n editor2.putString(\"ligado\", \"Nao\");\n\n }\n //Amazena os valores\n editor2.apply();\n editor.apply();\n Toast toast = Toast.makeText(getApplicationContext(), \"Configurações salvas!\", Toast.LENGTH_SHORT);\n toast.show();\n Rediceriona();\n\n }", "@Override\n public void onClick(View v) {\n SharedPreferences currShared = getContext().getSharedPreferences(MainActivity.CURR_PREFS, Context.MODE_PRIVATE);\n SharedPreferences.Editor currEditor = currShared.edit();\n currEditor.clear();\n currEditor.apply();\n Toast.makeText(getContext(), \"We should build a post trip page\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getContext(), MainActivity.class));\n\n }", "private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }", "public void saveSelectedGroup(Elem group) {\n if (prefs == null) return;\n if (group == null) return;\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(SettingsActivity.GROUP_ID_PREF, group.id);\n editor.putString(SettingsActivity.GROUP_NAME_PREF, group.name);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) editor.apply();\n else editor.commit();\n }", "@Override\n \tpublic void onClick(DialogInterface dialog, int which) {\n myPref.setSummary(items[which]);\n switch(which)\n {\n case 0:\n editor.putInt(\"Theme\",R.style.AppThemeRed);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 1:\n editor.putInt(\"Theme\",R.style.AppThemeBlue);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 2:\n editor.putInt(\"Theme\",R.style.AppThemePurple);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 3:\n editor.putInt(\"Theme\",R.style.AppThemeGreen);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 4:\n editor.putInt(\"Theme\",R.style.AppThemeOrange);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 5:\n editor.putInt(\"Theme\",R.style.AppThemeGrey);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n }\n\n \t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n for (int i = 0; i < p.length; i++) {\n if (pChecked[i]) { // if a name is selected\n\n selectedPlayers.remove(p[i]); // remove the player from the list of selected players\n players.remove(p[i]); // remove it from the list of names to save\n savedNames = players.toString(); // convert the list of names to a single string that will be saved later\n savedNames = savedNames.replaceAll(\"\\\\[\", \"\").replaceAll(\"\\\\]\", \"\"); // the new string will include the list's square brackets. This removes them.\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"savedNames\", savedNames); // save the new list of players' names\n editor.commit();\n pChecked[i] = false; // untick the name\n }\n }\n }", "void setSavedEntries(Collection<String> savedEntries) {\n this.savedEntries = Collections.unmodifiableCollection(savedEntries);\n }", "public HashSet<String> conjProdutos(){\n return (HashSet)produtosComprados.values().stream().collect(Collectors.toSet());\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n\n return true;\n }\n if (id == R.id.action_fav) {\n Intent intent = new Intent(getApplicationContext(),ThirdActivity.class);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_addfav) {\n\n int i = 0;\n Map<String, ?> map = sharedPreferences.getAll();\n for(Map.Entry mEntry : map.entrySet()){\n if(Pattern.matches(\"fav \"+titre.getText(), mEntry.getKey()+\"\")){\n Toast.makeText(this,titre.getText()+\" removed from favorite\",Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .remove(mEntry.getKey()+\"\")\n .remove(titre.getText()+\" id\")\n .apply();\n i=1;\n }\n }\n\n if(i==0) {\n Toast.makeText(this, titre.getText() + \" added to favorite\", Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .putString(\"fav \" + titre.getText(), titre.getText() + \"\")\n .putInt(titre.getText() + \" id\", idAnime)\n .apply();\n }\n i=0;\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void bytteAntallOppgaver(int antallOpg){\n SharedPreferences.Editor editor = deltePreferanser.edit();\n editor.putInt(\"AntallOppgaver\", antallOpg);\n editor.commit();\n }", "public static void save(String s, boolean flag){\n SharedPreferences prefs = cont.getSharedPreferences(\"PAFF_SETTINGS\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(s,flag);\n editor.commit();\n }", "public void putStrings(HashMap<String,String> mHashMap){\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n\n for(Map.Entry m: mHashMap.entrySet()){\n\n editor.putString(m.getKey().toString(), m.getValue().toString());\n }\n\n editor.apply();\n }" ]
[ "0.71887684", "0.6430479", "0.6378629", "0.6097538", "0.6082793", "0.5980519", "0.59583193", "0.59320384", "0.5886672", "0.5881308", "0.5740285", "0.57278395", "0.5718536", "0.570034", "0.56608903", "0.56554186", "0.5612338", "0.55823654", "0.5550388", "0.5547222", "0.55470604", "0.5534936", "0.5530873", "0.55297", "0.55161554", "0.5513973", "0.55070585", "0.54674345", "0.5450316", "0.5444487", "0.542342", "0.5388258", "0.5369689", "0.5368322", "0.5367928", "0.53668296", "0.53662765", "0.5347561", "0.5347105", "0.5344102", "0.5321275", "0.53208226", "0.5308296", "0.5307211", "0.530668", "0.528995", "0.5289736", "0.5282853", "0.52813435", "0.52754027", "0.52509624", "0.5243435", "0.5226647", "0.52256966", "0.5216246", "0.51904047", "0.5189858", "0.51824236", "0.51733834", "0.515727", "0.515267", "0.5152315", "0.51285464", "0.5112375", "0.51110816", "0.51009834", "0.50945085", "0.5083474", "0.50748813", "0.50716335", "0.5064836", "0.50637627", "0.50617576", "0.5058784", "0.50575596", "0.504273", "0.50403816", "0.5036084", "0.5034699", "0.5027869", "0.50060827", "0.5001217", "0.499723", "0.499723", "0.4994422", "0.499315", "0.49918798", "0.49889994", "0.49883348", "0.4985427", "0.4985345", "0.49839175", "0.49815562", "0.49776155", "0.4977229", "0.49524838", "0.49511865", "0.49509174", "0.49492073", "0.49467805", "0.49432623" ]
0.0
-1
editor = sharedPreferences.edit(); set.addAll(alA); editor.putStringSet("selected",set); editor.apply();
@Override public void onClick(View v) { j=0; dataBaseClass.updateData1(b2.getText().toString(),q.getText().toString()); Intent i=new Intent(Question.this,Congratulation.class); // i.putExtra("json",al); // i.putExtra("slectedAnswer",alA); i.putExtra("Subject",subject); i.putExtra("score",String.valueOf(count)); startActivity(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void storeDataForCashePrefrenceArray(SharedPreferences spinnerPrefs, Set<String> arrayOFSpinnersValue){//for new version\n SharedPreferences.Editor prefsEditor = spinnerPrefs.edit();\n prefsEditor.putStringSet(\"inputspinner_prefrance_set_for_cashe\",arrayOFSpinnersValue);\n prefsEditor.commit();\n }", "public void updateRegions(SharedPreferences sharedPreferences){\r\n\t regionsSet = sharedPreferences.getStringSet(MainActivity.REGIONS, null);\r\n }", "private void saveSharedPrefs(String a, boolean b) {\n SharedPreferences.Editor editor = sp.edit();\n if (b) editor.putString(\"searchField\", a);\n else editor.putString(\"ingredientsField\", a);\n editor.commit();\n }", "public void saveSearchedCityNames(){\n SharedPreferences.Editor editor = getSharedPreferences(SharedPrefKeys.HISTORY, MODE_PRIVATE).edit();\n Set<String> cityNamesSet = new HashSet<>();\n cityNamesSet.addAll(mSearchedCities);\n editor.putStringSet(\"SearchedCities\", cityNamesSet);\n editor.apply();\n }", "private void saveOption() {\n SharedPreferences filterSetting = getSharedPreferences(\"filterSetting\",0);\n SharedPreferences.Editor editor = filterSetting.edit();\n editor.putBoolean(\"myMostRecent\",myMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"myDisplayAll\",myDisplayAllCheckbox.isChecked());\n editor.putBoolean(\"foMostRecent\",foMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"foDisplayAll\",foDisplayAllCheckbox.isChecked());\n editor.putString(\"myReason\",myReasonEditText.getText().toString());\n editor.putString(\"foReason\",foReasonEditText.getText().toString());\n editor.putInt(\"mySpinner\",myEmotionalStateSpinner.getSelectedItemPosition());\n editor.putInt(\"foSpinner\",foEmotionalStateSpinner.getSelectedItemPosition());\n\n editor.commit();\n }", "private void m29053a(MySharedPreferences bVar, SharedPreferences sharedPreferences) {\n if (bVar != null && sharedPreferences != null) {\n Editor edit = sharedPreferences.edit();\n if (edit != null) {\n edit.clear();\n for (Entry entry : bVar.getAll().entrySet()) {\n String str = (String) entry.getKey();\n Object value = entry.getValue();\n if (value instanceof String) {\n edit.putString(str, (String) value);\n } else if (value instanceof Integer) {\n edit.putInt(str, ((Integer) value).intValue());\n } else if (value instanceof Long) {\n edit.putLong(str, ((Long) value).longValue());\n } else if (value instanceof Float) {\n edit.putFloat(str, ((Float) value).floatValue());\n } else if (value instanceof Boolean) {\n edit.putBoolean(str, ((Boolean) value).booleanValue());\n }\n }\n edit.commit();\n }\n }\n }", "public AppPreferences set(@NonNull String name, Iterable<String> value) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n SharedPreferences.Editor prefsEditor = prefs.edit();\n Set<String> set = new LinkedHashSet<>();\n for (String s : value) {\n set.add(s);\n }\n prefsEditor.putStringSet(name, set);\n prefsEditor.apply(); // or commit();\n return this;\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }", "set.addAll(Arrays.asList(a));", "public void guardarModosTransporteSeleccionados( View view ){\r\n\t\tSet<String> modosTransporteSeleccionados = this.adapterListaModosTransporte.getItemsSeleccionados();\r\n\t\tSet<String> modosTransportePref = this.adapterListaModosTransporte.getItemsPreferencias();\r\n\t\tfor ( String modoTransporteSeleccionado : modosTransporteSeleccionados ){\r\n\t\t\tmodosTransportePref.add( modoTransporteSeleccionado );\r\n\t\t}\r\n\t\t\r\n\t\tSharedPreferences prefActuales = getSharedPreferences( \"com.example.conteos_preferences\", MODE_PRIVATE );\r\n\t\tEditor editor = prefActuales.edit();\r\n\t\teditor.remove( CLAVE_MODOS_TRANSPORTE );\t//(1)\r\n\t\teditor.apply();\t\t\t\t\t\t\t\t//(2)\r\n\t\teditor.putStringSet( CLAVE_MODOS_TRANSPORTE, modosTransportePref );\t//(3)\r\n\t\teditor.commit();\r\n\t\t//Toast.makeText( getApplicationContext(), \"Items Saved: \\n\" + Arrays.toString( modosTransportePref.toArray() ), Toast.LENGTH_LONG ).show();\t\t\r\n\t\t//Toast.makeText( getApplicationContext(), \"Items Restored from pref: \\n\" + Arrays.toString( prefActuales.getStringSet( CLAVE_MODOS_TRANSPORTE, null ).toArray() ), Toast.LENGTH_LONG ).show();\r\n\t\tfinish();\r\n\t}", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public void savingPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n\n //tao doi tuong editer\n SharedPreferences.Editor editor = sharedPreferences.edit();\n String user = txtUserName.getText().toString();\n String pass = txtPassWord.getText().toString();\n\n boolean bchk = chkSave.isChecked();\n\n\n if(!bchk)\n {\n //xoa du lieu luu truoc do\n editor.clear();\n }\n else\n {\n editor.putString(\"user\",user);\n editor.putString(\"pass\",pass);\n editor.putBoolean(\"checked\",bchk);\n }\n\n editor.commit();\n\n\n }", "private void setPreferences(String sw, boolean checked) {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(sw,checked);\n editor.apply();\n\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "public void saveAllNot() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(SW_ALLNOT, allNotifications.isChecked());\n editor.commit();\n }", "public void saveGroups() {\n String listOfCodes = \"\";\n for (Pair<String, Group> groupPair : savedGroups) {\n listOfCodes += \",\" + groupPair.first + \"|\" + groupPair.second.getCode();\n }\n prefs.setString(\"listOfCode\", listOfCodes);\n }", "private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }", "private void saveValues() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n // If the field is disabled, add the DEACTIVATED marker to the value of the field\n if (e.getKey().isEnabled())\n Pref.put(this, e.getValue(), e.getKey().getText().toString());\n else\n Pref.put(this, e.getValue(), Data.DEACTIVATED_MARKER + e.getKey().getText().toString());\n }\n\n }", "public void mo16912a(String str, Set<String> set) {\n try {\n this.f9119b.edit().putStringSet(str, set).apply();\n } catch (Throwable unused) {\n }\n }", "private void saveJSON(String myList, String saveFile, ArrayList<JSONObject> arr) {\n SharedPreferences sharedPreferences = getSharedPreferences(saveFile, MODE_PRIVATE);\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n Gson gson = new Gson();\n String typeList = gson.toJson(arr);\n prefEditor.putString( myList, typeList );\n System.out.println(\"saveJSON myList = \" + myList);\n prefEditor.apply();\n }", "public void storeChoicePrefs(ResultDetail restaurant) {\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(restaurant);\n editor.putString(RESTAURANTS, json);\n //close the file\n editor.apply();\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public AppPreferences set(@NonNull String name, Set<String> value) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n SharedPreferences.Editor prefsEditor = prefs.edit();\n prefsEditor.putStringSet(name, value);\n prefsEditor.apply(); // or commit();\n return this;\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public static void UpdateTripList(Context context, Trip trip, int pos){\n\n\n ArrayList<Trip> allTrips = getTripList(context);\n allTrips.set(pos, trip);\n\n String tripsArray = new Gson().toJson(allTrips);\n\n SharedPreferences sharedPreferences = context.getSharedPreferences(context.getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(context.getString(R.string.trips_array), tripsArray);\n editor.apply();\n System.out.println(tripsArray);\n\n\n }", "private static void setPersistedOSMFilesFromSharedPreferences() {\n Set<String> sharedPrefSet = sharedPreferences.getStringSet(PERSISTED_OSM_FILES, loadedOSMFiles);\n persistedOSMFiles = new HashSet<>();\n for (String path : sharedPrefSet) {\n if ((new File(path).exists())) {\n persistedOSMFiles.add(path);\n }\n }\n updateSharedPreferences();\n }", "public void UniversitySelected(View view) {\n\n SharedPreferences storeduniversity = getSharedPreferences(\"universityfile\",Activity.MODE_PRIVATE);\n SharedPreferences.Editor editor=storeduniversity.edit();\n\n EditText editText = (EditText) findViewById(R.id.enterDescription);\n String uni=editText.getText().toString();\n\n editor.putString(\"university\",uni);\n editor.apply();\n\n\n \n\n\n Intent intent = new Intent(this, ClassAdder.class);\n //String message = String.valueOf(id.UniversitySelect);\n //intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }", "public void saveArrayList(ArrayList<String> list, String key) {\n SharedPreferences preferences = getSharedPreferences(\"itemlist\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(list);\n editor.putString(key, json);\n editor.apply();\n }", "public void shareData(){\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n //now get Editor\n SharedPreferences.Editor editor = sharedPref.edit();\n //put your value\n editor.putInt(\"score3\", points);\n\n //commits your edits\n editor.commit();\n }", "@Override\n public void onClick(View view) {\n String newShopName = etNewname.getText().toString();\n\n\n if (newShopName.isEmpty())\n {\n\n Toast.makeText(getActivity(), \"Please enter a shop name\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.d(TAG, \"Set up the new value for LatestShop in SharedPreferences\");\n Log.d(TAG, \"No need to save or delete anything but need to add to FullShopsList\");\n\n SharedPreferences.Editor myEditor = myPreferences.edit();\n\n currentShop = myPreferences.getString(\"LatestShopList\", \"Default\") ;\n Log.d(TAG, \"Changing currentShop from \" + currentShop + \"to \" + newShopName);\n myEditor.putString(\"LatestShopList\", newShopName);\n\n\n\n\n List<ShopItem> newListOfData = new ArrayList<ShopItem>();\n List<String> shopsHistoryList = new ArrayList<String>();\n shopsHistoryList.add(currentShop);\n Set<String> set = new HashSet<String>();\n Set<String> getset = new HashSet<String>();\n set.addAll(shopsHistoryList);\n\n // add the old shop to the FullShopsList\n\n\n\n if (myPreferences.contains(\"FullShopsList\"))\n {\n Log.d(TAG, \"In newShopFragment get the current set stored for FullShopsList\");\n getset = myPreferences.getStringSet(\"FullShopsList\", set) ;\n Log.d(TAG, \"In newShopFragment saving the old shop to the Shops History = \" + currentShop);\n ArrayList<String> shopList = new ArrayList<>();\n shopList.addAll(getset);\n\n Log.d(TAG, \"In newShopFragment - the current History of shops is :-\");\n for(String s: shopList)\n {\n Log.d(TAG, \"Shop History Item - \" + s);\n\n }\n\n\n shopList.add(currentShop);\n set.clear();\n set.addAll(shopList);\n myEditor.putStringSet(\"FullShopsList\", set);\n myEditor.commit();\n\n\n\n }\n else\n {\n // history does not exist\n myEditor.putStringSet(\"FullShopsList\", set);\n //currentShop = \"Default\";\n Log.d(TAG, \"In saveTheNewShopData - Current shop is not in myPreferences so creating FullShopsList \");\n myEditor.commit();\n }\n\n\n\n\n Intent listActivityIntent = new Intent(getActivity(), ListActivity.class);\n listActivityIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(listActivityIntent);\n\n\n }\n\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n /* I'm using SharedPreferences as a simple way to store key value sets\n */\n SharedPreferences sharedPref = getActivity().getSharedPreferences(\"mesprefs\", Context.MODE_PRIVATE);\n final SharedPreferences.Editor editor = sharedPref.edit();\n\n\n // Set the dialog title\n builder.setTitle(\"My Preferences\")\n // Specify the list array, the items to be selected by default (null for none),\n // and the listener through which to receive callbacks when items are selected\n .setMultiChoiceItems(R.array.prefs_array, null,\n new DialogInterface.OnMultiChoiceClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which,\n boolean isChecked) {\n if (isChecked) {\n // If the user checked the item, add it to the selected items\n mSelectedItems.add(which);\n } else if (mSelectedItems.contains(which)) {\n // Else, if the item is already in the array, remove it\n mSelectedItems.remove(Integer.valueOf(which));\n }\n }\n })\n // Set the action buttons\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK, so save the mSelectedItems results somewhere\n // or return them to the component that opened the dialo\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n\n\n\n return builder.create();\n\n }", "public void shared() {\n\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n String username = userstring;\n\n SharedPreferences sharedlog = getSharedPreferences(\"usernamelast\" , MODE_PRIVATE);\n SharedPreferences.Editor editorlogin = sharedlog.edit();\n editorlogin.putString(\"usernamelast\", username);\n editorlogin.apply();\n\n SharedPreferences sharedPref = getSharedPreferences(\"email\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"email\", Email);\n editor.apply();\n //Los estados los podemos setear en la siguiente actividad\n SharedPreferences sharedPref2 = getSharedPreferences(\"password\", MODE_PRIVATE);\n SharedPreferences.Editor editor2 = sharedPref2.edit();\n editor2.putString(\"password\", Password);\n editor2.apply();\n\n\n }", "private void currentStateSaveToSharedPref() {\n sharedPreferences = getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"nameOfActiveChallenge\", nameOfCurrentChallenge);\n editor.putInt(\"key1OfActiveChallenge\", key1OfActiveChallenge);\n editor.putString(\"dateOfLastEdit\", dateOfLastEdit);\n editor.putFloat(\"goal\", goal);\n editor.putFloat(\"carry\", carry);\n editor.putInt(\"challengeDaysRunning\", challengeDaysRunning);\n editor.commit();\n }", "private void toggleMultiple(final Set<Long> selectedSet, final MultiToggleHelper helper) {\n final Cursor c = mListAdapter.getCursor();\n if (c == null || c.isClosed()) {\n return;\n }\n\n final HashMap<Long, Boolean> setValues = Maps.newHashMap();\n boolean allWereSet = true;\n\n c.moveToPosition(-1);\n while (c.moveToNext()) {\n long id = c.getInt(MessagesAdapter.COLUMN_ID);\n if (selectedSet.contains(id)) {\n boolean value = helper.getField(c);\n setValues.put(id, value);\n allWereSet = allWereSet && value;\n }\n }\n\n if (!setValues.isEmpty()) {\n final boolean newValue = !allWereSet;\n c.moveToPosition(-1);\n // TODO: we should probably put up a dialog or some other progress indicator for this.\n EmailAsyncTask.runAsyncParallel(new Runnable() {\n @Override\n public void run() {\n for (long id : setValues.keySet()) {\n if (setValues.get(id) != newValue) {\n helper.setField(id, newValue);\n }\n }\n }});\n }\n }", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "public Set<Preference> toSet() {\n assert CollectionUtil.elementsAreUnique(internalList);\n return new HashSet<>(internalList);\n }", "public void saveDataToSharedPreference(View view) {\n email = emailEditText.getText().toString();\n name = nameEditText.getText().toString();\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(\"name\",name);\n editor.putString(\"email\",email);\n editor.apply();\n\n Toast.makeText(context, \"Data saved successfully into SharedPreferences!\", Toast.LENGTH_SHORT).show();\n clearText();\n }", "public static void setPreferences (ArrayList<String> ipreferences){\n\t\t\tpreferences = ipreferences;\n\t}", "public void setStocksAtHome(List<String> stockList){\n HashSet<String> hashSet = new HashSet<String>(stockList);\n List<String> stocksAtHome = getStocksAtHome();\n hashSet.addAll(stocksAtHome);\n\n //To proceed with easy storage\n stockList = new ArrayList<String>(hashSet);\n\n Gson gson = new GsonBuilder().create();\n String gsonStockList = gson.toJson(stockList);\n editor.putString(STOCK_HOME_SET, gsonStockList);\n editor.commit();\n }", "public void setActive(String key, int value){\r\n SharedPreferences sp = this.getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "SharedPreferences mo117960a();", "private void toggleFavorite(Set<Long> selectedSet) {\n toggleMultiple(selectedSet, new MultiToggleHelper() {\n\n @Override\n public boolean getField(Cursor c) {\n return c.getInt(MessagesAdapter.COLUMN_FAVORITE) != 0;\n }\n\n @Override\n public void setField(long messageId, boolean newValue) {\n mController.setMessageFavoriteSync(messageId, newValue);\n }\n });\n }", "public void update_storage( ) {\n SharedPreferences sp_file = getPreferences(Context.MODE_PRIVATE); //make shared preferences object\n SharedPreferences.Editor editor = sp_file.edit(); //make editor object\n editor.putInt(\"alarm_set\", alarm_set);\n editor.apply();\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "public static ArrayList getArrayVal( Context dan)\n {\n SharedPreferences WordSearchGetPrefs = dan.getSharedPreferences(\"dbArrayValues\",Activity.MODE_PRIVATE);\n Set<String> tempSet = new HashSet<String>();\n tempSet = WordSearchGetPrefs.getStringSet(\"myArray\", tempSet);\n return new ArrayList<String>(tempSet);\n }", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n String aaString = sharedPreferences.getString(getString(R.string.pref_antalAktier_key), getString(R.string.pref_antalAktier_default));\n// float aaFloat = Float.parseFloat(aaString);\n editTextAntalAktier.setText(aaString);\n\n String kk = sharedPreferences.getString(getString(R.string.pref_koebskurs_key), getString(R.string.pref_koebskurs__default));\n editTextKoebskurs.setText(kk);\n\n String k = sharedPreferences.getString(getString(R.string.pref_kurtage_key), getString(R.string.pref_kurtage_default));\n editTextKurtage.setText(k);\n\n// float minSize = Float.parseFloat(sharedPreferences.getString(getString(R.string.pref_size_key),\n// getString(R.string.pref_size_default)));\n// mVisualizerView.setMinSizeScale(minSize);\n\n // Register the listener\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "public void restoringPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n //lay gia tri checkbook, k co mac dinh la false\n boolean bchk = sharedPreferences.getBoolean(\"checked\",false);\n if(bchk)\n {\n //lay user, pass, neu k co mac dinh gia tri la rong\n String user = sharedPreferences.getString(\"user\",\"\");\n String pass = sharedPreferences.getString(\"pass\",\"\");\n txtUserName.setText(\"user\");\n txtPassWord.setText(\"pass\");\n }\n\n chkSave.setChecked(bchk);\n }", "public void onClicked() {\n mypreference = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor editorpref = mypreference.edit();\n Gson gson = new Gson();\n //retrieve the stored ArrayList of fovorite movies as json format\n String storedJsonList = mypreference.getString(\"storedjsonList\", \"\");\n // get the type of this json format\n Type type = new TypeToken<ArrayList<ItemsClass>>() {\n }.getType();\n ArrayList<ItemsClass> movieArrayList = new ArrayList<ItemsClass>();\n //create array list of the retrieved json\n // store it in my Arraylist\n movieArrayList = gson.fromJson(storedJsonList, type);\n\n// favo.setSelected(va[0]);\n ischecked = va[0];\n if (va[0] == true) {\n\n if (movieArrayList == null) {\n\n favoImageButton.setImageResource(R.drawable.liked);\n\n String loadedPosterString = encodeTobase64(theposterImage);\n\n\n serItems.add(new ItemsClass(loadedPosterString, title, releaseDate, overview, rate, id));\n\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id + \"and you list size is\" + serItems.size(), Toast.LENGTH_SHORT).show();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n\n } else if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n int detectId = serItems.get(i).getId();\n if (serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you already have this movie in favorite list \", Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.liked);\n break;\n } else if (serItems.size() > 0 && detectId != id && i < serItems.size() - 1) {\n\n continue;\n\n } else if (detectId != id && i == serItems.size() - 1 && i > serItems.size() - 2) {\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n serItems.add(new ItemsClass(storedPoster, title, releaseDate, overview, rate, id));\n serItems.size();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n break;\n }\n\n }\n }\n\n } else {\n if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n\n int detectId = serItems.get(i).getId();\n if (i < serItems.size() && serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you have deleted this movie this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n mypreference = getContext().getSharedPreferences(\"moviepref\", Context.MODE_PRIVATE);\n editorpref.putString(\"storedPoster\", \"\");\n editorpref.putString(\"storedTitle\", \"\");\n editorpref.putString(\"storedOverview\", \"\");\n editorpref.putString(\"storedDate\", \"\");\n editorpref.putFloat(\"storedrating\", (float) 0.0);\n editorpref.commit();\n va[0] = !va[0];\n//\n break;\n } else if (detectId != id && i < serItems.size() - 1) {\n continue;\n } else if (detectId == id && i == serItems.size() - 1) {\n Toast.makeText(getContext(), \" actually you don't have this movie in your favorite list \", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }", "private void saveClubList() {\n SharedPreferences sharedPreferences = getSharedPreferences(\"Shared Preferences\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(clubList);\n editor.putString(\"Club List\", json);\n editor.apply();\n }", "private void save(){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(downloadedBooks);\n editor.putString( LISTS_DOWNLOADED, json);\n json = gson.toJson(progress);\n editor.putString( LISTS_PROGRESS, json);\n editor.apply();\n }", "private void loadPreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n\n int entreeIndex = sp.getInt(\"entreeIndex\", 0);\n int drinkIndex = sp.getInt(\"drinkIndex\", 0);\n int dessertIndex = sp.getInt(\"dessertIndex\", 0);\n\n // Setting inputs from SharedPreferences\n spEntree.setSelection(entreeIndex);\n spDrink.setSelection(drinkIndex);\n spDessert.setSelection(dessertIndex);\n\n edtTxtEntreePrice.setText(alEntreePrices.get(entreeIndex));\n edtTxtDrinkPrice.setText(alDrinkPrices.get(drinkIndex));\n edtTxtDessertPrice.setText(alDessertPrices.get(dessertIndex));\n }", "private void storePotList(){\n String tempName;\n int tempWeight;\n SharedPreferences preferences = getSharedPreferences(SHAREDPREF_SET, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n int sizeOfPotList = potList.countPots();\n editor.putInt(SHAREDPREF_ITEM_POTLIST_SIZE, sizeOfPotList);\n for(int i = 0; i < potList.countPots();i++){\n tempWeight = (potList.getPot(i).getWeightInG());\n tempName = (potList.getPot(i).getName());\n editor.putString(SHAREDPREF_ITEM_POTLIST_NAME+i, tempName);\n editor.putInt(SHAREDPREF_ITEM_POTLIST_WEIGHT+i, tempWeight);\n }\n editor.commit();\n }", "private void resetSharedPreferences(){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(getString(R.string.pref_genre_key), getString(R.string.pref_genre_any_value));\n editor.putString(getString(R.string.pref_earliest_year_key), getString(R.string.pref_earliest_year_default));\n editor.putString(getString(R.string.pref_latest_year_key), getString(R.string.pref_latest_year_default));\n // Commit the edits\n editor.apply();\n }", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "@Override\n public void onPause() {\n SharedPreferences.Editor editor = savedValues.edit();\n editor.putInt(\"num1\", num1);\n editor.putInt(\"num2\", num2);\n editor.commit();\n\n super.onPause();\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n sharedPrefManager.setHelathAPI(\"Questions\", \"\");\n sharedPrefManager.setHelathAPI(\"LessionsName\", \"\");\n sharedPrefManager.setHelathAPI(\"LessionsName\", lessionName);\n sharedPrefManager.setHelathAPI(\"Questions\", AngelPitchUtil.toJson(questionsArrayList));\n\n Intent Quiz = new Intent(App.getContext(), QuizActivity.class);\n Quiz.putExtra(\"lessionId\", lessionId);\n Quiz.putExtra(\"topicId\", topicId);\n myServerData.setTestState(\"inProgress\");\n startActivity(Quiz);\n\n /*for (int i = 0; i < questionsArrayList.size(); i++) {\n showQuestionsDialog(getContext(), questionsArrayList.get(i));\n\n }\n*/\n }", "private void getPrefs(){\n SharedPreferences sharedPreferences = getSharedPreferences(LIST_TAG, MODE_PRIVATE);\n Gson gson = new Gson();\n String json = sharedPreferences.getString(PREFS_TAG, null);\n Type type = new TypeToken<ArrayList<String[]>>() {}.getType();\n dataPref = gson.fromJson(json, type);\n\n if(dataPref == null){\n LoadFromCSV();\n }\n else {\n Log.d(\"getPrefs\", \"was called \");\n itemArrAdapt.setList(dataPref);\n }\n\n }", "private void LoadSavedPreferences() {\n\t\tString value;\n\t\tSharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\t// tab 3 ************************************************\n\t\tvalue = sharedPreferences.getString(\"tempSzad\", \"22\");\n\t\tettempSzad_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempPmaxdop\", \"70\");\n\t\tettempPmaxdop_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempZmaxdop\", \"22\");\n\t\tettempZmaxdop_.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tempPumpaON\", \"50\");\n\t\tettempPumpaON_.setText(value);\n\n\t\t// tab 1 ************************************************\n\t\tvalue = sharedPreferences.getString(\"tv1\", \"20.20\");\n\t\ttvS1.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tv2\", \"44.22\");\n\t\ttvS2.setText(value);\n\t\tvalue = sharedPreferences.getString(\"tv3\", \"19.22\");\n\t\ttvS3.setText(value);\n\t}", "@Override\n public void onBackPressed() {\n spSubject = getSharedPreferences(\"SUBJECT_LIST\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = spSubject.edit();\n editor.clear();\n editor.commit();\n\n for(int i=0; i< dpItems.size(); i++)\n editor.putString(\"subject_\"+i , dpItems.get(i));\n editor.putInt(\"subject_size\", dpItems.size());\n editor.apply();\n\n super.onBackPressed();\n\n }", "private ArrayList<Boolean> createBoolArrayList(String notificationPreferences){\n String[] genres = getResources().getStringArray(R.array.genre);\n ArrayList<Boolean> isCheckedArray = new ArrayList<>();\n String[] arrayNotificationPref = notificationPreferences.split(\",\");\n\n for (int i = 0; i < genres.length; i++){\n isCheckedArray.add(false);\n for (String curNotification: arrayNotificationPref) {\n if (genres[i].equals(curNotification)){\n isCheckedArray.set(i,true);\n }\n }\n }\n\n return isCheckedArray;\n }", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }", "private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public void question4(List<String> input){\n Set<String> s = new HashSet<>(input);\n }", "public void setBoton() {\n SharedPreferences preferences = getSharedPreferences(STRING_PREFERENCES,MODE_PRIVATE);\n preferences.edit().putBoolean(PREFERENCE_ESTADO_BUTTON_SESION,checkBox.isChecked()).apply();\n\n }", "public void salvarDadosNaTela(){\n SharedPreferences sharedPreferences = this.getActivity().getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(TVHORAUM, tvHoraUm.getText().toString());\n editor.putString(TVHORADOIS, tvHoraDois.getText().toString());\n editor.putString(TVHORATRES, tvHoraTres.getText().toString());\n editor.putString(TVHORAQUATRO, tvHoraQuatro.getText().toString());\n\n editor.apply();\n\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "private void loadSettings(){\n SharedPreferences sharedPreferences = getActivity().getSharedPreferences(SHARED_PREF, Context.MODE_PRIVATE);\n notificationSwtich = sharedPreferences.getBoolean(SWITCH, false);\n reminderOnOff.setChecked(notificationSwtich);\n }", "public void saveFavorites(Context context, List<ClassDataGejala> favorites) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(GEJALA,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(favorites);\n\n editor.putString(GEJALA, jsonFavorites);\n\n editor.commit();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n sparseBooleanArray = listview.getCheckedItemPositions();\n\n ValueHolder = \"\" ;\n\n int i = 0 ;\n\n while (i < sparseBooleanArray.size()) {\n\n if (sparseBooleanArray.valueAt(i)) {\n\n ValueHolder += goodlist [ sparseBooleanArray.keyAt(i) ] + \",\";\n }\n\n i++ ;\n }\n\n ValueHolder = ValueHolder.replaceAll(\"(,)*$\", \"\");\n\n Toast.makeText(listforcar.this, \"ListView Selected Values = \" + ValueHolder, Toast.LENGTH_LONG).show();\n\n }", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public void set(boolean[] abol);", "private boolean[] SetSelected(boolean[] selected, JList list) {\n\t\tint[] indices = list.getSelectedIndices();\n\t\tfor (int i = 0; i < selected.length; i++) {\n\t\t\tselected[i] = false;\n\t\t}\n\t\tfor (int i = 0; i < indices.length; i++) {\n\t\t\tselected[indices[i]] = true;\n\t\t}\n\t\treturn selected;\n\t}", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t str1=editText1.getText().toString();\n\t\t\t\t\tSharedPreferences preferences=getSharedPreferences(\"user\",Context.MODE_PRIVATE);\n\t\t\t Editor editor=preferences.edit();\n\t\t\t editor.putString(\"str1\", str1);\n\t\t\t editor.commit();\n\t\t\t \n\t\t\t}", "public void saveSettings(View v) {\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE); // get shared preferences\n SharedPreferences.Editor editor = sharedPref.edit();\n int seconds_rec = Integer.parseInt(time_recording.getText().toString());\n int notif_occ = Integer.parseInt(time_occurance.getText().toString());\n\n editor.putInt(getString(R.string.time_recording_seconds), seconds_rec); // save values to a sp\n editor.putInt(getString(R.string.time_notification_minutes), notif_occ);\n editor.commit(); // commit the differences\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "public void onClick(DialogInterface dialog,int id) {\n collections.remove(position);\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"TestHashMap\", 0);\n SharedPreferences.Editor prefEditor = pref.edit();\n JSONArray result= new JSONArray(collections);\n prefEditor.putString(\"Time\", result.toString());\n prefEditor.commit();\n adapter.notifyDataSetChanged();\n Toast.makeText(OnOffTime.this, \"Data has been Deleted.\", Toast.LENGTH_SHORT).show();\n\n }", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "@Override\n public void onClick(View v) {\n saveRoundSetting();\n saveMembers();\n sharedpreferencesAddname= getSharedPreferences(\"AddFriend\" , MODE_PRIVATE);\n final SharedPreferences.Editor editorFR = sharedpreferencesAddname.edit();\n for(int i =0 ; i<3;i++)\n {\n editorFR.putInt(\"friendid\"+i , -1);\n editorFR.commit();\n }\n\n\n Intent NextScreen = new Intent(RoundSetting.this, AddFriends.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n saveRoundSetting();\n saveMembers();\n sharedpreferencesAddname= getSharedPreferences(\"AddFriend\" , MODE_PRIVATE);\n final SharedPreferences.Editor editorFR = sharedpreferencesAddname.edit();\n for(int i =0 ; i<3;i++)\n {\n editorFR.putInt(\"friendid\"+i , -1);\n editorFR.commit();\n }\n\n\n Intent NextScreen = new Intent(RoundSetting.this, AddFriends.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onPositive(MaterialDialog materialDialog) {\n sharedPrefs.edit()\n .remove(pref.key)\n .putString(pref.key, \"\" + values[numberPicker.getValue()])\n .apply();\n pref.pref.setSummary(values[numberPicker.getValue()]);\n materialDialog.dismiss();\n }", "@Override\n public boolean onSelection(MaterialDialog materialDialog, View view, int which, CharSequence text) {\n sharedPrefs.edit()\n .remove(badgePosition.getKey())\n .putString(badgePosition.getKey(), \"\" + getResources().getStringArray(R.array.notificationbadge_position_values)[which])\n .apply();\n badgePosition.setSummary(text);\n return true;\n }", "public Set<String> getStringSet(@NonNull String name, Set<String> defaultValue) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n return prefs == null ? defaultValue : prefs.getStringSet(name, defaultValue);\n }", "void updatePreferences(List<IPreference> prefs);", "private void savePreferenceData(String role){\n if (getIntent()!=null){\n SharedPreferences preferences = getSharedPreferences(detailPreference, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(preferenceKey, role);\n editor.apply();\n }\n }", "@Override\n public void onClick(View v) {\n SharedPreferences prefs1 = getSharedPreferences(\"configuracoes\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs1.edit();\n\n RadioGroup formatoGroup = (RadioGroup) findViewById(R.id.formatoGroup);\n switch (formatoGroup.getCheckedRadioButtonId()) {\n case R.id.grauDecimal:\n //armazena os valores\n editor.putString(\"grau\", \"Decimal\");\n break;\n case R.id.grauMinuto:\n editor.putString(\"grau\", \"Minuto\");\n break;\n case R.id.grauSegundo:\n editor.putString(\"grau\", \"Segundo\");\n break;\n }\n\n\n RadioGroup unidadeGroup = (RadioGroup) findViewById(R.id.unidadeGroup);\n switch (unidadeGroup.getCheckedRadioButtonId()) {\n case R.id.km:\n //armazena os valores\n editor.putString(\"unidade\", \"km\");\n break;\n case R.id.mph:\n editor.putString(\"unidade\", \"mph\");\n break;\n }\n\n RadioGroup orientacaoGroup = (RadioGroup) findViewById(R.id.orientacaoGroup);\n switch (orientacaoGroup.getCheckedRadioButtonId()) {\n case R.id.nenhuma:\n //armazena os valores\n editor.putString(\"orientacao\", \"Nenhuma\");\n break;\n case R.id.north:\n editor.putString(\"orientacao\", \"North\");\n break;\n case R.id.course:\n editor.putString(\"orientacao\", \"Course\");\n break;\n }\n\n RadioGroup tipoGroup = (RadioGroup) findViewById(R.id.tipoGroup);\n switch (tipoGroup.getCheckedRadioButtonId()) {\n\n case R.id.vetorial:\n //armazena os valores\n editor.putString(\"tipo\", \"Vetorial\");\n break;\n case R.id.imagem:\n editor.putString(\"tipo\", \"Imagem\");\n break;\n\n }\n\n\n SharedPreferences prefs = getSharedPreferences(\"configuracoes\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor2 = prefs.edit();\n if(escolha.isChecked())\n {\n editor2.putString(\"ligado\", \"Sim\");\n\n }else{\n\n editor2.putString(\"ligado\", \"Nao\");\n\n }\n //Amazena os valores\n editor2.apply();\n editor.apply();\n Toast toast = Toast.makeText(getApplicationContext(), \"Configurações salvas!\", Toast.LENGTH_SHORT);\n toast.show();\n Rediceriona();\n\n }", "@Override\n public void onClick(View v) {\n SharedPreferences currShared = getContext().getSharedPreferences(MainActivity.CURR_PREFS, Context.MODE_PRIVATE);\n SharedPreferences.Editor currEditor = currShared.edit();\n currEditor.clear();\n currEditor.apply();\n Toast.makeText(getContext(), \"We should build a post trip page\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getContext(), MainActivity.class));\n\n }", "private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }", "public void saveSelectedGroup(Elem group) {\n if (prefs == null) return;\n if (group == null) return;\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(SettingsActivity.GROUP_ID_PREF, group.id);\n editor.putString(SettingsActivity.GROUP_NAME_PREF, group.name);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) editor.apply();\n else editor.commit();\n }", "@Override\n \tpublic void onClick(DialogInterface dialog, int which) {\n myPref.setSummary(items[which]);\n switch(which)\n {\n case 0:\n editor.putInt(\"Theme\",R.style.AppThemeRed);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 1:\n editor.putInt(\"Theme\",R.style.AppThemeBlue);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 2:\n editor.putInt(\"Theme\",R.style.AppThemePurple);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 3:\n editor.putInt(\"Theme\",R.style.AppThemeGreen);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 4:\n editor.putInt(\"Theme\",R.style.AppThemeOrange);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 5:\n editor.putInt(\"Theme\",R.style.AppThemeGrey);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n }\n\n \t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n for (int i = 0; i < p.length; i++) {\n if (pChecked[i]) { // if a name is selected\n\n selectedPlayers.remove(p[i]); // remove the player from the list of selected players\n players.remove(p[i]); // remove it from the list of names to save\n savedNames = players.toString(); // convert the list of names to a single string that will be saved later\n savedNames = savedNames.replaceAll(\"\\\\[\", \"\").replaceAll(\"\\\\]\", \"\"); // the new string will include the list's square brackets. This removes them.\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"savedNames\", savedNames); // save the new list of players' names\n editor.commit();\n pChecked[i] = false; // untick the name\n }\n }\n }", "void setSavedEntries(Collection<String> savedEntries) {\n this.savedEntries = Collections.unmodifiableCollection(savedEntries);\n }", "public HashSet<String> conjProdutos(){\n return (HashSet)produtosComprados.values().stream().collect(Collectors.toSet());\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n\n return true;\n }\n if (id == R.id.action_fav) {\n Intent intent = new Intent(getApplicationContext(),ThirdActivity.class);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_addfav) {\n\n int i = 0;\n Map<String, ?> map = sharedPreferences.getAll();\n for(Map.Entry mEntry : map.entrySet()){\n if(Pattern.matches(\"fav \"+titre.getText(), mEntry.getKey()+\"\")){\n Toast.makeText(this,titre.getText()+\" removed from favorite\",Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .remove(mEntry.getKey()+\"\")\n .remove(titre.getText()+\" id\")\n .apply();\n i=1;\n }\n }\n\n if(i==0) {\n Toast.makeText(this, titre.getText() + \" added to favorite\", Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .putString(\"fav \" + titre.getText(), titre.getText() + \"\")\n .putInt(titre.getText() + \" id\", idAnime)\n .apply();\n }\n i=0;\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void bytteAntallOppgaver(int antallOpg){\n SharedPreferences.Editor editor = deltePreferanser.edit();\n editor.putInt(\"AntallOppgaver\", antallOpg);\n editor.commit();\n }", "public static void save(String s, boolean flag){\n SharedPreferences prefs = cont.getSharedPreferences(\"PAFF_SETTINGS\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(s,flag);\n editor.commit();\n }", "public void putStrings(HashMap<String,String> mHashMap){\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n\n for(Map.Entry m: mHashMap.entrySet()){\n\n editor.putString(m.getKey().toString(), m.getValue().toString());\n }\n\n editor.apply();\n }" ]
[ "0.71887684", "0.6430479", "0.6378629", "0.6097538", "0.6082793", "0.5980519", "0.59583193", "0.59320384", "0.5886672", "0.5881308", "0.5740285", "0.57278395", "0.5718536", "0.570034", "0.56608903", "0.56554186", "0.5612338", "0.55823654", "0.5550388", "0.5547222", "0.55470604", "0.5534936", "0.5530873", "0.55297", "0.55161554", "0.5513973", "0.55070585", "0.54674345", "0.5450316", "0.5444487", "0.542342", "0.5388258", "0.5369689", "0.5368322", "0.5367928", "0.53668296", "0.53662765", "0.5347561", "0.5347105", "0.5344102", "0.5321275", "0.53208226", "0.5308296", "0.5307211", "0.530668", "0.528995", "0.5289736", "0.5282853", "0.52813435", "0.52754027", "0.52509624", "0.5243435", "0.5226647", "0.52256966", "0.5216246", "0.51904047", "0.5189858", "0.51824236", "0.51733834", "0.515727", "0.515267", "0.5152315", "0.51285464", "0.5112375", "0.51110816", "0.51009834", "0.50945085", "0.5083474", "0.50748813", "0.50716335", "0.5064836", "0.50637627", "0.50617576", "0.5058784", "0.50575596", "0.504273", "0.50403816", "0.5036084", "0.5034699", "0.5027869", "0.50060827", "0.5001217", "0.499723", "0.499723", "0.4994422", "0.499315", "0.49918798", "0.49889994", "0.49883348", "0.4985427", "0.4985345", "0.49839175", "0.49815562", "0.49776155", "0.4977229", "0.49524838", "0.49511865", "0.49509174", "0.49492073", "0.49467805", "0.49432623" ]
0.0
-1
ArrayBlockingQueue is a bounded, blocking queue that stores the elements internally in an array. That it is bounded means that it cannot store unlimited amounts of elements. There is an upper bound on the number of elements it can store at the same time. You set the upper bound at instantiation time, and after that it cannot be changed. The ArrayBlockingQueue stores the elements internally in FIFO (First In, First Out) order. The head of the queue is the element which has been in queue the longest time, and the tail of the queue is the element which has been in the queue the shortest time. By default fairness is false
public static void main(String[] args) { BlockingQueue<String> blockingQueue1 = new ArrayBlockingQueue<String>(3); // fair if true then queue accesses for threads blocked on insertion or // removal, are processed in FIFO order; if false the access order is // unspecified Boolean fair = Boolean.TRUE; BlockingQueue<String> blockingQueue2 = new ArrayBlockingQueue<String>( 3, fair); Thread t1 = new Thread(new Producer(blockingQueue1)); Thread t2 = new Thread(new Consumer(blockingQueue1)); Thread t3 = new Thread(new Producer(blockingQueue1)); Thread t4 = new Thread(new Consumer(blockingQueue1)); t1.start(); t2.start(); t3.start(); t4.start(); try { t1.join(); t2.join(); t3.join(); t4.join(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Exception{\n\n BlockingQueue<String> blockingQueue = new ArrayBlockingQueue<>(3);\n\n /*System.out.println(blockingQueue.offer(\"a\"));\n System.out.println(blockingQueue.offer(\"b\"));\n System.out.println(blockingQueue.offer(\"c\"));\n System.out.println(blockingQueue.offer(\"x\"));\n\n System.out.println(blockingQueue.peek());\n\n System.out.println(blockingQueue.poll());\n System.out.println(blockingQueue.poll());\n System.out.println(blockingQueue.poll());\n System.out.println(blockingQueue.poll()); */\n\n /*blockingQueue.put(\"a\");\n blockingQueue.put(\"a\");\n blockingQueue.put(\"a\");\n System.out.println(\"===============\");\n// blockingQueue.put(\"x\");\n\n blockingQueue.take();\n blockingQueue.take();\n blockingQueue.take();\n blockingQueue.take();*/\n\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n\n }", "public CincamimisQueue()\r\n {\r\n measurementQueue=new ArrayBlockingQueue(10,true);\r\n }", "public BlockingQueue(int maxSize) {\r\n\t\tthis.maxSize = maxSize;\r\n\t\tqueue = new LinkedList<T>();\r\n\t}", "public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}", "public ArrayQueue() {\n\t\tthis(Integer.MAX_VALUE);\n\t}", "public RandomizedQueue() {\n \t\titems = new Object[MIN_COUNT];\n \t\tsize = 0;\n \t}", "public <T> ArrayBlockingQueue<T> create(int size){\n return new ArrayBlockingQueue<T>(size);\n }", "public void test_1() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\t// Fill the Queue\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// make sure the capacity doesn't evolve\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure the size is right after the filling loop\n\t\tassertEquals(theBSQ.capacity(), theBSQ.size());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(!theBSQ.isEmpty());\n\t\tassertTrue(theBSQ.isFull());\n\n\t\t// Empty the queue\n\t\tfor(int i = theBSQ.capacity(); i > 0 ; --i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\tObject theObject = theBSQ.remove();\n\t\t\tassertEquals(theObject, new Integer(theBSQ.capacity()-i));\n\t\t}\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "public void testFairEmptyFull() {\n SynchronousQueue q = new SynchronousQueue(true);\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "myQueue(int size){\n }", "public RandomizedQueue() {\n this.capacity = 2;\n this.numberOfItems = 0;\n\n this.queue = (Item[]) new Object[capacity];\n }", "public MyCircularQueue(int k) {\n this.capacity = k;\n this.array = new int[this.capacity];\n Object ob= new Object();\n try {\n ob.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n ob.notify();\n\n }", "public static void main(String[] args) {\n ArrayList<String> list=new ArrayList<>();\n list.add(\"1\");\n list.add(\"2\");\n list.add(\"3\");\n list.add(\"4\");\n list.add(\"5\");\n list.remove(\"2\");\n PriorityBlockingQueue priorityBlockingQueue=new PriorityBlockingQueue(100, new Comparator() {\n @Override\n public int compare(Object o1, Object o2) {\n return 0;\n }\n });\n }", "public CircularArrayQueue() {\n\t\tthis(QUEUESIZE);\t// constructs queue with default queue size\n\t}", "public ConcurrentRingBuffer(int size, String disabledMessage){\r\n\tbuf = new ArrayBlockingQueue<E>(size);\r\n\tenabled = true;\r\n\tdisabledMsg = disabledMessage;\r\n}", "public RandomizedQueue() {\n size = 0;\n arr = (Item[]) new Object[MINIMUM_STORAGE_SIZE];\n }", "public BoundedQueue(int size){\n queueArray = (T[]) new Object[size];\n tail = 0;\n }", "Integer backlogCapacity();", "public HoldingQueue(int maxSize) {\n this.maxSize = maxSize;\n holdingQueue = new ArrayList<Person>(maxSize);\n numPeople = 0;\n }", "Queue() {\r\n\t\telements = new int[DEFAULT_CAPACITY];\r\n\t}", "public void test_3() throws Exception {\n\t\tfinal BoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tThread theProducer = new Thread(\"Producer\") {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i = 0; i < MAX_CAPACITY * 1000; ++i) {\n\t\t\t\t\t\ttheBSQ.add(new Integer(i));\n//\t\t\t\t\t\tif(theBSQ.isFull()) {\n//\t\t\t\t\t\t\tSystem.err.println(\"theProducer: queue is full \" + theBSQ);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tfail(ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tThread theConsumer = new Thread(\"Consumer\") {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i = 0; i < MAX_CAPACITY * 1000; ++i) {\n\t\t\t\t\t\tInteger theInteger = (Integer)theBSQ.remove();\n\t\t\t\t\t\t// Consume the Integers, make sure they arrive in the same\n\t\t\t\t\t\t// order they where produced\n\t\t\t\t\t\tassertEquals(i, theInteger.intValue());\n//\t\t\t\t\t\tif(theBSQ.isEmpty()) {\n//\t\t\t\t\t\t\tSystem.err.println(theInteger);\n//\t\t\t\t\t\t\tSystem.err.println(\"theConsumer: queue is empty \");\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\tSystem.err.println(theInteger);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tfail(ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheProducer.start();\n\t\ttheConsumer.start();\n\n\t\ttheProducer.join();\n\t\ttheConsumer.join();\n\n\t\t// Make sure avery and all Integers have been consumed\n\t\tcheckEmptyness(theBSQ);\n\t}", "@Test\n public void testIsEmptyAfterTakesAll() throws InterruptedException {\n final int capacity = 10;\n final BoundedBuffer<Integer> bb = new BoundedBuffer<Integer>(capacity);\n\n for(int i = 0; i < capacity; i++){\n bb.put((new Random()).nextInt());\n }\n assertTrue(bb.isFull());\n\n Runnable task = new Runnable() {\n public void run() {\n try {\n bb.take();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n };\n\n Thread[] threads = new Thread[capacity];\n\n for (int i = 0; i < capacity; i++) {\n threads[i] = new Thread(task);\n threads[i].start();\n }\n\n for (int i = 0; i < capacity; i++) {\n threads[i].join();\n }\n\n //postcondition: buffer is empty\n assertTrue(bb.isEmpty());\n assertFalse(bb.isFull());\n\n }", "public BlockingDataSet(int maxSize)\n {\n \t// create an empty queue \n queArray = new ArrayBlockingQueue<Object[]>(maxSize, false);\n \n timeoutGet = Const.toInt(System.getProperty(Const.DATASET_GET_TIMEOUT), Const.TIMEOUT_GET_MILLIS);\n timeoutPut = Const.toInt(System.getProperty(Const.DATASET_PUT_TIMEOUT), Const.TIMEOUT_PUT_MILLIS);\n }", "public static void main(String[] args) {\n\t\t\n\t\tPriorityBlockingQueue<Integer> obj = new PriorityBlockingQueue<Integer>();\n\t\t\n\t\t/*for(int i=9;i<=99;i=i+9)\n\t\t{\n\t\t\tobj.offer(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);*/\n\t\t\n//\t\tfor (int i = 7; i <=84; i=i+7) {\n//\t\t\tobj.offer(i);\n//\t\t}\n\t\t\n\t\tobj.offer(5);\n\t\tobj.offer(2);\n\t\tobj.offer(13);\n\t\tobj.offer(7);\n\t\tobj.offer(12);\n\t\tobj.offer(3);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(\"Now First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\n\t}", "public static void main(String[] args) {\n\t\tint capacity = 15;\n\n\t\t// create object of PriorityBlockingQueue\n\t\t// using PriorityBlockingQueue(int initialCapacity) constructor\n\t\tPriorityBlockingQueue<Integer> pbq = new PriorityBlockingQueue<Integer>(capacity);\n\n\t\t// add numbers\n\t\tpbq.add(1);\n\t\tpbq.add(2);\n\t\tpbq.add(3);\n\n\t\t// print queue\n\t\tSystem.out.println(\"PriorityBlockingQueue:\" + pbq);\n\t}", "public AsyncQueueBroker(int capacity, int timeoutDuration)\n {\n super(capacity, timeoutDuration);\n queue = new ArrayBlockingQueue<V>(100);\n }", "public WaitablePQueue() {\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\n\t}", "public void test_2() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// clear the queue\n\t\ttheBSQ.clear();\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "public ArrayQueue() {\n Object[] arr = new Object[INITIAL_CAPACITY];\n backingArray = (T[]) arr;\n size = 0;\n front = 0;\n }", "public RandomizedQueue() {\n\t\tsize = 0;\n\t\tqueue = (Item[]) new Object[size];\n\t}", "@Test\n public void testpoll() {\n\tFileBackedBlockingQueue<String> queue = new FileBackedBlockingQueue.Builder<String>()\n\t\t.directory(TEST_DIR)\n\t\t.serializer(new StringSerializer())\n\t\t.segmentSize((TEST_STRING.length() + Segment.ENTRY_OVERHEAD_SIZE) * 100)\n\t\t.build();\n\n\t// init\n\tfor (int i = 0; i < 2000; i++)\n\t queue.add(TEST_STRING);\n\tfor (int i = 0; i < 2000; i++) {\n\t if (i <= 1000)\n\t\tAssert.assertTrue(queue.segments.getActiveSegments() > 10);\n\t else\n\t\tAssert.assertTrue(\n\t\t\t\"size : \" + queue.segments.getInActiveSegments(),\n\t\t\tqueue.segments.getInActiveSegments() >= 9);\n\t Assert.assertEquals(TEST_STRING, queue.poll());\n\t}\n }", "@Override\r\npublic void run() {\n\tfor (int i = 0; i < 10; i++) {\r\n\t\ttry {\r\n\t\t\tbQueue.take();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"------苹果的数量是:\"+\" \"+\" \"+bQueue.size());\r\n\t}\r\n}", "public void testEmptyFull() {\n SynchronousQueue q = new SynchronousQueue();\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "public void add_elements()\n {\n\tint n = 0;\n\tSystem.out.println(Thread.currentThread().getName() + \" is waiting for permit\");\n\ttry\n\t{\n\t semaphoreIm.P();\n\t System.out.println(Thread.currentThread().getName()+ \" has got permit\");\n\t while (num_elements > 0)\n\t {\n\t buf.add(n, id);\t\t\t\t\t\t\t\n\t n++;\n\t num_elements--;\n\t }\n\t}\n\tcatch (InterruptedException e)\n\t{\n\t\t\n\t}\n\tSystem.out.println(Thread.currentThread().getName()+\n \" has released permit\");\n\tsemaphoreIm.V();\n }", "@Test\n public void randomLockstep() {\n PriorityBlockingQueue pbq = new PriorityBlockingQueue();\n PriorityQueue pq = new PriorityQueue();\n List<Consumer<Queue>> frobbers = List.of(\n q -> q.add(42),\n q -> assertTrue(q.offer(86)),\n q -> q.poll(),\n q -> q.peek(),\n q -> {\n Iterator it = q.iterator();\n if (it.hasNext()) {\n it.next();\n it.remove();\n }});\n for (int i = 0; i < 100; i++) {\n Consumer<Queue> frobber = frobbers.get(rnd.nextInt(frobbers.size()));\n frobber.accept(pq);\n frobber.accept(pbq);\n assertInvariants(pbq);\n assertInvariants(pq);\n assertTrue(Arrays.equals(pq.toArray(), pbq.toArray()));\n }\n }", "public int queue() \n { return waiting; }", "public BulkFifoNaive() {\n m_chainedFifo[0] = new long[m_bulkSize];\n }", "public Queue()\r\n\t{\r\n\t\tthis(capacity);\r\n\t}", "public interface BlockingFIFO {\r\n\tvoid put(Task item) throws Exception;\r\n Task take() throws Exception;\r\n\r\n}", "public void testDrainToWithActivePut() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n q.put(new Integer(1));\n } catch (InterruptedException ie){\n threadUnexpectedException();\n }\n }\n });\n try {\n t.start();\n ArrayList l = new ArrayList();\n Thread.sleep(SHORT_DELAY_MS);\n q.drainTo(l);\n assertTrue(l.size() <= 1);\n if (l.size() > 0)\n assertEquals(l.get(0), new Integer(1));\n t.join();\n assertTrue(l.size() <= 1);\n } catch(Exception e){\n unexpectedException();\n }\n }", "public ArrayPriorityQueue()\n { \n\tqueue = new ArrayList();\n }", "public RandomizedQueue() { }", "public RandomizedQueue(){\n itemCount = 0;\n array = (Item[]) new Object[8]; // initial size of 8 just to not keep resizing in the early stages\n }", "private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }", "public interface UnboundedQueue<T> {\n \n\t/**\n\t * This method inserts a generic type element to the back of the Queue, increasing the\n\t * size by one. \n\t * \n\t * @param o Generic type to be added to the back of the Queue.\n\t */\n public void insert(T o);\n \n /**\n * This method removes a generic type element from the front of the Queue thereby decreasing the\n * size by one. Throws an EmptyQueueException if the Queue is empty and there is no\n * element to remove.\n * \n * @return Object removed from the front of the Queue\n * @throws EmptyQueueException if Queue is empty and there is no object to remove\n */\n public T remove() throws EmptyQueueException;\n \n /**\n * This method makes a copy of the element at the front of the Queue. Size stays the same.\n * \n * @return copy of the element at the front of the Queue.\n * @throws EmptyQueueException thrown if the Queue is empty and there is no elment at the front\n */\n public T front() throws EmptyQueueException;\n \n /**\n * This method returns true if the Queue has a front element and therefore is \n * not empty.\n * \n * @return true if the Queue has a front element\n */\n public boolean hasFront();\n \n /**\n * This method returns the number of elements currently stored in the structure (Queue).\n * \n * \n * @return int number of elements stored in the Queue\n */\n public int size();\n\n /**\n * This method creates a String representation of the Queue.\n * \n * @return String which represents the Queue\n */\n public String toString();\n \n}", "public Queue(int size){\r\n\t\tthis.maxSize = size;\r\n\t\tthis.queueArray = new long[size];\r\n\t\tthis.front = 0; //index pos of the first slot of array\r\n\t\tthis.rear = -1; // there's no item in the array yet to be considered last item.\r\n\t\tthis.nItems = 0; //don't have elements in array yet\r\n\t}", "int getQueueSize();", "public void testFairTakeFromEmpty() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n q.take();\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){ }\n }\n });\n try {\n t.start();\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public RandomizedQueue() {\n a = (Item[]) new Object[1];\n n = 0;\n }", "public Queue(){\n first = null;\n last = null;\n N = 0;\n }", "int capacity();", "int capacity();", "public void testFairBlockingPut() {\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n SynchronousQueue q = new SynchronousQueue(true);\n q.put(zero);\n threadShouldThrow();\n } catch (InterruptedException ie){\n }\n }});\n t.start();\n try {\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n }\n catch (InterruptedException ie) {\n\t unexpectedException();\n }\n }", "public RandomizedQueue() {\n count = 0;\n N = 2;\n }", "public RandomizedQueue() {\n collection = (Item[]) new Object[1];\n }", "public void testFairPutWithTake() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n int added = 0;\n try {\n q.put(new Object());\n ++added;\n q.put(new Object());\n ++added;\n q.put(new Object());\n ++added;\n q.put(new Object());\n ++added;\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException e){\n assertTrue(added >= 1);\n }\n }\n });\n try {\n t.start();\n Thread.sleep(SHORT_DELAY_MS);\n q.take();\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public RandomizedQueue() {\n\t\tN = 0;\n\t\tarr = (Item []) new Object[1];\n\t}", "public abstract void backoffQueue();", "public ArrayQueue() {\n this(10);\n }", "public MessageQueue(int capacity) \n { \n elements = new Message[capacity]; \n count = 0; \n head = 0; \n tail = 0; \n }", "public ArrayQueue(int capacity){\r\n\t\tq = new String [capacity];\r\n\t\tn = 0;\r\n\t\tfirst = 0;\r\n\t\tlast = 0; \r\n\t}", "MyConsumer(BlockingQueue<Integer> sharedBuffer,Integer bufferSize,Integer waitingPeriodMin,Integer waitingPeriodMax,Integer terminationTime,String fileName){\r\n\t\tthis.sharedBuffer = sharedBuffer;\r\n\t\tthis.bufferSize=bufferSize;\r\n\t\tthis.waitingPeriodMin=waitingPeriodMin;\r\n\t\tthis.waitingPeriodMax= waitingPeriodMax;\r\n\t\tthis.terminationTime=terminationTime;\r\n\t\trandom = new Random();\r\n\t\ttry{\r\n\t\t\t File outFile = new File(fileName);\r\n\t\t\t outStream = new PrintStream(new FileOutputStream(outFile));\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t }", "@Override\n public boolean offer(E e) {\n if(e== null || (limited && size >= length)) {\n return false;\n }\n queue[size++] = e;\n Arrays.sort(queue, comparator);\n if(size >= queue.length) {\n queueResize();\n }\n return true;\n }", "public ListPool(int capacity) {\n pool = new ArrayBlockingQueue<>(capacity);\n }", "public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedElements();\n\tpublic int getQueueSize(int level);\n\tpublic int getProcessedSize();\n\tpublic int getGatheredSize();\n\tpublic void setMaxElements(int elements);\n\tpublic Object pop(int level);\n\tpublic boolean push(Object task, int level);\n\tpublic void clear();\n}", "public WaitingProcessQueue() {\r\n this.data = new CustomProcess[INITIAL_CAPACITY];\r\n }", "@Test\n public void testDrain() {\n\tFileBackedBlockingQueue<String> queue = new FileBackedBlockingQueue.Builder<String>()\n\t\t.directory(TEST_DIR)\n\t\t.serializer(new StringSerializer())\n\t\t.segmentSize((TEST_STRING.length() + Segment.ENTRY_OVERHEAD_SIZE + 10) * 100)\n\t\t.build();\n\t// init\n\tfor (int i = 0; i < 2000; i++)\n\t queue.add(TEST_STRING + i);\n\tqueue.drainTo(new ArrayList<String>(), 1000);\n\n\tfor (int i = 1000; i < 2000; i++)\n\t Assert.assertEquals(TEST_STRING + i, queue.poll());\n }", "public RandomizedQueue() {\n queue = (Item[]) new Object[1];\n size = 0;\n }", "public RandomizedQueue()\r\n {\r\n a = (Item[]) new Object[2];\r\n n = 0;\r\n }", "public RandomizedQueue() {\r\n\t\tqueue = (Item[]) new Object[1];\r\n\t}", "public RandomizedQueue() {\n this.size = 0;\n this.storage = (Item[]) new Object[1];\n this.currentIndex = 0;\n }", "@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }", "public Queue(int maxsize){\n this.maxsize=maxsize; // sets the limit\n System.out.println(\"The maxsize was set to \"+maxsize);\n }", "public RandomizedQueue() {\n first = 0;\n s = (Item[]) new Object[INIT_CAPACITY];\n }", "public void testOfferInExecutor() {\n final SynchronousQueue q = new SynchronousQueue();\n ExecutorService executor = Executors.newFixedThreadPool(2);\n final Integer one = new Integer(1);\n\n executor.execute(new Runnable() {\n public void run() {\n threadAssertFalse(q.offer(one));\n try {\n threadAssertTrue(q.offer(one, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS));\n threadAssertEquals(0, q.remainingCapacity());\n }\n catch (InterruptedException e) {\n threadUnexpectedException();\n }\n }\n });\n\n executor.execute(new Runnable() {\n public void run() {\n try {\n Thread.sleep(SMALL_DELAY_MS);\n threadAssertEquals(one, q.take());\n }\n catch (InterruptedException e) {\n threadUnexpectedException();\n }\n }\n });\n\n joinPool(executor);\n\n }", "public InMemoryQueueService(){\n this.ringBufferQueue = new QueueMessage[10000];\n }", "public HighPerformanceQueue(int size) throws NoSuchFieldException {\n if(size <= 0) throw new IllegalArgumentException(\"size must be positive\");\n if((size & (size-1)) != 0){\n throw new IllegalArgumentException(\"size must be multiple of 2\");\n }\n\n this.max_size = size;\n front = rear = 0;\n\n // Space pre allocation\n data = new Object[max_size];\n available = new boolean[max_size];\n\n // Get the offset in the object and modify it with CAS later\n this.help = Util.createUnsafe();\n frontOffset = help.objectFieldOffset(HighPerformanceQueue.class.getDeclaredField(\"front\"));\n rearOffset = help.objectFieldOffset(HighPerformanceQueue.class.getDeclaredField(\"rear\"));\n }", "private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }", "public int drain(MessagePassingQueue.Consumer<E> c, int limit)\r\n/* 362: */ {\r\n/* 363: */ E m;\r\n/* 364:652 */ for (int i = 0; (i < limit) && ((m = relaxedPoll()) != null); i++) {\r\n/* 365:656 */ c.accept(m);\r\n/* 366: */ }\r\n/* 367:658 */ return i;\r\n/* 368: */ }", "private void growQueue() {\n Runnable[] oldQ = queue;\n int oldSize = oldQ.length;\n int newSize = oldSize << 1;\n if (newSize > MAXIMUM_QUEUE_CAPACITY)\n throw new RejectedExecutionException(\"Queue capacity exceeded\");\n Runnable[] newQ = queue = new Runnable[newSize];\n\n int b = base;\n int bf = b + oldSize;\n int oldMask = oldSize - 1;\n int newMask = newSize - 1;\n do {\n int oldIndex = b & oldMask;\n Runnable t = oldQ[oldIndex];\n if (t != null && !casSlotNull(oldQ, oldIndex, t))\n t = null;\n setSlot(newQ, b & newMask, t);\n } while (++b != bf);\n pool.signalWork();\n }", "public MyQueue() {\n queue = new PriorityQueue<>();\n }", "public RandomizedQueue() {\n queue = (Item[]) new Object[1];\n }", "public int capacity();", "public int capacity();", "public void testFairTimedPollWithOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n threadAssertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success) { }\n }\n });\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n assertTrue(q.offer(zero, SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public void testDrainTo() {\n SynchronousQueue q = new SynchronousQueue();\n ArrayList l = new ArrayList();\n q.drainTo(l);\n assertEquals(q.size(), 0);\n assertEquals(l.size(), 0);\n }", "private int dequeue(){\n size--;\n int ret = array[front];\n front = (front+1)%capacity;\n return ret;\n }", "public ArrayDeque() {\n myQ = (T[]) new Object[IDeque.MAX_LENGTH];\n myLength = 0;\n }", "public void testFairTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public MaxPriorityQueue() {\n heap = new MaxHeap<>();\n }", "public BaseMpscLinkedArrayQueue(int initialCapacity)\r\n/* 20: */ {\r\n/* 21:184 */ RangeUtil.checkGreaterThanOrEqual(initialCapacity, 2, \"initialCapacity\");\r\n/* 22: */ \r\n/* 23:186 */ int p2capacity = Pow2.roundToPowerOfTwo(initialCapacity);\r\n/* 24: */ \r\n/* 25:188 */ long mask = p2capacity - 1 << 1;\r\n/* 26: */ \r\n/* 27:190 */ E[] buffer = CircularArrayOffsetCalculator.allocate(p2capacity + 1);\r\n/* 28:191 */ this.producerBuffer = buffer;\r\n/* 29:192 */ this.producerMask = mask;\r\n/* 30:193 */ this.consumerBuffer = buffer;\r\n/* 31:194 */ this.consumerMask = mask;\r\n/* 32:195 */ soProducerLimit(mask);\r\n/* 33: */ }", "@Override\r\n\tpublic void run() {\n\t\tsynchronized (arr) {\r\n\t\t\twhile (!arr.isEmpty()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Producer Waiting as array is full.\");\r\n\t\t\t\t\tarr.wait();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsynchronized(arr){\r\n\t\t\ttry {\r\n\t\t\t\tarr.put(5);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Producer making the array full.\");\r\n\t\t\tarr.notifyAll();\r\n\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tCreate_queue new_queue= new Create_queue();\n\t\tnew_queue.enqueu(12);\n\t\tnew_queue.enqueu(5);\n\t\tnew_queue.enqueu(36);\n\t\tnew_queue.enqueu(5);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(10);\n\t\tnew_queue.enqueu(8);\n\t\tnew_queue.enqueu(2);\n\t\tnew_queue.enqueu(14);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(32);\n\t\tnew_queue.enqueu(11);\n\t\tnew_queue.enqueu(21);\n\t\tnew_queue.enqueu(44);\n\t\tnew_queue.enqueu(46);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(50);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(100);\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue.peek());\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue.peek());\n\t\t\n\t\t\n\t}", "public ArrayRingBuffer(int capacity) {\n first = 0;\n last = 0;\n fillCount = 0;\n this.capacity = capacity;\n rb = (T[]) new Object[this.capacity];\n // Create new array with capacity elements.\n // first, last, and fillCount should all be set to 0.\n // this.capacity should be set appropriately. Note that the local variable\n // here shadows the field we inherit from AbstractBoundedQueue, so\n // you'll need to use this.capacity to set the capacity.\n }", "public boolean isAvailable(){\r\n return blockingQueue.size() < maxWorkQueueSize;\r\n }", "public RandomizedQueue() // construct an empty randomized queue\n {\n items = (Item[]) new Object[4];\n nextFreePos = 0;\n used = 0;\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayQueue(int max) {\n\t\tthis.max = max;\n\t\tthis.data = (T[])new Object[DEFAULT_INIT_CAPACITY];\n\t}", "private Queue(){\r\n\t\tgenerateQueue();\r\n\t}", "public BlaqDeque(){super();}", "public ByteRingBuffer(int maxSize){\n buffer= new byte[maxSize];\n readIndex = 0;\n writeIndex = -1;\n size=0;\n }", "public BetterParkingLot( int size )\n\t{\n\t\tsuper(size);\n queue = new PriorityQueue<Integer>(size);\n\n // add all available parking slots in zero-indexed form\n for(int i=0; i <= size; i++) // this is my only problem. It HAS to be O(n) here.\n queue.add(i);\n\t}" ]
[ "0.70005214", "0.68575525", "0.6573968", "0.64369243", "0.63790804", "0.614486", "0.60996467", "0.60994685", "0.6086728", "0.60562587", "0.6022978", "0.6015099", "0.5993644", "0.59777665", "0.5970756", "0.5964485", "0.59313375", "0.59029835", "0.58971953", "0.58886117", "0.5877739", "0.5876683", "0.5875342", "0.5862136", "0.5827061", "0.58132577", "0.58120173", "0.58103484", "0.57454526", "0.5730065", "0.57205033", "0.5718785", "0.57137275", "0.5683482", "0.5677166", "0.567681", "0.5671059", "0.56657505", "0.56596065", "0.56549156", "0.5638366", "0.5633011", "0.5629393", "0.562397", "0.5615455", "0.5602646", "0.5601421", "0.55881524", "0.558598", "0.55820894", "0.5581513", "0.5581513", "0.55811673", "0.555877", "0.5558518", "0.55584866", "0.5555083", "0.55540997", "0.55526835", "0.55526143", "0.5550508", "0.55467516", "0.5542803", "0.5539965", "0.552949", "0.5515785", "0.5512074", "0.5507625", "0.54969996", "0.549274", "0.54897845", "0.5486651", "0.5475667", "0.5474775", "0.54706144", "0.5470234", "0.5460005", "0.5459826", "0.5459484", "0.5457572", "0.54548556", "0.54544955", "0.54479104", "0.54479104", "0.54454273", "0.54441357", "0.5441914", "0.5436023", "0.5409256", "0.5405702", "0.5403376", "0.53965116", "0.53871334", "0.5384652", "0.53801715", "0.5379913", "0.5379279", "0.5371446", "0.536861", "0.53636634", "0.5353617" ]
0.0
-1
Created by thuongle on 2/13/16.
interface SplashView extends ErrorView { void onSessionRestore(); void onNoSessionAvailable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void poetries() {\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\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n\n }", "public void mo4359a() {\n }", "protected boolean func_70814_o() { return true; }", "private void init() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "private void m50366E() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private void strin() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {}", "@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 initialize() {\n\n\t}", "@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 }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void init() {}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void skystonePos4() {\n }", "private void init() {\n\n\n\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo6081a() {\n }", "public void mo12628c() {\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void einkaufen() {\n\t}", "protected void mo6255a() {\n }", "private Rekenhulp()\n\t{\n\t}", "private void initialize() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public void skystonePos6() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }" ]
[ "0.60841376", "0.6027869", "0.59372777", "0.5914552", "0.5896505", "0.58567804", "0.58567804", "0.5834579", "0.57930845", "0.5791396", "0.5744119", "0.5742035", "0.5740049", "0.5727408", "0.5724265", "0.5709778", "0.5709778", "0.5709778", "0.5709778", "0.5709778", "0.5700175", "0.56874186", "0.567899", "0.5676729", "0.5674471", "0.56565976", "0.56560796", "0.5649336", "0.5644892", "0.5643622", "0.56420064", "0.5627579", "0.5626564", "0.56202036", "0.56202036", "0.56094086", "0.56082886", "0.557583", "0.55683666", "0.5561399", "0.55515295", "0.5549861", "0.55478996", "0.55478996", "0.55478996", "0.5541316", "0.5541316", "0.5541316", "0.5538619", "0.5535659", "0.5535659", "0.5535659", "0.5524816", "0.5513258", "0.5509543", "0.5505204", "0.5505204", "0.5505204", "0.5505204", "0.5505204", "0.5505204", "0.55026436", "0.549987", "0.54958534", "0.54958534", "0.5494935", "0.5494189", "0.54931045", "0.5488533", "0.5488533", "0.5488533", "0.5488533", "0.5488533", "0.5488533", "0.5488533", "0.5485076", "0.5484376", "0.5482638", "0.5475065", "0.54681295", "0.5464575", "0.54633534", "0.54552215", "0.54552215", "0.5454901", "0.545161", "0.5446175", "0.5444581", "0.54407036", "0.5438396", "0.5434727", "0.5421994", "0.5421427", "0.54179764", "0.5409461", "0.54074705", "0.54060876", "0.5403888", "0.5387202", "0.5386286", "0.5383771" ]
0.0
-1
Creates new form PLGSingleLogSetup
public PLGSingleLogSetup(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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}", "public PanelPayload_cmd( Log log ) {\r\n initComponents();\r\n this.log = log; \r\n if( this.log == null ) this.log = new Log();\r\n }", "@Override\r\n\tpublic ItemLog createItemLog() {\n\t\treturn new HpLog();\r\n\t}", "protected void logEventCreation(final GossipEvent event) {\n logger.debug(CREATE_EVENT.getMarker(), \"Creating {}\", event::toString);\n }", "public Log()\n {\n filePath = String.format(\"log-%d.sl\", System.currentTimeMillis());\n\n open();\n }", "public CommandNew(LogsPanel logsWindow) {\n super(logsWindow);\n }", "private TicketLog createLog() throws SQLException {\n\t\t\t\t\treturn new TicketLog(rs.getLong(1), rs.getString(2),\n\t\t\t\t\t\t\trs.getLong(3),\n\t\t\t\t\t\t\tTicketLog.Action.valueOf(rs.getString(4)),\n\t\t\t\t\t\t\trs.getInt(5));\n\t\t\t\t}", "public Creator_4_tables() {\n// this.sourceUnits = sourceUnits;\n sourceUnits = new HashMap<String, PojoSourceCreatorUnit>();\n sourceTemplatePool.logEnvOnSrcCreate = app.cfg.getCfgBean().logEnvOnSrcCreate;\n env.setLogLeading(\"--cfenv--\");\n }", "public void createAdminLog(TadminLog adminlog) {\n\t\tadminLogDao.create(adminlog);\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public FormFieldsReport() {}", "public Logs() {\n initComponents();\n }", "public Packet(final long unique) {\r\n\t\ttype = EvidenceType.NONE;\r\n\t\tcommand = EvidenceBuilder.LOG_CREATE;\r\n\t\tid = unique;\r\n\t\tdata = null;\r\n\t}", "private void buildTransactionLogPane() // buildTransactionLogPane method start\n\t{\n\t\t// creating object\n\t\tlogOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tlogOutput.setText(log.logReport());\n\t\tlogOutput.setEditable(false);\n\t\tlogOutput.setFont(font);\n\t\tlogOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\ttransactionLogPane.add(logOutput);\n\t\ttransactionLogPane.add(new JScrollPane(logOutput));\n\t}", "public Project_Create_Process() {\n initComponents();\n }", "public MyLogs() {\n }", "@PrePersist\n public void startLog(){\n logger.info(\"creation du place en cours \" + this.name);\n }", "public ChangeLog() {\n initComponents();\n }", "protected GerentePoolLog(Class ownerClass)\n {\n\t\tArquivoConfiguracaoGPP arqConf = ArquivoConfiguracaoGPP.getInstance();\n\t\t//Define o nome e a porta do servidor q serao utilizados no LOG\n\t\thostName = arqConf.getEnderecoOrbGPP() + \":\" + arqConf.getPortaOrbGPP();\n\n\t\t/* Configura o LOG4J com as propriedades definidas no arquivo\n\t\t * de configuracao do GPP\n\t\t */\n\t\t\n\t\tPropertyConfigurator.configure(arqConf.getConfiguracaoesLog4j());\n\t\t//Inicia a instancia do Logger do LOG4J\n\t\tlogger = Logger.getLogger(ownerClass);\n\t\tlog(0,Definicoes.DEBUG,\"GerentePoolLog\",\"Construtor\",\"Iniciando escrita de Log do sistema GPP...\");\n }", "@Override\n public boolean createSalesCallLog(SalesCallLog salescalllog) {\n salescalllog.setGendate(C_Util_Date.generateDate());\n return in_salescalllogdao.createSalesCallLog(salescalllog);\n }", "abstract void initiateLog();", "public void createEditLog(long startingTransactionId) throws IOException {\n mEditLog = new EditLog(mEditLogPath, false, startingTransactionId);\n }", "public NewEntryWizard()\n {\n setNeedsProgressMonitor( true );\n }", "public SystemLog () {\r\n\t\tsuper();\r\n\t}", "public HtShowDetailedLog() {\n\t}", "public NewCommand(ApplicationData data) {\n super(\"NewCommand\");\n this.data = data;\n // configure log4j using resource URL APF-548\n DOMConfigurator.configure(getClass().getResource(\"/META-INF/log4j.xml\"));\n log = getLogger(NewCommand.class);\n\n }", "public LogX() {\n\n }", "public AdminLog() {\n initComponents();\n setSize(1450,853);\n setLocation (250,130);\n }", "public Log() { //Null constructor is adequate as all values start at zero\n\t}", "public static TournamentLogger createDummyLogger(){\n\t\tTournamentLogger logger = new TournamentLogger();\n\t\tlogger.setEventLogPath(null);\n\t\tlogger.setPrintStdOut(false);\n\t\tlogger.setPrintStdErr(false);\n\t\treturn logger;\n\t}", "public Project_Create() {\n initComponents();\n }", "public LogEntry () {\n }", "public CreationScenario(IEmergencyDispatchApi api, Logger logger) {\n\t\tsuper(\"Creation Test\", api, logger);\n\t}", "private void addEntranceLog(String logType) {\n if(ticketTrans == null || checkedItems.size() == 0) return;\n\n Entrance entrance = new Entrance(EntranceStep2Activity.this);\n\n Log.d(EntranceStep2Activity.class.toString(), logType);\n\n try {\n entrance.add(encryptRefNo, checkedItems, logType);\n } catch (Exception e) {\n String reason = e.getMessage();\n Toast.makeText(getApplicationContext(), reason, Toast.LENGTH_SHORT).show();\n } finally {\n loading.dismiss();\n }\n }", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "private Log() {\r\n\t}", "private static void createLogFile() {\n try {\n String date = new Date().toString().replaceAll(\":\", \"-\");\n logFile = new FileWriter(\"bio-formats-test-\" + date + \".log\");\n TestLogger log = new TestLogger(logFile);\n LogTools.setLog(log);\n }\n catch (IOException e) { }\n }", "public DNSLog() {}", "public LoggingPanel() {\n initComponents();\n\n }", "public LogEntry generateLogEntry() {\n long time = getTime();\n int bloodGlucose = getBloodGlucose();\n double bolus = getBolus();\n int carbohydrate = getCarbohydrate();\n return new LogEntry(time, bloodGlucose, bolus, carbohydrate);\n }", "public LogForm(String title) {\r\n\t\tsuper(title);\r\n\t\tthis.addCommand(clearLogCommand);\r\n\t\tthis.addCommand(previuosScreenCommand);\r\n\t\tthis.setCommandListener(new CommandHandler());\r\n\t}", "public Logger(int loglv) {\r\n LOGLV = loglv;\r\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public LogBook() {\n logs = new UniqueLogList();\n exercises = new UniqueExerciseList();\n }", "public LogPoster() {\n\t\t\n\t}", "public CreateProject() {\n\t\tsuper();\n\t}", "private static void createLogger() {\n logger = myLogger.createHtmlLogger(\"JRECEIPTS\", Options.LOG_PATH + \"Receipts\", 262144, true, 1);\n// boolean append = true;\n// int limit = 1000000; // 1 Mb\n// int numLogFiles = 5;\n// FileHandler fh = new FileHandler(Options.LOG_PATH + \"Receipts_%g.html\", limit, numLogFiles, true);\n// fh.setFormatter(new SimpleFormatter());\n// // Add to the desired logger\n// logger = Logger.getLogger(\"Receipts\");\n// logger.addHandler(fh);\n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public ProductCreate() {\n initComponents();\n }", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File(logURL.toURI());\n if (!flog.exists()) {\n flog.createNewFile();\n }\n } catch (Exception ex) {\n log.error(\"newLogFile :\"+ ex.getMessage());\n } finally{\n this.fLogFile = flog;\n return flog;\n }\n }", "public TPMTransportLog( int tpmManufacturer )\r\n {\r\n super();\r\n this.tpmManufacturer = tpmManufacturer;\r\n }", "public void createPPF(){\n\t\tSystem.out.println(\"HDFC:: createed ppf\");\n\t}", "public VfeWorkflowLogAdp(VfeWorkflowsAdp vfeWorkflowsAdp, String input, String output, String poolLog) {\n/* 34 */ this.vfeWorkflowsAdp = vfeWorkflowsAdp;\n/* 35 */ this.input = input;\n/* 36 */ this.output = output;\n/* 37 */ this.poolLog = poolLog;\n/* */ }", "public TOpLogs() {\n this(DSL.name(\"t_op_logs\"), null);\n }", "private Log() {\n }", "public ProductTestReport() {}", "public void create() {\n\t\t\n\t}", "public SensorLog() {\n }", "private LogEvent()\n\t{\n\t\tsuper();\n\t}", "public void generateReport()\r\n {\r\n ProfilerGUI reportGUI = new ProfilerGUI(map,mapCountTracker);\r\n //reportGUI.\r\n }", "public GenerateReport() {\n initComponents();\n displayLogs();\n }", "void createReport(Report report);", "public ClipLog() { }", "private void startFresh() throws JournalException {\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to create initial log file.\");\n }\n }", "@Override\n public void prepare() {\n System.out.println(\"Add Pepporonie!!\");\n }", "public final void fill(final ALogFile pLog, final String pFlBsNm) {\n String logPrp = \"/\" + pFlBsNm + \".properties\";\n URL urlSt = FilFlLogPrp.class.getResource(logPrp);\n if (urlSt != null) {\n this.prnDbg.prn(FilFlLogPrp.class, \"Found properties: \" + logPrp);\n InputStream is = null;\n try {\n Properties props = new Properties();\n is = FilFlLogPrp.class.getResourceAsStream(logPrp);\n props.load(is);\n if (this.logDir == null) { // this.logDir has higher priority\n String lgDir = props.getProperty(\"logDir\");\n if (lgDir != null) {\n this.logDir = lgDir;\n } else {\n String ojStr = props.getProperty(\"onlyJar\");\n if (ojStr != null) {\n this.onlyJar = Boolean.valueOf(ojStr);\n }\n }\n }\n String fmsStr = props.getProperty(\"maxSize\");\n if (fmsStr != null) {\n int maxSize = Integer.parseInt(fmsStr);\n pLog.setMaxSize(maxSize);\n }\n String mitStr = props.getProperty(\"maxIdleTm\");\n if (mitStr != null) {\n int maxIdleTm = Integer.parseInt(mitStr);\n pLog.setMaxIdleTm(maxIdleTm);\n }\n String clsImmStr = props.getProperty(\"clsImm\");\n if (clsImmStr != null) {\n boolean clsImm = Boolean.parseBoolean(clsImmStr);\n pLog.setClsImm(clsImm);\n }\n String dbgShStr = props.getProperty(\"dbgSh\");\n if (dbgShStr != null) {\n boolean dbgSh = Boolean.parseBoolean(dbgShStr);\n pLog.setDbgSh(dbgSh);\n }\n } catch (Exception ex) {\n this.prnDbg.prn(FilFlLogPrp.class, ex);\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ex) {\n this.prnDbg.prn(FilFlLogPrp.class, ex);\n }\n }\n }\n } else {\n this.prnDbg.prn(FilFlLogPrp.class,\n \"There is no properties: \" + logPrp);\n }\n if (this.logDir == null) {\n if (this.onlyJar) {\n try {\n File jarFl = new File(FilFlLogPrp.class.getProtectionDomain()\n .getCodeSource().getLocation().toURI().getPath());\n this.logDir = jarFl.getParent();\n } catch (Exception ex) {\n this.logDir = System.getProperty(\"user.dir\");\n this.prnDbg.prn(FilFlLogPrp.class, ex);\n }\n } else {\n this.logDir = System.getProperty(\"user.dir\");\n }\n }\n pLog.setPath(this.logDir + File.separator + pFlBsNm);\n this.prnDbg.prn(FilFlLogPrp.class, \"Log file path: \" + pLog.getPath());\n }", "public OrderLogRecord() {\n super(OrderLog.ORDER_LOG);\n }", "public NewTargetFileWizard() {\n super();\n }", "public void create(){}", "int insertProductTaskLog(ProductTaskLog productTaskLog);", "protected abstract Logger newInstance(String name);", "@Override\n\tpublic CreditrepayplanLog getLogInstance() {\n\t\treturn new CreditrepayplanLog();\n\t}", "public LoggerView() {\n super(new GridBagLayout());\n\n// this.p = p;\n \n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.HORIZONTAL;\n c.insets = new Insets(2, 5, 2, 5);\n c.anchor = GridBagConstraints.PAGE_START;\n c.gridx = 0;\n c.gridy = 0;\n c.weightx = 0;\n \n c.gridx=0;\n c.gridy++;\n add(new JLabel(\"Name\"), c);\n c.gridx=1;\n// add(new JLabel(p.getName()),c);\n nameField=new JTextField();\n nameField.setEditable(false);\n add(nameField,c);\n c.gridx=0;\n c.gridy++;\n add(new JLabel(\"Level\"), c);\n c.gridx++;\n c.weightx = 1;\n levelSelect = new JComboBox(availLevels);\n// levelSelect.setSelectedItem(Level.parse(p.getLevel()));\n add(levelSelect,c);\n levelSelect.addActionListener(this);\n c.gridx=0;\n c.gridy++;\n \n \n c.gridx++;\n c.gridx=0;\n c.gridy++;\n add(new JLabel(\"Handlername\"), c);\n c.gridx=1;\n String[] defHandlers=new String[SpeechRecorder.DEF_LOG_HANDLERS.length];\n for(int i=0;i<SpeechRecorder.DEF_LOG_HANDLERS.length;i++){\n defHandlers[i]=SpeechRecorder.DEF_LOG_HANDLERS[i].getName();\n }\n handlerBox = new JComboBox(defHandlers);\n \n// handlerBox.setSelectedItem(p.getHandlerName());\n add(handlerBox,c);\n \n \n }", "public Systemlog (java.lang.Integer rowid) {\n\t\tsuper(rowid);\n\t}", "private TypicalLogEntries() {}", "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 }", "public NewProjectDialog(String pt) {\n\t\t\t\n\t\t\tsuper(frame, \"Add new project\");\n\t\t\tresetFields();\n\t\t\tpType = pt;\n\t\t\t\n\t\t\tfinal JDialog npd = this;\n\t\t\t\n\t\t\tpSDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpDeadline.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpEndDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpBudget.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpTotalCost.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpCompletion.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\t\n\t\t\tint x = frame.getLocation().x;\n\t\t\tint y = frame.getLocation().y;\n\t\t\t\n\t\t\tint pWidth = frame.getSize().width;\n\t\t\tint pHeight = frame.getSize().height;\n\t\t\t\n\t\t\tgetContentPane().setLayout(new BorderLayout());\n\t\t\t\n\t\t\tfinal JPanel fieldPanel = new JPanel();\n\t\t\t\n\t\t\tpCode.setText(portfolio.getNewCode());\n\t\t\tpCode.setEditable(false);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(7,3));\n\t\t\t\tSystem.out.println(\"ongoing\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,230));\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(6,3));\n\t\t\t\tSystem.out.println(\"finished\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,200));\n\t\t\t}\n\t\t\tfieldPanel.add(new JLabel(\"Project Code :\"));\n\t\t\tfieldPanel.add(pCode);\n\t\t\tfieldPanel.add(msgCode);\t\t\n\t\t\tfieldPanel.add(new JLabel(\"Project Name :\"));\n\t\t\tfieldPanel.add(pName);\n\t\t\tfieldPanel.add(msgName);\n\t\t\tfieldPanel.add(new JLabel(\"Client :\"));\n\t\t\tfieldPanel.add(pClient);\n\t\t\tfieldPanel.add(msgClient);\n\t\t\tfieldPanel.add(new JLabel(\"Start date: \"));\n\t\t\tfieldPanel.add(pSDate);\n\t\t\tfieldPanel.add(msgSDate);\n\t\t\tmsgSDate.setText(DATE_FORMAT);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"Deadline :\"));\n\t\t\t\tfieldPanel.add(pDeadline);\n\t\t\t\tfieldPanel.add(msgDeadline);\n\t\t\t\tmsgDeadline.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Budget :\"));\n\t\t\t\tfieldPanel.add(pBudget);\n\t\t\t\tfieldPanel.add(msgBudget);\n\t\t\t\tfieldPanel.add(new JLabel(\"Completion :\"));\n\t\t\t\tfieldPanel.add(pCompletion);\t\t\t\n\t\t\t\tfieldPanel.add(msgCompletion);\n\t\t\t\t\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"End Date :\"));\n\t\t\t\tfieldPanel.add(pEndDate);\n\t\t\t\tfieldPanel.add(msgEndDate);\n\t\t\t\tmsgEndDate.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Total Cost :\"));\n\t\t\t\tfieldPanel.add(pTotalCost);\n\t\t\t\tfieldPanel.add(msgTotalCost);\n\t\t\t}\n\t\t\t\n\t\t\tJPanel optionButtons = new JPanel();\n\t\t\toptionButtons.setLayout(new FlowLayout());\n\t\t\t\n\t\t\tJButton btnAdd = new JButton(\"Add\");\n\t\t\tbtnAdd.addActionListener(new ActionListener() {\n\n\t\t\t\t/**\n\t\t\t\t * Validates the information entered by the user and adds the project to the\n\t\t\t\t * Portfolio object if data is valid.\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tif(validateForm()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tProject prj = compileProject();\n\t\t\t\t\t\tportfolio.add(prj,config.isUpdateDB());\n\t\t\t\t\t\tif(prj instanceof OngoingProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) opTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\topTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t} else if (prj instanceof FinishedProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) fpTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\tfpTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnpd.dispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\toptionButtons.add(btnAdd);\n\t\t\t\n\t\t\tJButton btnClose = new JButton(\"Close\");\n\t\t\tbtnClose.addActionListener(new ActionListener() {\n\n\t\t\t\t/* Closes the NewProjectDialog window. */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tnpd.dispose();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\toptionButtons.add(btnClose);\n\t\t\tgetContentPane().add(new JLabel(\"Enter the data for your new \" + getPType(pType) + \" project:\"), BorderLayout.PAGE_START);\n\t\t\tthis.add(fieldPanel, BorderLayout.CENTER);\n\t\t\tthis.add(optionButtons, BorderLayout.PAGE_END);\n\n\t\t\tthis.pack();\n\t\t\t\t\t\n\t\t\tint width = this.getSize().width;\n\t\t\tint height = this.getSize().height;\n\t\t\t\n\t\t\tthis.setLocation(new Point((x+pWidth/2-width/2),(y+pHeight/2-height/2)));\n\t\t\tthis.setVisible(true);\n\t\t}", "@BeforeClass\n public static void setupClass() {\n build = System.getenv(\"BUILD\");\n \n File logFile = new File(LOG_FILE);\n if(!logFile.exists()) {\n System.out.println(\"Creating log file\");\n try {\n logFile.createNewFile();\n System.out.println(\"Created log file: \" + logFile.getPath());\n } catch (IOException e) {\n System.out.println(e.getMessage());\n //e.printStackTrace();\n }\n }\n \n try {\n FileHandler fileHandler = new FileHandler(logFile.getPath());\n fileHandler.setFormatter(new LogFormatter());\n LOGGER.addHandler(fileHandler);\n \n } catch (SecurityException e) {\n System.out.println(e.getMessage());\n //e.printStackTrace();\n } catch (IOException e) {\n System.out.println(e.getMessage());\n //e.printStackTrace();\n }\n \n LOGGER.setUseParentHandlers(false);\n \n }", "public APIOp(final String log) {\r\n\r\n\t\t}", "public Logger (){}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }", "public LogPrompt() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public static TimeTakenLogEntry create() {\n return builder().build();\n }", "Report createReport();", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "@Override\n\tpublic void create(IWizardEntity entity, WizardRunner runner) {\n\t\t\n\t}", "private void createNewLab(){\n String newLabName = NewLabNameTextfield.getText();\n // If lab doesn't exist make the new lab\n if(!Arrays.asList(labsPath.list()).contains(newLabName)){ \n try{\n LabExistLabel.setVisible(false);\n NewLabDialog.revalidate();\n //call python new_lab_script: new_lab_setup.py -b basename \n File labdir = new File(labsPath+File.separator+newLabName);\n labdir.mkdir();\n this.labName = newLabName;\n String cmd = \"new_lab_setup.py -b \"+NewLabBaseImageComboBox.getSelectedItem();\n doLabCommand(cmd);\n \n // Close the new lab dialog and open the new lab\n NewLabDialog.setVisible(false);\n openLab(new File(labsPath+File.separator+newLabName));\n } \n catch (IOException e){\n System.out.println(e);\n }\n }\n else{\n LabExistLabel.setVisible(true);\n NewLabDialog.revalidate();\n System.out.println(\"Lab already exists. Make the lab with a different name other than:\");\n printExistingLabs();\n }\n }", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n public CreateLogPatternResult createLogPattern(CreateLogPatternRequest request) {\n request = beforeClientExecution(request);\n return executeCreateLogPattern(request);\n }", "public FlowAddSender() {\n logger = LoggerFactory.getLogger(FlowAddSender.class.getSimpleName());\n }", "public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public NewScenario(int option, String dbName) {\n setModal(true);\n this.option = option;\n this.dbName = dbName;\n try { \n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n initComponents();\n this.setTitle(title[option]);\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, title[option], javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Arial\", 1, 12)));\n bt_Ok.setText(text[option]);\n tf_Name.setText(dbName);\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n } catch (InstantiationException ex) {\n Logger.getLogger(NewScenario.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(NewScenario.class.getName()).log(Level.SEVERE, null, ex);\n } catch (UnsupportedLookAndFeelException ex) {\n Logger.getLogger(NewScenario.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public EditLogRecordDialog(java.awt.Frame parent, boolean modal, RecoveryLog log)\n {\n super(parent, modal);\n \n this.log = log;\n //this.transactions = log.getTransactions();\n this.items = log.getItems();\n this.parent = parent;\n\n initComponents();\n\n }", "public org.landxml.schema.landXML11.TargetSetupDocument.TargetSetup addNewTargetSetup()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.TargetSetupDocument.TargetSetup target = null;\r\n target = (org.landxml.schema.landXML11.TargetSetupDocument.TargetSetup)get_store().add_element_user(TARGETSETUP$0);\r\n return target;\r\n }\r\n }", "public JDialogParticleAnalysisNew() { }", "public HomeLogada(String userCPF, TipoPessoa tipoPessoa) {\n this.tipoFuncionario = tipoPessoa;\n this.userCPF = userCPF;\n initComponents();\n setModal(true);\n prepFieldsPanelsOnStart();\n }", "private void constructLog() {\r\n String padStr = new String();\r\n padStr = \"Pad with slices \";\r\n\r\n if (padMode == PAD_FRONT) {\r\n padStr += \" using front slices\";\r\n } else if (padMode == PAD_BACK) {\r\n padStr += \" using back slices\";\r\n } else if (padMode == PAD_HALF) {\r\n padStr += \" using front and back slices\";\r\n }\r\n\r\n historyString = new String(\"PadWithSlices(\" + padStr + \")\\n\");\r\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}" ]
[ "0.575105", "0.5576772", "0.5491637", "0.5470512", "0.54480445", "0.5433337", "0.5415718", "0.54055345", "0.53446347", "0.5260506", "0.52402574", "0.5227532", "0.5226601", "0.52256787", "0.52098185", "0.52085334", "0.5194417", "0.5186543", "0.5155354", "0.5149526", "0.514722", "0.5142699", "0.51401097", "0.5138289", "0.5128857", "0.51220804", "0.5120702", "0.51067555", "0.5105204", "0.51040965", "0.50880843", "0.50755775", "0.5074612", "0.5046704", "0.5022321", "0.5021552", "0.50143474", "0.5013569", "0.50011885", "0.49725735", "0.4969442", "0.49677217", "0.49654856", "0.4960662", "0.49595833", "0.49595296", "0.4958974", "0.4944704", "0.4931328", "0.49189654", "0.49136597", "0.49086124", "0.49078456", "0.48929092", "0.48913896", "0.4885987", "0.48789603", "0.48605937", "0.4853351", "0.48415524", "0.48291045", "0.48216766", "0.48128873", "0.4798819", "0.478031", "0.47748777", "0.47713766", "0.47654736", "0.4758626", "0.4754672", "0.4752911", "0.47511333", "0.474767", "0.4742296", "0.47399256", "0.47386152", "0.4734979", "0.47337648", "0.47330928", "0.47209853", "0.47206798", "0.47166646", "0.47139582", "0.47115368", "0.4706226", "0.47042558", "0.47031814", "0.47023484", "0.46998727", "0.4698369", "0.46923226", "0.46906015", "0.468482", "0.4680364", "0.46757913", "0.4671623", "0.46687904", "0.46673235", "0.46672752", "0.46666715" ]
0.5559537
2
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jPanel1 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jFormattedTextField1 = new javax.swing.JFormattedTextField(); jLabel2 = new javax.swing.JLabel(); jSlider1 = new javax.swing.JSlider(); jLabel3 = new javax.swing.JLabel(); jSlider2 = new javax.swing.JSlider(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(it.unipd.math.plg.ui.ProcessLogGeneratorApp.class).getContext().getResourceMap(PLGSingleLogSetup.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setName("Form"); // NOI18N jPanel1.setName("jPanel1"); // NOI18N jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT)); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(it.unipd.math.plg.ui.ProcessLogGeneratorApp.class).getContext().getActionMap(PLGSingleLogSetup.class, this); jButton1.setAction(actionMap.get("actionOk")); // NOI18N jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N jPanel1.add(jButton1); jButton2.setAction(actionMap.get("actionCancel")); // NOI18N jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N jButton2.setName("jButton2"); // NOI18N jPanel1.add(jButton2); getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH); jPanel2.setName("jPanel2"); // NOI18N jPanel2.setLayout(new java.awt.GridBagLayout()); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(10, 0, 5, 0); jPanel2.add(jLabel1, gridBagConstraints); jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#")))); jFormattedTextField1.setText(resourceMap.getString("jFormattedTextField1.text")); // NOI18N jFormattedTextField1.setName("jFormattedTextField1"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5); jPanel2.add(jFormattedTextField1, gridBagConstraints); jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 5, 10, 0); jPanel2.add(jLabel2, gridBagConstraints); jSlider1.setMajorTickSpacing(25); jSlider1.setMinorTickSpacing(25); jSlider1.setPaintLabels(true); jSlider1.setValue(75); jSlider1.setName("jSlider1"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 5, 10, 5); jPanel2.add(jSlider1, gridBagConstraints); jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0); jPanel2.add(jLabel3, gridBagConstraints); jSlider2.setMajorTickSpacing(25); jSlider2.setMinorTickSpacing(25); jSlider2.setPaintLabels(true); jSlider2.setValue(20); jSlider2.setName("jSlider2"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5); jPanel2.add(jSlider2, gridBagConstraints); getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\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.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\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.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\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.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\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.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\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.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\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.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\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(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\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.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.createParallelGroup(\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\tAlignment.LEADING)\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(label22,\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\tGroupLayout.PREFERRED_SIZE,\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\tGroupLayout.DEFAULT_SIZE,\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\tGroupLayout.PREFERRED_SIZE)\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.addGroup(\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\tlayout.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\t\t\t\t.addGap(3)\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.addComponent(\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\tlabel23,\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\tGroupLayout.PREFERRED_SIZE,\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\tGroupLayout.DEFAULT_SIZE,\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\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
TODO Autogenerated method stub
@Override public void requestLaw() { System.out.println("xiaoming-requestLaw"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void requestLawyer() { System.out.println("xiaoming-requestLawyer"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void requestNews() { System.out.println("xiaoming-requestNews"); }
{ "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
Takes user input for new game name and adds it to a database which fills the game combobox in the main form
@Override public void actionPerformed(ActionEvent e) { if (! newGame.getText().equals("")) { String gameName = newGame.getText(); controller.addGame(gameName); ArrayList<String> allGames = controller.getAllGames(); characterGUI.setGameCombo(allGames); characterGUI.setEnabled(true); GameGUI.this.dispose(); } else { characterGUI.showMessageDialog("You must enter a game name.", "GAME NAME ERROR", JOptionPane.ERROR_MESSAGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public void add() {\r\n // Getting the player name.\r\n DialogManager dialog = this.gui.getDialogManager();\r\n String name = dialog.showQuestionDialog(\"Name\", \"Enter your name:\", \"\");\r\n if (name != null) {\r\n this.scoreTable.add(new ScoreInfo(name, this.score.getValue()));\r\n try {\r\n this.scoreTable.save(new File(\"highscores\"));\r\n } catch (IOException e) {\r\n System.out.println(\"Failed creating a file.\");\r\n return;\r\n }\r\n }\r\n }", "public static void addingNewPlayer(){\r\n\t\t//hard code each score includng a total.\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Enter the name of the Player?\");\r\n\t\t\t\t\tString name = scan.next();\r\n\t\t\t\t\t\r\n\t\t\t//establishing the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//inserting the quries assign to the String variables\r\n\t\t\tString query=\"insert into \" + tableName + \" values ('\" + name +\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\";\t\t\r\n\t\t\t\r\n\t\t\t//inserting the hard coded data into the table of the datbase\r\n\t\t\tstatement.execute(query);\r\n\t\t\t\r\n\t\t\t//closing the statement\r\n\t\t\tstatement.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t System.out.println(\"SQL Exception occurs\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void createGame(View view) {\n EditText editText = (EditText) findViewById(R.id.enter_game_keyword);\n gameName = editText.getText().toString();\n\n if (!nameEntered(gameName)) {\n return;\n }\n GameNameHandler.createGameHandler(this,gameName, getPlayerName());\n saveInPreferences(gameName);\n }", "void setGameName(String gameName);", "@Override\n\tprotected void addRecord(AddWindow window) {\n\t\tCategory category = new Category();\n\t\tcategory.setName(this.nameInput.getText());\n\n\t\tString selectedGame = (String) this.gamesList.getSelectedItem();\n\t\tPattern pattern = Pattern.compile(\"\\\\[(\\\\d+)\\\\] (.)+\");\n\t\tMatcher matcher = pattern.matcher(selectedGame);\n\t\tmatcher.find();\n\t\tint gameId = new Integer(matcher.group(1));\n\n\t\tcategory.setGameId(gameId);\n\n\t\tnew Categories().create(category);\n\t\twindow.getSection().refreshTab();\n\n\t}", "@Override\r\n\t//public void sqlQueryAdd(JComboBox combo, String name, JTextArea textArea, Vector vectorCombo) {\r\n\tpublic void sqlQueryAdd(String name, Vector vectorCombo) {\n\t\ttry {\r\n\t\t\tstatement = conn.prepareStatement(\"INSERT INTO words VALUES(?, ?)\");\t\t\r\n\t\t\tstatement.setString(1, name);\r\n\t\t\tstatement.setString(2, \"put contents here & click Update!\"); \r\n\t // add a word into the words table\r\n\t statement.executeUpdate();\r\n\t \r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\ttextArea.setText(e.getMessage());\r\n\t\t\t\r\n\t\t}\r\n \r\n sqlQueryList(vectorCombo);\r\n comboBox.setSelectedItem(name);\r\n //JOptionPane.showMessageDialog(null, name + \" needs to be updated with contents\");\r\n sqlQueryDisplay(name);\r\n \r\n\t}", "public void addZoneCommitte() {\n\t\t\tid = new JComboBox<Integer>();\n\t\t\tAutoCompleteDecorator.decorate(id);\n\t\t\tid.setBackground(Color.white);\n\t\t\tJButton save = new JButton(\"Save members \");\n\t\t\tfinal Choice position = new Choice();\n\t\t\tfinal JTextField txtLevel = new JTextField(10), txtPhone = new JTextField(10);\n\t\t\tfinal Choice chczon = new Choice();\n\n\t\t\ttry {\n\t\t\t\tString sql = \"select * from Zone;\";\n\t\t\t\tResultSet rs = null;\n\t\t\t\t// Register jdbc driver\n\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t// open connection\n\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tchczon.add(rs.getString(\"Name\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\t}\n\n\t\t\t// select zone before proceeding\n\t\t\tObject[] zone = { new JLabel(\"Zone\"), chczon };\n\t\t\tint option = JOptionPane.showConfirmDialog(this, zone, \"Choose zone..\", JOptionPane.OK_CANCEL_OPTION,\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\n\t\t\tif (option == JOptionPane.OK_OPTION) {\n\n\t\t\t\ttry {\n\t\t\t\t\tString sql = \"select * from Registration where Zone=?;\";\n\t\t\t\t\tResultSet rs = null;\n\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t// open connection\n\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\tstmt.setString(1, chczon.getSelectedItem());\n\t\t\t\t\trs = stmt.executeQuery();\n\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tid.addItem(Integer.parseInt(rs.getString(\"RegNo\")));\n\t\t\t\t\t}\n\t\t\t\t\tif (id.getItemCount() > 0) {\n\t\t\t\t\t\tsql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\n\t\t\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (SQLException | ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tid.addItemListener(new ItemListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString sql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\t\t\t\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// If save button clicked, get the inputs from the text fields\n\t\t\t\tsave.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t// ID = Integer.parseInt(IDs.getSelectedItem().toString());\n\t\t\t\t\t\tint RegNo = Integer.parseInt(id.getSelectedItem().toString());\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Insertion to database\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tif (txtPhone.getText().isEmpty() | txtLevel.getText().isEmpty()) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Phone Number or Level cannot be empty\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t\t\t\t// open connection\n\t\t\t\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\t\t\t\tString sql = \"INSERT INTO `Zone committee`(`ID`, `BaptismalName`, `OtherName`, `Phone`, `Position`, `Level`, `Zone`)\"\n\t\t\t\t\t\t\t\t\t\t+ \" VALUES (?,?,?,?,?,?,?);\";\n\t\t\t\t\t\t\t\tstmt = (PreparedStatement) con.prepareStatement(sql);\n\t\t\t\t\t\t\t\tstmt.setInt(1, RegNo);\n\t\t\t\t\t\t\t\tstmt.setString(2, txtFname.getText().toString().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(3, txtSname.getText().toString().toUpperCase());\n\n\t\t\t\t\t\t\t\tstmt.setInt(4, Integer.parseInt(txtPhone.getText().toString()));\n\t\t\t\t\t\t\t\tstmt.setString(5, position.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(6, txtLevel.getText().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(7, chczon.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.executeUpdate();\n\t\t\t\t\t\t\t\tshowZonecomm();\n\t\t\t\t\t\t\t\tid.setSelectedIndex(0);\n\t\t\t\t\t\t\t\ttxtFname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtSname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtLevel.setText(\"\");\n\t\t\t\t\t\t\t\ttxtPhone.setText(\"\");\n\t\t\t\t\t\t\t\tposition.select(0);\n\t\t\t\t\t\t\t} catch (SQLException | ClassNotFoundException e2) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Member exists in the committee list!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// add items to the choice box\n\t\t\t\tposition.add(\"Chairperson\");\n\t\t\t\tposition.add(\"Vice chairperson\");\n\t\t\t\tposition.add(\"Secretary\");\n\t\t\t\tposition.add(\"Vice secretary\");\n\t\t\t\tposition.add(\"Treasurer\");\n\t\t\t\tposition.add(\"Member\");\n\t\t\t\tposition.select(\"Member\");\n\n\t\t\t\tObject[] inputfields = { new JLabel(\"Type ID and press ENTER\"), id, labBaptismalName, txtFname,\n\t\t\t\t\t\tlabOtherName, txtSname, labPhone, txtPhone, new JLabel(\"Level\"), txtLevel, labPosition, position };\n\n\t\t\t\tJOptionPane.showOptionDialog(this, inputfields, \"Enter zone committee members\", JOptionPane.DEFAULT_OPTION,\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, new Object[] { save }, null);\n\t\t\t}\n\n\t\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 }", "@Override\n public void actionPerformed(ActionEvent e) {\n currentUser = (String) comboBox1.getSelectedItem();\n try {\n saveGame.setGameState(currentUser);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public void sauvegardeActionPerformed(java.awt.event.ActionEvent evt) throws IOException{ \n Games.get(0).saveGame();\n JOptionPane.showMessageDialog(this,\"Partie sauvegardée !\");\n this.requestFocusInWindow();\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增员工\",\"输入员工信息,用空格分开,例如:001 Manager Tommy f 312039\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Staff values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"','\"+str[3]+\"','\"+str[4]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowStaff();\r\n\t\t\t}", "public static void fillComboBox() {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tresults = statement.executeQuery(\"Select PeopleName from people \");\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tString peopleName = results.getString(\"PeopleName\");\r\n\t\t\t\tcomboBox.addItem(peopleName);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t \te.printStackTrace();\r\n\t\t}\r\n\t}", "public Game populateGames(String name);", "private void createGame(String name){\n\n }", "public void onSelectionCreate(ActionEvent event) throws SQLException {\n //TODO think about creating league model class to get id easily\n if(chooseAgeGroupCreate.getValue() != null && chooseCityBoxCreate.getValue() != null){\n chooseLeagueBoxCreate.setDisable(false);\n chooseLeagueTeamBoxCreate.getItems().clear();\n chooseLeagueBoxCreate.getItems().clear();\n ObservableList<String> leagueList = DatabaseManager.getLeagues(user, chooseCityBoxCreate.getValue().toString(), chooseAgeGroupCreate.getValue());\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate .setButtonCell(new ListCell<String>() {\n @Override\n protected void updateItem(String item, boolean empty) {\n super.updateItem(item, empty) ;\n if (empty || item == null) {\n setText(\"Choose League\");\n } else {\n setText(item);\n }\n }\n });\n if(leagueList.size() != 0){\n chooseLeagueBoxCreate.getItems().addAll(leagueList);\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField_ip = new javax.swing.JTextField();\n jButton_connect = new javax.swing.JButton();\n jTextField_port = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jTextField_playername = new javax.swing.JTextField();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTable_games = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n jTextField_username = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jPasswordField_password = new javax.swing.JPasswordField();\n diceChoice = new javax.swing.JComboBox<>();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jSpinner_playerNum = new javax.swing.JSpinner();\n jButton_create = new javax.swing.JButton();\n jButton_Closegame = new javax.swing.JButton();\n jButton_update = new javax.swing.JButton();\n\n jTextField_ip.setText(\"130.225.170.205\");\n jTextField_ip.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField_ipActionPerformed(evt);\n }\n });\n\n jButton_connect.setText(\"Forbind\");\n jButton_connect.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_connectActionPerformed(evt);\n }\n });\n\n jTextField_port.setText(\"?\");\n jTextField_port.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField_portActionPerformed(evt);\n }\n });\n jTextField_port.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField_portKeyTyped(evt);\n }\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jTextField_portKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField_portKeyReleased(evt);\n }\n });\n\n jLabel2.setText(\"IP\");\n\n jLabel3.setText(\"Port\");\n\n jLabel5.setText(\"Spillernavn\");\n\n jTextField_playername.setText(\"Navn\");\n jTextField_playername.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField_playernameActionPerformed(evt);\n }\n });\n\n jTable_games.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Skaber\", \"Spillere\", \"Terninger\", \"Port\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jTable_games.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);\n jTable_games.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable_gamesMouseClicked(evt);\n }\n });\n jTable_games.addInputMethodListener(new java.awt.event.InputMethodListener() {\n public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {\n }\n public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {\n jTable_gamesCaretPositionChanged(evt);\n }\n });\n jTable_games.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTable_gamesKeyTyped(evt);\n }\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jTable_gamesKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTable_gamesKeyReleased(evt);\n }\n });\n jScrollPane2.setViewportView(jTable_games);\n if (jTable_games.getColumnModel().getColumnCount() > 0) {\n jTable_games.getColumnModel().getColumn(0).setResizable(false);\n jTable_games.getColumnModel().getColumn(1).setResizable(false);\n jTable_games.getColumnModel().getColumn(2).setResizable(false);\n jTable_games.getColumnModel().getColumn(3).setResizable(false);\n }\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 0, 51));\n jLabel1.setText(\"Velkommen til terningespillet Snyd!\");\n\n jTextField_username.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField_usernameActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Brugernavn\");\n\n jLabel7.setText(\"Kode\");\n\n jPasswordField_password.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jPasswordField_passwordActionPerformed(evt);\n }\n });\n\n diceChoice.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\" }));\n diceChoice.setSelectedIndex(5);\n diceChoice.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n diceChoiceActionPerformed(evt);\n }\n });\n\n jLabel8.setText(\"Terninger\");\n\n jLabel9.setText(\"Spillere\");\n\n jSpinner_playerNum.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n jButton_create.setText(\"Opret Server\");\n jButton_create.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_createActionPerformed(evt);\n }\n });\n\n jButton_Closegame.setText(\"Luk Server\");\n jButton_Closegame.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_ClosegameActionPerformed(evt);\n }\n });\n\n jButton_update.setText(\"Opdater\");\n jButton_update.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_updateActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 586, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(jLabel5)\n .addGap(154, 154, 154))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(7, 7, 7)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField_ip, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 414, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField_playername, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jTextField_port, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton_connect))\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPasswordField_password, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField_username, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(diceChoice, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jSpinner_playerNum)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(25, 25, 25)\n .addComponent(jButton_create)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton_Closegame)\n .addGap(73, 73, 73)))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton_update)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField_ip, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton_connect)\n .addComponent(jTextField_port, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField_playername, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton_update)\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(102, 102, 102)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton_create)\n .addComponent(jButton_Closegame)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(diceChoice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSpinner_playerNum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField_username, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel7)\n .addGap(5, 5, 5)\n .addComponent(jPasswordField_password, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addContainerGap())\n );\n }", "public void onClick(DialogInterface dialog, int whichButton) {\n\n String inputName = input.getText().toString();\n\n if (inputName.length() > 0) {\n players.add(inputName);\n StringBuilder sb = new StringBuilder(savedNames);\n sb.append(inputName + \",\");\n savedNames = sb.toString();\n editor.putString(\"savedNames\", savedNames);\n editor.commit();\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n ConnectDatabase.connectDatabase(); //Open the connection\n\n\n /*\n * Begin preparing statements\n */\n\n /* Prepare the name fields */\n try{\n String nameInsertString = \"INSERT INTO names (firstName, middleName, lastName) value(?, ?, ?)\";\n PreparedStatement nameStmt = conn.prepareStatement(nameInsertString);\n //stmt.executeUpdate(\"INSERT INTO names (firstName, middleName, lastName) value(\" + nameEntry + \")\");\n\n nameStmt.setNString(1, firstNameField.getText());\n nameStmt.setNString(2, middleNameField.getText());\n nameStmt.setNString(3, lastNameField.getText());\n\n nameStmt.executeUpdate();\n\n }catch(SQLException se){\n se.printStackTrace();\n }\n\n /* Prepare the address fields */\n try{\n String addressInsertString = \"INSERT INTO direct_deposit (address, city, state, zip_code) value(?, ?, ?, ?)\";\n PreparedStatement addrStmt = conn.prepareStatement(addressInsertString);\n\n addrStmt.setNString(1, addressField.getText());\n addrStmt.setNString(2, cityField.getText());\n addrStmt.setNString(3, stateField.getText());\n addrStmt.setNString(4, zipCodeField.getText());\n\n addrStmt.executeUpdate();\n }catch (SQLException se){\n se.printStackTrace();\n }\n\n /* Check which radio button is pressed (checkings or savings) and update that field */\n if(checkAcctButton.isSelected()){ //User has selected the checking account\n try{\n String checkInsertString = \"INSERT INTO account_num (checking, bank_rout) value(?, ?)\";\n PreparedStatement acctStmt = conn.prepareStatement(checkInsertString);\n\n acctStmt.setNString(1, checkAcctField.getText());\n acctStmt.setNString(2, routNumField.getText());\n\n acctStmt.executeUpdate();\n }catch (SQLException se){\n se.printStackTrace();\n }\n }else{ //User has selected the savings account\n try{\n String saveInsertString = \"INSERT INTO account_num (savings, bank_rout) value(?, ?)\";\n PreparedStatement acctStmt = conn.prepareStatement(saveInsertString);\n\n acctStmt.setNString(1, saveAcctField.getText());\n acctStmt.setNString(2, routNumField.getText());\n\n acctStmt.executeUpdate();\n }catch (SQLException se){\n se.printStackTrace();\n }\n }\n\n dataSentField.setText(\"Data sent\");\n\n\n }", "private void createGame() {\n String[] options = { \"2\", \"3\", \"4\" };\n String result = (String) JOptionPane.showInputDialog(frame, \"Please enter the max player amount (must be between 2-4\", \"Create game\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n if (result == null) {\n System.out.println(\"[Client] Cancelled game creation\");\n } else {\n connectedServer.writeMessage(client.create(Integer.parseInt(result)));\n gameWindow();\n }\n }", "public void setCombobox() throws IOException {\n try {\n fileReader = new FileReader(\"data/textFiles/gameState.txt\");\n bufferedReader = new BufferedReader(fileReader);\n //remove all items and reload the existing in the file\n comboBox1.removeAllItems();\n //always add \"Trial\" as user\n comboBox1.addItem(\"Trial\");\n //read the file till the end is reached\n while ((line = bufferedReader.readLine()) != null) {\n tokens = line.split(\",\");\n //add all names from the file(names are at first position)\n comboBox1.addItem(tokens[0]);\n }\n } catch (IOException ex) {\n System.out.println(ex);\n } finally {\n if (bufferedReader != null) {\n bufferedReader.close();\n }\n if (fileReader != null) {\n fileReader.close();\n }\n }\n }", "void addTeam1Members() {\n\n String pname, pinit;\n String[] aname;\n for (int x = 0; x < team1Players; x++) {\n switch (x) {\n case 0:\n aname = spnPlayer1.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P1 = pname;\n\n setTeam1PlayerInit(pinit, x);\n\n break;\n case 1:\n aname = spnPlayer2.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P2 = pname;\n\n setTeam1PlayerInit(pinit, x);\n\n break;\n case 2:\n aname = spnPlayer3.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P3 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n case 3:\n aname = spnPlayer4.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P4 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n case 4:\n aname = spnPlayer5.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P5 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n case 5:\n aname = spnPlayer6.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P6 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n\n }\n\n }\n\n }", "public void fillComBox1()\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tconnection = SqlServerConnection.dbConnecter();\r\n\t\t\t\t\r\n\t\t\t\tString sql=\"select * from addLocation\";\r\n\t\t\t\tPreparedStatement pst=connection.prepareStatement(sql);\r\n\t\t\t\tResultSet rs=pst.executeQuery();\r\n\t\t\t\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\troomcombo2.addItem(rs.getString(\"RoomName\"));\r\n\t\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tSystem.out.println(\"新增用户\");\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增用户\",\"输入用户信息,用空格分开,例如:pdl 666 管理员\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Users values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowUser();\r\n\t\t\t}", "private void AddPerson (MouseEvent evt)\n {\n if(currentPlayers < nPlayers && !textfield1.getText().equals(\"\"))\n {\n Names[currentPlayers] = textfield1.getText();\n currentPlayers++;\n editorpane1.setText(editorpane1.getText()+textfield1.getText()+'\\n');\n }\n else\n {\n if(currentPlayers == nPlayers)\n {\n label2.setText(\"Max number of players reached\");\n }\n else\n {\n if(textfield1.getText().equals(\"\"))\n {\n label2.setText(\"Add a Name\");\n }\n }\n }\n }", "private void launchCreateGame() {\n\t\tString name = nameText.getText().toString();\n\t\tString cycle = cycleText.getText().toString();\n\t\tString scent = scentText.getText().toString();\n\t\tString kill = killText.getText().toString();\n\t\t\n\t\tif (name.equals(\"\")){\n\t\t\tname = defaultName;\n\t\t} \n\t\tif (cycle.equals(\"\")) {\n\t\t\tcycle = \"720\";\n\t\t} \n\t\tif (scent.equals(\"\")) {\n\t\t\tscent = \"1.0\";\n\t\t}\n\t\tif (kill.equals(\"\")) {\n\t\t\tkill = \".5\";\n\t\t}\n\t\t\n\t\t\t\n\t\tAsyncJSONParser pewpew = new AsyncJSONParser(this);\n\t\tpewpew.addParameter(\"name\", name);\n\t\tpewpew.addParameter(\"cycle_length\", cycle);\n\t\tpewpew.addParameter(\"scent_range\", scent);\n\t\tpewpew.addParameter(\"kill_range\", kill);\n\t\tpewpew.execute(WerewolfUrls.CREATE_GAME);\n\t\t\n\t\tsetProgressBarEnabled(true);\n\t\tsetErrorMessage(\"\");\n\t}", "public void startNewGame()\n {\n // Display the Banner Page.\n \n System.out.println(\"\\nWelcome to the city of Aaron.\");\n \n // Prompt for and get the user’s name.\n String name;\n System.out.println(\"\\nPlease type in your first name: \");\n name = keyboard.next();\n\n // Call the createNewGame() method in the GameControl class\n \n GameControl.createNewGame(name);\n\n // Display a welcome message\n System.out.println(\"Welcome \" + name + \" have fun!!!\");\n \n //Call the GameMenuView\n GameMenuView gmv = new GameMenuView();\n gmv.displayMenu();\n }", "public void joinGame(View view) {\n EditText editText = (EditText) findViewById(R.id.enter_game_keyword);\n gameName = editText.getText().toString();\n\n if (!nameEntered(gameName)) {\n return;\n }\n GameNameHandler.joinGameHandler(this, gameName, getPlayerName());\n saveInPreferences(gameName);\n }", "public void addGameToList(String name, String maxPlayers, String playeramount) {\n String gameInformation = \"Game name: #\" + name + \"# max players: #\" + maxPlayers + \"# current amount of players: #\" + playeramount;\n for(int i = 0; i < gamesModel.getSize(); i++) {\n if(gamesModel.contains(name)) {\n gamesModel.remove(i);\n break;\n }\n }\n gamesModel.addElement(gameInformation);\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n Playername = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n Playerrating = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n Playerteam = new javax.swing.JTextField();\n Repeatall = new javax.swing.JCheckBox();\n Age = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Add Player\");\n setAlwaysOnTop(true);\n setBackground(new java.awt.Color(255, 255, 255));\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n Playername.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n Playername.setHorizontalAlignment(javax.swing.JTextField.LEFT);\n Playername.setToolTipText(\"\");\n Playername.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Player Name\", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font(\"Arial\", 1, 12), java.awt.Color.black)); // NOI18N\n Playername.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n Playername.setSelectionColor(new java.awt.Color(255, 51, 51));\n Playername.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n PlayernameActionPerformed(evt);\n }\n });\n Playername.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n PlayernameKeyPressed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Add New Player\");\n\n Playerrating.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n Playerrating.setHorizontalAlignment(javax.swing.JTextField.LEFT);\n Playerrating.setToolTipText(\"\");\n Playerrating.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Player Rating(?/10)\", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font(\"Arial\", 1, 12), java.awt.Color.black)); // NOI18N\n Playerrating.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n Playerrating.setSelectionColor(new java.awt.Color(255, 51, 51));\n Playerrating.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n PlayerratingActionPerformed(evt);\n }\n });\n Playerrating.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n PlayerratingKeyPressed(evt);\n }\n });\n\n jButton1.setBackground(new java.awt.Color(204, 204, 204));\n jButton1.setText(\"Submit\");\n jButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(255, 255, 255), new java.awt.Color(204, 204, 204)));\n jButton1.setContentAreaFilled(false);\n jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n Playerteam.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n Playerteam.setHorizontalAlignment(javax.swing.JTextField.LEFT);\n Playerteam.setToolTipText(\"\");\n Playerteam.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Player Team\", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font(\"Arial\", 1, 12), java.awt.Color.black)); // NOI18N\n Playerteam.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n Playerteam.setSelectionColor(new java.awt.Color(255, 51, 51));\n Playerteam.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n PlayerteamActionPerformed(evt);\n }\n });\n Playerteam.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n PlayerteamKeyPressed(evt);\n }\n });\n\n Repeatall.setBackground(new java.awt.Color(255, 255, 255));\n Repeatall.setText(\" Repeat\");\n Repeatall.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RepeatallActionPerformed(evt);\n }\n });\n\n Age.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n Age.setHorizontalAlignment(javax.swing.JTextField.LEFT);\n Age.setToolTipText(\"\");\n Age.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Age\", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font(\"Arial\", 1, 12), java.awt.Color.black)); // NOI18N\n Age.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n Age.setSelectionColor(new java.awt.Color(255, 51, 51));\n Age.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AgeActionPerformed(evt);\n }\n });\n Age.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n AgeKeyPressed(evt);\n }\n });\n\n jLabel2.setText(\"Clear\");\n jLabel2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel2MouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(75, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel2)\n .addGap(29, 29, 29)\n .addComponent(Repeatall)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Playername, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n .addComponent(Playerrating)\n .addComponent(Playerteam)\n .addComponent(Age))\n .addContainerGap(125, Short.MAX_VALUE))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(Playername, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(Playerteam, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(Playerrating, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(Age, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Repeatall)\n .addComponent(jLabel2))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setSize(new java.awt.Dimension(416, 437));\n setLocationRelativeTo(null);\n }", "public void addNewGame(gameLocation game) {\n\n\t\t// add to database here\n\t\tCursor checking_avalability = helper.getGameLocationData(GamelocationTableName,\n\t\t\t\tgame.getTitle());\n\t\tif (checking_avalability == null) {\t\t\t\t\n\n\t\t\tGAME_LIST.add(game);\n\n\t\t\tlong RowIds = helper.insertGameLocation(GamelocationTableName,\n\t\t\t\t\tgame.getTitle(), game.getDescription(),\n\t\t\t\t\tconvertToString(game.getIsCouponUsed()));\n\t\t\t//if (RowIds == -1)\n\t\t\t\t//Log.d(TAG, \"Error on inserting columns\");\n\t\t} else if (checking_avalability.getCount() == 0) { \t\t\t\t// checking twice to make sure it will not miss \n\n\t\t\tGAME_LIST.add(game);\n\n\t\t\tlong RowIds = helper.insertGameLocation(GamelocationTableName,\n\t\t\t\t\tgame.getTitle(), game.getDescription(),\n\t\t\t\t\tconvertToString(game.getIsCouponUsed()));\t\t\t// reuse method\n\t\t\t//if (RowIds == -1)\n\t\t\t\t//Log.d(TAG, \"Error on inserting columns\");\n\t\t}\n\n\t}", "public Frame_of_choice(Weather_Data_Into_DB db_tester, ArrayList<String> table_names){\n\t\n\t//1. Create the frame.\n\t\tframe = new JFrame(\"Choices of action\");\n\t//\tframe = new JApplet();\n\t\tthis.table_names= table_names; \n\t\ttext_box = new JTextField(20);\n\t\ttable_name_box= new JTextField(20);\n \t \tcombo_box = new JComboBox();\n \t \t width=200;\n \t \t height=100;\n \t \t\n\n \t \tcount = 0;\n \t this.db_tester=db_tester;\n \t setDelete_flag(false);\n\t}", "private void editName() {\n Routine r = list.getSelectedValue();\n\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the new name:\",\n \"Edit name\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, r.getName());\n\n if (s != null) {\n r.setName(s);\n }\n }", "public void add_stage() {\r\n\t\tif (this.controller.getSelectedCatagory() == null)\r\n\t\t\treturn;\r\n\t\tString name = JOptionPane.showInputDialog(this,\r\n\t \t\"Choose a name for the stage\",\r\n\t \"Name Stage\", 1);\r\n\t if (name == null) {\r\n\t \treturn;\r\n\t }\r\n\t // If the stage cannot be added, inform the user\r\n\t\tif (!controller.addStage(name)) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A Stage with that name already exists\");\r\n\t\t}\r\n\t}", "public void saveData(){\n String name = editTextName.getText().toString();\n if(!name.isEmpty()){\n DataManager.getInstance().addName(name);\n }\n\n finish();\n }", "public void newgame(String dummy) {\n _game.deal();\n _display.repaint();\n updateScore();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n db = new javax.swing.JComboBox<>();\n driver = new javax.swing.JTextField();\n url = new javax.swing.JTextField();\n username = new javax.swing.JTextField();\n password = new javax.swing.JTextField();\n showPassword = new javax.swing.JCheckBox();\n check = new javax.swing.JButton();\n save = new javax.swing.JButton();\n close = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Add databse\");\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"DB\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Driver\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Url\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Username\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"Password\");\n jLabel5.setToolTipText(\"\");\n\n db.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n db.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"select\", \"MySQL\", \"Oracle\", \"IBM DB2 App\", \"IBM DB2 Net\\t\", \"Sybase\", \"Teradata\", \"Microsoft SQL Server\\t\", \"Postgre\" }));\n db.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n dbItemStateChanged(evt);\n }\n });\n\n driver.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n driver.setEnabled(false);\n\n url.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n\n username.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n\n password.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n\n showPassword.setBackground(new java.awt.Color(255, 255, 255));\n showPassword.setText(\"show password\");\n\n check.setText(\"Check\");\n check.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkActionPerformed(evt);\n }\n });\n\n save.setText(\"Save\");\n save.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveActionPerformed(evt);\n }\n });\n\n close.setText(\"Close\");\n close.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n closeActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showPassword))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(db, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(username))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(url))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(driver, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(85, 85, 85)\n .addComponent(check, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46)\n .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46)\n .addComponent(close, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(34, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(db, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(driver, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(url, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(username, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(showPassword))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(check, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(close, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void courseDoctor() {\n conn=ConnectionDataBase.connect();\n try {\n String name=Login.user;\n ps=conn.prepareStatement(\"select * from course where nameDoctor ='\"+name+\"'\");\n rst=ps.executeQuery();\n while(rst.next())\n {\n chooseCourse.addItem(rst.getString(\"nameC\"));\n }\n chooseCourse.setSelectedIndex(-1);\n \n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }finally{\n try {\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n }\n }", "public Builder setGameName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n gameName_ = value;\n onChanged();\n return this;\n }", "public Builder setGameName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n gameName_ = value;\n onChanged();\n return this;\n }", "public void addGame(String pgn) throws PGNParseException, IOException {\n String name = username + \"_\" + UUID.randomUUID().toString() + \".pgn\";\n addGame(pgn, name);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String name = name_et.getText().toString().trim();\n //String name = text.replaceAll(\"\\\\d+\", \"\").replaceAll(\"(.)([A-Z])\", \"$1 $2\");\n\n //adding new Person to database\n //Person addNewPerson = new Person(name);\n //reference.push().setValue(addNewPerson);\n }", "public void addGames(String game) {\n this.games.add(game);\n }", "private void addList(){\n boolean unique = true;\n String name =this.stringPopUp(\"List name:\");\n do {\n if(name == null){\n return;\n }\n if(!unique){\n unique = true;\n name = this.stringPopUp(\"List with this name already exists\");\n }\n for (Component p : window.getComponents()) {\n if (p.getName().equals(name)) {\n unique = false;\n }\n }\n }while (!unique);\n numberOfLists++;\n\n Users user = new Users();\n user.setEmail(agenda.getUsername());\n ColorPicker colorPicker = ColorPicker.createColorPicker(4);\n JOptionPane.showConfirmDialog(null, colorPicker, \"Chose default priority\", JOptionPane.OK_CANCEL_OPTION);\n Items item = new Items(name,ColorPicker.getColorName(colorPicker.getColor()),\"list\",user);\n agenda.getConnector().addItem(item,user);\n comboBox.addItem(name);\n currentList = agenda.getConnector().getItem(agenda.getUsername(),\"list\",name);\n JPanel panel = new JPanel();\n setUpList(panel);\n setup.put(name,true);\n comboBox.setSelectedItem(name);\n panel.setName(name);\n window.add(name, panel);\n this.showPanel(name);\n this.updateComponent(panel);\n comboBox.setSelectedIndex(numberOfLists-1);\n\n if(numberOfLists==1){\n setUpHeader();\n }\n }", "private void dialogGame(final Game game) {\n final boolean isInsert = game.getId() == null;\n final Dialog dialog = new Dialog(this);\n\n dialog.setContentView(R.layout.new_game);\n\n dialog.setTitle(R.string.label_novo_game);\n\n final TextInputLayout etTitulo = (TextInputLayout) dialog.findViewById(R.id.inputTitulo);\n\n Spinner spGenero = (Spinner)dialog.findViewById(R.id.spGenero);\n\n Spinner spPlataforma = (Spinner)dialog.findViewById(R.id.spPlataforma);\n\n initGeneroSpinner(spGenero, game.getGenero());\n\n initPlataformaSpinner(spPlataforma, game.getPlataforma());\n\n etTitulo.getEditText().setText(game.getTitulo());\n\n Button btConfirmar = (Button) dialog.findViewById(R.id.btConfirmar);\n\n btConfirmar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String titulo = etTitulo.getEditText().getText().toString();\n if(titulo.trim().equals(\"\")){\n etTitulo.setError(getString(R.string.label_campo_obrigatorio));\n } else {\n etTitulo.setErrorEnabled(false);\n game.setTitulo(etTitulo.getEditText().getText().toString());\n game.setGenero(generoSelecionado);\n game.setPlataforma(plataformaSelecionada);\n game.save();\n\n if (isInsert)\n mAdapter.add(game);\n\n mAdapter.notifyDataSetChanged();\n\n dialog.dismiss();\n Toast.makeText(MainActivity.this, R.string.label_gravado_com_sucesso, Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n\n Button btCancelar = (Button) dialog.findViewById(R.id.btCancelar);\n\n btCancelar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t\tMySQLConnect dal = new MySQLConnect();\r\n\t\t\ttry {\r\n\t\t\t\tString name;\r\n\t\t\t\tString date;\r\n\t\t\t\tString desc;\r\n\t\t\t\tString course;\r\n\t\t\t\tString type;\r\n\t\t\t\tString prior;\r\n\t\t\t\tScanner scan = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Name: \");\r\n\t\t\t\tname = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Due Date(YYYY-MM-DD): \");\r\n\t\t\t\tdate = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Description: \");\r\n\t\t\t\tdesc = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Course: \");\r\n\t\t\t\tcourse = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Type: \");\r\n\t\t\t\ttype = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Priority: \");\r\n\t\t\t\tprior = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"The following form was added to the database:\");\r\n\t\t\t\tString[] check = dal.addForm(name.toString(),\"admin\",date.toString(),desc.toString(),course.toString(),type.toString(),prior.toString());\r\n\t\t\t\tfor(int i=0; i<check.length; i++){\r\n\t\t\t\t\tSystem.out.print(check[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t//test confirmation that button works\r\n\t\t\t\ttextArea.append(\"Form Submitted!\\n\");\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public void addClicked(View v){\n android.util.Log.d(this.getClass().getSimpleName(), \"add Clicked. Adding: \" + this.nameET.getText().toString());\n try{\n PartnerDB db = new PartnerDB((Context)this);\n SQLiteDatabase plcDB = db.openDB();\n ContentValues hm = new ContentValues();\n hm.put(\"name\", this.nameET.getText().toString());\n double hours = Double.parseDouble(this.tippableHoursET.getText().toString());\n hm.put(\"tippableHours\", hours);\n double tipsPerHour = Double.parseDouble(this.tipsPerHourET.getText().toString());\n hm.put(\"tipsPerHour\", tipsPerHour);\n //double tips = Double.parseDouble(this.tipsET.getText().toString());\n //hm.put(\"tips\", tips);\n plcDB.insert(\"partner\",null, hm);\n plcDB.close();\n db.close();\n String addedName = this.nameET.getText().toString();\n setupselectSpinner1();\n this.selectedPartner = addedName;\n this.selectSpinner1.setSelection(Arrays.asList(partners).indexOf(this.selectedPartner));\n } catch (Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"Exception adding partner information: \"+\n ex.getMessage());\n }\n }", "public void newGame() throws IOException {\n label.getScene().getWindow().hide();\n\n Stage newStage = new Stage();\n Parent root = FXMLLoader.load(getClass().getResource(\"playerName.fxml\"));\n newStage.setTitle(\"Enter Players\");\n newStage.setScene(new Scene(root));\n newStage.show();\n }", "public void AskName(String input){\r\n\t\tplayerName = input;\r\n\t}", "public void newGameStarted(String p1Name, String p2Name) {\r\n p1Name = p1Name.trim();\r\n p2Name = p2Name.trim();\r\n if (p1Name.equals(\"\"))\r\n p1Name = \"One\";\r\n if (p2Name.equals(\"\"))\r\n p2Name = \"Two\";\r\n game.getPlayerOne().setPlayerName(p1Name);\r\n game.getPlayerTwo().setPlayerName(p2Name);\r\n data.p1Name = p1Name;\r\n data.p2Name = p2Name;\r\n data.gameState = 1;\r\n data.newGameFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.newGameFlag = false; //Set the newGame flag to false so the relevant update lines aren't ever run a second time\r\n }", "@Override\n\tpublic void createNewGame() \n\t{\n\t\t//Create new game\n\t\tboolean randomhexes = getNewGameView().getRandomlyPlaceHexes();\n\t\tboolean randomnumbers = getNewGameView().getRandomlyPlaceNumbers();\n\t\tboolean randomports = getNewGameView().getUseRandomPorts();\n\t\tString title = getNewGameView().getTitle();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tReference.GET_SINGLETON().proxy.createGame(title, randomhexes, randomnumbers, randomports);\n\t\t} \n\t\tcatch (JoinExceptions e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//Refresh game list\n\t\tList<Game> gamelist = Reference.GET_SINGLETON().proxy.getGameList();\n\t\tGameInfo[] games = new GameInfo[gamelist.size()];\n\t\tint counter = 0;\n\t\tfor(Game game: gamelist)\n\t\t{\n\t\t\tGameInfo thisgame = new GameInfo();\n\t\t\tthisgame.setId(game.getId());\n\t\t\tthisgame.setTitle(game.getTitle());\n\t\t\tfor(Player player : game.getPlayers())\n\t\t\t{\n\t\t\t\tPlayerInfo player_info = new PlayerInfo(player);\n\t\t\t\tplayer_info.setColor(player.getColor());\n\t\t\t\tif(!(player.color == null))thisgame.addPlayer(player_info);\n\t\t\t}\n\t\t\tgames[counter] = thisgame;\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\t\n\t\tPlayerInfo ourguy = new PlayerInfo();\n\t\t\n\t\tourguy.setId(ref.player_id);\n\t\tourguy.setName(ref.name);\n\t\tif(getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\t\tif (getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\n\t\tgetJoinGameView().setGames(games, ourguy);\n\t\t\n\t}", "private void addProfile(String inputName) {\n \tif (! inputName.equals(\"\")) {\n\t\t\t///Creates a new profile and adds it to the database if the inputName is not found in the database\n \t\tif (database.containsProfile(inputName)) {\n \t\t\tlookUp(inputName);\n \t\t\tcanvas.showMessage(\"Profile with name \" + inputName + \" already exist.\");\n \t\t\treturn;\n \t\t}\n\t\t\tprofile = new FacePamphletProfile (inputName);\n\t\t\tdatabase.addProfile(profile);\n\t\t\tcurrentProfile = database.getProfile(inputName);\n \t\tcanvas.displayProfile(currentProfile);\n\t\t\tcanvas.showMessage(\"New profile created.\");\n\t\t\t\n \t}\n\t\t\n\t}", "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 }", "@Override\n public void actionPerformed(ActionEvent e) {\n m_testGame.setTitle(searchGameText.getText());\n try {\n if(m_fileManager1.isGameInList(m_testGame)){ // if the game is in the file\n m_NewSearchResult = m_fileManager1.gamesSearchResult(m_testGame); //makes a new com.cs_group.objects.GameList with the search Result\n ChangeEvent event = new ChangeEvent(this);\n for (ChangeListener listener : m_addAnotherGame) {\n listener.stateChanged(event);\n }\n }else { JOptionPane.showMessageDialog(null, \"GAME NOT FOUND\", \"ERROR\", JOptionPane.ERROR_MESSAGE);}\n } catch (IOException | ParseException ioException) {\n ioException.printStackTrace();\n }\n }", "public void characterDialog(View view) {\r\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\r\n final EditText txtInput = new EditText(this);\r\n dialogBuilder.setTitle(\"Add Character:\");\r\n dialogBuilder.setView(txtInput);\r\n dialogBuilder.setPositiveButton(\"Done\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n int firstSize=characters.size();\r\n nextDisplayName = txtInput.getText().toString();//Gets name of character to add\r\n //Next three lines update variables and saves them.\r\n characters.add(new character(nextDisplayName));\r\n adapter.add(characters.get(characters.size()-1));\r\n if(characters.size() > firstSize + 1){\r\n characters.remove(characters.size()-1);\r\n }\r\n saveCharacters(context);\r\n }\r\n });\r\n AlertDialog dialogCharacterName = dialogBuilder.create();\r\n dialogCharacterName.show();\r\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\n\t\t\t\t\tint counter = 0;\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0; i < textFieldHolder.size(); i++){//if field isn't empty\n\t\t\t\t\t\tif(!textFieldHolder.get(i).getText().equals(\"\")){\n\t\t\t\t\t\t\t//game.addTeamToGame(textFieldHolder.get(i).getText()); // adds team to game\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(\"teams: \"+ textFieldHolder.get(i).getText());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(host.isSelected()){\n\t\t\t\t\t\tString portStr = portText.getText();\n\t\t\t\t\t\tSystem.out.println(\"port # : \" + portStr);\n\t\t\t\t\t\t\n\t\t\t\t\t\tint portInt = Integer.parseInt(portStr);\n\t\t\t\t\t\t\n\t\t\t\t\t\tint sliderValue = hostSlider.getValue();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tgameData = new Jeopardy_Game(fileName, teamsFromUser, gameType);\n\t\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnew GameServer(portInt, sliderValue, gameData);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew GameClient(portInt, hostUN.getText());\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\t\n\t\t\t\t\telse if(joinGame.isSelected()){\n\t\t\t\t\t\tString portStr = joinPort.getText();\n\t\t\t\t\t\tSystem.out.println(\"port # : \" + portStr);\n\t\t\t\t\t\tString ipStr = ip.getText();\n\t\t\t\t\t\tint portInt = Integer.parseInt(portStr);\n\t\t\t\t\t\tnew GameClient(portInt, joinName.getText());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{ //if \"not networked\" is selected\n\t\t\t\t\t\tdisplayGB();\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n button.setText(\"CREATING ROOM\");\n button.setEnabled(false);\n writeStringDB(playerName,\"rooms/\" + playerName + \"/Player 1\" + \"/Name\");\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",1);\n startActivity(intent);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField5 = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n teama = new javax.swing.JLabel();\n teamb = new javax.swing.JLabel();\n teamnameA = new javax.swing.JTextField();\n teamnameB = new javax.swing.JTextField();\n playername_1 = new javax.swing.JTextField();\n playername_3 = new javax.swing.JTextField();\n playername_2 = new javax.swing.JTextField();\n playername_4 = new javax.swing.JTextField();\n teamnamelbl = new javax.swing.JLabel();\n playernameAlbl = new javax.swing.JLabel();\n playernameBlbl = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n addPlayersbtn = new javax.swing.JButton();\n scoardplayerlbl = new javax.swing.JLabel();\n\n jTextField5.setText(\"jTextField5\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n teama.setText(\"Team A\");\n\n teamb.setText(\"Team B\");\n\n teamnameA.setText(\"team A\");\n\n teamnameB.setText(\"team B\");\n\n playername_1.setText(\"name_A1\");\n playername_1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n playername_1ActionPerformed(evt);\n }\n });\n playername_1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n playername_1PropertyChange(evt);\n }\n });\n\n playername_3.setText(\"name_A2\");\n\n playername_2.setText(\"name_B1\");\n\n playername_4.setText(\"name_B2\");\n\n teamnamelbl.setText(\"Team Name :\");\n\n playernameAlbl.setText(\"Player A:\");\n\n playernameBlbl.setText(\"Player B:\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(teamnamelbl)\n .addComponent(playernameAlbl)\n .addComponent(playernameBlbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(teama)\n .addComponent(teamnameA)\n .addComponent(playername_1)\n .addComponent(playername_3, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(playername_4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(playername_2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teamnameB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teamb))))\n .addContainerGap(69, Short.MAX_VALUE))\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {playername_1, playername_2, playername_3, playername_4, teamnameA, teamnameB});\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teamb)\n .addComponent(teama))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teamnameB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teamnameA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teamnamelbl))\n .addGap(2, 2, 2)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(playername_1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(playername_2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(playernameAlbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(playername_3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(playername_4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(playernameBlbl))\n .addContainerGap(28, Short.MAX_VALUE))\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {playername_1, playername_2, playername_3, playername_4, teamnameA, teamnameB});\n\n addPlayersbtn.setText(\"OK\");\n addPlayersbtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addPlayersbtnActionPerformed(evt);\n }\n });\n\n scoardplayerlbl.setFont(new java.awt.Font(\"Dialog\", 1, 18));\n scoardplayerlbl.setText(\"Scoard\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(178, 178, 178)\n .addComponent(scoardplayerlbl))\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(addPlayersbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(23, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addComponent(scoardplayerlbl)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(addPlayersbtn)\n .addContainerGap(59, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void newGame() {\n gameString = playerPlays = computerPlays = \"\";\n pScore = cScore = 0;\n setLabels();\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增商品\",\"输入商品信息,用空格分开,例如:001 方便面 6.8\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Goods values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t\t//compositeGoodsShow.layout(true);\r\n\t\t\r\n\t\t\t}", "@FXML\n private void addNewCoach() {\n try {\n Connection conn = DatabaseHandler.getInstance().getConnection();\n try (Statement st = conn.createStatement()) {\n st.execute(\"insert into szkolka.uzytkownik(imie, nazwisko, id_tu) values('\" +\n coachName.getText() + \"', '\" + coachSurname.getText() + \"', 2);\");\n st.close();\n coachName.setText(\"\");\n coachSurname.setText(\"\");\n setCoachesTable();\n }\n } catch (SQLException e) {\n warningText.setVisible(true);\n }\n }", "public void btn_newEntry() throws IOException, SQLException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewEntry.fxml\"));\n Parent parent = fxmlLoader.load();\n NewEntryController newEntryController = fxmlLoader.<NewEntryController>getController();\n newEntryController.setPresenter(presenter);\n newEntryController.fillComboBox();\n this.stageNewEntry = new Stage();\n stageNewEntry.setTitle(bundle.getString(\"entryNew.title\"));\n stageNewEntry.setScene(new Scene(parent, 400, 400));\n stageNewEntry.setAlwaysOnTop(true);\n stageNewEntry.setResizable(false);\n stageNewEntry.initModality(Modality.APPLICATION_MODAL);\n stageNewEntry.getIcons().add(new Image(String.valueOf(this.getClass().getResource(\"images/logo.png\"))));\n stageNewEntry.show();\n }", "public void onCreate() {\r\n Session session = sessionService.getCurrentSession();\r\n Map<String, Region> items = ControlUtility.createForm(Pc.class);\r\n\r\n ControlUtility.fillComboBox((ComboBox<Kind>) items.get(\"Kind\"), session.getCampaign().getCampaignVariant().getKinds());\r\n ControlUtility.fillComboBox((ComboBox<Race>) items.get(\"Race\"), session.getCampaign().getCampaignVariant().getRaces());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Ability>) items.get(\"SavingThrows\"), Arrays.asList(Ability.values()));\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Proficiency>) items.get(\"Proficiencies\"), session.getCampaign().getCampaignVariant().getProficiencies());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Feature>) items.get(\"Features\"), session.getCampaign().getCampaignVariant().getFeatures());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Trait>) items.get(\"Traits\"), session.getCampaign().getCampaignVariant().getTraits());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Equipment>) items.get(\"Equipment\"), session.getCampaign().getCampaignVariant().getEquipments());\r\n\r\n Campaign campaign = session.getCampaign();\r\n\r\n Dialog<String> dialog = ControlUtility.createDialog(\"Create Playable Character\", items);\r\n dialog.show();\r\n\r\n dialog.setResultConverter(buttonType -> {\r\n if (buttonType != null) {\r\n Pc pc = null;\r\n try {\r\n pc = ControlUtility.controlsToValues(Pc.class, items);\r\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if (pc != null) {\r\n try {\r\n characterService.createPlayerCharacter(pc);\r\n } catch (SessionAlreadyExists | IndexAlreadyExistsException sessionAlreadyExists) {\r\n sessionAlreadyExists.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n Player player = playerManagementService.getRegisteredPlayer();\r\n campaign.addPlayer(player);\r\n campaign.addCharacter(pc);\r\n if (campaignListingService.campaignExists(campaign.getId())) {\r\n manipulationService.updateCampaign(campaign);\r\n } else {\r\n manipulationService.createCampaign(campaign);\r\n }\r\n } catch (MultiplePlayersException | EntityNotFoundException | SessionAlreadyExists | IndexAlreadyExistsException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n } catch (MultiplePlayersException | EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), pc.getId());\r\n sessionService.updateCampaign(campaign);\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n render();\r\n return pc.toString();\r\n }\r\n }\r\n return null;\r\n });\r\n }", "private void initialize() {\n frame = new JFrame();\n frame.setBounds(100, 100, 550, 412);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(null);\n\n JLabel lblHi = new JLabel(\"<html>How many days would you like to play?</html>\");\n lblHi.setBounds(12, 12, 267, 48);\n frame.getContentPane().add(lblHi);\n\n JComboBox<String> howManyDays = new JComboBox<String>();\n howManyDays.setModel(new DefaultComboBoxModel<String>(new String[]{\"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"}));\n howManyDays.setBounds(328, 24, 56, 24);\n frame.getContentPane().add(howManyDays);\n\n JLabel lblNewLabel = new JLabel(\"How many players do you want ?\");\n lblNewLabel.setBounds(12, 89, 267, 15);\n frame.getContentPane().add(lblNewLabel);\n\n JComboBox<Integer> numOfCrew = new JComboBox<Integer>();\n numOfCrew.setModel(new DefaultComboBoxModel<Integer>(new Integer[]{2, 3, 4}));\n numOfCrew.setBounds(328, 84, 56, 24);\n frame.getContentPane().add(numOfCrew);\n\n JLabel lblWhatIsYour = new JLabel(\"What is your Ship name?\");\n lblWhatIsYour.setBounds(12, 154, 267, 15);\n frame.getContentPane().add(lblWhatIsYour);\n\n JTextField shipName = new JTextField();\n shipName.setText(\"fake_taxi\");\n shipName.setBounds(271, 154, 226, 24);\n frame.getContentPane().add(shipName);\n shipName.setColumns(10);\n\n JLabel errorMessage = new JLabel(\"\");\n errorMessage.setBounds(281, 200, 216, 48);\n frame.getContentPane().add(errorMessage);\n\n\n JButton btnLetsPlay = new JButton(\"Next\");\n btnLetsPlay.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n\n\n if (shipName.getText().length() > 15 || shipName.getText().length() < 1) {\n errorMessage.setText(\"<html>Your ship name has to be between 1 to 15 characters</html>\");\n\n } else if (shipName.getText().contains(\" \")) {\n errorMessage.setText(\"<html>Your ship name cannot contain spaces</html1>\");\n } else {\n Game gameState = new Game(Integer.parseInt(howManyDays.getSelectedItem().toString()), Integer.parseInt(numOfCrew.getSelectedItem().toString()));\n Crew theCrew = new Crew(shipName.getText(), gameState);\n frame.dispose();\n CharacterCreationScreen.main(theCrew);\n }\n }\n });\n\n btnLetsPlay.setBounds(209, 283, 114, 25);\n frame.getContentPane().add(btnLetsPlay);\n\n\n }", "public void addLibrian() {\n\t\t JTextField name = new JTextField();\r\n\t\t JPasswordField password = new JPasswordField();\r\n\t\t JTextField email = new JTextField(); \r\n\t\t JTextField address = new JTextField(); \r\n\t\t JTextField city = new JTextField(); \r\n\t\t JTextField contact = new JTextField(); \r\n\t\t Object[] librian = {\r\n\t\t\t\t \"Name:\",name,\r\n\t\t\t\t \"Password:\",password,\r\n\t\t\t\t \"Email:\",email,\r\n\t\t\t\t \"Address:\",address,\r\n\t\t\t\t \"City:\",city,\r\n\t\t\t\t \"Contact:\",contact\r\n\t\t };\r\n\t\t int option = JOptionPane.showConfirmDialog(null, librian, \"New librian\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t if(option==JOptionPane.OK_OPTION) {\r\n // add to the librian database\r\n\t\t try {\r\n\t\t\t \r\n\t\t String query = \"insert into Librian(name,password,email,address,city,contact)\"\r\n\t\t\t\t +\" values(?,?,?,?,?,?)\";\r\n\t\t \r\n\t\t PreparedStatement s = SimpleLibraryMangement.connector.prepareStatement(query);\r\n\t\t s.setString(1, name.getText());\r\n\t\t s.setString(2, String.valueOf(password.getPassword()) );\r\n\t\t s.setString(3, email.getText());\r\n\t\t s.setString(4, address.getText());\r\n\t\t s.setString(5, city.getText());\r\n\t\t s.setString(6, contact.getText());\r\n\t\t s.executeUpdate();\r\n\t\t JOptionPane.showMessageDialog(null, \"Add librian successfully\", null, JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t } catch(Exception e) {\r\n\t\t\t JOptionPane.showMessageDialog(null, \"Add librian failed\", null, JOptionPane.ERROR_MESSAGE);\r\n\t\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t } \r\n\t\t \r\n\t}", "public void onLeagueSelectionCreate(ActionEvent actionEvent) throws SQLException {\n if(chooseLeagueBoxCreate.getValue() != null){\n chooseLeagueTeamBoxCreate.setDisable(false);\n ObservableList<String> teamList = DatabaseManager.getLeagueTeams(user, chooseCityBoxCreate.getValue().toString(), chooseAgeGroupCreate.getValue().toString(), chooseLeagueBoxCreate.getValue().toString());\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.setButtonCell(new ListCell<String>() {\n @Override\n protected void updateItem(String item, boolean empty) {\n super.updateItem(item, empty) ;\n if (empty || item == null) {\n setText(\"Choose Team\");\n } else {\n setText(item);\n }\n }\n });\n if(teamList.size() != 0){\n chooseLeagueTeamBoxCreate.getItems().addAll(teamList);\n }\n }\n }", "public void addQuestionsToDatabase() {\n\t\taddMoreQuestionsframe = new JFrame(\"Add Questions\");\n\n\t\t// Shows maximum number of questions\n\t\tJLabel maxQuestions = new JLabel(\"Total number of questions: \");\n\t\tJLabel maxQuestionsText = new JLabel(Integer.toString(testGenerator.noOfQuestionsForTest()));\n\n\t\tJPanel maxQuestionsPanel = new JPanel();\n\t\tmaxQuestionsPanel.setLayout(new FlowLayout());\n\t\tmaxQuestionsPanel.add(maxQuestions);\n\t\tmaxQuestionsPanel.add(maxQuestionsText);\n\n\t\t// Allows user to specify the number of questions to be added\n\t\tJLabel numQuestions = new JLabel(\"Number of Questions to be added: \");\n\t\tfinal JTextField numQuestionsText = new JTextField();\n\t\tnumQuestionsText.setColumns(3);\n\n\t\tJPanel numQuestionsPanel = new JPanel();\n\t\tnumQuestionsPanel.setLayout(new FlowLayout());\n\t\tnumQuestionsPanel.add(numQuestions);\n\t\tnumQuestionsPanel.add(numQuestionsText);\n\n\t\t// Adds a button for user to submit the number entered\n\t\tJButton addQuestions = new JButton(\"Add Questions\");\n\t\tJButton cancel = new JButton(\"Cancel\");\n\n\t\taddQuestions.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint numQuestions = Integer.parseInt(numQuestionsText.getText());\n\t\t\t\tif(numQuestions < 0) {\n\t\t\t\t\tshowMessage(\"A number above zero has to be entered\");\n\t\t\t\t} else {\n\t\t\t\t\tif(((noOfQuestions + numQuestions) <= MaxQuestionLimit)) {\n\t\t\t\t\t\tint previousTotal = noOfQuestions;\n\t\t\t\t\t\tnoOfQuestions += numQuestions;\n\t\t\t\t\t\ttestGenerator.addMoreQuestions(noOfQuestions);\n\t\t\t\t\t\tupdateTotalQuestions();\n\t\t\t\t\t\tupdateQuestionComboBox(previousTotal);\n\t\t\t\t\t\tupdateFields();\n\t\t\t\t\t\taddMoreQuestionsframe.dispose();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowMessage(\"There cant be over \" + MaxQuestionLimit + \n\t\t\t\t\t\t\t\t\" questions in a database\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tcancel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddMoreQuestionsframe.dispose();\n\t\t\t}\n\t\t});\n\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new FlowLayout());\n\t\tbuttonPanel.add(addQuestions);\n\t\tbuttonPanel.add(cancel);\n\n\t\t// Adds all components to a panel\n\t\tJPanel mainPanel = new JPanel();\n\t\tmainPanel.setLayout(new BorderLayout());\n\t\tmainPanel.add(maxQuestionsPanel, BorderLayout.NORTH);\n\t\tmainPanel.add(numQuestionsPanel, BorderLayout.CENTER);\n\t\tmainPanel.add(buttonPanel, BorderLayout.SOUTH);\n\n\t\taddMoreQuestionsframe.getContentPane().add(mainPanel, BorderLayout.CENTER);\n\n\t\taddMoreQuestionsframe.pack();\n\t\taddMoreQuestionsframe.setVisible(true);\n\t}", "public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }", "@FXML\n public void save(ActionEvent event) throws SQLException {\n current.parseRole(roleTextBox.getText());\n \n current.setName(comboFkp.getValue());\n current.setTitle(comboFkm.getValue());\n \n if(inserting) {\n System.out.println(\"Inserting \" + current.getTitle() + \" \" + current.getName());\n // Precisa inserir dois booleanos no final, um para ator e um para diretor\n dh.insertPersonMidia(current.getTitle(), current.getName(), current.getActor(), current.getDirector());\n }\n\n closeWindow();\n }", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "private void add(String name) {\n try {\n PokemonToEdit pkm = Reader.readPokemon(name);\n team.add(pkm);\n System.out.println(name + \" has been add to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException e) {\n System.out.println(\"Pokemon not found natively\");\n System.out.println(\"Try looking for the pokemon online\");\n try {\n PokemonToEdit pkm = Crawler.loadPokemon(name);\n Saver.savePokemon(pkm);\n team.add(pkm);\n System.out.println(name + \" has been added to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException ex) {\n System.out.println(\"Pokemon not found\");\n } catch (TeamFullException ex) {\n System.out.println(\"Team is full\");\n }\n } catch (TeamFullException e) {\n System.out.println(\"Team is full\");\n\n }\n }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n String playerName=nameTextField.getText();\n String playerNumber=numberTextField.getText();\n String message=\"\";\n\n if(playerName.equals(\"\"))\n {\n message=\"the name field is empty! \\n\";\n }\n if(playerNumber.equals(\"\")||(Integer.parseInt(playerNumber)!=2&&(Integer.parseInt(playerNumber))!=3))\n {\n message+=\"Remember a game is composed by 2 or 3 players\";\n }\n if (actionEvent.getActionCommand().equals(\"submit\"))\n {\n Choice c=new PlayerNumberChoice(playerName,Integer.parseInt(playerNumber));\n view.setPlayerName(playerName);\n view.notify(c);\n submitButton.setEnabled(false);\n }\n else\n {\n JOptionPane.showMessageDialog(lobbyWindowFrame,message);\n }\n }", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "public GameData addGame(String name, int hosting) {\n\t\tSQLiteDatabase database = getWritableDatabase();\n\n\t\tContentValues gamevals = new ContentValues();\n\t\tgamevals.put(\"name\", name);\n\t\tgamevals.put(\"hosting\", hosting);\n\n\t\tlong rowid = database.insert(\"game\", null, gamevals);\n\t\tString[] args = new String[] { \"\" + rowid };\n\n\t\tCursor c = database.rawQuery(\n\t\t\t\t\"SELECT game_id, name, hosting FROM game WHERE game.ROWID =?\",\n\t\t\t\targs);\n\t\tc.moveToFirst();\n\n\t\tcreateMap(c.getInt(c.getColumnIndex(\"game_id\")));\n\n\t\treturn new GameData(c.getInt(c.getColumnIndex(\"game_id\")),\n\t\t\t\tc.getString(c.getColumnIndex(\"name\")), c.getInt(c\n\t\t\t\t\t\t.getColumnIndex(\"hosting\")));\n\t}", "private void save1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_save1ActionPerformed\n\n //Save Button action\n //eid int\n //level int\n //rank int\n String lname = LectName.getText();\n String eid = EmpID.getText();\n String fac = faculty.getSelectedItem().toString();\n String dep = department.getSelectedItem().toString();\n String cent = center.getSelectedItem().toString();\n String build = building.getSelectedItem().toString();\n String lev = level.getSelectedItem().toString();\n String rnk = Rank.getText();\n\n try {\n\n String s = \"INSERT INTO lecturer (eid, lectur_name, faculty, department, center, building, lec_level, lec_rank) values ('\" + eid + \"', '\" + lname + \"', '\" + fac + \"', '\" + dep + \"', '\" + cent + \"', '\" + build + \"', '\" + lev + \"', '\" + rnk + \"')\";\n pst = con.prepareStatement(s);\n pst.execute();\n\n //load tabledetails after adding a new one\n lectureDetails();\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e);\n System.out.print(e);\n }\n\n }", "private static void createPlayers(int numPlayers){\r\n\t\t// crea la lista de jugadores\r\n\t\tfor(int i = 1; i <= numPlayers; i++){\r\n\t\t\t// Muestra una ventana de dialogo para introducir el nombre del jugador\r\n\t\t\tJTextField textField = new JTextField();\r\n\t\t\ttextField.setText(\"Jugador\"+i);\r\n\t\t\tJOptionPane.showOptionDialog(null, textField, \"Escriba el nombre para el jugador #\"+i, JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, new String[]{\"Aceptar\"}, null);\r\n\t\t\tplayers.add(new Player(textField.getText()));\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t// You fill this in //\n\t\tif (e.getSource() == clearButton) {\n\t\t\tgraph.clear();\n\t\t}\n\t\telse if ( (e.getSource() == graphButton) || (e.getSource() == nameBox) ) {\t\t\t\n\t\t\t// If the name is in the database, add it to the graph\n\t\t\tif (namesInfo.findEntry(nameBox.getText()) != null ) {\n\t\t\t\tgraph.addEntry(namesInfo.findEntry(nameBox.getText()) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprintln(\"Name \" + nameBox.getText() + \" isn't in the database.\");\n\t\t\t}\n\t\t}\n\t}", "private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {\n String ids=id.getText().toString();\n \n if(nameadd.getText().isEmpty() || id.getText().isEmpty() || lev.getText().isEmpty() ||rank.getText().isEmpty() )\n JOptionPane.showMessageDialog(null,\"FILL ALL FIELDS\");\n else if(id.getText().length() !=6){\n JOptionPane.showMessageDialog(null,\"ID should be six digits\");\n }\n else{\n String query = \"insert into Lecturer (id,name,faculty,centre,department,category,building,level,rank) values('\"+id.getText()+\"','\"+nameadd.getText()+\"','\"+faccombo.getSelectedItem()+\"','\"+centrecombo.getSelectedItem()+\"','\"+deptcombo.getSelectedItem()+\"','\"+buildcombo.getSelectedItem()+\"','\"+catecombo.getSelectedItem()+\"','\"+lev.getText()+\"','\"+rank.getText()+\"')\";\n try {\n st.executeUpdate(query);\n JOptionPane.showMessageDialog(null,\"EMPLOYEE ADDED SUCCESSFULLY\");\n clearadd();\n } catch (SQLException ex) {\n Logger.getLogger(Lecturer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public addInventory() {\n initComponents();\n centerFrame(); //Set frame in the center of the screen\n conn = ConnectToDatabase.getConnection(); //Get connection to the database\n setComboBoxValues(); //Set the combo box values\n listLoaded = true; //List has been loaded completely\n }", "public void newGame()\n\t{\n\t\tthis.setVisible(false);\n\t\tthis.playingField = null;\n\t\t\n\t\tthis.playingField = new PlayingField(this);\n\t\tthis.setSize(new Dimension((int)playingField.getSize().getWidth()+7, (int)playingField.getSize().getHeight() +51));\n\t\tthis.setLocation(new Point(200,20));\n\t\tthis.setContentPane(playingField);\n\t\t\n\t\tthis.setVisible(true);\n\t}", "public void loadLecturer1(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec1.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n}", "public static void main(String[] args) {\r\n\t\r\n\t// Connecting to the dataBase\r\n createConnection(dbURL, creationAttribute);\r\n \r\n \r\n Scanner scan = new Scanner(System.in);\r\n\r\n int selection=0;\r\n do{\r\n \tSystem.out.println(\"What would you like to do?\");\r\n System.out.println(\"\\t1) Add a new Player\");\r\n System.out.println(\"\\t2) Calculate and post the front 9 score\");\r\n System.out.println(\"\\t3) Display the Players in alphabetic order\");\r\n System.out.println(\"\\t4) Display the Players sorted lowest to highest score\");\r\n System.out.println(\"\\t5) Display the Players sorted highest to lowest score\");\r\n System.out.println(\"\\t6) Enter the player score\");\r\n System.out.println(\"\\t7) Quit\");\r\n System.out.print(\"\t Choice: -->\");\r\n \r\n selection = scan.nextInt();\r\n System.out.flush();\r\n \r\n if(selection == 1){\r\n //Adding new data from the data base\r\n addingNewPlayer();\r\n System.out.println(\"Players is successfully Added.\");\r\n System.out.println();\r\n }else if(selection == 2){ \r\n \t\r\n \tSystem.out.println(\"Calculating and posting the front 9 score:\");\r\n \tcalculateAndPost();\r\n \tdisplayScoreCard();\r\n \t System.out.println();\r\n \t\r\n }\r\n else if(selection == 3){\r\n \tSystem.out.println(\"The Players in alphabetic order:\");\r\n \tplayersInAlphabeticalOrder();\r\n \t System.out.println();\r\n }\r\n else if(selection ==4){\r\n \tSystem.out.println(\"The players sorted lowest to highest score:\");\r\n \tlowestToHighestScore();\r\n \t System.out.println();\r\n }else if(selection == 5){\r\n \tSystem.out.println(\"The players sorted lowest to highest score:\");\r\n \thigestToLowestScore();\r\n \t System.out.println();\r\n }else if(selection == 6){\r\n \tinsertPlayersData();\r\n \tdisplayScoreCard();\r\n \tSystem.out.println();\r\n }else if (selection == 7){\r\n \tSystem.out.println(\"You quit.\\nThank you for playing this Game.\");\r\n \tSystem.exit(0);\r\n }else{\r\n \tSystem.out.println(\"You have entered the wrong selection. Please Try again.\");\r\n \t System.out.println();\r\n }\r\n \r\n }while(selection !=7);\r\n \r\n //closing the statement and connection to the database\r\n shutdown();\r\n }", "@Override\r\n\tpublic void add() {\n\t\tif(alreadyAdded()) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Member is already added\");\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\t\ttry(Connection connection= db.getConnection();) {\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString addString=\"INSERT INTO members VALUES(?,?,?,?)\";\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(addString);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t\t\tpreparedStatement.setString(2, super.getNameString());\r\n\t\t\t\tpreparedStatement.setString(3, super.getSurnameString());\r\n\t\t\t\tpreparedStatement.setString(4, super.getEmailString());\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "private void handleStartGame()\n {\n String name = nameInputLabel.getText();\n if (name != null)\n {\n gameScreen.setPlayerName(name.replaceAll(\";\", \" \").trim());\n }\n else\n {\n gameScreen.setPlayerName(\"\");\n }\n \n // Set the new screen state\n gameScreen.setState(gameScreen.getLevelSplashState());\n }", "@Override\n\tpublic void addChoice(String choice) {\n\t}", "public void onStartGameClicked() throws IOException {\n playerList.clear();\n MapBlackWhite currentMap;\n MapFull tournamentMap;\n Triple tournamentTriple;\n\n //Spielertypen hinzufügen\n addPlayerType(playerOneChooseCharakterComboBox.getValue(),\n isPlayerOneKiCheckBox.isSelected(),\n playerOneNameTextField.getText());\n addPlayerType(playerTwoChooseCharakterComboBox.getValue(), isPlayerTwoKiCheckBox.isSelected(), playerTwoNameTextField.getText());\n if (addPlayerThreeToggleButton.isSelected()) {\n addPlayerType(playerThreeChooseCharakterComboBox.getValue(), isPlayerThreeKiCheckBox.isSelected(), playerThreeNameTextField.getText());\n }\n if (addPlayerFourToggleButton.isSelected()) {\n addPlayerType(playerFourChooseCharakterComboBox.getValue(), isPlayerFourKiCheckBox.isSelected(), playerFourNameTextField.getText());\n }\n setDifficulty();\n\n //PLayerList muss mind. zwei Spieler enthalten\n if (!playerList.stream().map(Triple::getFirst).filter(playerType -> !playerType.equals(PlayerType.NONE)).allMatch(new HashSet<PlayerType>()::add)) {\n cannotStartGameLabel.setText(\"Mindestens zwei Spieler haben den gleichen Typ\");\n return;\n }\n if (playerList.isEmpty() || difficulty == null || isTextFieldEmpty()) {\n cannotStartGameLabel.setText(\"Es sind nicht alle Namensfelder ausgefüllt\");\n return;\n }\n \n playerOneNameTextField.clear();\n playerTwoNameTextField.clear();\n playerThreeNameTextField.clear();\n playerFourNameTextField.clear();\n \n playerOneChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n playerTwoChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n playerThreeChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n playerFourChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n editDifficultyComboBox.getSelectionModel().select(0);\n\n playerThreeNameTextField.setDisable(true);\n playerFourNameTextField.setDisable(true);\n playerThreeChooseCharakterComboBox.setDisable(true);\n playerFourChooseCharakterComboBox.setDisable(true);\n addPlayerThreeButton.setDisable(true);\n addPlayerFourButton.setDisable(true);\n isPlayerOneKiCheckBox.setSelected(false);\n isPlayerTwoKiCheckBox.setSelected(false);\n isPlayerThreeKiCheckBox.setSelected(false);\n isPlayerFourKiCheckBox.setSelected(false);\n isPlayerThreeKiCheckBox.setDisable(true);\n isPlayerFourKiCheckBox.setDisable(true);\n \n addPlayerThreeToggleButton.setSelected(false);\n addPlayerFourToggleButton.setSelected(false);\n\n if (!getGameWindow().getDeveloperSettings()) {\n \n if (chooseMapComboBox.getValue() == null) {\n cannotStartGameLabel.setText(\"Es ist keine Map ausgewählt\");\n return;\n } else if (chooseMapComboBox.getValue().equals(\"neu generieren\")) {\n currentMap = MapUtil.generateRandomIsland();\n debug(\"Map: random \\n\");\n } else {\n String mapString = new String(Files.readAllBytes(Paths.get(MapController.MAP_FOLDER + chooseMapComboBox.getValue() + \".map\")), StandardCharsets.UTF_8);\n currentMap = MapUtil.readBlackWhiteMapFromString(mapString);\n debug(\"Map:\" + chooseMapComboBox.getSelectionModel().getSelectedItem() + \"\\n\");\n }\n \n \n this.getGameWindow().getControllerChan().startNewGame(\"Coole Carte\", currentMap, playerList, difficulty);\n debug(chooseMapComboBox.getSelectionModel().getSelectedItem() );\n debug(chooseMapComboBox.getValue());\n debug(currentMap.toString());\n } else {\n \n if (chooseDeveloperMapComboBox.getValue() == null) {\n cannotStartGameLabel.setText(\"Es ist keine Map ausgewählt\");\n return;\n } else if (chooseArtifactCardStackComboBox.getValue() == null){\n cannotStartGameLabel.setText(\"Es ist kein Flutkartenstapel ausgewählt\");\n return;\n } else if (chooseFloodCardStackComboBox == null) {\n cannotStartGameLabel.setText(\"Es ist kein Artefaktkartenstapel ausgewählt\");\n return;\n } else {\n String devMapString = new String(Files.readAllBytes(Paths.get(DEV_MAP_FOLDER + chooseDeveloperMapComboBox.getSelectionModel().getSelectedItem() + \".extmap\")), StandardCharsets.UTF_8);\n tournamentMap = MapUtil.readFullMapFromString(devMapString);\n debug(\"Map:\" + chooseMapComboBox.getValue() + \"\\n\");\n \n String artifactStackString = new String(Files.readAllBytes(Paths.get(DEV_ARTIFACT_STACK_FOLDER + chooseArtifactCardStackComboBox.getSelectionModel().getSelectedItem() + \".csv\")), StandardCharsets.UTF_8);\n CardStack<ArtifactCard> artifactStack = CardStackUtil.readArtifactCardStackFromString(artifactStackString);\n \n String flooodStackString = new String(Files.readAllBytes(Paths.get(DEV_FLOOD_STACK_FOLDER + chooseFloodCardStackComboBox.getSelectionModel().getSelectedItem() + \".csv\")), StandardCharsets.UTF_8);\n CardStack<FloodCard> floodStack = CardStackUtil.readFloodCardStackFromString(flooodStackString);\n \n tournamentTriple = new Triple<>(tournamentMap, artifactStack, floodStack);\n }\n \n \n this.getGameWindow().getControllerChan().startNewGame(\"Coole Carte\", tournamentTriple, playerList, difficulty);\n getGameWindow().playBgm();\n }\n \n getGameWindow().getControllerChan().getInGameViewAUI().refreshHopefullyAll(getGameWindow().getControllerChan().getCurrentAction());\n changeState(ViewState.GAME_PREPARATIONS, ViewState.IN_GAME);\n getGameWindow().getControllerChan().getInGameViewAUI().refreshHopefullyAll(getGameWindow().getControllerChan().getCurrentAction());\n // this.getGameWindow().getControllerChan().startNewGame(\"vulcan_island\", new MapLoader().loadMap(\"vulcan_island\"), playerList, difficulty);\n\n getGameWindow().getControllerChan().getInGameViewAUI().refreshWaterLevel(getGameWindow().getControllerChan().getCurrentAction().getWaterLevel().getLevel());\n getGameWindow().getControllerChan().getAiController().setActive(true);\n }", "public void registerplayerName()\n { \n boolean repeat = true;\n while (repeat)\n {\n playerName = getUserStringInput(\"Please input your name\");\n if (playerName.trim().length() >= 3 && playerName.trim().length() <= 10)\n {\n String playName = playerName;\n setPlayerName(playName);\n repeat = false;\n }\n else\n {\n System.out.println(\"Sorry, you enter incorrect,please input between 3 to 10 characters\");\n repeat = true;\n }\n }\n }", "@Override\r\n\t//public void sqlQueryUpdate(JComboBox combo, String name, JTextArea textArea, Vector vectorCombo) {\r\n\tpublic void sqlQueryUpdate(String name, Vector vectorCombo) {\n\t\tString strings = textArea.getText();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tstatement = conn.prepareStatement(\"UPDATE words SET descr = ? WHERE word = ?\");\r\n\t\t\r\n\t\t\tif (strings.equals(\"\")) {\r\n\t\t JOptionPane.showMessageDialog(null, name + \" contents are empty!!\");\r\n\t\t return;\r\n\t\t } //no value check\r\n\t\r\n\t\t statement.setString(1, strings);\r\n\t\t statement.setString(2, name);\r\n\t\r\n\t\t // add a word into the words table\r\n\t\t statement.executeUpdate();\r\n\t\t \r\n\t\t sqlQueryList(vectorCombo);\r\n\t\t comboBox.setSelectedItem(name);\r\n\t\t JOptionPane.showMessageDialog(null, name + \" update completed\");\r\n\t\t sqlQueryDisplay(name);\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t//e.printStackTrace();\r\n\t\t\t//System.out.print(e);\r\n\t\t\ttextArea.setText(e.getMessage());\r\n\t\t}\r\n\t}", "private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }", "private void lookUp(String inputName) {\n \tif (! inputName.equals(\"\")) {\n\t\t\tif (database.containsProfile(inputName)) {\n\t\t\t\tcurrentProfile = database.getProfile(inputName);\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Displaying \" + inputName);\n\t\t\t} else {\n\t\t\t\tcurrentProfile = null;\n\t\t\t\tcanvas.removeAll();\n\t\t\t\tcanvas.showMessage(\"A profile with the name \" + inputName + \" does not exist.\");\n\t\t\t}\n\t\t}\n\t}", "public void addRoomWindow(ControllerAdmin controllerAdmin) throws SQLException, ClassNotFoundException {\n JFrame addFrame = new JFrame();\n\n JButton jButtonCanceled = new JButton(\"Annuler\");\n jButtonCanceled.setBounds(380, 140, 100, 28);\n JButton jButtonAdd = new JButton(\"Ajouter\");\n jButtonAdd.setBounds(490, 140, 100, 28);\n\n JLabel jLabelIdSite = new JLabel(\"Selectionner le site où ajouter la salle à créer : \");\n jLabelIdSite.setBounds(20, 20, 250, 28);\n\n ArrayList<String> site = controllerAdmin.getAllNamesSite();\n String[] strSite = new String[site.size()];\n for (int j = 0; j < site.size(); j++) {\n strSite[j] = site.get(j);\n }\n JComboBox jComboBoxSelectSite = new JComboBox(strSite);\n jComboBoxSelectSite.setBounds(280, 20, 200, 28);\n\n JLabel jLabelIdRoom = new JLabel(\"Saissisez l'ID de la salle : \");\n jLabelIdRoom.setBounds(20, 48, 250, 28);\n\n JTextField jTextFiedlIdRoom = new JTextField();\n jTextFiedlIdRoom.setBounds(280, 48, 200, 28);\n\n JLabel jLabelName = new JLabel(\"Saissisez le nom de la salle : \");\n jLabelName.setBounds(20, 80, 280, 28);\n\n JTextField jTextFiedldName = new JTextField();\n jTextFiedldName.setBounds(280, 80, 200, 28);\n\n JLabel jLabelCapacity = new JLabel(\"Saissisez la capacite de la salle : \");\n jLabelCapacity.setBounds(20, 108, 250, 28);\n\n JTextField jTextFiedldCapacity = new JTextField();\n jTextFiedldCapacity.setBounds(280, 108, 200, 28);\n\n addFrame.add(jLabelIdSite);\n addFrame.add(jComboBoxSelectSite);\n addFrame.add(jLabelIdRoom);\n addFrame.add(jTextFiedlIdRoom);\n addFrame.add(jLabelName);\n addFrame.add(jTextFiedldName);\n addFrame.add(jLabelCapacity);\n addFrame.add(jTextFiedldCapacity);\n addFrame.add(jButtonCanceled);\n addFrame.add(jButtonAdd);\n\n jButtonCanceled.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n addFrame.dispose();\n }\n });\n jButtonAdd.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n Room rm = new Room();\n Site site = new Site();\n assert rm != null;\n if(!jTextFiedldName.getText().equals(\"\") && !jTextFiedldCapacity.getText().equals(\"\")){\n if(!rm.alreadyExist(jTextFiedlIdRoom.getText())){\n Room room = new Room(jTextFiedlIdRoom.getText(), Integer.parseInt(jTextFiedldCapacity.getText()), jTextFiedldName.getText(), site.findByName(Objects.requireNonNull(jComboBoxSelectSite.getSelectedItem()).toString()).getIdSite());\n room.createRoom();\n addFrame.dispose();\n }}\n else {\n AlertePopUp alertePopUp = new AlertePopUp();\n alertePopUp.AddFailId.setVisible(true);\n System.out.println(\"Erreur de saisie des informations\");\n addRoomWindow(controllerAdmin);\n }\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n }\n });\n\n addFrame.setTitle(\"Ajout d'une salle\");\n addFrame.setSize(600,200);\n addFrame.setLocation(200, 100);\n addFrame.setLayout(null);\n addFrame.setVisible(true);\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\tcontroller.createUserDatabaseFile();\r\n\t\t\r\n\t\t// If backToMain button is pressed\r\n\t\tif (e.getActionCommand().equals(\"Back to Main\")) {\r\n\t\t\t// Goes back to main screen\r\n\t\t\tcontroller.mainScreenFrame();\r\n\t\t\tdispose();\r\n\t\t}\r\n\t\t\r\n\t\tint selected_index = (int) mediaTypeSelected.getSelectedIndex();\r\n\r\n\t\t\t// If mediaTypeSelected is changed these actions occur\r\n\t\t\tif (e.getActionCommand().equals(\"Media Select\")) {\r\n\t\t\t\t// Checks which item is selected in the combo box and sets up the screen\r\n\t\t\t\t// appropriately\r\n\t\t\t\tswitch (selected_index) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tchangePanel(selected_index);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tchangePanel(selected_index);\r\n\t\t\t\t\taddedText.setVisible(false);\r\n\t\t\t\t\tchooseMediaText.setVisible(false);\r\n\t\t\t\t\tCDsSelected.titleField.setText(\"\");\r\n\t\t\t\t\tCDsSelected.artistField.setText(\"\");\r\n\t\t\t\t\tCDsSelected.genreField.setText(\"\");\r\n\t\t\t\t\tCDsSelected.descriptionTextArea.setText(\"\");\r\n\t\t\t\t\tCDsSelected.enterTitleText.setText(\" \");\r\n\t\t\t\t\tCDsSelected.enterArtistText.setText(\" \");\r\n\t\t\t\t\tCDsSelected.enterGenreText.setText(\" \");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// If add button is pressed\r\n\t\t\tif (e.getActionCommand().equals(\"Add\")) {\r\n\t\t\t\tcheck_add = true;\r\n\r\n\t\t\t\t// Checks which item is selected in the combo box and checks to make sure\r\n\t\t\t\t// all the fields are filled in\r\n\t\t\t\tswitch (selected_index) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tchooseMediaText.setBounds(276, 128, 150, 20);\r\n\t\t\t\t\tchooseMediaText.setVisible(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tcheckCD();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tif ((check_add) && (selected_index != 0)) {\r\n\t\t\t\t\t// Adds item to database and clears the text fields\r\n\t\t\t\t\tcontroller.appendMediaDatabase(title, artist, genre, description);\r\n\t\t\t\t\taddedText.setVisible(true);\r\n\t\t\t\t\tmediaTypeSelected.setSelectedIndex(0);\r\n\t\t\t\t\tCDsSelected.titleField.setText(\"\");\r\n\t\t\t\t\tCDsSelected.artistField.setText(\"\");\r\n\t\t\t\t\tCDsSelected.genreField.setText(\"\");\r\n\t\t\t\t\tCDsSelected.descriptionTextArea.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}", "private void nameInventory() throws SQLException {\r\n boolean answer = Close_Program.DisplayAlert(\"New Inventory\", \"Would you like to update inventory with new values?\");\r\n if (answer) {\r\n new Archive().Weekly_Inventory();\r\n }\r\n\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n nameField = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n playButton = new javax.swing.JButton();\n error = new javax.swing.JLabel();\n Join_button = new javax.swing.JButton();\n error1 = new javax.swing.JLabel();\n\n jLabel2.setText(\"jLabel2\");\n\n setBackground(new java.awt.Color(204, 204, 255));\n\n nameField.setText(\"Name\");\n\n jLabel1.setText(\"Type your name\");\n\n playButton.setText(\"Start game\");\n playButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n playButtonActionPerformed(evt);\n }\n });\n\n Join_button.setText(\"Save name\");\n Join_button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Join_buttonActionPerformed(evt);\n }\n });\n\n error1.setText(\"jLabel3\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(65, 65, 65)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)\n .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(119, 119, 119))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(130, 130, 130)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(playButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(error))\n .addComponent(Join_button, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(157, 157, 157)\n .addComponent(error1)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(64, 64, 64)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(44, 44, 44)\n .addComponent(Join_button)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(error))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(playButton)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE)\n .addComponent(error1)\n .addGap(34, 34, 34))\n );\n }", "private void createGameClicked() {\n RadioGroup gameMode = findViewById(R.id.gameMode);\n Intent intent = new Intent(this, GameActivity.class);\n EditText enterName = findViewById(R.id.enterName);\n String setName = enterName.getText().toString();\n TextView enterNameText = findViewById(R.id.enterNameText);\n\n TextView errorMessage = findViewById(R.id.errorMessage);\n errorMessage.setVisibility(View.GONE);\n\n\n if (setName.trim().isEmpty()) {\n enterNameText.setTextColor(Color.RED);\n } else {\n enterNameText.setTextColor(Color.BLACK);\n intent.putExtra(\"name\", setName);\n Log.i(TAG, \"My name is\" + setName);\n }\n\n if (gameMode.getCheckedRadioButtonId() == R.id.beginner && !(setName.trim().isEmpty())) {\n Log.i(TAG, \"beginner button pressed\");\n intent.putExtra(\"mode\", \"Beginner\");\n intent.putExtra(\"ability\", a.nextInt(30));\n intent.putExtra(\"mental\", m.nextInt(30) + 70);\n intent.putExtra(\"grades\", g.nextInt(20) + 40);\n intent.putExtra(\"social\", s.nextInt(20) + 40);\n\n startActivity(intent);\n finish();\n\n } else if (gameMode.getCheckedRadioButtonId() == R.id.advanced && !(setName.trim().isEmpty())) {\n Log.i(TAG, \"advanced button clicked\");\n intent.putExtra(\"mode\", \"Advanced\");\n intent.putExtra(\"ability\", a.nextInt(30) + 70);\n intent.putExtra(\"mental\", m.nextInt(20) + 10);\n intent.putExtra(\"grades\", g.nextInt(20) + 80);\n intent.putExtra(\"social\", s.nextInt(20));\n\n startActivity(intent);\n finish();\n\n } else if (gameMode.getCheckedRadioButtonId() != R.id.beginner && gameMode.getCheckedRadioButtonId() != R.id.advanced ){\n Log.i(TAG, \"no version selected\");\n errorMessage.setVisibility(View.VISIBLE);\n errorMessage.setText(\"Please select a difficulty level\");\n }\n\n }", "protected void newGame() {\r\n playSound( RESET );\r\n\r\n timeTitle.setText( Msgs.str( \"Time\" ) );\r\n timeMesg.setText( Msgs.str( \"zeroTime\" ) );\r\n infoMesg.setText( Msgs.str( \"Ready\" ) );\r\n scoreTitle.setText( Msgs.str( \"Score\" ) );\r\n\r\n adjustScore();\r\n currentScore = 0;\r\n scoreMesg.setText( \"0\" );\r\n\r\n mineField.newGame();\r\n minesTitle.setText( Msgs.str( \"mines.left\" ) );\r\n setMinesMesg( mineField.getNumHiddenMines() );\r\n\r\n pane.repaint();\r\n }", "public void onClick(View v) {\n\t\t\t\tString name=editName.getText().toString(); \r\n\t\t\t\tint playerId=Integer.parseInt(editId.getText().toString());\r\n\t\t\t\tint handicap=Integer.parseInt(editHandicap.getText().toString());\r\n\t\t\t\tint code=Integer.parseInt(editCode.getText().toString());\r\n\t\t\t\tint status=editStatus.isChecked()?0:1;\r\n\t\t\t\t\r\n\t\t\t\t// check if REQUIRED fields are vacant \r\n\t\t\t\tif(name.equals(\"\")|| code<1 || handicap<1 || playerId<1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (playerId<1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Select a player\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Enter a name and handicap\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t} \t\r\n\t\t\t\telse \r\n\t\t\t\t{ //db = new DatabaseHelper(getApplicationContext());\r\n\t\t\t\t\tplayer=db.getPlayer(playerId);\r\n\t\t\t\t\tplayer.setName(name);\r\n\t\t\t\t\tplayer.setHandicap(handicap);\r\n\t\t\t\t\tplayer.setKey(code);\r\n\t\t\t\t\tplayer.setStatus(status);\r\n\t\t\t\t\tdb.updatePlayer(player);\r\n\t\t\t\t\t//db.close();\r\n\t\t\t\t\t// Save the Data in Database \r\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Saved Successfully \", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}", "public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "private static void continueGame()\r\n\t{\r\n\t\tString name = \"\";\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tname = scan(\"Write the name of your game: \");\r\n\t\t\t\r\n\t\t\tif(GameManager.instance().players().contains(name)) break;\r\n\t\t}\r\n\t\t\r\n\t\tGameManager.instance().setCurrentPlayer(name);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tGameManager.instance().loadGame();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t//e.printStackTrace();\r\n\t\t\tSystem.out.println(\"Something happened\");\r\n\t\t}\r\n\t}", "protected void newPlayersClicked(ActionEvent e) {\n getPlayerNames();\n blackPlayer = 0;\n playerScores[0] = 0;\n playerScores[1] = 0;\n refreshScore();\n updateTurnInfo();\n startNewGame();\n }" ]
[ "0.6626234", "0.65499943", "0.6454329", "0.63891554", "0.62386435", "0.6224571", "0.61019146", "0.59277654", "0.59257334", "0.5898524", "0.5887485", "0.5880534", "0.58746445", "0.58703446", "0.5861079", "0.5850037", "0.5818781", "0.580524", "0.57989913", "0.57965964", "0.57914877", "0.57713026", "0.5762094", "0.5750986", "0.57462716", "0.574449", "0.5738157", "0.5729141", "0.57234824", "0.5723041", "0.57202345", "0.5716275", "0.57101893", "0.5709803", "0.5701906", "0.56952167", "0.56928194", "0.5690363", "0.5688191", "0.5688191", "0.5677585", "0.56747663", "0.56377643", "0.56375074", "0.56306577", "0.562505", "0.56234676", "0.56220454", "0.56113017", "0.5609203", "0.5606349", "0.5601105", "0.5598897", "0.55555856", "0.55553824", "0.5548591", "0.5542321", "0.5542043", "0.5538742", "0.5535809", "0.5533171", "0.5524334", "0.55196595", "0.5518895", "0.55175436", "0.55111593", "0.5501851", "0.55014765", "0.55013007", "0.54982096", "0.5497737", "0.54947746", "0.5490912", "0.54888076", "0.54850256", "0.54843616", "0.5476732", "0.54750097", "0.5464584", "0.5461421", "0.54603624", "0.545385", "0.5440197", "0.5435306", "0.54338115", "0.54288965", "0.54288185", "0.54157186", "0.54152507", "0.541512", "0.5408002", "0.54052645", "0.5404839", "0.54045933", "0.5399856", "0.5396615", "0.53962445", "0.5396096", "0.53958344", "0.53884304" ]
0.7518822
0
overwride for heather's save method
public static void save() { Game.save(UI.askNgetString("Filename for this save file?")+".xml"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void save() {\n \n }", "@Override\n public void save()\n {\n \n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n public void save() {\n\n }", "@Override\n public void Save() {\n\t \n }", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public void save() {\t\n\t\n\t\n\t}", "public void save() {\n }", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "@Override\n public void saveValues() {\n \n }", "public Saving() {\n super();\n }", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}", "protected abstract void doSave();", "@Override\n\tpublic void save(Field entity) {\n\t\t\n\t}", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "@Override\r\n\tpublic void innerSave() {\n\r\n\t}", "@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}", "@Override\n public Owner save(Owner object) {\n return super.save(object);\n }", "@Override\n\tpublic void save(Person person) {\n\t\t\n\t}", "@Override\n public int save( Mention obj ) {\n return 0;\n }", "@Exclude\n public abstract void save();", "public void save();", "public void save();", "public void save();", "public void save();", "@Override\n public boolean save()\n {\n return false;\n }", "@Override\n\tpublic void save(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Override\n public void persist() {\n }", "@Override\n public SideDishEntity save(SideDishEntity entity) {\n return null;\n }", "public void save(){\n\t\tlowresModelManager.save();\n\t}", "@Override\n public LineEntity save(LineEntity entity) {\n return null;\n }", "@Override\n\tpublic void save(Company company) {\n\t\t\n\t}", "@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic Visit save(Visit object) {\n\t\treturn super.save(object);\r\n\t}", "@Override\n\tpublic void save(EmpType entity) {\n\t\t\n\t}", "@Override\n protected void validateSave(Fornecedor post) {\n\n }", "@Override\r\n\tpublic void save(User user) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void persist() {\n\t}", "private void saveData() {\n }", "@Override\n\tpublic void save(T obj) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic Spittle save(Spittle spittle) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void save(WechatMember member) {\n\t\t\r\n\t}", "@PrePersist\n private void onSave()\n {\n this.lastUpdateDateTime = new Date();\n if(this.registerDateTime == null)\n {\n this.registerDateTime = new Date();\n }\n \n if(this.personKey == null || this.personKey.isEmpty())\n {\n this.personKey = UUID.randomUUID().toString();\n }\n \n if(this.activationDate == null && (this.activationKey == null || this.activationKey.isEmpty()))\n {\n this.activationKey = UUID.randomUUID().toString();\n this.activationDate = new Date();\n }\n \n // O ID só será 0 (zero) se for a criação do registro no banco\n if(this.id == 0)\n {\n this.isValid = false;\n }\n }", "@Override\n\tpublic void save(Religiao obj) throws Exception {\n\t\t\n\t}", "@Override\n public Building save(Building entity) {\n return dao.save(entity);\n }", "public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}", "void save(Employee employee);", "public void save(HrJBorrowcontract entity);", "public void saveExtraData() {}", "@Override\r\n\tpublic void save(PartyType entity) {\n\t\t\r\n\t}", "@Override\r\n\tpublic Employee save(Employee emp) {\n\t\t return empdao.save(emp);\r\n\t}", "public abstract boolean saveRequired();", "@Override\r\n\tpublic void save(Worker worker) {\n\t\tbaseDao.save(worker);\r\n\t}", "void save(Teacher teacher);", "protected abstract void onSave(Person person);", "public void save(Person p) {\n\n\t}", "@Override\n\tItem save(Item item);", "public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}", "protected void doSave() {\n GWT.log(\"Please override\");\n }", "@Override\r\n\tpublic <S extends Estates> S save(S arg0) {\n\t\treturn null;\r\n\t}", "@Override\n public void save() {\n String query = null;\n super.save();\n ((DataUser) user).save();\n\n if (getId() == 0) {\n String[] values = {super.getId() + \"\", \"\" + getUser().getId()};\n\n query = Database.compose(\n \"INSERT INTO case_workers (person_id, user_id)\",\n \"VALUES('\" + String.join(\"','\", values) + \"')\",\n \"RETURNING id\"\n );\n } else {\n query = Database.compose(\n \"UPDATE case_workers SET\",\n \"person_id = \" + super.getId() + \",\",\n \"user_id = \" + getUser().getId() + \"\",\n \"WHERE id = \" + getId()\n );\n\n }\n\n Database.getInstance().query(query, rs -> {\n if (id == 0) {\n id = rs.getInt(1);\n }\n });\n }", "void save();", "void save();", "void save();", "@Override\n public void saveUser(User user) {\n }", "protected boolean save() {\r\n\t\tboolean saved=true;\r\n\t\tif(validated()){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tsaved=false;\r\n\t\t}\r\n\t\treturn saved;\r\n\t}", "@PostPersist\n\t@PostUpdate\n\tprivate void storeChangesToDw() {\n\t}", "@Override\r\n\tpublic void validateSave() throws Exception {\n\r\n\t}", "@Override\n\tpublic Order save(Order e, long id) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Ngo save(Ngo obj) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic <S extends Audit> S save(S entity) {\n\t\treturn null;\n\t}", "@Override\n\tpublic <S extends Pessoa> S save(S arg0) {\n\t\treturn null;\n\t}", "public Flight save(Flight flight);", "public void save(Object obj) throws HibException;", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "public void onSave() {\n\t\tsetCreationDate(new Date());\n\t\tPageAlias.create(this, null);\n\t\tupdateChildPaths();\n\t}", "@Override\n public void save(Game game) {\n }", "@Override\n\tpublic Employee saveEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.saveEmployee(Employee emp) save Employee object\");\n\t\treturn repositary.save(emp);\n\t}", "public void saveState() {\n\t\tsuper.saveState();\n\t}", "@Override\n\tpublic void save(User entity) {\n\t\t\n\t}", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "public boolean save();", "protected void saveValues() {\n dataModel.persist();\n }", "@Override\r\n\tpublic <S extends Employee> S save(S arg0) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic int saveObject(Evaluate entity) {\n\t\treturn evaluateMapper.saveObject(entity)\n\t\t\t\t;\n\t}", "Hotel saveHotel(Hotel hotel);", "@Override\n\tpublic void save( T entity) {\n\t baseDaoImpl.save(entity);\n\t}", "public boolean doSave() {\n return true;\n }", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "@Override\n String save() {\n return \"\";\n }", "@Override\r\n\tpublic final void saveObjectData() throws BillingSystemException{\n\t}", "public boolean save(BaseVo vo) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\tpublic void persist(Object entity) {\n\t\t\n\t}", "public boolean save() {\n return false;\n }", "public BankThing save(BankThing thing);" ]
[ "0.79958236", "0.7960741", "0.7924046", "0.7924046", "0.7840219", "0.78014463", "0.77847695", "0.77847695", "0.75535935", "0.7425824", "0.72900814", "0.72602797", "0.7230907", "0.7220363", "0.7215976", "0.7167899", "0.71312314", "0.7128874", "0.7102135", "0.7065012", "0.70418745", "0.703971", "0.7032328", "0.69489497", "0.69227445", "0.69026244", "0.6901135", "0.6901135", "0.6901135", "0.6901135", "0.68871963", "0.68473417", "0.6827745", "0.6825944", "0.68137324", "0.67955214", "0.6776789", "0.67764324", "0.67586654", "0.6732441", "0.672499", "0.67080665", "0.6707706", "0.6699618", "0.66927356", "0.6684691", "0.66828203", "0.6680477", "0.66713375", "0.6669069", "0.664134", "0.6637521", "0.6631937", "0.66115", "0.66096777", "0.6605826", "0.6594338", "0.6592405", "0.65872043", "0.6569569", "0.65631354", "0.65600914", "0.6557409", "0.6556467", "0.65503794", "0.6547071", "0.65419817", "0.6534036", "0.6534036", "0.6534036", "0.6524754", "0.6515564", "0.6513816", "0.6501269", "0.64904755", "0.6475662", "0.6463358", "0.64602035", "0.6452636", "0.6446251", "0.64265615", "0.6424913", "0.6412749", "0.6407862", "0.6403903", "0.640212", "0.63916737", "0.63845485", "0.6383554", "0.6383344", "0.6374691", "0.63668776", "0.63595724", "0.63468003", "0.63455623", "0.6342441", "0.6342374", "0.63369", "0.6335568", "0.63352644", "0.6323209" ]
0.0
-1
will return list of files from save directory
public static ArrayList<String> availableSaveFiles() { String path = "saveFiles/"; ArrayList<String> files = new ArrayList<String>(); File folder = new File(path); //if the save folder exists if (folder.exists()) { //get list of XML files String[] listOfFiles = folder.list(new FilenameFilter() { public boolean accept(File directory, String fileName) { return fileName.endsWith(".xml"); } }); //if there are any XML files if (listOfFiles.length > 0) { for (int i = 0; i < listOfFiles.length; i++) { files.add(listOfFiles[i]); } } else { StdOut.println("No savefiles in " + path + " directory."); } } else { StdOut.println("No " + path + " directory!"); } return files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Path> getFiles();", "public void getImagesFromFolder() {\n File file = new File(Environment.getExternalStorageDirectory().toString() + \"/saveclick\");\n if (file.isDirectory()) {\n fileList = file.listFiles();\n for (int i = 0; i < fileList.length; i++) {\n files.add(fileList[i].getAbsolutePath());\n Log.i(\"listVideos\", \"file\" + fileList[0]);\n }\n }\n }", "public List<String> getFiles();", "public static List<String> getSavedGames( Context context ){\n String[] saveFiles = context.fileList();\n\n // Valid game files\n List<String> gameFiles = new ArrayList<String>();\n\n for( int l=0; l<saveFiles.length; l++ ) {\n Log.d(\"File list: \", saveFiles[l]);\n\n // All game states saved in .dat files!!\n if( saveFiles[l].contains( \".dat\" ) ){\n //if( saveFiles[l].contains( \".zzz\" ) ){ // test case if there are no saved games\n gameFiles.add( saveFiles[l] );\n Log.d(\"Valid save data: \", saveFiles[l]);\n }\n }\n\n return gameFiles;\n\n }", "private List<String> getFiles(String path){\n workDir = Environment.getExternalStorageDirectory().getAbsolutePath() + path;\n List<String> files = new ArrayList<String>();\n File file = new File(workDir);\n File[] fs = file.listFiles();\n for(File f:fs)\n if (f.isFile())\n files.add(String.valueOf(f).substring(workDir.length()));\n return files;\n }", "public List<File> getFiles();", "public File[] CreateListFiles() {\n\t\tif (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n\t\t\tToast.makeText(this, \"Error! No SDCARD Found!\", Toast.LENGTH_LONG).show();\n\t\t} else {\n\t\t\tfile = new File(Environment.getExternalStorageDirectory(), File.separator + \"/MelanomaPics/\" + File.separator + MelanomaActivity.pacientSelected);\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t// pega todas as imagens do diretorio MelanomaPics e coloca dentro de\n\t\t// uma lista\n\t\tif (file.isDirectory()) {\n\t\t\tlistFile = file.listFiles();\n\t\t}\n\t\treturn listFile;\n\t}", "public List listFiles(String path);", "public abstract List<LocalFile> getAllFiles();", "private ArrayList<String> getTrackPathList() {\n String MEDIA_TRACKS_PATH = \"CuraContents/tracks\";\n File fileTracks = new File(Environment.getExternalStorageDirectory(), MEDIA_TRACKS_PATH);\n if (fileTracks.isDirectory()) {\n File[] listTracksFile = fileTracks.listFiles();\n ArrayList<String> trackFilesPathList = new ArrayList<>();\n for (File file1 : listTracksFile) {\n trackFilesPathList.add(file1.getAbsolutePath());\n }\n return trackFilesPathList;\n }\n return null;\n }", "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}", "private static ArrayList<String> getImagesInFileSystem() {\n\t\t// get file list in database\n\t\tArrayList<String> fileNameList = new ArrayList<String>();\n\t\t\n\t\tFile folder = new File(IMAGE_DIRECTORY);\n\t File[] listOfFiles = folder.listFiles();\n\t \n\t for (File currFile : listOfFiles) {\n\t if (currFile.isFile() && !currFile.getName().startsWith(\".\")) {\n\t \t fileNameList.add(currFile.getName());\n\t }\n\t }\n\t \n\t return fileNameList;\n\t}", "public abstract List<String> getFiles( );", "private List<String> returnFiles(int selection) {\n\t\tString path = System.getProperty(\"user.dir\");\n\t\tList<String> allImages = new ArrayList<String>();\n\t\tpath += this.setFolderPath(selection);\n\t\tFile[] files = new File(path).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile() && isCorrectFile(file)) {\n\t\t\t\tallImages.add(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\treturn allImages;\n\t}", "public void getListaArchivos() {\n\n File rutaAudio = new File(Environment.getExternalStorageDirectory() + \"/RecordedAudio/\");\n File[] archivosAudio = rutaAudio.listFiles();\n\n for (int i = 0; i < archivosAudio.length; i++) {\n File file = archivosAudio[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n\n File rutaVideos = new File(Environment.getExternalStorageDirectory() + \"/RecordedVideo/\");\n File[] archivosVideo = rutaVideos.listFiles();\n\n for (int i = 0; i < archivosVideo.length; i++) {\n File file = archivosVideo[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n }", "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 }", "private File[] getFilesInDirectory() {\n\t\t//Show Directory Dialog\n\t\tDirectoryChooser dc = new DirectoryChooser();\n\t\tdc.setTitle(\"Select Menu File Directory\");\n\t\tString folderPath = dc.showDialog(menuItemImport.getParentPopup().getScene().getWindow()).toString();\n\t\t\n\t\t//Update Folder location text\n\t\ttxtFolderLocation.setText(\"Import Folder: \" + folderPath);\n\t\t//Now return a list of all the files in the directory\n\t\tFile targetFolder = new File(folderPath);\n\t\t\n\t\treturn targetFolder.listFiles(); //TODO: This returns the names of ALL files in a dir, including subfolders\n\t}", "private static ArrayList<String> getPlayerFileNames() {\n\n ArrayList<String> fileNames = new ArrayList<String>();\n\n File folder = new File(\"otterbein/pig/player\");\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n if (listOfFiles[i].getName().endsWith(\".class\")) {\n fileNames.add(listOfFiles[i].getName());\n }\n }\n }\n\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 File[] listFiles() {\n\n\t\tFileFilter Ff = f -> true;\n\t\treturn this.listFiles(Ff);\n\t}", "List<File> list(String directory) throws FindException;", "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 static File[] getFiles() /*throws IOException*/ {\n\n String os = (System.getProperty(\"os.name\")).toUpperCase();\n File path;\n if (os.contains(\"WIN\")) {\n path = new File(System.getenv(\"APPDATA\")+\"\\\\SudokuGR04\");\n }\n else\n {\n path = new File(System.getProperty(\"user.home\" + \"/Library/Application Support/SudokuGR04\" ));\n }\n\n FileFilter fileFilter = dir -> {\n return dir.isFile();\n };\n //in the files-array there is a list of all files in the dir\n files = path.listFiles(fileFilter);\n return files;\n }", "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 }", "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 }", "java.util.List<entities.Torrent.FileInfo>\n getFilesList();", "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}", "public String[] listFilesString() {\n\t\tFile[] FL = listFiles();\n\t\treturn FU.listFilesString(FL);\n\t}", "private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}", "private void readSavedFile() {\n\n String[] files = new String[0];\n \n // On récupère la liste des fichiers\n File file = new File(folderName);\n\n // check if the specified pathname is directory first\n if(file.isDirectory()){\n //list all files on directory\n files = file.list();\n }\n\n if (files != null) {\n for(String currentFile : files) {\n Vehicule voiture;\n try {\n FileInputStream fileIn = new FileInputStream(folderName + \"/\" + currentFile);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n voiture = (Vehicule) in.readObject();\n addVoitureToList(voiture);\n in.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"#Erreur : Impossible de récupérer l'objet \" + currentFile);\n c.printStackTrace();\n return;\n }\n }\n }\n }", "public ArrayList<OfflineSong> getPlayList() {\n System.out.println(MEDIA_PATH);\n if (MEDIA_PATH != null) {\n File home = new File(MEDIA_PATH);\n File[] listFiles = home.listFiles();\n if (listFiles != null && listFiles.length > 0) {\n for (File file : listFiles) {\n System.out.println(file.getAbsolutePath());\n if (file.isDirectory()) {\n scanDirectory(file);\n } else {\n addSongToList(file);\n }\n }\n }\n }\n // return songs list array\n return songsList;\n }", "private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}", "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 }", "List<String> getFiles(String path) throws IOException;", "public static List<String> getFilesFromDirectory(){\n File wordTextFolder = new File(FOLDER_OF_TEXT_FILES.toString());\n File[] filesInsideFolder = wordTextFolder.listFiles();\n List<String> paths = new ArrayList<>();\n String name;\n\n for (File txtFile : filesInsideFolder){\n paths.add( txtFile.getPath() );\n name = txtFile.getName();\n name = name.substring(0, name.lastIndexOf('.'));\n\n if(name.length() > Table.maxFileNameLength){\n Table.setMaxFileNameLength(name.length());\n }\n }\n return paths;\n }", "public String[] getListOfFiles() {\n\t\treturn listOfFiles;\n\t}", "private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}", "public List<File> findAll() {\n\t\treturn files;\n\t}", "public static List<File> getAllAutoSaves() throws DatabaseWrapperOperationException{\r\n \t\tList<File> autoSaves = FileSystemAccessWrapper.getAllMatchingFilesInHomeDirectory(DatabaseIntegrityManager.AUTO_SAVE_FILE_REGEX);\r\n \t\tCollections.sort(autoSaves, new Comparator<File>() {\r\n \t\t\t@Override\r\n \t\t\tpublic int compare(File file1, File file2) {\r\n \t\t\t\ttry {\r\n \t\t\t\t\treturn Long.compare(DatabaseIntegrityManager.extractTimeStamp(file2), DatabaseIntegrityManager.extractTimeStamp(file1));\r\n \t\t\t\t} catch (DatabaseWrapperOperationException e) {\r\n \t\t\t\t\treturn -1;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t});\r\n \t\t\r\n \t\treturn autoSaves;\r\n \t}", "public List<File> getListing(){\n\t return getFileList(new File(defaultPath));\n }", "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}", "@GetMapping(\"/all\")\r\n\tpublic List<FileModel> getListFiles() {\r\n\t\treturn fileRepository.findAll();\r\n\t}", "public void listMyFiles(){\n\t\tpeer.removeFiles();\n\t\tint count = localModel.getRowCount();\n\t\tif (count > 0){\n\t\t\tfor (int i = count-1; i >= 0; i--){\n\t\t\t\tlocalModel.removeRow(i);\n\t\t\t}\n\t\t}\n\t\tFile folder = fileChooser.getSelectedFile();\n\t\tpeer.setFolder(folder.getAbsolutePath());\n shareFolder = folder.getAbsolutePath();\n\t\tconsole(\"\\\"\" + folder.getAbsolutePath() + \"\\\" set as Shared Directory.\");\n\t\tmyFiles = folder.listFiles();\n\t\tfor(File file : myFiles){\n\t\t\tlocalModel.addRow(new Object[]{file.getName(),file.length()});\n\t\t\ttry {\n\t\t\t\tpeer.addFile(file.getName(),file.length());\n\t\t\t} catch (UnknownHostException e1) {e1.printStackTrace();}\n\t\t}\n\t}", "private ArrayList<String> getImagesPathList() {\n String MEDIA_IMAGES_PATH = \"CuraContents/images\";\n File fileImages = new File(Environment.getExternalStorageDirectory(), MEDIA_IMAGES_PATH);\n if (fileImages.isDirectory()) {\n File[] listImagesFile = fileImages.listFiles();\n ArrayList<String> imageFilesPathList = new ArrayList<>();\n for (File file1 : listImagesFile) {\n imageFilesPathList.add(file1.getAbsolutePath());\n }\n return imageFilesPathList;\n }\n return null;\n }", "public List<GameSceneSerializable> getGameSceneSerializables(String fileName){\n File directory = new File(fileName);\n File[] directoryListing = directory.listFiles();\n List<GameSceneSerializable> list = new ArrayList<>();\n if (directoryListing != null){\n for (File level : directoryListing){\n String path = level.getAbsolutePath();\n if (path.contains(DS_STORE)) {continue;}\n list.add(retrieveGameSceneSerializable(path));\n }\n }\n return list;\n }", "private DefaultListModel<String> loadFileNames(){\r\n\t\tthis.fileNamesListModel.clear();\r\n\t\tfor(FileModel model : FileData.getAllFileModels()) {\r\n\t\t\tthis.fileNamesListModel.addElement(model.getName());\r\n\t\t}\r\n\t\treturn this.fileNamesListModel;\r\n\t}", "java.util.List<ds.hdfs.generated.FileMetadata> \n getFilesList();", "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}", "public Set<String> getSavedCollections() {\n if (!Files.exists(this.container)) {\n return ImmutableSet.of();\n }\n\n try (Stream<Path> s = Files.list(this.container)) {\n return s.filter(Files::isDirectory)\n .map(p -> p.getFileName().toString())\n .collect(ImmutableCollectors.toSet());\n } catch (IOException e) {\n e.printStackTrace();\n return ImmutableSet.of();\n }\n }", "public String[] list() {\n String[] list = _file.list();\n if (list == null) {\n return null;\n }\n for (int i = list.length; i-- > 0; ) {\n if (new File(_file, list[i]).isDirectory() && !list[i].endsWith(\"/\")) {\n list[i] += \"/\";\n }\n }\n return list;\n }", "private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }", "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 static List<String> getFile(String path){\n File file = new File(path);\n // get the folder list\n File[] array = file.listFiles();\n\n List<String> fileName = new ArrayList<>();\n\n for(int i=0;i<array.length;i++){\n if(array[i].isFile()){\n // only take file name\n fileName.add(array[i].getName());\n }else if(array[i].isDirectory()){\n getFile(array[i].getPath());\n }\n }\n return fileName;\n }", "private void saveExternalFilesList() {\n List<String> extFiles = new ArrayList<>();\n journalFiles.forEach(file -> {\n if (!file.isBuiltInListProperty().get()) {\n file.getAbsolutePath().ifPresent(path -> extFiles.add(path.toAbsolutePath().toString()));\n }\n });\n abbreviationsPreferences.setExternalJournalLists(extFiles);\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}", "java.util.List<java.lang.String>\n getFileNamesList();", "private String[] nlstHelper(String args) {\n // Construct the name of the directory to list.\n String filename = currDirectory;\n if (args != null) {\n filename = filename + fileSeparator + args;\n }\n\n // Now get a File object, and see if the name we got exists and is a\n // directory.\n File f = new File(filename);\n\n if (f.exists() && f.isDirectory()) {\n return f.list();\n } else if (f.exists() && f.isFile()) {\n String[] allFiles = new String[1];\n allFiles[0] = f.getName();\n return allFiles;\n } else {\n return null;\n }\n }", "java.util.List<java.lang.String>\n getFileNamesList();", "public static List<String> getAllFileNames() {\n List<String> fileNames = new ArrayList();\n\n String sql = \"SELECT fileName FROM files;\";\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n while (rs.next()) {\n fileNames.add(rs.getString(\"fileName\"));\n }\n return fileNames;\n } catch (SQLException e) {\n System.out.println(\"getAllFileIDs: \" + e.getMessage());\n }\n return null;\n }", "private List<File> getFileList(File root){\n\t List<File> returnable = new ArrayList<File>();\n\t if(root.exists()){\n\t\t for(File currentSubFile : root.listFiles()){\n\t\t\t if(currentSubFile.isDirectory()){\n\t\t\t\t returnable.addAll(getFileList(currentSubFile));\n\t\t\t } else {\n\t\t\t\t returnable.add(currentSubFile);\n\t\t\t }\n\t\t }\n\t }\n\t return returnable;\n }", "private List<File> getFiles() {\n\t\tList<File> mFileLists = new ArrayList<File>();\n\t\tfor (Category category : mFiles) {\n\t\t\tif (category.getName() == null) {\n\t\t\t\tLog.i(TAG, \"no file seleted=\" + category.tag);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmFileLists.add(new File(category.getName()));\n\t\t}\n\t\treturn mFileLists;\n\t}", "File[] getFilesInFolder(String path) {\n return new File(path).listFiles();\n }", "private void loadFolderPressed() {\n\n\t\t// open a jfile chooser and then go through the directory chosen\n\t\t// then load all the video and audio files in that directory\n\n\t\tFile chosenDirectory =null;\n\n\t\t// choose a directory only\n\t\tJFileChooser chooser = new JFileChooser();\n\t\tchooser.setCurrentDirectory(new java.io.File(\".\"));\n\t\tchooser.setDialogTitle(\"Choose Directory\");\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tint response = chooser.showOpenDialog(Library.this);\n\t\tif (response == JFileChooser.APPROVE_OPTION) {\n\t\t\t// Chose the directory to save to\n\t\t\tchosenDirectory = chooser.getSelectedFile().getAbsoluteFile();\n\t\t}\n\t\tif(chosenDirectory != null){\n\t\t\t// go through the chosen directory and get all the files\n\t\t\tl.clear();\n\t\t\tFile[] directoryListing = chosenDirectory.listFiles();\n\t\t\tif (directoryListing != null) {\n\n\t\t\t\t// check if that file chosen currently is a media file. If it is then\n\t\t\t\t// add it to the list\n\t\t\t\tInvalidCheck ic = new InvalidCheck();\n\n\t\t\t\tfor(File f : directoryListing){\n\t\t\t\t\tboolean isValid = ic.invalidCheck(f.getAbsolutePath());\n\n\t\t\t\t\tif(isValid){\n\t\t\t\t\t\tlistFolder.add(f);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(File f2 : listFolder){\n\t\t\t\t\tSystem.out.println(f2.getName());\n\t\t\t\t}\n\n\t\t\t\t// get the paths and sizes of the media files.\n\t\t\t\tfor(File f : listFolder){\n\t\t\t\t\t// only put the file in if it is not size 0 so that any bad files are avoided.\n\t\t\t\t\tif(f.length() != 0){\n\t\t\t\t\t\tl.addElement(f.getName());\n\t\t\t\t\t\tpaths.put(f.getName(),f.getAbsoluteFile());\n\t\t\t\t\t\tsizes.put(f.getName(), f.length());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void getAllFiles()\n\t{\n\t\t//Getting the File Name\n\n\t\tList<String> fileNames = FileManager.getAllFiles(folderpath);\n\t\n\t\tfor(String f:fileNames)\n\t\tSystem.out.println(f);\n\t\n\t}", "List<File> getSystemDescriptionFiles();", "public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Filename>\");\n\t\tSystem.out.println(\"To refresh type command: refresh\");\n\t\tSystem.out.println(\"To disconnect type command: disconnect\");\n\t}", "public List<String> _getSavingDirectories() throws CallError, InterruptedException {\n return (List<String>)service.call(\"_getSavingDirectories\").get();\n }", "public void listFiles(String path) {\r\n String files;\r\n File folder = new File(path);\r\n File[] listOfFiles = folder.listFiles();\r\n\r\n for (int i = 0; i < listOfFiles.length; i++) {\r\n\r\n if (listOfFiles[i].isFile()) {\r\n files = listOfFiles[i].getName();\r\n if (files.endsWith(\".png\") || files.endsWith(\".PNG\")\r\n || files.endsWith(\".gif\") || files.endsWith(\".GIF\")) {\r\n //System.out.println(files);\r\n pathList.add(path+\"\\\\\");\r\n fileList.add(files);\r\n }\r\n }\r\n \r\n else {\r\n listFiles(path+\"\\\\\"+listOfFiles[i].getName());\r\n }\r\n }\r\n }", "public File[] elements() {\n File plik = new File(katalog);\n katalog = plik.getAbsolutePath();\n if (katalog.endsWith(\".\")) {\n katalog = katalog.substring(0, katalog.length() - 1);\n }\n return plik.listFiles();\n }", "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 static File[] getDicomExportDirectoryFiles() {\n\t\tif (xml == null) return new File[0];\n\t\treturn dicomExportDirectoryFiles;\n\t}", "@GetMapping(\"/files\")\n public ResponseEntity<List<FileInfo>> getListFiles() {\n List<FileInfo> fileInfos = storageService.loadAll().map(path -> {\n String filename = path.getFileName().toString();\n String url = MvcUriComponentsBuilder\n .fromMethodName(FilesController.class, \"getFile\", path.getFileName().toString()).build().toString();\n\n return new FileInfo(filename, url);\n }).collect(Collectors.toList());\n\n return ResponseEntity.status(HttpStatus.OK).body(fileInfos);\n }", "public List<File> listCacheDirs() {\n List<File> cacheDirs = new ArrayList<File>();\n File file = new File(parent);\n if(file.exists()) {\n File[] files = file.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n // TODO Auto-generated method stub\n return pathname.isDirectory() && \n pathname.getName().startsWith(CacheDirectory.cacheDirNamePrefix(identity));\n }\n \n });\n cacheDirs = Arrays.asList(files);\n }\n return cacheDirs;\n }", "private static ArrayList<String> fetchSaved() {\n\t\tScanner s;\n\t\tint count = 0;\n\t\tArrayList<String> savedList = new ArrayList<String>();\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"saved.txt\"));\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tsavedList.add(s.next());\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of converted urls fetched: \" + count);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn savedList;\n\t}", "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 ArrayList<Record> getAllSavedRecords() {\n ArrayList<Record> resultList = new ArrayList<>();\n\n File baseFolder = getBaseFolder();\n if (baseFolder != null) {\n String[] allRecords = baseFolder.list();\n if (allRecords == null || allRecords.length == 0) {\n return resultList;\n }\n\n for (String eachRecord : allRecords) {\n Record record = loadRecordFromFolderName(eachRecord);\n if (record == null) {\n continue;\n }\n updateRecordCurrentSize(record);\n updateRecordCurrentImageCount(record);\n resultList.add(record);\n }\n }\n\n if (resultList.size() > 0) {\n sortRecordList(resultList);\n }\n return resultList;\n }", "public List<File> getFiles(String dir)\r\n\t{\r\n\t\tList<File> result = null;\r\n\t\tFile folder = new File(dir);\r\n\t\tif (folder.exists() && folder.isDirectory())\r\n\t\t{\r\n\t\t\tFile[] listOfFiles = folder.listFiles(); \r\n\t\t\t \r\n\t\t\tresult = new ArrayList<File>();\r\n\t\t\tfor (File file : listOfFiles)\r\n\t\t\t{\r\n\t\t\t\tif (file.isFile())\r\n\t\t\t\t\tresult.add(file);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlogger.error(\"check to make sure that \" + dir + \" exists and you have permission to read its contents\");\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public ArrayList<String> getList(String path) throws Exception {\n\t\t\t\n\t\t\tSmbFile file = new SmbFile(path, new NtlmPasswordAuthentication(null, user, pass));\n\t\t\tArrayList<String> fileList = new ArrayList<String>();\n\t\t\t\n\t\t\tSmbFile[] fArr = file.listFiles();\n\t\t\t\n\t\t\tfor(int a=0;a<fArr.length;a++) {\n\t\t\t\tif(accept(fArr[a]) == true) {\n\t\t\t\t\tfileList.add(fArr[a].getName());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn fileList;\n\t\t}", "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 }", "private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }", "public static ArrayList<String> getPlayList(){\n\t\tFile home = new File(MEDIA_PATH);\n\t\tif(home.listFiles(new FileExtensionFilter()).length > 0){\n\t\t\tfor(File file : home.listFiles(new FileExtensionFilter())){\n\t\t\t\tString song = new String();\n\t\t\t\tsong = file.getName().substring(0, (file.getName().length() - 4 )); // - \".mp3\"\t\t\t\t\n\t\t\t\t// Add song\n\t\t\t\tsongsList.add(song);\n\t\t\t}\n\t\t}\n\t\treturn songsList;\n\t}", "public List<Path> getAllPaths();", "public List<Path> getTestFiles() throws Exception {\n try (Stream<Path> stream = Files.list(Paths.get(BibTeXMLImporterTest.class.getResource(\"\").toURI()))) {\n return stream.filter(p -> !Files.isDirectory(p)).collect(Collectors.toList());\n }\n\n }", "List<IDirectory> getSourcePath();", "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 static List<String> getFileNameList(final BaseManager manager, final AxisID axisID) {\n File[] fileList = FileType.AUTOFIDSEED_DIR.getFile(manager, axisID).listFiles(\n new AutofidseedSelectionAndSorting());\n if (fileList == null || fileList.length == 0) {\n UIHarness.INSTANCE.openMessageDialog(manager, \"No \" + getDescr(manager, axisID)\n + \" files available.\", \"No Such File\", axisID);\n return null;\n }\n String subdir = FileType.AUTOFIDSEED_DIR.getFileName(manager, axisID);\n List<String> fileNameList = new ArrayList<String>();\n for (int i = 0; i < fileList.length; i++) {\n if (fileList[i] != null) {\n fileNameList.add(subdir + File.separator + fileList[i].getName());\n }\n }\n Collections.sort(fileNameList);\n return fileNameList;\n }", "public static List<File> listAllConvertibleFilesInCwd() {\n File folder = new File( System.getProperty(\"user.dir\") );\n File[] listOfFiles = folder.listFiles();\n List<File> files = new ArrayList<>();\n\n for (int i = 0; i < (listOfFiles != null ? listOfFiles.length : 0); i++) {\n String match = \".*(?<!ac2)\\\\.mkv$|.*\\\\.avi$|.*\\\\.flv$|.*\\\\.mp4$\"; // match every video except mkv with ac2 behind it\n if(listOfFiles[i].getName().matches(match)) {\n files.add(listOfFiles[i]);\n }\n }\n return files;\n }", "@Override\n public Iterable<File> list(File storageDirectory, FilenameFilter filter) {\n\treturn null;\n }", "void onSavingCompleted(List<File> files);", "public final List<File> mo14817d() {\n ArrayList arrayList = new ArrayList();\n try {\n if (mo14820g().exists()) {\n if (mo14820g().listFiles() != null) {\n for (File file : mo14820g().listFiles()) {\n if (!file.getCanonicalPath().equals(mo14819f().getCanonicalPath())) {\n arrayList.add(file);\n }\n }\n return arrayList;\n }\n }\n return arrayList;\n } catch (IOException e) {\n f6563c.mo14884b(6, \"Could not process directory while scanning installed packs. %s\", new Object[]{e});\n }\n }", "public String[] listFilesString(String extension) {\n\t\tFile[] FL = listFiles(extension);\n\t\treturn FU.listFilesString(FL);\n\t}", "private String[] findFiles(String dirName, String suffix)\r\n {\r\n File dir = new File(dirName);\r\n if(dir.isDirectory()) {\r\n String[] allFiles = dir.list();\r\n if(suffix == null) {\r\n return allFiles;\r\n }\r\n else {\r\n List<String> selected = new ArrayList<String>();\r\n for(String filename : allFiles) {\r\n if(filename.endsWith(suffix)) {\r\n selected.add(filename);\r\n }\r\n }\r\n return selected.toArray(new String[selected.size()]);\r\n }\r\n }\r\n else {\r\n System.out.println(\"Error: \" + dirName + \" must be a directory\");\r\n return null;\r\n }\r\n }", "private ArrayList<String> listFilesForFolder(File folder, TaskListener listener) {\n \tArrayList<String> lista = new ArrayList<String>();\n \tif(folder.exists()){\n\t \tFile[] listOfFiles = folder.listFiles();\n\t\t\t if(listOfFiles != null){\t\n\t\t\t\tfor (File file : listOfFiles) {\n\t\t\t\t\t if (file.isDirectory()) {\t\n\t\t\t\t \tlista.add(file.getName());\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t\treturn lista;\n\t}", "public File[] getFiles(String mkey) {\n\t\tFile last;\n\t\tint i = 0;\n\t\tArrayList<File> v = new ArrayList<>();\n\t\twhile (true) {\n\t\t\tlast = getFile(mkey + i);\n\t\t\ti++;\n\t\t\tif (last == null)\n\t\t\t\tbreak;\n\t\t\tv.add(last);\n\t\t}\n\t\tif (v.size() != 0) {\n\t\t\tFile[] path = new File[v.size()];\n\t\t\treturn v.toArray(path);\n\t\t} else {\n\t\t\treturn (File[]) getDefault(mkey);\n\t\t}\n\t}", "public static List<File> getSettingsFiles() {\n\t\tString[] pathList = System.getProperty(SETTINGS_FILE_PROPERTY, DEFAULT_SETTINGS_FILEPATH).split(\n\t\t\t\tFile.pathSeparator);\n\t\tList<File> result = new ArrayList<File>();\n\t\tfor (String path : pathList) {\n\t\t\tif (path.trim().length() != 0) {\n\t\t\t\tFile settingsFile = new File(path);\n\t\t\t\tif (settingsFile.isFile()) {\n\t\t\t\t\tresult.add(settingsFile);\n\t\t\t\t} else {\n\t\t\t\t\tlog.debug(\"Ignoring non-existing file {}\", settingsFile);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "static void viewFiles()\r\n\t {\n\t\t File directoryPath = new File(\"D:\\\\java_project\");\r\n\t File filesList[] = directoryPath.listFiles();\r\n System.out.println(\"List of files and directories in the specified directory:\");\r\n\t for(File file : filesList) \r\n\t {\r\n\t System.out.println(\"File name: \"+file.getName());\r\n\t System.out.println(\"File path: \"+file.getAbsolutePath());\r\n\t System.out.println(\"Size :\"+file.getTotalSpace());\r\n\t System.out.println(\"last time file is modified :\"+new Date(file.lastModified()));\r\n System.out.println(\" \");\r\n\t }\r\n }", "private static File[] filesMiner(String path) {\n try {\n File directoryPath = new File(path);\n FileFilter onlyFile = new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n return pathname.isFile();\n }\n }; // filter directories\n return directoryPath.listFiles(onlyFile);\n } catch (Exception e) {\n System.err.println(UNKNOWN_ERROR_WHILE_ACCESSING_FILES);\n return null;\n }\n\n }", "static ArrayList<String> loadShop() {\n //check directory, create if missing\n File dir = new File(\"./plugins/SkyblockShop/\");\n if (!dir.exists()) {if (!dir.mkdir()) { System.out.println(\"Failed to create SkyblockShop directory!\");}}\n\n //create fullShop to return all retrieved files\n ArrayList<String> fullShop = new ArrayList<>();\n\n //iterate through all files in directory and add them to fullShop\n File[] files = dir.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.getName().endsWith(\".txt\")) {\n fullShop.addAll(loadShop(file));\n }\n }\n }\n\n return fullShop;\n }", "public List<File> returnFiles(HttpServletRequest request, ServletContext context, String dirToSaveUploadedFileIn) {\n boolean isMultipart = ServletFileUpload.isMultipartContent(request);\n return isMultipart ? getFiles(request, context, createDirectoryIfDoesntExist(dirToSaveUploadedFileIn)) : new ArrayList<File>();\n }", "private List<org.jajuk.base.File> getFiles() {\n List<org.jajuk.base.File> files;\n if (Mode.DJ.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getDJFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Ambience.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getAmbienceFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Playlist.equals(data.get(Variable.MODE))\n || Mode.ProvidedPlaylist.equals(data.get(Variable.MODE))) {\n try {\n Playlist tempPlaylist = (Playlist) data.get(Variable.TEMP_PLAYLIST);\n files = UtilPrepareParty.getPlaylistFiles((String) data.get(Variable.ITEM), tempPlaylist);\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Shuffle.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getShuffleFiles();\n } else if (Mode.BestOf.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBestOfFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Queue.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getQueueFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Bookmarks.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBookmarkFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Novelties.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getNoveltiesFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else {\n throw new IllegalArgumentException(\"Unknown mode in PreparePartyWizard: \"\n + data.get(Variable.MODE));\n }\n // filter by media first\n if (isTrue(Variable.ONE_MEDIA_ENABLED) && !isTrue(Variable.CONVERT_MEDIA)) {\n files = UtilPrepareParty.filterMedia(files, (String) data.get(Variable.ONE_MEDIA));\n }\n // then filter out by rating\n if (data.containsKey(Variable.RATING_LEVEL)) {\n files = UtilPrepareParty.filterRating(files, (Integer) data.get(Variable.RATING_LEVEL));\n }\n // filter max length\n if (isTrue(Variable.MAXLENGTH_ENABLED)) {\n files = UtilPrepareParty.filterMaxLength(files, (Integer) data.get(Variable.MAXLENGTH));\n }\n // filter max size\n if (isTrue(Variable.MAXSIZE_ENABLED)) {\n files = UtilPrepareParty.filterMaxSize(files, (Integer) data.get(Variable.MAXSIZE));\n }\n // filter max tracks\n if (isTrue(Variable.MAXTRACKS_ENABLED)) {\n files = UtilPrepareParty.filterMaxTracks(files, (Integer) data.get(Variable.MAXTRACKS));\n }\n return files;\n }" ]
[ "0.73658234", "0.7190803", "0.71216077", "0.7020431", "0.69385356", "0.68878436", "0.68636", "0.6826849", "0.6811302", "0.6802398", "0.67538", "0.67076105", "0.66888523", "0.6646149", "0.6600738", "0.6592331", "0.65622777", "0.6546946", "0.65313995", "0.6526533", "0.6517982", "0.6490205", "0.648689", "0.6481256", "0.6461544", "0.64599264", "0.6444638", "0.6443959", "0.6421849", "0.64201105", "0.6418563", "0.6413981", "0.64093244", "0.64071596", "0.6389693", "0.6360035", "0.63418496", "0.6341188", "0.63306576", "0.629659", "0.62963134", "0.6292064", "0.62896305", "0.62838477", "0.62811846", "0.62793046", "0.62778705", "0.62655944", "0.62113804", "0.6210763", "0.6203716", "0.6198297", "0.61973035", "0.6191149", "0.61848915", "0.61757433", "0.6174243", "0.61722755", "0.61612153", "0.61567116", "0.61362284", "0.6120017", "0.6119297", "0.61184734", "0.611635", "0.61128145", "0.6112643", "0.6107812", "0.6101094", "0.6084132", "0.60802937", "0.6078529", "0.606573", "0.60571504", "0.6054662", "0.6040684", "0.6035146", "0.6026668", "0.60253936", "0.60111076", "0.6004566", "0.59891087", "0.5987528", "0.5985795", "0.5983437", "0.59698415", "0.5966766", "0.59657544", "0.59593993", "0.59591377", "0.5947658", "0.5927669", "0.5925403", "0.59014416", "0.5898131", "0.5888089", "0.58655393", "0.5863443", "0.5850245", "0.5843705" ]
0.81441617
0
get all players from the game who are playing
public static ArrayList<Player> getAllPlayingPlayers() { // Anton fix: Would copy the list itself, we want just the items. // Remove/add manipulations would affect original list /* * ArrayList<Player> all = players; for (Player player: all) { if * (!player.isPlaying()) { all.remove(player); } } */ ArrayList<Player> all = new ArrayList<Player>(); for (Player player : players) { if (player.isPlaying()) all.add(player); } return all; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Player> getPlayers();", "public List<Player> findAllPlayers(){\n\t\treturn playerRepository.findAll();\n\t}", "List<Player> findAllPlayers();", "static List<Player> getAllPlayers() {\n\t\treturn null;\r\n\t}", "public List<Player> getAllPlayers() {\r\n // TODO fix actual order of players in the List.\r\n\r\n List<Player> players = new ArrayList<>();\r\n players.addAll(teamRed.getPlayers());\r\n players.addAll(teamBlue.getPlayers());\r\n\r\n return players;\r\n }", "@Override\r\n\tpublic ArrayList<PlayerPO> getAllPlayers() {\n\t\treturn playerController.getAllPlayers();\r\n\t}", "public TennisPlayer[] getAllPlayers() throws TennisDatabaseRuntimeException {\n\t\t \t\n\t\tTennisPlayerContainerIterator iterator = this.iterator();\n\t\t\n iterator.setInorder();\n \t\n TennisPlayer[] outputArray = new TennisPlayer[playerCount];\n \n int index = 0;\n \n while (iterator.hasNext()) {\n \t\n outputArray[index] = iterator.next();\n \n index++;\n \n }\n \n return outputArray;\n \n\t}", "public List<Player> getPlayers() {\r\n\t\tList<Player> playerList = new ArrayList<Player>();\r\n\r\n\t\tfor (Player p : players.values()) {\r\n\t\t\tif (p != null)\r\n\t\t\t\tplayerList.add(p);\r\n\t\t}\r\n\r\n\t\treturn playerList;\r\n\t}", "public List<Player> getAll() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAll();\n }", "ArrayList<Player> getAllPlayer();", "List<Player> listPlayers();", "public List<PlayerInfo> getPlayerList(GameInfo gi){\n\t\tClientModelFacade facade = ClientModelFacade.getInstance(null);\n\t\t\n\t\tGameInfo[] gameList = facade.getGamesList();\n\n\t\tfor(int i = 0; i < gameList.length; i++){\n\t\t\tif(gameList[i].getId() == gi.getId()){\n\t\t\t\treturn gameList[i].getPlayers();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public ArrayList<Entity> getPlayers() {\n ArrayList<Entity> players = new ArrayList<>();\n students.forEach(student -> players.add(student.getPlayer()));\n return players;\n }", "Collection<User> players();", "@Override\n public List<Player> getPlayers() {\n return players;\n }", "public List<PlayerInstance> getAllPlayers()\n\t{\n\t\tfinal List<PlayerInstance> players = new ArrayList<>();\n\t\tfor (Creature temp : getCharactersInside())\n\t\t{\n\t\t\tif (temp instanceof PlayerInstance)\n\t\t\t{\n\t\t\t\tplayers.add((PlayerInstance) temp);\n\t\t\t}\n\t\t}\n\t\treturn players;\n\t}", "public List<Player> getPlayers() {\r\n return players;\r\n }", "public List<Player> getPlayers() {\r\n return players;\r\n }", "public List<String> getAllPlayers() throws ServerProblem {\r\n\ttry (Connection connTDB = ConnectionManager.getInstance().getConnection()) {\r\n\t LOGGER.debug(\"Getting all players\");\r\n\t List<String> results = engine.getAllPlayers(connTDB);\r\n\t LOGGER.debug(\"Players found in the database: \" + results);\r\n\t return results;\r\n\t} catch (Exception ex) {\r\n\t String error = \"Problem encountered getting all players: \" + ex;\r\n\t LOGGER.error(error);\r\n\t throw new ServerProblem(error, ex);\r\n\t}\r\n }", "@Override\n public List<Player> getPlayers() {\n return new ArrayList<Player>(players);\n }", "public List<Player> getAvailablePlayers(Round round) {\r\n\t\tList<Player> availablePlayers = playerLogic.createNew(round.getPlayers());\r\n\r\n\t\tfor (Match match : round.getMatches()) {\r\n\t\t\tavailablePlayers.removeAll(match.getHomeTeam());\r\n\t\t\tavailablePlayers.removeAll(match.getAwayTeam());\r\n\t\t}\r\n\t\treturn availablePlayers;\r\n\t}", "public List <FootballPlayer> getAllPlayers() {\n\t\treturn market.getAllPlayers();\n\t}", "public Player[] getPlayers() {\n return this.players;\n }", "public Player[] getPlayers() {\n return this.players;\n }", "public Player[] getPlayers() {\r\n return players;\r\n }", "public Player[] getPlayers() {\n return players;\n }", "public Set<String> getPlayers()\n\t{\n\t\tSet<String> player = playerPieces.keySet();\n\t\treturn player;\n\t}", "public List<PlayerItem> getAll();", "public Set<UUID> getAlivePlayers() {\n return new HashSet<>(players);\n }", "public Collection<Player> getPlayersChunk() {\n var chunk = new Chunk<Player>();\n var playersChunk = chunk.get(this.players, ALL_PLAYERS_CHUNK_SIZE, allPlayersChunkIndex);\n\n // up to ALL_PLAYERS_CHUNK_SIZE with empty players\n // to have an even view\n var startIndex = playersChunk.size();\n for (var i = startIndex; i < ALL_PLAYERS_CHUNK_SIZE; i++) {\n playersChunk.add(new Player(new Person()));\n }\n\n return playersChunk;\n }", "public Player[] getPlayers()\r\n\t{\r\n\t\treturn this.players;\r\n\t}", "private Collection<Player> getPlayers() {\n\t\treturn players;\n\t}", "public List<Player> getPlayers() {\r\n\t\treturn players;\r\n\t}", "public Player[] getPlayers()\n\t{\n\t\treturn players;\n\t}", "public Set<Player> getPlayers() {\n return players;\n }", "private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }", "public String[] getPlayers() {\r\n return playerIds;\r\n }", "public synchronized List<Card> getCardsInPlay(){\n cardsInPlay.clear();\r\n \r\n for(Player player: players){\r\n if(player == null){\r\n continue;\r\n }\r\n if(player.getCardsInHand().isEmpty()){\r\n continue;\r\n }\r\n for(Card card: player.getCardsInHand()){\r\n cardsInPlay.add(card);\r\n }\r\n }\r\n return cardsInPlay;\r\n }", "public ArrayList<Player> getPlayersInGame() {\n return playersInGame;\n }", "public List<PlayerItem> getAllPlayerItemById(Player player);", "public static Collection<? extends Player> getOnlinePlayers() {\n return Bukkit.getServer().getOnlinePlayers();\n }", "public List<Player> getPlayers() {\n\t\treturn players;\n\t}", "public List<Player> getPlayers() {\n\n\t\treturn players;\n\t}", "public List<Player> getAllOrdered() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAllOrdered();\n }", "public ArrayList<Player> getPlayers() {\n return players;\n }", "public ArrayList<Player> getPlayers() {\n return players;\n }", "Set<String> getPlayers();", "public List<String> getAllPlayerNames() {\n List<String> playerNames = new ArrayList<>(10);\n for (Player p : players) {\n playerNames.add(p.getName());\n }\n return playerNames;\n }", "@Override\n public ArrayList<Player> getPlayers() throws RemoteException {\n return players;\n }", "public Set<GamePiece> getPlayerPieces() \n\t{\n\t\tSet<GamePiece> pieces = new HashSet<GamePiece>();\n\t\tfor(GamePiece piece: playerPieces.values())\n\t\t{\n\t\t\tpieces.add(piece);\n\t\t}\n\t\treturn pieces;\n\t}", "public static List<Player> getTrackablePlayers() {\n\t\tPlayer[] players = Bukkit.getOnlinePlayers();\n\t\tList<Player> players1 = new ArrayList<Player>();\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].hasMetadata(\"invisible\")) {\n\t\t\t\tplayers1.add(players[i]);\n\t\t\t}\n\n\t\t}\n\t\treturn players1;\n\t}", "public EntityList<Player> getPlayers() {\n\t\treturn players;\n\t}", "public ListResponse<PlayerResponse> getPlayers() {\n\t\tcheckProvided();\n\t\treturn players;\n\t}", "public static ArrayList<EntityPlayer> getAll() {\r\n\t\ttry {\r\n\t\t\tArrayList<EntityPlayer> players = new ArrayList<EntityPlayer>();\r\n\t\t\t\r\n\t\t\tfor (EntityPlayer player : mc.world.playerEntities) {\r\n\t\t\t\tif (!player.isEntityEqual(mc.player)) {\r\n\t\t\t\t\tplayers.add(player);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn players;\r\n\t\t} catch (NullPointerException ignored) {\r\n\t\t\treturn new ArrayList<EntityPlayer>();\r\n\t\t}\r\n\t}", "public List<Player> getPlayerList(){\n return this.players;\n }", "public Set<Character> players(){\r\n\t\tSet<Character> players = new HashSet<Character>();\r\n\t\tfor(Character character: characters()){\r\n\t\t\tif(character.isPlayer())\r\n\t\t\t\tplayers.add(character);\r\n\t\t}\r\n\t\treturn players;\r\n\t}", "public List<Result> getPlayerResults(Player player) {\t\n\t\treturn results.stream()\n\t\t\t\t.filter(result -> result.participated(player))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}", "public List<Player> getPlayersOrdered() {\r\n ArrayList<Player> result = new ArrayList<>();\r\n for (PlayerContainer container : players) {\r\n result.add(container.player);\r\n }\r\n return result;\r\n }", "private void getPlayers() {\r\n\t\tSystem.out.println(\"How Many Players: \");\r\n\t\tpnum = getNumber(1, 3);\r\n\r\n\t\tfor(int i=0; i < pnum; i++){\r\n\t\t\tSystem.out.println(\"What is player \" + (i + 1) + \"'s name? \");\r\n\t\t\tString name = sc.next();\r\n\t\t\tboolean dupe = true;\r\n\t\t\twhile(dupe){\r\n\t\t\t\tint samecounter = 0;\r\n\t\t\t\tfor(Player p : players){\r\n\t\t\t\t\tif(name.equals(p.getName())){\r\n\t\t\t\t\t\tsamecounter += 1;\r\n\t\t\t\t\t\tSystem.out.println(\"Name is the same as another players. Please choose another name: \");\r\n\t\t\t\t\t\tname = sc.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(samecounter == 0){\r\n\t\t\t\t\tdupe = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayers.add(new Player(name));\r\n\r\n\t\t}\r\n\t}", "public List<Player> getAttackedPlayers() {\r\n\t\tArrayList<Player> output = new ArrayList<Player>();\r\n\t\tfor(Player p : getOtherPlayers()) {\r\n\t\t\tif(!(p.deck.hand.contains(new Moat()) \r\n\t\t\t\t\t|| p.deck.duration.contains(new Lighthouse()) \r\n\t\t\t\t\t|| p.deck.duration.contains(new Champion()) \r\n\t\t\t\t\t|| p.getPlayerNum() == getWhoseTurn())) {\r\n\t\t\t\toutput.add(p);\r\n\t\t\t}\r\n\t\t\tArrayList<Card> reactions = new ArrayList<Card>();\r\n\t\t\tfor(Card c : p.deck.hand) {\r\n\t\t\t\tif(c.isReaction()) reactions.add(c);\r\n\t\t\t}\r\n\t\t\tfor(Card c : reactions) {\r\n\t\t\t\tc.reactAttack();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "public LinkedList<Player> getPlayers() {\n\t\treturn this.players;\n\t}", "public Hashtable<Integer, Player> getPlayers() {\r\n\t\treturn players;\r\n\t}", "@Override\n\tpublic List<Game> listGames(Player player) {\n\t\treturn iGameRepository.findAllByPlayer(player);\n\t}", "public List<Game> getFullGameList() {\n List<Game> listOfGames = null;\n Session session = sessionFactory.openSession();\n // Try to return the user by the given nickname\n try {\n session.beginTransaction();\n // if mode equals ALL then get full list of games\n listOfGames = session.createCriteria(Game.class).list();\n \n session.getTransaction().commit();\n session.flush();\n } \n catch (HibernateException e) { return null; } \n finally { session.close(); }\n // Return userID if seted\n return listOfGames;\n }", "public ArrayList<Player> getPlayerList() {\n ArrayList<Player> ret = new ArrayList<>();\n ret.addAll(playerList);\n return ret;\n }", "@Override\r\n\tpublic List<Player> getAllPlayer(String email) {\n\t\treturn dao.getAllPlayer(email);\r\n\t}", "public CompactPlayer[] getPlayers()\n {\n return players;\n }", "public static ArrayList<Player> getOtherPlayers() {\n ArrayList<Player> all = getAllPlayingPlayers();\n all.remove(getCurrentPlayer());\n\n return all;\n }", "@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}", "public abstract Collection<PlayerFish> getPlayers();", "public List<Player> getPlayersInRoom() {\n\t\treturn playersInRoom;\n\t}", "public List<RPSGame> getGamesByPlayer(String playerId) {\n\t\tif (playerId == null) {\n\t\t\tthrow new RuntimeException(\"Player ID can't be null!\");\n\t\t}\n\t\treturn games.entrySet().stream().map(entry -> entry.getValue()).filter(game -> game.isPlayerGame(playerId))\n\t\t\t\t.collect(Collectors.toList());\n\n\t}", "public Set<Player> getParticipants() { //TODO: not sure the validation needs to happend here\n\t\t// Run through the results and make sure all players have been pushed into the participants set.\n\t\tfor ( Result result : results ) {\n\t\t\tparticipants.add(result.getWinner());\n\t\t\tparticipants.add(result.getLoser());\n\t\t}\n\n\t\treturn participants;\n\t}", "public synchronized List<Game> getGameList() {\n return games;\n }", "public static ArrayList<Player> getPlayerAry(){\n\t\treturn players;\n\t}", "@RequestMapping(\"/players\")\n public List<Player> getAllPlayers() {\n return playerService.getPlayerList();\n }", "public SmallGameBoard[] getAllGames(){return games;}", "public static ArrayList<Player> getWinners(){return winners;}", "public ArrayList<Player> getOtherPlayers() {\r\n\t\tArrayList<Player> output = new ArrayList<Player>();\r\n\t\toutput.addAll(players);\r\n\t\toutput.remove(getWhoseTurn() - 1);\r\n\t\treturn output;\r\n\t}", "public Collection<Game> getAllActiveGames() {\n return gameRepository.findAllActive();\n }", "public Map<String, Player> getPlayersMap(){\n return this.players;\n }", "private void loadPlayers() {\r\n this.passive_players.clear();\r\n this.clearRoster();\r\n //Map which holds the active and passive players' list\r\n Map<Boolean, List<PlayerFX>> m = ServiceHandler.getInstance().getDbService().getPlayersOfTeam(this.team.getID())\r\n .stream().map(PlayerFX::new)\r\n .collect(Collectors.partitioningBy(x -> x.isActive()));\r\n this.passive_players.addAll(m.get(false));\r\n m.get(true).stream().forEach(E -> {\r\n //System.out.println(\"positioning \"+E.toString());\r\n PlayerRosterPosition pos = this.getPlayerPosition(E.getCapnum());\r\n if (pos != null) {\r\n pos.setPlayer(E);\r\n }\r\n });\r\n }", "@Override public GameList getAllGamesFromServer() throws RemoteException, SQLException {\r\n return gameListClientModel.getGamesFromServer();\r\n }", "public List<Player> getPlayerList()\n\t{\n\t\treturn playerList;\n\t}", "public List<Player> loadAll() throws SQLException {\n\t\tfinal Connection connection = _database.getConnection();\n\t\tfinal String sql = \"SELECT * FROM \" + table_name + \" ORDER BY id ASC \";\n\t\tfinal List<Player> searchResults = listQuery(connection.prepareStatement(sql));\n\n\t\treturn searchResults;\n\t}", "List<GameResult> getAllGameResults();", "public List<Player> getPassengers() {\n\t\tList<Player> ret = new ArrayList<Player>();\n\t\t\n\t\tfor (Player p : Bukkit.getOnlinePlayers()) {\n\t\t\tif (isPassenger(p))\n\t\t\t\tret.add(p);\n\t\t}\n\t\treturn ret;\n\t}", "public List<ServerPlayerEntity> getPlayerList() {\n return this.players;\n }", "public Integer[] getAllPlayerVisible() {\n\t\treturn playerVisible.toArray(new Integer[playerVisible.size()]);\n\t}", "public static Map<String, PlayerConfig> getPlayers() {\n return players;\n }", "public Connect4Player[] getPlayers(){\n\t\tConnect4Player[] output = new Connect4Player[4];\n\t\tif(players.isEmpty()){\n\t\t\tplayers.add(new Connect4Player(this, TOKEN.X));\n\t\t\tplayers.add(new Connect4Player(this, TOKEN.O));\n\t\t}\n\t\toutput[0] = players.get(0);\n\t\toutput[1] = players.get(1);\n\t\treturn output;\n\t}", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "private static PlayerDto[] getPlayersDto(Game game) {\n return Arrays.stream(game.getPlayers()).map(GameMapper::getPlayerDto).toArray(PlayerDto[]::new);\n }", "protected ClientList getCurrentPlayers() {\r\n\t\treturn this.players;\r\n\t}", "public ArrayList<CardGamePlayer> getPlayerList(){\n\t\treturn this.playerList;\n\t}", "public static Set<String> getGamesList() {\n\t\treturn arcade.findPlayableIds();\n\t}", "public List<PlayerGame> findAllByGame(Long gameId) {\n return playerGames.stream()\n .filter(p -> p.getGame().getId().equals(gameId))\n .collect(Collectors.toList());\n }", "public Set<Colour> getWinningPlayers();", "public ArrayList<GameData> getGames() {\n\t\tCursor dbGames = getReadableDatabase().rawQuery(\n\t\t\t\t\"SELECT game_id, name, hosting from game\", null);\n\t\tdbGames.moveToFirst();\n\t\tArrayList<GameData> games = new ArrayList<GameData>();\n\t\twhile (!dbGames.isAfterLast()) {\n\t\t\tgames.add(new GameData(dbGames.getInt(0), dbGames.getString(1),\n\t\t\t\t\tdbGames.getInt(2)));\n\t\t\tdbGames.moveToNext();\n\t\t}\n\t\tdbGames.close();\n\t\treturn games;\n\t}" ]
[ "0.786035", "0.77785146", "0.76723725", "0.7611984", "0.75849706", "0.7564791", "0.7549002", "0.75457036", "0.753281", "0.751754", "0.7506504", "0.7462838", "0.7389344", "0.73309636", "0.7322235", "0.7290806", "0.72892827", "0.72892827", "0.7277799", "0.72663885", "0.7221089", "0.7207529", "0.71823156", "0.71823156", "0.71741533", "0.7167615", "0.71586657", "0.7141946", "0.71376663", "0.7123466", "0.71200573", "0.7119317", "0.71151966", "0.7114366", "0.7113545", "0.7100601", "0.7084829", "0.7074522", "0.70685434", "0.7057263", "0.7046401", "0.703784", "0.70299447", "0.70157105", "0.70104635", "0.70015335", "0.69874966", "0.69790757", "0.6968186", "0.694619", "0.69369686", "0.69313365", "0.6907175", "0.6901388", "0.68997824", "0.6886381", "0.68769866", "0.687418", "0.68539786", "0.6843656", "0.68367696", "0.68129563", "0.6796896", "0.6784496", "0.6776444", "0.67763764", "0.6762419", "0.6721255", "0.67155725", "0.67133397", "0.6693318", "0.6674259", "0.6670895", "0.6664168", "0.66365063", "0.6619155", "0.66150504", "0.6591164", "0.6582216", "0.6572566", "0.65708286", "0.6569264", "0.656652", "0.6563248", "0.65418595", "0.6532254", "0.65249616", "0.6519932", "0.6513808", "0.65131825", "0.6503365", "0.64967996", "0.64930993", "0.6491064", "0.6449993", "0.6441519", "0.6429509", "0.6428036", "0.6419245", "0.6408446" ]
0.7203876
22
get all who are playing except yourself
public static ArrayList<Player> getOtherPlayers() { ArrayList<Player> all = getAllPlayingPlayers(); all.remove(getCurrentPlayer()); return all; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Player> getOtherPlayers() {\r\n\t\tArrayList<Player> output = new ArrayList<Player>();\r\n\t\toutput.addAll(players);\r\n\t\toutput.remove(getWhoseTurn() - 1);\r\n\t\treturn output;\r\n\t}", "public ArrayList<Entity> getAllOtherEntities(Player player)\n {\n ArrayList<Entity> entitiesWithoutPlayer = new ArrayList<>();\n for (Entity entity : entityList) {\n if (!entity.equals(player)) {\n entitiesWithoutPlayer.add(entity);\n }\n }\n return entitiesWithoutPlayer;\n }", "public Player getOppositePlayer();", "public ArrayList<Player> checkToEliminate() {\n ArrayList<Player> eliminated = new ArrayList<Player>();\n\n // Check which players are to be eliminated\n for (Player player : playersInGame) {\n if (player.peekCard() == null) {\n eliminated.add(player);\n }\n }\n\n // Eliminate players from model\n for (Player eliminatedPlayer : eliminated) {\n playersInGame.remove(eliminatedPlayer);\n }\n\n return eliminated;\n }", "public static List<Player> getTrackablePlayers() {\n\t\tPlayer[] players = Bukkit.getOnlinePlayers();\n\t\tList<Player> players1 = new ArrayList<Player>();\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].hasMetadata(\"invisible\")) {\n\t\t\t\tplayers1.add(players[i]);\n\t\t\t}\n\n\t\t}\n\t\treturn players1;\n\t}", "default Set<UUID> getOpponents(UUID playerId, boolean excludeDeadPlayers) {\n Player player = getPlayer(playerId);\n if (player == null) {\n return new HashSet<>();\n }\n\n return player.getInRange().stream()\n .filter(opponentId -> !opponentId.equals(playerId))\n .filter(opponentId -> !excludeDeadPlayers || !getPlayer(opponentId).hasLost())\n .collect(Collectors.toSet());\n }", "private List<Character> getOtherCharacters(Character killer) {\n List<Character> copy = new ArrayList<>(characters);\n copy.remove(killer);\n return copy;\n }", "private List<MutableTrooper> teammatesWithoutSelf() {\n ArrayList<MutableTrooper> r = new ArrayList<>();\r\n for (Trooper ally : teammates) {\r\n if (ally.getId() != self.getId()) {\r\n r.add(new MutableTrooper(ally, -1));\r\n }\r\n }\r\n return r;\r\n }", "@SuppressWarnings(\"unused\")\n\tprivate synchronized void excludePlayer() throws RemoteException\n\t{\n\t\tPlayerInterface pi;\n\t\tData privateData;\n\t\tData data = this.toExecute.data;\n\t\tPlayerInterface playerToExclude = this.toExecute.player;\n\n\t\tplayerToExclude.excludePlayer();\n\t}", "public List<Player> getAttackedPlayers() {\r\n\t\tArrayList<Player> output = new ArrayList<Player>();\r\n\t\tfor(Player p : getOtherPlayers()) {\r\n\t\t\tif(!(p.deck.hand.contains(new Moat()) \r\n\t\t\t\t\t|| p.deck.duration.contains(new Lighthouse()) \r\n\t\t\t\t\t|| p.deck.duration.contains(new Champion()) \r\n\t\t\t\t\t|| p.getPlayerNum() == getWhoseTurn())) {\r\n\t\t\t\toutput.add(p);\r\n\t\t\t}\r\n\t\t\tArrayList<Card> reactions = new ArrayList<Card>();\r\n\t\t\tfor(Card c : p.deck.hand) {\r\n\t\t\t\tif(c.isReaction()) reactions.add(c);\r\n\t\t\t}\r\n\t\t\tfor(Card c : reactions) {\r\n\t\t\t\tc.reactAttack();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "public List<String> allUsersInteractedWith(String owner)\n\t{\n\t\tSet<String> users = new HashSet<>();\n\t\tfor (Chat chat : db.findBySenderOrReceiver(owner, owner))\n\t\t{\n\t\t\t// if the receiver is the owner, the sender is someone else (the user)\n\t\t\t// and vice versa\n\t\t\tString receiver = chat.getReceiver();\n\t\t\tString sender = chat.getSender();\n\t\t\tusers.add(sender.equals(owner) ? receiver : sender);\n\t\t}\n\t\treturn new ArrayList<String>(users);\n\t}", "@Override\n public List<Set<String>> getPlayersVisibleTo(){\n Set<String> players = new HashSet<String>();\n players.add(destination.getOwner().getName());\n for(Region adj : destination.getAdjRegions()){\n players.add(adj.getOwner().getName());\n }\n //All adjacent can see cloaking happened\n return Arrays.asList(players);\n }", "@Override\n public ArrayList<Thing> getNonCurrentUserThings() {\n User owner = new User();\n owner.setFirstName(\"Bob\");\n owner.setLastName(\"Jones\");\n owner.setEmail(\"bjones@ualberta.ca\");\n\n ArrayList<Thing> things = new ArrayList<>();\n for (int i = 0; i < 15; ++i) {\n Thing thing = new Thing(owner);\n thing.setOwner(owner); // ???\n thing.setTitle(\"Thing \" + (i + 1));\n thing.setDescription(\"The description of Thing \" + (i + 1));\n\n things.add(thing);\n }\n\n return things;\n }", "public Player getOppositePlayer(){\n return this.oppositePlayer;\n }", "public static ArrayList<EntityPlayer> getAll() {\r\n\t\ttry {\r\n\t\t\tArrayList<EntityPlayer> players = new ArrayList<EntityPlayer>();\r\n\t\t\t\r\n\t\t\tfor (EntityPlayer player : mc.world.playerEntities) {\r\n\t\t\t\tif (!player.isEntityEqual(mc.player)) {\r\n\t\t\t\t\tplayers.add(player);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn players;\r\n\t\t} catch (NullPointerException ignored) {\r\n\t\t\treturn new ArrayList<EntityPlayer>();\r\n\t\t}\r\n\t}", "public Roster without (Player p)\n\t{\n\t\tList<Player> resultList = new ArrayList<Player>();\n\t\tIterator<Player> it = iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tPlayer p2 = it.next();\n\t\t\tif(!p.equals(p2))\n\t\t\t\tresultList.add(p2);\n\t\t}\n\t\treturn new Rosters(resultList);\n\t}", "public Collection findOtherPresentationsUnrestricted(Agent owner, String toolId, String showHidden);", "public Set<String> getWordsNotFoundByUser(){\n\n Set<String> validWordsOnBoardCopy = new HashSet<String>();\n validWordsOnBoardCopy.addAll(validWordsOnBoard);\n validWordsOnBoardCopy.removeAll(validWordsFoundByUser);\n\n return validWordsOnBoardCopy;\n }", "@SuppressWarnings(\"unused\")\n public static List<String> getDiscordChatMutedPlayers() {\n return DiscordListener.chatMuted;\n }", "public static List<String> getOnlinePlayerNames() {\n Iterable<User> onlineUsers = SlapPlugin.getInstance().getEssentials().getOnlineUsers();\n return StreamSupport.stream(onlineUsers.spliterator(), false)\n .map(user -> StringUtils.isEmpty(user.getNickname()) ? user.getName() : user.getNickname())\n .collect(Collectors.toList());\n }", "public static ArrayList<Player> getAllPlayingPlayers() {\n // Anton fix: Would copy the list itself, we want just the items.\n // Remove/add manipulations would affect original list\n /*\n * ArrayList<Player> all = players; for (Player player: all) { if\n * (!player.isPlaying()) { all.remove(player); } }\n */\n\n ArrayList<Player> all = new ArrayList<Player>();\n for (Player player : players) {\n if (player.isPlaying()) all.add(player);\n }\n\n return all;\n }", "public Set<Character> players(){\r\n\t\tSet<Character> players = new HashSet<Character>();\r\n\t\tfor(Character character: characters()){\r\n\t\t\tif(character.isPlayer())\r\n\t\t\t\tplayers.add(character);\r\n\t\t}\r\n\t\treturn players;\r\n\t}", "private void eliminatePlayers() {\n \n Iterator<Player> iter = players.iterator();\n\n while (iter.hasNext()) {\n Player player = iter.next();\n\n if (player.getList().isEmpty()) {\n iter.remove();\n if (player.getIsHuman()) {\n setGameState(GameState.HUMAN_OUT);\n }\n // need to remember that due to successive draws, the active player could run\n // out of cards\n // select a new random player if player gets eliminated\n if (!players.contains(activePlayer)) {\n selectRandomPlayer();\n }\n }\n }\n }", "public ArrayList<String> deadPersonsTrueGuess(Guess currGuess) {\n ArrayList<String> deadPerson = new ArrayList<String>();\n for (Person person : config.personList) {\n for (HashMap.Entry<String, String> entry : person.getPersonAttValSet().entrySet()) {\n if (entry.getKey().equals(currGuess.getAttribute()) && !entry.getValue().equals(currGuess.getValue())) {\n deadPerson.add(person.getName());\n }\n }\n }\n\n return deadPerson;\n }", "private List<FeedbackResponseAttributes> getResponsesExcludingSelf(List<FeedbackResponseAttributes> responses) {\n List<FeedbackResponseAttributes> responsesExcludingSelf = new ArrayList<>();\n for (FeedbackResponseAttributes response : responses) {\n if (!response.giver.equalsIgnoreCase(response.recipient)) {\n responsesExcludingSelf.add(response);\n }\n }\n return responsesExcludingSelf;\n }", "private ArrayList findUnAskedPermissions(ArrayList wanted) {\n ArrayList result = new ArrayList();\n for (Object perm : wanted) {\n if (!hasPermission((String) perm)) {\n result.add(perm);\n }\n }\n return result;\n }", "static List<Player> getAllPlayers() {\n\t\treturn null;\r\n\t}", "@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}", "Set<String> getPlayers();", "public Character getNotActivePlayer() {\n\t\tif(this.getActivePlayer().equals(this.getPlayer1())) {\n\t\t\treturn this.getPlayer2();\n\t\t} else {\n\t\t\treturn this.getPlayer1();\n\t\t}\n\t}", "public List<ScoredMove> allDiscardMoves(GameState gm) {\n\t\tList<ScoredMove> discardMoves = new ArrayList<ScoredMove>();\n\t\t\n\t\tfor (Card c: getHand().getCards()) {\n\t\t\tif (!(c instanceof MerchantShip)) {\n\t\t\t\tdiscardMoves.add(new ScoredMove(ACTION.DISCARD, c, null));\n\t\t\t}\n\t\t}\n\t\treturn discardMoves;\n\t}", "public ArrayList<String> deadPersonsFalseGuess(Guess currGuess) {\n ArrayList<String> deadPerson = new ArrayList<String>();\n\n for (Person person : config.personList) {\n for (HashMap.Entry<String, String> entry : person.getPersonAttValSet().entrySet()) {\n if (entry.getKey().equals(currGuess.getAttribute()) && entry.getValue().equals(currGuess.getValue())) {\n deadPerson.add(person.getName());\n }\n }\n }\n\n return deadPerson;\n\n }", "@Override\n\tpublic String getInspected(Player p) {\n\t\treturn null;\n\t}", "private void findAllReceivers()\n {\n //IF actually there is something where we can search\n if(getDataStore().containsKey(MUSICIAN_LIST))\n {\n //We take the list from the data store\n musicians = (Vector) getDataStore().get(MUSICIAN_LIST);\n\n //exclude myself from the list\n for (int i = 0; i<musicians.size(); i++)\n {\n if(!musicians.get(i).equals(myAgent.getAID()))\n {\n receivers.add(musicians.get(i));\n }\n }\n }\n nResponders = receivers.size();\n\n }", "@NotNull\n public ArrayList method_740() {\n ArrayList var1 = new ArrayList();\n Iterator var2 = this.c.world.playerEntities.iterator();\n\n while(var2.hasNext()) {\n EntityPlayer var3 = (EntityPlayer)var2.next();\n if (var3 != null && Intrinsics.areEqual((Object)var3, (Object)this.c.player) ^ true && !FriendManager.Companion.isFriend(var3)) {\n var1.add(var3);\n }\n }\n\n return var1;\n }", "public List<Player> lookForShootPeople(Player player)\n {\n List<Player> playerList = new LinkedList<>();\n\n playerList.addAll(player.getSquare().getRoom().getPlayerRoomList()); //adds all the players in the room\n\n /*\n * Now i have to check if the player is close to a door. In this case i can see all the players in this adiacent room.\n * I will implement the method in this way:\n * 1. I check if the player can move to a different room with a distance 1 using the method squareReachableNoWall\n * 2. If the player can effectively move to a different room it means it is close to a door\n * 3. I will add to the list all the players in this different room\n */\n\n for (Square square : player.getSquare().getGameBoard().getArena().squareReachableNoWall(player.getSquare().getX(), player.getSquare().getY(), 1))\n {\n if (!(player.getSquare().getColor().equals(square.getColor()))) // if the color of the reachable square is different from the color of the square\n // where the player is this means player can see in a different room\n {\n playerList.addAll(player.getSquare().getRoom().getPlayerRoomList()); //adds all the players in the room\n }\n\n }\n\n Set<Player> playerSet = new HashSet<>();\n playerSet.addAll(playerList);\n\n playerList.clear();\n\n playerList.addAll(playerSet);\n playerList.remove(player);\n\n\n return playerList;\n }", "public List<Player> getPassengers() {\n\t\tList<Player> ret = new ArrayList<Player>();\n\t\t\n\t\tfor (Player p : Bukkit.getOnlinePlayers()) {\n\t\t\tif (isPassenger(p))\n\t\t\t\tret.add(p);\n\t\t}\n\t\treturn ret;\n\t}", "public Set<UUID> getAlivePlayers() {\n return new HashSet<>(players);\n }", "void skipNextPlayer() {\n endTurn();\n }", "public List<User> findOtherUsers(String name) {\n\t\treturn null;\r\n\t}", "Collection<User> players();", "public List<User> getDisabledUsers();", "@Override\r\n\tpublic List<Player> getAllPlayer(String email) {\n\t\treturn dao.getAllPlayer(email);\r\n\t}", "public Set<String> getPlayers()\n\t{\n\t\tSet<String> player = playerPieces.keySet();\n\t\treturn player;\n\t}", "private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}", "public static SkillName[] valuesWithoutGlobal() {\n return new SkillName[] {\n DIGGING,\n WOODCUTTING,\n MINING,\n FARMING,\n FISHING,\n ARCHERY,\n BEAST_MASTERY,\n SWORDSMANSHIP,\n DEFENSE,\n AXE_MASTERY,\n REPAIR,\n AGILITY,\n ALCHEMY,\n SMELTING,\n ENCHANTING,\n };\n }", "public List<PlayerInstance> getAllPlayers()\n\t{\n\t\tfinal List<PlayerInstance> players = new ArrayList<>();\n\t\tfor (Creature temp : getCharactersInside())\n\t\t{\n\t\t\tif (temp instanceof PlayerInstance)\n\t\t\t{\n\t\t\t\tplayers.add((PlayerInstance) temp);\n\t\t\t}\n\t\t}\n\t\treturn players;\n\t}", "public List<Player> getPlayers() {\r\n\t\tList<Player> playerList = new ArrayList<Player>();\r\n\r\n\t\tfor (Player p : players.values()) {\r\n\t\t\tif (p != null)\r\n\t\t\t\tplayerList.add(p);\r\n\t\t}\r\n\r\n\t\treturn playerList;\r\n\t}", "@Override\n protected ArrayList<String> generateExclusions()\n {\n ArrayList<String> retVal = new ArrayList<>();\n switch (monsterList.get(monsterList.size() - 1))\n {\n case \"Spheric Guardian\":\n retVal.add(\"Sentry and Sphere\");\n break;\n case \"3 Byrds\":\n retVal.add(\"Chosen and Byrds\");\n break;\n case \"Chosen\":\n retVal.add(\"Chosen and Byrds\");\n retVal.add(\"Cultist and Chosen\");\n break;\n }\n return retVal;\n }", "void unsetWhoOwnsWhom();", "public DISCARD addIgnoreMember(Address sender) {ignoredMembers.add(sender); return this;}", "public Set<T> noFollow(T elem) {\n\t\t Set<T> s = rule.get(elem.hashCode());\n\t\t return s == null ? new HashSet<T>() :s; // TODO YOUR CODE HERE\n\t}", "public void moveEveryoneExcept(Player player) throws IOException, InterruptedException { }", "public List<CMMedia> getPicturesUnfiltered() {\n return super.getMedia();\n }", "public List<User> getPotFriends() {\n //friends;\n compareMajor();\n compareClasses();\n compareLanguage();\n Collections.sort(friends);\n return friends;\n }", "public List<String> allSquaresNoMove ()\n {\n List<Square> squareList = new ArrayList<>();\n List<String> stringList = new ArrayList<>();\n\n squareList.addAll(player.getSquare().getGameBoard().getArena().squareReachableNoWall(player.getSquare().getX() , player.getSquare().getY(),2));\n\n for (Square square : squareList)\n stringList.add(square.toStringCoordinates());\n\n return stringList;\n\n }", "public static ArrayList<SkillName> getValuesWithoutGlobal() {\n return new ArrayList<>(Arrays.asList(SkillName.valuesWithoutGlobal()));\n }", "public static ArrayList<Player> getWinners(){return winners;}", "public void skipTurn(String username) {\n if(username.equals(this.username) && !(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, \"You skipped your turn!\");\n } else if (!(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, username + \" skipped his turn\");\n\n }\n }", "public synchronized List<Card> getCardsInPlay(){\n cardsInPlay.clear();\r\n \r\n for(Player player: players){\r\n if(player == null){\r\n continue;\r\n }\r\n if(player.getCardsInHand().isEmpty()){\r\n continue;\r\n }\r\n for(Card card: player.getCardsInHand()){\r\n cardsInPlay.add(card);\r\n }\r\n }\r\n return cardsInPlay;\r\n }", "public List<String> getIgnoredUserIds() {\n if (null == mIgnoredUserIdsList) {\n mIgnoredUserIdsList = mStore.getIgnoredUserIdsList();\n }\n\n // avoid the null case\n if (null == mIgnoredUserIdsList) {\n mIgnoredUserIdsList = new ArrayList<>();\n }\n\n return mIgnoredUserIdsList;\n }", "public Set<Colour> getWinningPlayers();", "@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}", "public Chatbot getMySillyChatbot()\n\t{\n\t\treturn mySillyChatbot;\n\t}", "public List<Result> getPlayerResults(Player player) {\t\n\t\treturn results.stream()\n\t\t\t\t.filter(result -> result.participated(player))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public Iterable<UserWithProfile> getUserUnmatched(Long userId)\n\t{\n\t\tUser user = userRepository.findUserById(userId);\n\t\tArrayList<User> liked = new ArrayList<User>(user.getLiked());\n\t\tArrayList<User> disliked = new ArrayList<User>(user.getDisliked());\n\t\t\n\t\t//this is the fix for heroku...\n\t\tif (liked.size() == 0)\n\t\t{\n\t\t\tliked.add(userService.getCurrentUser());\n\t\t}\n\t\tif (disliked.size() == 0)\n\t\t{\n\t\t\tdisliked.add(userService.getCurrentUser());\n\t\t}\n\t\t\n\t\tIterable<User> userUnmatched = userRepository.findUserUnmatched(user.getId(), liked, disliked);\n\t\t\n\t\tLOG.info(\"user {} fetches unmatched list\", userId);\n\t\t\n\t\treturn this.createUserWithProfiles(userUnmatched);\n\t}", "@Override\n\tpublic List<Nature> findNaturesNotIn() {\n\t\treturn natureRepository.findNaturesNotIn();\n\t}", "public String[] getPlayersUsername(){\n String[] usernames = new String[players.size()];\n Iterator it = players.entrySet().iterator();\n int i = 0;\n while(it.hasNext()){\n Map.Entry pair = (Map.Entry)it.next();\n usernames[i] = (String)pair.getKey();\n i++;\n }\n return usernames;\n }", "public static ArrayList<String> Searching_OnPeople_who_AddMe() {\n\t\t\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\t\tArrayList<String> requests= new ArrayList<String>();\n\t\tQuery gaeQuery = new Query(\"friends\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t\n\t\t\tif (entity.getProperty(\"friendEmail\").toString().equals(User.getCurrentActiveUser().getEmail().toString())&&\n\t\t\t\t\t!entity.getProperty(\"status\").toString().equals(\"accept\")) {\n\t\t\t\t\n\t\t\t\trequests.add(entity.getProperty(\"myEmail\").toString());\n\t\t\t\t\n\t\t\t }\nelse{\n\t\t\t\t }\n\t\t}\n\t\treturn requests;\n\t\n\t}", "public void discardUserAction() {\n\t\tshowAnimalList();\n\t}", "String getOnlineUsers(String senderName)\n {\n List<String> users = new ArrayList<>();\n for (CommunicationLink node : allNodes.values())\n {\n NodeInfo currentNodeInfo = node.getInfo();\n if (currentNodeInfo.getName().equals(senderName))\n {\n users.add(senderName);\n } else\n {\n node.sendMessage(new Message(\"Checking if you are alive\", currentNodeInfo, myInfo, NAME));\n try\n {\n users.add(node.readMessage().getContent());\n } catch (IOException e)\n {\n handleNodeDeath(currentNodeInfo);\n logger.error(\"Node \" + myInfo + \"\\n - \" + currentNodeInfo.getName() + \" disconnected unexpectedly.\");\n }\n }\n }\n users.add(0, myInfo.getName());\n return String.join(\", \", users);\n }", "private List<String> GetWarps(IPlayer owner)\r\n\t{\r\n\t\tif (owner == null)\r\n\t\t\treturn database.queryStrings(\"SELECT name FROM warpdrive_locations WHERE `public`=1\");\r\n\t\telse\r\n\t\t\treturn database.queryStrings(\"SELECT name FROM warpdrive_locations WHERE `public`=0 AND creator=?\", owner);\r\n\t}", "public Player lookForWinner(){\n\t\tfor(int i = 0; i < this.players.size(); i++){\n\t\t\tif(this.players.get(i).numCards() == 0)\n\t\t\t\treturn this.players.get(i);\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public Integer[] getAllPlayerVisible() {\n\t\treturn playerVisible.toArray(new Integer[playerVisible.size()]);\n\t}", "public User whoIsTheUser(String name){\n boolean space5 = false;\n User userPrivate = null;\n for(int i = 0; i<MAX_USER && !space5; i++){\n userPrivate = user[i];\n if(userPrivate.getUserName().equals(name)){\n space5 = true;\n }\n }\n return userPrivate;\n }", "public List<TradeItem> getItemsGivenBy(Player player) {\n List<TradeItem> goodsList = new ArrayList<TradeItem>();\n for (TradeItem ti : items) {\n if (player == ti.getSource()) goodsList.add(ti);\n }\n return goodsList;\n }", "void noFriendsRetrieved();", "@SuppressWarnings(\"ResultOfObjectAllocationIgnored\")\n private String getWinnerList() {\n String list = \"\";\n\n ArrayList<IPlayer> arrlist = sortPlayerAfterPoints();\n\n for (IPlayer i : arrlist) {\n try {\n list += i.getName();\n list += \": \" + i.getPoints() + \"\\n\";\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n\n try {\n if (dialog.getSoundBox().isSelected()) {\n if (iPlayerList.size() > 0) {\n if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.ROT))) {\n new SoundClip(\"red_team_is_the_winner\");\n } else if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.BLAU))) {\n new SoundClip(\"blue_team_is_the_winner\");\n } else {\n new SoundClip(\"Flawless_victory\");\n }\n } else {\n new SoundClip(\"players_left\");\n }\n }\n } catch (NumberFormatException | RemoteException e) {\n e.printStackTrace();\n }\n\n return list;\n }", "public Collection<T> getOthers() {\n return others;\n }", "private Collection<? extends ActiveGroupEntry> filterOutNonUserActivateableGroups(\n Collection<? extends ActiveGroupEntry> groups)\n {\n return groups.stream().filter(age -> isUserActivationStateControl(age)).collect(Collectors.toList());\n }", "public void disablePlayer(String player) {\r\n\t\tObject[] o = piece.values().toArray();\r\n\t\tfor (int i=0; i<o.length; i++) {\r\n\t\t\tChessPiece p = (ChessPiece)o[i];\r\n\t\t\tif (p.chessPlayer.equals(player)) {\r\n\t\t\t\tp.removeMouseListener(this);\r\n\t\t\t\tp.removeMouseMotionListener(this);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<ColorId> checkPlayersBasicMode ()\n {\n List<ColorId> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate.getColor());\n }\n return players;\n }", "private ArrayList<Equity> getUnwatchedEquities(ArrayList<Equity> list) {\n ArrayList<Equity> temp = new ArrayList<>();\n temp.addAll(list);\n ArrayList<WatchedEquity> watched = controller.getUser().watchedEquities;\n for (Equity e : list) {\n for (WatchedEquity we : watched) {\n if (e.getTickerSymbol().equals(we.getSymbol())) {\n temp.remove(e);\n break;\n }\n }\n }\n return temp;\n }", "public void logEliminatedPlayer(Player p)\n\t{\n\t\tif(p instanceof HumanPlayer)\n\t\t\tlog += String.format(\"%nUSER ELIMINATED\");\n\t\telse\n\t\t{\n\t\t\tAIPlayer player = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s ELIMINATED\", player.getName().toUpperCase());\n\t\t}\n\t\tlineBreak();\n\t}", "@Test\r\n\tpublic void hidingTest(){\r\n\t\tBlacklisting bl = new Blacklisting();\r\n\t\tConversation c = convoCopy.copy();\r\n\t\t\r\n\t\tList<String> hideWords = new ArrayList<String>();\r\n\t\thideWords.add(\"Hello\");\r\n\t\thideWords.add(\"like\");\r\n\t\thideWords.add(\"pie\");\r\n \t\r\n \t\r\n\t\tConversation hidden = bl.hideWord(c, hideWords);\r\n\r\n\t\tMessage[] redactedmsg = new Message[hidden.getMsg().size()];\r\n\t\thidden.getMsg().toArray(redactedmsg);\r\n\t\t\r\n\t\t\r\n\t\tassertEquals(hidden.getMsg().size(), 7);\r\n\r\n\t\tassertEquals(redactedmsg[0].getContent(), \"*redacted* there!\");\r\n\t\tassertEquals(redactedmsg[2].getContent(), \"I'm good thanks, do you *redacted* *redacted*?\");\r\n\t\tassertEquals(redactedmsg[4].getContent(), \"Hell yes! Are we buying some *redacted*?\");\r\n\t\tassertEquals(redactedmsg[5].getContent(), \"No, just want to know if there's anybody else in the *redacted* society...\");\r\n\t\tassertEquals(redactedmsg[6].getContent(), \"YES! I'm the head *redacted* eater there...\");\r\n\r\n\r\n\t\tSystem.out.println(\"Filtered by user ID: \" + hidden);\r\n\t}", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "public static ArrayList<String> getPlayerInformation() {\n clearScreen();\n ArrayList<String> Names = new ArrayList<String>();\n for (int i = 1; i < 3; i++) {\n System.out.println(\"Player \" + i + \"'s Name:\");\n Names.add(Input.nextLine());\n clearScreen();\n }\n return Names;\n }", "List<Player> getPlayers();", "public ArrayList<Hole> availableMoves(Side turnSide){\n ArrayList<Hole> holesOwned = new ArrayList<>();\n for(Hole h : holes){\n if(h.getOwner() == turnSide && h.getNumberOfKoorgools() != 0){\n holesOwned.add(h);\n }\n }\n return holesOwned;\n }", "@Override\r\n\tpublic Player getTheOwner() {\n\t\treturn null;\r\n\t}", "public Iterator<IGame> getGames(){\r\n\t\treturn null;\r\n\t}", "public List<String> getAllPlayerNames() {\n List<String> playerNames = new ArrayList<>(10);\n for (Player p : players) {\n playerNames.add(p.getName());\n }\n return playerNames;\n }", "public List<AXProperty> getIgnoredReasons() {\n return ignoredReasons;\n }", "public List<Player> getAvailablePlayers(Round round) {\r\n\t\tList<Player> availablePlayers = playerLogic.createNew(round.getPlayers());\r\n\r\n\t\tfor (Match match : round.getMatches()) {\r\n\t\t\tavailablePlayers.removeAll(match.getHomeTeam());\r\n\t\t\tavailablePlayers.removeAll(match.getAwayTeam());\r\n\t\t}\r\n\t\treturn availablePlayers;\r\n\t}", "@Override\n\tpublic String[] getOutsideOwners() {\n\t\treturn new String[0];\n\t}", "private static List<Sticker> m33731b(Collection<Sticker> collection) {\n List<Sticker> arrayList = new ArrayList(collection.size());\n for (Sticker sticker : collection) {\n if (!sticker.isFriendmoji()) {\n arrayList.add(sticker);\n }\n }\n return arrayList;\n }", "public List<Player> getAllPlayers() {\r\n // TODO fix actual order of players in the List.\r\n\r\n List<Player> players = new ArrayList<>();\r\n players.addAll(teamRed.getPlayers());\r\n players.addAll(teamBlue.getPlayers());\r\n\r\n return players;\r\n }", "public Set<Player> getParticipants() { //TODO: not sure the validation needs to happend here\n\t\t// Run through the results and make sure all players have been pushed into the participants set.\n\t\tfor ( Result result : results ) {\n\t\t\tparticipants.add(result.getWinner());\n\t\t\tparticipants.add(result.getLoser());\n\t\t}\n\n\t\treturn participants;\n\t}", "protected Collection<IRI> getNonCurrentGraphNames() {\n final IRI ext = getExtensionGraphName();\n return extensions.values().stream().map(iri -> iri.equals(ext) ? PreferUserManaged : iri).collect(toSet());\n }", "public List<Game> getFullGameList() {\n List<Game> listOfGames = null;\n Session session = sessionFactory.openSession();\n // Try to return the user by the given nickname\n try {\n session.beginTransaction();\n // if mode equals ALL then get full list of games\n listOfGames = session.createCriteria(Game.class).list();\n \n session.getTransaction().commit();\n session.flush();\n } \n catch (HibernateException e) { return null; } \n finally { session.close(); }\n // Return userID if seted\n return listOfGames;\n }" ]
[ "0.6630963", "0.6420405", "0.6272185", "0.6252382", "0.62237585", "0.6131486", "0.6039991", "0.59999454", "0.598598", "0.5963526", "0.5928285", "0.5881473", "0.58479387", "0.583317", "0.58060205", "0.5755942", "0.5721696", "0.5720567", "0.5700077", "0.56671005", "0.5627504", "0.5627079", "0.5624751", "0.5580081", "0.55568814", "0.5551516", "0.5511543", "0.54931885", "0.5483475", "0.54777676", "0.5465183", "0.5449703", "0.5424917", "0.539733", "0.53878826", "0.5361551", "0.53494775", "0.5345908", "0.53418475", "0.5313085", "0.53098917", "0.53097457", "0.52993625", "0.52991205", "0.529685", "0.5291203", "0.52834594", "0.5281907", "0.5264813", "0.5258477", "0.52576244", "0.5222578", "0.52204025", "0.5213056", "0.5209388", "0.52051616", "0.5203073", "0.51906466", "0.5187465", "0.51863277", "0.518532", "0.5183206", "0.5182954", "0.5156863", "0.5149547", "0.5149134", "0.5141461", "0.5137091", "0.51291037", "0.51248443", "0.51247996", "0.51245064", "0.5104513", "0.510069", "0.5100346", "0.509582", "0.50894034", "0.5085877", "0.5084211", "0.50822383", "0.507866", "0.5075575", "0.50732714", "0.50593966", "0.5058146", "0.5055052", "0.505345", "0.5051807", "0.50512993", "0.50501454", "0.5043723", "0.50425714", "0.5036321", "0.50326324", "0.5023344", "0.50208837", "0.50136495", "0.5011574", "0.50107825", "0.5003929" ]
0.656451
1
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { File f1=new File("E:\\py\\img\\1.jpg"); File f2=new File("C:\\Users\\meng\\Desktop\\1.jpg"); File f3=new File("C:\\Users\\meng\\Desktop\\liaotian.txt"); File f4=new File("C:\\Users\\meng\\Desktop\\country.txt"); cp(f1, f2); //2 liaotian(f3); //3 ArrayList<CIty> a4=duxushuji(f4); chaxun(a4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static ArrayList<CIty> duxushuji(File file) throws IOException { ArrayList<CIty>city=new ArrayList<>(); InputStreamReader isr = new InputStreamReader(new FileInputStream(file), "GBK"); BufferedReader br=new BufferedReader(isr); String str; while((str=br.readLine())!=null){ String[] strings=str.split("[|]"); city.add(new CIty(Integer.parseInt(strings[0]), strings[1],strings[2])); } isr.close(); return city; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static void chaxun(ArrayList<CIty> citys) { Scanner scanner=new Scanner(System.in); while(true){ System.out.println("您是要查询年份1,举办地2,还是冠军国3,退出请输入0:"); String i2=scanner.next(); int i=Integer.parseInt(i2); switch (i) { case 1: i=scanner.nextInt(); System.out.println(chaxunniangen(i,citys)); break; case 2: String jibandi=scanner.next(); System.out.println(chaxunjibandi(jibandi,citys)); break; case 3: String guanjunguo=scanner.next(); System.out.println(chaxunguanjunguo(guanjunguo,citys)); break; default: System.out.println("tuichu!"); return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static CIty chaxunguanjunguo(String guanjunguo, ArrayList<CIty> citys) { Iterator it=citys.iterator(); while(it.hasNext()){ CIty c=(CIty)it.next(); if(c.winner.equals(guanjunguo)) return c; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static CIty chaxunjibandi(String jibandi, ArrayList<CIty> citys) { Iterator it=citys.iterator(); while(it.hasNext()){ CIty c=(CIty)it.next(); if(c.place.equals(jibandi)) return c; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static CIty chaxunniangen(int i, ArrayList<CIty> citys) { Iterator it=citys.iterator(); while(it.hasNext()){ CIty c=(CIty)it.next(); if(c.year==i) return c; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static void liaotian(File f3) throws IOException { System.out.println("输入聊天,quit退出"); FileWriter fw=new FileWriter(f3); BufferedWriter bw=new BufferedWriter(fw); int i=0; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); while(true){ SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String time=sdf.format(System.currentTimeMillis()); bw.write(time); bw.newLine(); String[] name={"小明:","小红 : "}; System.out.print(name[i%2]); String line=br.readLine(); br.lines(); if(line.equals("quit")){ bw.flush(); System.out.println("退出聊天,保存到"+f3); return; } bw.write(name[i%2]+line); bw.newLine(); i++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static void cp(File f1,File f2) throws IOException{ FileInputStream fi=new FileInputStream(f1); FileOutputStream fo=new FileOutputStream(f2); BufferedOutputStream bof=new BufferedOutputStream(fo); BufferedInputStream bis=new BufferedInputStream(fi); byte[] buffer=new byte[1024]; int off=0; int length=1024; while(true){ if(fi.available()<1024){ length=fi.available();} bis.read(buffer, off, length); bof.write(buffer, off, length); // fi.read(buffer, off,length); // fo.write(buffer, off, length); if(length<1024){ System.out.println(f1+"-->"+f2+"复制完成!"); bof.flush(); fi.close(); fo.close(); return;} } }
{ "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
delete the temp file
@Override public void handle(AsyncResult<Buffer> read) { file.delete(); // parse JsonArray json = new JsonArray(read.result().toString()); // iterate new AsyncIterator<Object>(json) { @Override public void handle(Object o) { if (hasNext()) { final JsonObject json = (JsonObject) o; db.set(domain.namespace + "&" + json.getString("key"), json.getString("value"), new Handler<Message<JsonObject>>() { @Override public void handle(Message<JsonObject> message) { if (!"ok".equals(message.body().getString("status"))) { next.handle(message.body().getString("message")); } else { next(); } } }); } else { request.response().redirect("/admin"); } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete() {\n if (tempFile != null) {\n tempFile.delete();\n }\n }", "private void deleteTempHTMLFile()\n {\n File file = new File(\"resources/tempHTML\" +Thread.currentThread().getName() +\".html\");\n file.delete();\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 final void deleteTemporaryFile()\n\t\tthrows IOException {\n\t\t\t\n // DEBUG\n \n if ( isQueued()) {\n Debug.println(\"@@ Delete queued file segment, \" + this);\n Thread.dumpStack();\n }\n \n\t\t//\tDelete the temporary file used by the file segment\n\n\t\tFile tempFile = new File(getTemporaryFile());\n\t\t\t\t\n\t\tif ( tempFile.exists() && tempFile.delete() == false) {\n\n\t\t //\tDEBUG\n\t\t \n\t\t Debug.println(\"** Failed to delete \" + toString() + \" **\");\n\t\t \n\t\t //\tThrow an exception, delete failed\n\t\t \n\t\t\tthrow new IOException(\"Failed to delete file \" + getTemporaryFile());\n\t\t}\n\t}", "public void deleteTempDir(File file) {\n if (!shouldReap()) {\n return;\n }\n\n // If the tempfile can be removed, delete it. If not, it wasn't created by us.\n if (temporaryFiles.remove(file)) {\n FileHandler.delete(file);\n }\n }", "private void deleteFile() {\n\t\tFile dir = getFilesDir();\n\t\tFile file = new File(dir, FILENAME);\n\t\tfile.delete();\n\t}", "protected synchronized void delete()\n {\n if (this.file.exists())\n {\n this.file.delete();\n }\n }", "private void removeTmpConfigFile() throws IOException {\n fileSystem.delete(tempConfigPath, true);\n LOG.info(\"delete temp configuration file: \" + tempConfigPath);\n }", "public void delete_File(){\n context.deleteFile(Constant.FILE_NAME);\n }", "private void removeTempData(CopyTable table)\n\t{\n\t\tFile dataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_data.csv\");\n\t\tFile countFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_count.txt\");\n\t\tFile metaDataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_metadata.ser\");\n\t\t\n\t\tdataFile.delete();\n\t\tcountFile.delete();\n\t\tmetaDataFile.delete();\n\t\t\n\t\tFile tempDir = new File(config.getTempDirectory());\n\t\ttempDir.delete();\n\t}", "private void tearDown() {\n if (tempDir != null) {\n OS.deleteDirectory(tempDir);\n tempFiles.clear();\n tempDir = null;\n }\n }", "@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "public void exitTemp() {\r\n tr.saveTempToFile(TemplateManager.IdToTemplate);\r\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 }", "public void tempcheck(){\r\n \t//clear last data\r\n if(workplace!=null){\r\n \tFile temp = new File(workplace +\"/temp\");\r\n \tif(temp.exists()){\r\n \t\tFile[] dels = temp.listFiles();\r\n \t\tif(dels[0]!=null){\r\n \t\t\tfor(int i=0; i<dels.length; i++){\r\n \t\t\t\tif(dels[i].isFile()){\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}else{\r\n \t\t\t\t\tFile[] delss = dels[i].listFiles();\r\n \t\t\t\t\tif(delss[0]!=null){\r\n \t\t\t\t\t\tfor(int k=0; k<delss.length; k++){\r\n \t\t\t\t\t\t\tdelss[k].delete();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \ttemp.delete();\r\n }\r\n }", "public void deleteTmpDirectory() {\n\t\tdeleteTmpDirectory(tmpDir);\n\t}", "@AfterClass\n public static void teardown() {\n logger.info(\"teardown: remove the temporary directory\");\n\n // the assumption is that we only have one level of temporary files\n for (File file : directory.listFiles()) {\n file.delete();\n }\n directory.delete();\n }", "private void log_out() {\n File xx = new File(\"resource/data/staff_id_logedin.txt\");\n if(xx.isFile()){\n xx.delete();\n }\n this.dispose();\n }", "public void deleteFile(File f);", "public void destroy() {\r\n if (isDestroyed) {\r\n return;\r\n }\r\n isDestroyed = true;\r\n IOUtil.safeDelete(fileA);\r\n IOUtil.safeDelete(fileB);\r\n }", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n if (!isChangingConfigurations()) {\n pickiT.deleteTemporaryFile(this);\n }\n }", "private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }", "@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 }", "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 }", "void deleteFile(FsPath path);", "public void cancelDemo() {\r\n \t\t\r\n \t\tif (this.fos != null) {\r\n \t\t\t\r\n \t\t\ttry {\r\n \t\t\t\tthis.fos.close();\r\n \t\t\t\tthis.fos = null;\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tif (this.fileName != null) {\r\n \t\t\t\r\n \t\t\ttry {\r\n \t\t\t\tthis.fileIO.deleteFile(this.fileName);\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t}\r\n \t\t}\r\n \t}", "protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "@Override\n public void delete(File file) {\n }", "private void cleanReporter(){\n File file = new File(\"test-report.html\");\n file.delete();\n\n }", "public void mo83565a(File file) {\n if (!file.delete()) {\n file.deleteOnExit();\n }\n }", "public static void clearFile() {\n if (data.delete())\n data = new File(\"statistics.data\");\n }", "public static void deleteChatThumbTempIntStg() {\n File f = new File(PathUtil.getInternalChatImageTempUri().getPath());\n if(f.exists()) {\n delete(f);\n //LogUtil.e(\"StorageUtil\", \"deleteChatThumbTempIntStg\");\n }\n }", "private void del_file() {\n\t\tFormatter f;\n\t\ttry{\n\t\t\tf = new Formatter(url2); //deleting file content\n\t\t\tf.format(\"%s\", \"\");\n\t\t\tf.close();\t\t\t\n\t\t}catch(Exception e){}\n\t}", "public static void destroy(String filename) throws IOException {\n\t\t// only system calls are used\n\t\tFileChannel fc = (new RandomAccessFile(filename, \"rw\")).getChannel();\n\t\tlong size = fc.size();\n\t\tfc.truncate(0);\n\t\tfc.truncate(size);\n\t\tfc.close();\n\t}", "public void deleteUrl() throws IOException\n\t{\n\t\tFile tempFile = new File(\"Resource/test.txt\");\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));\n\t\twriter.write(newFile);\n\t\twriter.close();\n\t\t\n\t\t//boolean successful = tempFile.renameTo(inputFile);\n\t}", "protected static void deleteTrash() {\n\t\tArrays.stream(new File(\".\").listFiles())\n\t\t\t.filter(f -> f.getName().startsWith(\"_tmp.\"))\n\t\t\t.forEach(File::delete);\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n Log.d(\"Paul\", \"delete file\");\n\n File file = new File(Environment.getExternalStorageDirectory().getPath(), getString(R.string.temp_file_name));\n try {\n // if file exists in memory\n if (file.exists()) {\n file.delete();\n Log.d(\"Paul\", \"file deleted\");\n }\n } catch (Exception e) {\n Log.d(\"Paul\",\"Some error happened?\");\n }\n\n }", "@AfterStep\n\tprivate void deleteFile(){\n\t\tif(LOGGER.isDebugEnabled()){\n\t\tLOGGER.debug(\" Entering into SalesReportByProductEmailProcessor.deleteFile() method --- >\");\n\t\t}\n\t\ttry {\n\t\t\tif(null != salesReportByProductBean){\n\t\t\tReportsUtilBO reportsUtilBO = reportBOFactory.getReportsUtilBO();\n\t\t\tList<String> fileNames = salesReportByProductBean.getFileNameList();\n\t\t\tString fileLocation = salesReportByProductBean.getFileLocation();\n\t\t\treportsUtilBO.deleteFile(fileNames, fileLocation);\n\t\t\t}\n\t\t} catch (PhotoOmniException e) {\n\t\t\tLOGGER.error(\" Error occoured at SalesReportByProductEmailProcessor.deleteFile() method ----> \" + e);\n\t\t}finally {\n\t\t\tif(LOGGER.isDebugEnabled()){\n\t\t\tLOGGER.debug(\" Exiting from SalesReportByProductEmailProcessor.deleteFile() method ---> \");\n\t\t\t}\n\t\t}\n\t}", "public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }", "@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}", "private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }", "public void deleteGeneratedFiles();", "public static void clean(Task task, String localTemp) {\n\t\tif (state.getErrCode() == null) S3IO.uploadDir(task.getOutputPath(), localTemp);\n\t\ttry {\n\t\t\tFileUtils.deleteDirectory(new File(localTemp));\n\t\t\tFileUtils.deleteDirectory(task.getTaskType() == TaskType.MAP_TASK\n\t\t\t ? new File(MAP_INPUT_DIR + task.getTaskId()) : new File(REDUCE_INPUT_DIR + task.getTaskId()));\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"Exception occoured while deleting input files and local temporary directory \\n\"\n\t\t\t + e.getLocalizedMessage());\n\t\t\tstate.setErrCode(state.getTsk() == TaskType.MAP_TASK ? ERR_CODE.EXCEPTION_DELETING_TEMP_DIR_MAP\n\t\t\t : ERR_CODE.EXCEPTION_DELETING_TEMP_DIR_REDUCE);\n\t\t}\n\n\t}", "@AfterClass\n public static void cleanup() throws IOException {\n File directory = new File(TMP_DIR_BASE);\n File dirname = directory.getParentFile();\n final String basename = directory.getName() + \"[0-9]+\";\n File[] files = dirname.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.matches(basename);\n }\n });\n for (File file : files) {\n if (file.delete() == false) {\n throw new IOException(\"Can't delete \" + file);\n }\n }\n }", "public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }", "void deleteFile(FileReference fileReferece);", "public void deleteOutputData() {\n\t\tif (outputData != null) {\n\t\t\tFile file = outputData;\n\t\t\toutputData = null;\n\t\t\tsave();\n\t\t\tfile.delete();\n\t\t}\n\t}", "protected void tearDown() throws Exception {\r\n filePersistence = null;\r\n readOnlyFile.delete();\r\n }", "private void cleanTempImages(String[] images) {\n for (int i = 1; i < images.length; i++) {\n File f = new File(images[i]);\n f.deleteOnExit();\n }\n }", "private void deleteFile() {\r\n actionDelete(dataModelArrayList.get(position));\r\n }", "@Override\n public void destroy() {\n if (fileWriter != null) {\n try {\n fileWriter.close();\n } catch (IOException e) {\n }\n }\n }", "public void removeFileInstance()\n {\n this.source = null;\n this.data = null;\n }", "public void delete() throws IOException {\n\t\tclose();\n\t\tdeleteContents(directory);\n\t}", "private void deleteFile(@Nonnull File file) throws IOException {\n Files.delete(file.toPath());\n }", "@AfterClass\n\tpublic static void cleanUp() throws IOException {\n\t\tLpeFileUtils.removeDir(tempDir.getAbsolutePath());\n\t}", "@Override\n\tprotected void finalize() throws Throwable\n\t{\n\t\tsuper.finalize(); // currently empty but there for safer refactoring\n\n\t\tFile outputFile = dfos.getFile();\n\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.deleteFile(\"\");\n }", "public static void unlockFile() {\n try {\n \t\n if(lock != null) {\n \t\n lock.release();\n channel.close();\n f.delete();\n \n }\n \n } catch(IOException e) {\n \t\n e.printStackTrace();\n \n }\n \n }", "public void clearFile(File file){\n try{\n PrintWriter writer = new PrintWriter(file);\n writer.close();\n }\n catch(IOException e){\n System.out.println(\"IOException\");\n }\n }", "boolean deleteFile(File f);", "public static void deletaArquivo(String nomeArquivo){\n\t\tboolean logExiste = false;\n\t\t\n\t\tFile file = new File(nomeArquivo);\n\t\tlogExiste = file.exists();\n\t\t\n\t\tif(logExiste){\n\t\t\tfile.delete();\n\t\t}\n\t}", "private void deleteResidualFile()\n\t{\n\t\tFile[] trainingSetFileName = directoryHandler.getTrainingsetDir().listFiles();\n\t\ttry\n\t\t{\n\t\t\tfor (int i = 1; i < nu; i++) trainingSetFileName[i].delete();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public interface TempFile {\n\n\t\tpublic void delete() throws Exception;\n\n\t\tpublic String getName();\n\n\t\tpublic OutputStream open() throws Exception;\n\t}", "private void deleteFile(String oldPic) {\n\n\n File fileDir = new File(oldPic);\n if (fileDir.exists()) {\n \n fileDir.delete();\n }\n\n }", "@After\n\tpublic void tearDown() throws Exception {\n\t\tFileUtils.cleanDirectory(new File(this.tempFolderPath));\n\t}", "public static void deleteSettingsFile() {\n File settingsFile = new File(propertyFileName);\n if (settingsFile.exists())\n settingsFile.delete();\n }", "public static void m85582a(File file) {\n try {\n if (!file.delete()) {\n file.deleteOnExit();\n }\n } catch (Exception unused) {\n }\n }", "private static void deleteTempFolder(String folderName) throws IOException {\n Path tempFolderPath = Paths.get(folderName);\n\n if (Files.exists(tempFolderPath) && Files.isDirectory(tempFolderPath)) {\n Files.walk(tempFolderPath)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n }\n }", "@Override\r\n\tpublic void remFile(String path) {\n\t\t\r\n\t}", "public static void clearFile(String filename) {\n PrintWriter pw = null;\n try {\n pw = new PrintWriter(filename);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n pw.close();\n }", "public boolean delete(String filename);", "public static void delete(File f) {\n delete_(f, false);\n }", "private void delete(File file) {\n if (file.isDirectory()) {\n cleanDirectory(file);\n }\n file.delete();\n }", "@Override\r\n\tpublic void deleteFileData(Long id) {\n\t\t\r\n\t}", "public void clean()\r\n {\r\n // DO NOT TOUCH\r\n // System.out.println(unzipedFilePath);\r\n\r\n // only clean if there was a successful unzipping\r\n if (success)\r\n {\r\n // only clean if the file path to remove matches the zipped file.\r\n if (unzippedFilePath.equals(zippedFilePath.substring(0,\r\n zippedFilePath.length() - 4)))\r\n {\r\n // System.out.println(\"to be implmented\");\r\n for (File c : outputDir.listFiles())\r\n {\r\n // System.out.println(c.toString());\r\n if (!c.delete())\r\n {\r\n System.out.println(\"failed to delete\" + c.toString());\r\n }\r\n }\r\n outputDir.delete();\r\n outputDir = null;\r\n }\r\n }\r\n }", "public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }", "@Override\n\tpublic void delete(File file) {\n\t\tthis.getSession().delete(file);\n\t}", "public void cleanup() {\n this.close();\n this.delete(this.backingFileBasename + RECORDING_OUTPUT_STREAM_SUFFIX);\n this.delete(this.backingFileBasename + RECORDING_INPUT_STREAM_SUFFIX);\n }", "@Override\n public void onBackPressed() {\n pickiT.deleteTemporaryFile(this);\n super.onBackPressed();\n }", "void delete(InformationResourceFile file);", "protected void deleteAttachmentFile()\n {\n try\n {\n if (deleteAttachmentAfterSend && fullAttachmentFilename != null)\n {\n File attFile = new File(fullAttachmentFilename);\n if (log.isDebugEnabled())\n {\n log.debug(\"Delete attachment file: \" + attFile.getCanonicalPath());\n }\n attFile.delete();\n }\n } catch (Exception e)\n {\n log.warn(\"Unable to delete \" + fullAttachmentFilename + \" : \" + e.getMessage());\n }\n }", "private void deleteFile(String runtimePropertiesFilename) {\n File f = new File(runtimePropertiesFilename);\r\n\r\n // Make sure the file or directory exists and isn't write protected\r\n if (!f.exists())\r\n return; // already gone!\r\n\r\n if (!f.canWrite())\r\n throw new IllegalArgumentException(\"Delete: write protected: \"\r\n + runtimePropertiesFilename);\r\n\r\n // If it is a directory, make sure it is empty\r\n if (f.isDirectory()) {\r\n String[] files = f.list();\r\n if (files.length > 0)\r\n throw new IllegalArgumentException(\r\n \"Delete: directory not empty: \" + runtimePropertiesFilename);\r\n }\r\n\r\n // Attempt to delete it\r\n if (!f.delete())\r\n throw new IllegalArgumentException(\"Delete: deletion failed\");\r\n }", "public static void cleanOldTemp(String rootOutput){\r\n\t\tif(new File(rootOutput).exists()){\r\n\t\t\tLog.log(\"cleanOldTemp \"+rootOutput);\r\n\t\t\tPath pathToBeDeleted = Paths.get(rootOutput);\r\n\t\t\ttry {\r\n\t\t\t\tFiles.walk(pathToBeDeleted)\r\n\t\t\t\t .sorted(Comparator.reverseOrder())\r\n\t\t\t\t .map(Path::toFile)\r\n\t\t\t\t .forEach(File::delete);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tLog.error(e);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static File createTempFile() throws Exception {\n File dir = tempFileDirectory();\n dir.mkdirs();\n File tempFile = File.createTempFile(\"tst\", null, dir);\n dir.deleteOnExit(); // Not fail-safe on android )¬;\n return tempFile;\n }", "public void deleteBuffer(File buffer)\n {\n this.buffer2file.remove(buffer);\n\n // If we are deleting an Untitled buffer, we can decrement\n if (buffer.getName().startsWith(\"#Untitled\")) {\n this.untitledCounter--;\n }\n\n /* We must delete the buffers when we are done with them so that their\n * parent directory is empty, and able to be deleted upon the exiting\n * of the application. */\n System.out.println(\"Buffer was \" + (buffer.delete() ? \"\" : \"NOT \") + \"deleted.\");\n // (and we may as well use the return value of buffer.delete() for something)\n }", "void fileDeleted(String path);", "public void delete() {\n\t\tclose();\n\t\t// delete the files of the container\n\t\tfor (int i=0; i<BlockFileContainer.getNumberOfFiles(); i++)\n\t\t\tfso.deleteFile(prefix+EXTENSIONS[i]);\n\t}", "@Override\n protected void tearDown() throws Exception {\n m_TestHelper.deleteFileFromTmp(\"regression.arff\");\n\n super.tearDown();\n }", "public static void Deletefiles() throws Throwable\r\n\t{\r\n\t\tString filePath, timestamp;\r\n\t\tDate date = new Date();\r\n\t\ttimestamp = new SimpleDateFormat(\"MMMdd\").format(date);\r\n\t filePath = \"./target/screenshots/\" + timestamp;\r\n\t\tFile file = new File(filePath);\r\n\t\t\r\n\t\tString[] evdFiles;\r\n\t\tif (file.isDirectory())\r\n\t\t{\r\n\t\t\tevdFiles = file.list();\r\n\t\t\tSystem.out.println(\"number of files ::: \"+evdFiles.length);\r\n\t\t\tfor (int i = 0; i < evdFiles.length; i++)\r\n\t\t\t{\r\n\t\t\t\tFile evdFile = new File(file, evdFiles[i]);\r\n\t\t\t\tSystem.out.println(\"File to be deleted ::: \"+evdFile);\r\n\t\t\t\tif (!evdFile.isDirectory())\r\n\t\t\t\t{\r\n\t\t\t\t\tevdFile.delete();\r\n\t\t\t\t\tSystem.out.println(\"File deleted\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\ti = 0;\r\n\t}", "public void deleteData(String filename, SaveType type);", "void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }", "public void deleteFile(String filePath){\n File myFile = new File(filePath);\n if (myFile.exists()) {\n myFile.delete();\n System.out.println(\"File successfully deleted.\");\n } else {\n System.out.println(\"File does not exists\");\n }\n }", "public void deleteLocalImage() {\n try {\n if (isDeleteLocalImage && localImageFile != null) {\n localImageFile.delete();\n isDeleteLocalImage = false;\n } else {\n isDeleteLocalImage = false;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void deleteFile(long id)\r\n \t{\r\n \t\tif (this.logger!= null) \r\n \t\t\tlogger.debug(\"calling deleteFile(\"+id+\") was called...\");\r\n \t\t\r\n \t\tExtFileObjectDAO extFileDao= externalFileMgrDao.getExtFileObj(id);\r\n \t\tString fileSrc= this.externalDataFolder + \"/\"+ extFileDao.getBranch() + \"/\"+ extFileDao.getFileName();\r\n \t\tFile dFile= new File(fileSrc);\r\n \t\tif (!dFile.delete())\r\n \t\t\tthrow new ExternalFileMgrException(ERR_DELETE + fileSrc);\r\n \t\texternalFileMgrDao.deleteExtFileObj(id);\r\n \t}", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }", "private void delete(String name) {\n File f = new File(name);\n if (f.exists()) {\n f.delete();\n }\n }", "@AfterClass\n public static void cleanup() throws Exception {\n fs.delete(new Path(baseDir), true);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.deleteFile(\"8<U\");\n }", "public void clearSessionFile() {\n try {\n sessionData = new File(wnwData, \"session.dat\");\n sessionData.createNewFile();\n BufferedWriter bufferedWriter = new BufferedWriter(\n new FileWriter(new File(wnwData, \"session.dat\")));\n bufferedWriter.write(\"\");\n bufferedWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void deleteQuietly(File f) {\n if (!delete_(f, true)) {\n // As a last resort\n f.deleteOnExit();\n }\n }" ]
[ "0.8445722", "0.79085255", "0.7571688", "0.75580424", "0.7280862", "0.7249328", "0.7185232", "0.71827567", "0.71453154", "0.7089127", "0.7036948", "0.70013016", "0.6990867", "0.6921979", "0.6831977", "0.6827458", "0.6674217", "0.66469383", "0.6632556", "0.6599191", "0.6578218", "0.65667546", "0.6560591", "0.6559181", "0.65537655", "0.6548121", "0.6510658", "0.64947796", "0.64815384", "0.64605194", "0.6457356", "0.64398956", "0.643007", "0.6429346", "0.64270693", "0.6416276", "0.63991547", "0.6374377", "0.6371804", "0.6349273", "0.63424337", "0.6317074", "0.63150805", "0.6308924", "0.6261823", "0.6235637", "0.61783123", "0.61684865", "0.61671203", "0.6162499", "0.61563784", "0.6148054", "0.6131462", "0.60793686", "0.60785484", "0.6074642", "0.6060384", "0.60551506", "0.60496575", "0.60460514", "0.60261744", "0.6009203", "0.5991343", "0.59832925", "0.59820867", "0.5960085", "0.59583384", "0.59538794", "0.59470105", "0.5935723", "0.5933601", "0.59249246", "0.59106547", "0.59058434", "0.5905283", "0.5902171", "0.59005386", "0.59004515", "0.5900291", "0.58937144", "0.58877844", "0.58775973", "0.5876697", "0.58747244", "0.5873145", "0.58679885", "0.5863718", "0.5861074", "0.5858683", "0.5851257", "0.58390373", "0.5824928", "0.5821627", "0.58142376", "0.5813437", "0.58091855", "0.5808662", "0.58052045", "0.5804311", "0.5797095", "0.57797027" ]
0.0
-1
Retrieves ExternalFileResource based on accessToken
ExternalFileResource getExternalFileResourceByAccessToken(String accessToken);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FileReference getFile(String fileName);", "OauthResource getResourceByIllegalUri(String testId);", "com.google.apps.drive.activity.v2.DriveItem.DriveFile getDriveFile();", "private static String getAccessToken() throws IOException {\n\t\t \t\n\t\t GoogleCredential googleCredential = GoogleCredential\n\t .fromStream(new FileInputStream(path))\n\t .createScoped(Arrays.asList(SCOPES));\n\t\t \tgoogleCredential.refreshToken();\n\t\t \treturn googleCredential.getAccessToken();\n\t}", "OauthResource getResourceByIllegalResourceId(String testId);", "@Get\r\n\tpublic Representation getFile() throws Exception {\n\r\n\t\tString remainPart = StringUtil.split(getRequest().getResourceRef().getRemainingPart(), \"?\")[0];\r\n\t\tFile file = getAradon().getGlobalConfig().plugin().findPlugInFile(MyConstants.PLUGIN_ID, \"jminix/js/\" + remainPart ) ;\r\n\t\t\r\n\t\tif (! file.exists()) throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, getRequest().getResourceRef().getPath()) ; \r\n\r\n\t\tMediaType mtype = getMetadataService().getMediaType(StringUtil.substringAfterLast(file.getName(), \".\")) ;\r\n\t\tif (mtype == null) mtype = MediaType.ALL ; \r\n\t\t\r\n\t\tfinal FileRepresentation result = new FileRepresentation(file, mtype);\r\n\t\treturn result;\r\n\t}", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getAccessToken()\n {\n if (accessToken == null)\n {\n if (DEBUG)\n {\n System.out.println(\"Access token is empty\");\n }\n try\n {\n FileReader fileReader = new FileReader(getCache(\"token\"));\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n accessToken = bufferedReader.readLine();\n if (DEBUG)\n {\n System.out.println(\"BufferReader line: \" + accessToken);\n }\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return accessToken;\n }", "FileStore getFile(String fileRefId);", "public Blob getResource(String relativePath) throws DocumentNotFoundException;", "@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }", "OauthResource getResourceByIllegalId(String testId);", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "String getAccessToken();", "String getAccessToken();", "public String getAccessToken();", "public static UriSchemaUtils.UtilFile getFile(Context param0, Uri param1, String param2) throws IOException {\n }", "OauthResource getResourceByIllegalSecret(String testId);", "@Override\n public OAuth2Authentication loadAuthentication(final String accessToken)\n throws AuthenticationException, InvalidTokenException {\n String zoneId = HttpServletRequestUtil.getZoneName(this.request, this.serviceBaseDomain,\n getServiceZoneHeaderList());\n\n URI requestUri = URI.create(this.request.getRequestURI());\n\n OAuth2Authentication authentication;\n if (isNonZoneSpecificRequest(requestUri)) {\n if (zoneId == null) {\n authentication = authenticateNonZoneSpecificRequest(accessToken);\n } else {\n throw new InvalidRequestException(\"Resource not available for specified zone: \" + zoneId);\n }\n } else {\n if (zoneId == null) {\n throw new InvalidRequestException(\"No zone specified for zone specific request: \" + requestUri);\n } else {\n authentication = authenticateZoneSpecificRequest(accessToken, zoneId);\n }\n }\n\n return authentication;\n }", "private void retrieveAccessToken() {\n Log.d(TAG, \"at retreiveAccessToken\");\n String accessURL = TWILIO_ACCESS_TOKEN_SERVER_URL + \"&identity=\" + \"1234\" + \"a\";\n Log.d(TAG, \"accessURL \" + accessURL);\n Ion.with(this).load(accessURL).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null) {\n Log.d(TAG, \"Access token: \" + accessToken);\n MainActivity.this.accessToken = accessToken;\n registerForCallInvites();\n } else {\n Toast.makeText(MainActivity.this,\n \"Error retrieving access token. Unable to make calls\",\n Toast.LENGTH_LONG).show();\n Log.d(TAG, e.toString());\n }\n }\n });\n }", "public InputStream getInputStream() throws Exception {\r\n if (externalUrl != null) {\r\n AmazonS3URI s3Uri = DirectUtils.getS3Uri(externalUrl);\r\n if (s3Uri != null) {\r\n S3Object s3Object = DirectUtils.getS3Client().getObject(new GetObjectRequest(s3Bucket,\r\n DirectUtils.getS3FileKey(externalUrl)));\r\n return s3Object.getObjectContent();\r\n } else {\r\n DefaultHttpClient httpClient = new DefaultHttpClient();\r\n HttpGet request = new HttpGet(externalUrl);\r\n HttpResponse response = httpClient.execute(request);\r\n // skip status code >=400\r\n if (response.getStatusLine().getStatusCode() >= HttpStatus.SC_BAD_REQUEST) {\r\n throw new HttpResponseException(response.getStatusLine().getStatusCode(), \"Invalid file from external\");\r\n }\r\n\r\n HttpEntity entity = response.getEntity();\r\n if (entity == null) {\r\n throw new HttpResponseException(HttpStatus.SC_BAD_REQUEST, \"Invalid response from external\");\r\n }\r\n return entity.getContent();\r\n }\r\n }\r\n\r\n if (contest.getProjectHeader().getProjectCategory().getId() == ContestType.COPILOT_POSTING.getId()) {\r\n // it's copilot posting, append user handle to each file in the copilot posting submission\r\n Resource[] resources = contest.getResources();\r\n long userId = 0;\r\n for(Resource r : resources) {\r\n if(r.getId() == submission.getUpload().getOwner()) {\r\n userId = Long.parseLong(r.getProperty(\"External Reference ID\"));\r\n break;\r\n }\r\n }\r\n\r\n return prefixHandleToSubmissionFile(uploadedFile, userId);\r\n } else {\r\n return uploadedFile.getInputStream();\r\n }\r\n }", "edu.usfca.cs.dfs.StorageMessages.RetrieveFile getRetrieveFile();", "Blob getBlob(BlobStoreContext blobStoreContext, CloudPath path, GetOptionFileAttribute getOption);", "private File getFile(String filename) throws Exception {\n\t\tFile file = new File(filename);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t} else if (!file.isAbsolute()) {\n\t\t\tfinal Resource r = context.getThisInstance().eResource();\n\t\t\tfinal Path p = new Path(r.getURI().segment(1) + File.separator + filename);\n\t\t\tfinal IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(p);\n\t\t\tif (f.exists()) {\n\t\t\t\treturn f.getRawLocation().makeAbsolute().toFile();\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Filename \" + filename + \" not found\");\n\n\t}", "AccessToken getOAuthAccessToken() throws MoefouException;", "com.google.ads.googleads.v6.resources.MediaFile getMediaFile();", "InputStream getAsset(String asset) throws IOException;", "public Resource getResource(Request request);", "String getComponentAccessToken();", "String getExternalPath(String path);", "public Blob downloadFile(String inKey, String inFileName);", "@GET\n\tString get(@QueryParam(\"tempToken\") String tempToken) {\n\n\t\tif(tempToken==null)\n\t\t\treturn \"Invalid token provided\";\n\t\t\n\t\tString responseString = \"\";\n\t\tClientConfig config = new ClientConfig();\n\t\tClient client = ClientBuilder.newClient(config);\n\t\tWebTarget target = client.target(getBaseURI(tempToken));\n\t\tresponseString = target.request().accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.get(String.class);\n\t\tSystem.out.println(\"Obtained response is \" + responseString);\n\n\t\tif (responseString.contains(\"access_token=\")) {\n\t\t\tresponseString = responseString.replace(\"access_token=\", \"\");\n\t\t\treturn responseString;\n\t\t}else\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t\n\n\t}", "AccessToken getOAuthAccessToken(RequestToken requestToken, String oauthVerifier) throws MoefouException;", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "DocumentData getPreviewSign(String documentId,\n String filename) throws IOException;", "private File getDocumentFile(String filename) {\n LOGGER.debug(\"In getDownloadFile Params: filename[{}]\", filename);\n // get absolute path of the application\n String root = fileUploadDirectory; //context.getRealPath(\"/\");\n File folder = new File(root + File.separator + \"uploads\");\n if (folder.exists()) {\n File[] listFiles = folder.listFiles();\n for (File listFile : listFiles) {\n if (listFile.getName().equals(filename)) {\n LOGGER.debug(\"File found: [{}]\", listFile.getName());\n return listFile;\n }\n }\n } else {\n LOGGER.error(\"File upload folder path not found [{}]\", folder.getName());\n }\n LOGGER.error(\"Download File not found: [{}]\", filename);\n return null;\n }", "ExternalReference createExternalReference();", "private ResourceInputStream findResource(String resName, HttpServletRequest request) throws IOException {\n\t\tFile resFile = this.findFile(resName);\n\t\tif (resFile != null)\n\t\t\treturn new ResourceInputStream(resFile);\n\t\t\n\t\t//\ttry resource providers (copy for thread safety, as we don't want concurrent modification exceptions)\n\t\tLinkedList rpList = new LinkedList(this.resourceProviders);\n\t\twhile (rpList.size() != 0) {\n\t\t\tResourceProvider rp = ((ResourceProvider) rpList.removeFirst());\n\t\t\tResourceInputStream ris = rp.getResource(resName, request);\n\t\t\tif (ris != null)\n\t\t\t\treturn ris;\n\t\t}\n\t\t\n\t\t//\tnothing we can do about this one\n\t\treturn null;\n\t}", "public RetrieveDriveFileContentsAsyncTask getApiClientTask(ApiClientTask obj) {\n GoogleApiClient client = buildGoogleApiClient();\n\n return new RetrieveDriveFileContentsAsyncTask(client, obj);\n }", "@java.lang.Deprecated com.google.apps.drive.activity.v2.DriveItem.File getFile();", "Map<String, Resource> getInlineFiles();", "public FileObject getWebservicesDD();", "private static File getLocalReference(MD5Key id) {\n \n \t\tFile lnkFile = getAssetLinkFile(id);\n \t\tif (!lnkFile.exists()) {\n \t\t\treturn null;\n \t\t}\n \t\ttry {\n \t\t\tList<String> refList = FileUtil.getLines(lnkFile);\n \n \t\t\tfor (String ref : refList) {\n \t\t\t\tFile refFile = new File(ref);\n \t\t\t\tif (refFile.exists()) {\n \t\t\t\t\treturn refFile;\n \t\t\t\t}\n \t\t\t}\n \n \t\t} catch (IOException ioe) {\n \t\t\t// Just so we know, but fall through to return null\n \t\t\tioe.printStackTrace();\n \t\t}\n \n \t\t// Guess we don't have one\n \t\treturn null;\n \t}", "@RequestMapping(value=\"/files/{id}\", method = RequestMethod.GET) \n\tpublic File getFileById(@PathVariable(\"id\") final int id, HttpServletResponse response) throws InvalidInputException{\n\t\tFile temp = fileService.getFileById(id);\n\t\tif(temp==null) {\n\t\t\tthrow new InvalidInputException(id);\n\t\t}\n\t\treturn temp;\n\t}", "protected static File getFile(URL resourceUrl, String description) throws FileNotFoundException {\r\n\t\t//assert (resourceUrl == null);\r\n\t\tif (!URL_PROTOCOL_FILE.equals(resourceUrl.getProtocol())) {\r\n\t\t\tthrow new FileNotFoundException(\r\n\t\t\t\t\tdescription + \" cannot be resolved to absolute file path \" +\r\n\t\t\t\t\t\"because it does not reside in the file system: \" + resourceUrl);\r\n\t\t}\r\n\t\tFile file = null;\r\n\t\ttry {\r\n\t\t\tfile = new File(URLDecoder.decode(resourceUrl.getFile(), \"UTF-8\"));\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn file;\r\n\t}", "edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponse getRetrieveFileResponse();", "OAuth2ProtectedResourceDetails getOAuth2ResourceDetails(String applicationUuid);", "VirtualFile getFile(String uuid);", "AccessToken getOAuthAccessToken(String oauthVerifier) throws MoefouException;", "@Override\n public InputStream readFileExternal(String _fileName) throws IOException \n { // Reads a file saved to external storage. Takes the filename as a parameter and throws an IOException if failed.\n return new FileInputStream(externalStoragePath + _fileName);\n }", "public void retrieveFile(String fileName, String ext);", "private static Object downloadFeedVersionWithToken (Request req, Response res) {\n String tokenValue = req.params(\"token\");\n FeedDownloadToken token = Persistence.tokens.getById(tokenValue);\n\n if(token == null || !token.isValid()) {\n halt(400, \"Feed download token not valid\");\n }\n\n // Fetch feed version to download.\n FeedVersion version = token.retrieveFeedVersion();\n if (version == null) {\n haltWithError(400, \"Could not retrieve version to download\");\n }\n // Remove token so that it cannot be used again for feed download\n Persistence.tokens.removeById(tokenValue);\n File file = version.retrieveGtfsFile();\n return downloadFile(file, version.id, res);\n }", "@GetMapping(\"/files/{filename:.+}\")\n @ResponseBody\n public ResponseEntity<Resource> getFile(@PathVariable String filename) {\n Resource file = storageService.load(filename);\n return ResponseEntity.ok()\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + file.getFilename() + \"\\\"\").body(file);\n }", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "public Blob downloadFile(String inKey, File inDestFile);", "public RetrieveFileFromCacheRequest(String fileRef, String uniquePluginName) {\n mFileRef = fileRef;\n mUniquePluginName = uniquePluginName;\n }", "FileObject getFile();", "FileObject getFile();", "public String getAccessToken() {\n return accessToken;\n }", "public static String getAccessToken() {\n return accessToken;\n }", "public static Resource getUserFileResource() throws IOException {\n Path tempFile = Files.createTempFile(\"upload-test-file\", \".jpg\");\n Files.write(tempFile,FileUtils.readFileToByteArray(new File(\"d:/file_test.jpg\"))); \n // \"some test content...\\nline1\\nline2\".getBytes());\n System.out.println(\"uploading: \" + tempFile);\n File file = tempFile.toFile();\n //to upload in-memory bytes use ByteArrayResource instead\n return new FileSystemResource(file);\n }", "private File getOpenApiFile(String oasDefinition) throws IOException {\n File oasTempFile = File.createTempFile(\"oasTempFile\", \".json\");\n try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(oasTempFile),\n StandardCharsets.UTF_8))) {\n bw.write(oasDefinition);\n }\n return oasTempFile;\n }", "@GetMapping(\"/download/{id}\")\r\n public ResponseEntity<Resource> downloadFile(@PathVariable(value = \"id\") int fileId) {\n\r\n Files file = filesRepository.findById(fileId)\r\n .orElseThrow(() -> new ResourceNotFoundException(\"File\", \"id\", fileId));\r\n\r\n\r\n Resource resource = fileStorageService.loadFileAsResource(file.getFileName());\r\n\r\n\r\n String contentType = \"application/octet-stream\";\r\n\r\n\r\n return ResponseEntity.ok()\r\n .contentType(MediaType.parseMediaType(contentType))\r\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + resource.getFilename() + \"\\\"\")\r\n .body(resource);\r\n }", "RequestToken getOAuthRequestToken(String callbackURL) throws MoefouException;", "String getFile();", "String getFile();", "String getFile();", "public void get(String file) {\n\n }", "private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}", "@GET(\"/resource/example.zip\")\n Call<ResponseBody> downloadFileWithFixedUrl();", "public static final InputStream getResourceAsStream(String s) {\n\t\tif (s.startsWith(\"/\")) {\n\t\t\ts = s.substring(1);\n\t\t}\n\t\t//the name must be in lowercase always. Credits to dan.luongcong@gameloft.com\n\t\tString name = s.substring(s.lastIndexOf('/')+1).toLowerCase();\n\t\t//fixed: remove extension. Credits to dan.luongcong@gameloft.com\n\t\tint ext = name.indexOf('.');\n\t\tif (ext != -1)\n\t\t{\n\t\t\tname = name.substring(0, ext);\n\t\t}\n\t\tString path = s.substring(0, s.lastIndexOf('/')+1);\n\t\tString protectedRes = path + \"res_\"+name;\n\n\t\tif (debugEnabled)\n\t\t\tLog.d(\"getResourceAsStream\", \"Trying to get protected resource using forward lock. Resource: \"+ protectedRes);\n\n\t\tint ID = mContext.getResources().getIdentifier(protectedRes, \"drawable\", mContext.getPackageName());\n\t\tInputStream is = null;\n\t\tif (ID != 0) {\n\n\t\t\tif (debugEnabled)\n\t\t\t\tLog.d(\"getResourceAsStream\", \"Forward lock protection ok. Protected resource exists: \"+ protectedRes +\" with ID=\"+ ID);\n\n\t\t\tis = mContext.getResources().openRawResource(ID);\n\t\t\tif (is != null) {\n\t\t\t\treturn is;\n\t\t\t}\n\t\t}\n\t\tif (debugEnabled)\n\t\t\tLog.w(\"getResourceAsStream\", \"Resource: \"+ s +\" is not protected using forward lock\");\n\n\t\tAssetManager am = mContext.getAssets();\n\t\ttry {\n\t\t\tif (debugEnabled)\n\t\t\t\tLog.d(\"getResourceAsStream\", \"Reading asset: \"+ s);\n\n\t\t\tis = am.open(s);\n\t\t} catch (IOException e) {\n\t\t\tif (debugEnabled)\n\t\t\t\tLog.e(\"getResourceAsStream\", \"Error reading asset: \"+ s +\" :: \"+ e);\n\n\t\t\treturn null;\n\t\t}\n\t\treturn is;\n\t}", "public String getAccessToken() {\n return accessToken;\n }", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "public interface FileService extends PublicService {\n\n /**\n * Retrieves reference to a file by fileName\n */\n FileReference getFile(String fileName);\n \n /**\n * Creates a reference for a new file.\n * Use FileReference.getOutputStream() to set content for the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileName\n * @param toolId - optional parameter\n * @return\n */\n FileReference createFile(String fileName, String toolId);\n \n /**\n * Deletes the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileReferece\n */\n void deleteFile(FileReference fileReferece);\n \n /**\n * Returns a url to the file\n * Property WebSecurityUtil.DBMASTER_URL (dbmaster.url) is used as a prefix\n */\n URL toURL(FileReference fileReferece);\n}", "public Optional<AuthLoginTokenFile> authLoginTokenFile() {\n return Codegen.objectProp(\"authLoginTokenFile\", AuthLoginTokenFile.class).config(config).get();\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected abstract InputStream getStream(String resource);", "public List<File> search(String token, String name) {\n Drive service;\n List<File> files = new ArrayList<>();\n try {\n service = getDriveService(token);\n files = service.files().list().setQ(\"name = '\" + name + \"'\").setFields(\"files(id, name, mimeType, owners, ownedByMe, trashed)\").execute().getFiles();\n\n } catch (IOException | GeneralSecurityException e) {\n log.debug(\"Error while searching the file, {}\", e.getMessage());\n //e.printStackTrace();\n }\n\n return files;\n }", "public Resource loadFileAsResource(String fileName) {\n try {\n Path filePath = this.fileStorageLocation.resolve(fileName).normalize();\n Resource resource = new UrlResource(filePath.toUri());\n if(resource.exists()) {\n return resource;\n } else {\n throw new HubFileNotFoundException(\"File not found \" + fileName);\n }\n } catch (MalformedURLException ex) {\n throw new HubFileNotFoundException(\"File not found \" + fileName, ex);\n }\n }", "public File getPictureFromCache() {\n if (context != null) {\n File file = new File(context.getExternalFilesDir(null), pictureName);\n return file;\n }\n return null;\n }", "public File getResource(Integer id) {\n Cours cours = courRepo.findById(id.longValue()).orElseThrow(()-> new RuntimeException(\"this cours does not exist \"));\n if(cours.getVideo() == null)\n throw new RuntimeException(\"this video does not exist\");\n String filePath= cours.getVideo().getUrlFile();\n File f = new File(filePath);\n return f;\n }", "PrivateResource resolve(Uri encryptedPath, Uri decryptedPath);", "private TableEntity lookupByFileId(\n TableServiceClient tableServiceClient, String tableName, String fileId) {\n try {\n ListEntitiesOptions options =\n new ListEntitiesOptions().setFilter(String.format(\"fileId eq '%s'\", fileId));\n if (!TableServiceClientUtils.tableHasEntries(tableServiceClient, tableName, options)) {\n return null;\n } else if (!TableServiceClientUtils.tableHasSingleEntry(\n tableServiceClient, tableName, options)) {\n throw new FileSystemAbortTransactionException(\n String.format(\"lookupByFileId found too many entries for fileId %s\", fileId));\n }\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n PagedIterable<TableEntity> entities = tableClient.listEntities(options, null, null);\n return entities.iterator().next();\n\n } catch (TableServiceException ex) {\n throw new FileSystemExecutionException(\"lookupByFileId operation failed\");\n }\n }", "public Asset getAssetById(UUID id) throws IOException {\n try {\n String strBody = null;\n Map<String, String> params = null;\n String correctPath = \"/Assets/{id}\";\n // Hacky path manipulation to support different return types from same endpoint\n String path = \"/Assets/{id}\";\n String type = \"/pdf\";\n if(path.toLowerCase().contains(type.toLowerCase()))\n {\n correctPath = path.replace(\"/pdf\",\"\");\n } \n\n // create a map of path variables\n final Map<String, String> uriVariables = new HashMap<String, String>();\n uriVariables.put(\"id\", id.toString());\n UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath);\n String url = uriBuilder.buildFromMap(uriVariables).toString();\n\n \n String response = this.DATA(url, strBody, params, \"GET\");\n TypeReference<Asset> typeRef = new TypeReference<Asset>() {};\n return apiClient.getObjectMapper().readValue(response, typeRef);\n\n } catch (IOException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage());\n } catch (XeroApiException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage(), e.getResponseCode(),JSONUtils.isJSONValid(e.getMessage()));\n }\n }", "public String getZrtpSecretsFile();", "SharedPrivateLinkResource getById(String id);", "protected InputStream getURLInputStream() throws Exception\n\t {\n\n\t URL url = new URL(file, fFilename);\n\t InputStream fin = url.openStream();\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "public Optional<VirtualFile> getPublicOrResourcesFile(String id) {\n Stream<VirtualFile> files = Stream.concat(public_files.stream(), resource_files.stream());\n return files.filter(file -> file.getId().equals(id)).findFirst();\n }", "public abstract ResourceInputStream getResource(String resName, HttpServletRequest request);", "@GET\r\n\t@Produces(MediaType.APPLICATION_OCTET_STREAM)\r\n\t@Path(\"assets/{filename}\")\r\n\tpublic Response staticResources(@PathParam(\"filename\") String filename) {\r\n\t\tSystem.out.println(\"Fichier : \" + filename);\r\n\t\t\r\n\t\tString assetsPath = \"./assets/\";\r\n\t\tFile fichier = new File(assetsPath + filename );\r\n\t\t\r\n\t\tif( !fichier.exists() ) {\r\n\t\t\treturn Response.status(404).build();\r\n\t\t}\r\n\t\treturn Response.ok(fichier, MediaType.APPLICATION_OCTET_STREAM)\r\n\t\t .header(\"Content-Disposition\", \"attachment; filename=\\\"\" + fichier.getName() + \"\\\"\")\r\n\t\t\t .build();\r\n\t}", "File retrieveFile(String absolutePath);", "public File getFile();", "public File getFile();", "public static OAuthResourceResponse get(Authorization auth, String serviceURI) throws Exception {\n // Creating authorization HTTP client\n OAuthClient oAuthClient = new OAuthClient(new URLConnectionClient());\n\n // Creating token-signed request\n OAuthClientRequest signedGetRequest = new OAuthBearerClientRequest(serviceURI)\n .setAccessToken(auth.getAccessToken())\n .buildQueryMessage();\n signedGetRequest.setHeader(\"Authorization\", \"Bearer \" + auth.getAccessToken());\n signedGetRequest.setHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n return oAuthClient.resource(signedGetRequest, OAuth.HttpMethod.GET, OAuthResourceResponse.class);\n }", "public File getFile()\r\n \t{\r\n \t\tFile result = null;\r\n \t\t\r\n \t\tString hostName = getAuthority();\r\n \t\t\r\n \t\tif((hostName == null) || hostName.equals(\"\") || hostName.equalsIgnoreCase(\"localhost\"))\r\n \t\t{\r\n \t\t\tString filePath = getPath();\r\n \t\t\tresult = new File(filePath);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthrow new RuntimeException(\"Can't resolve files on remote host machines\");\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}", "private static File getCachedFile(String baseUrl, String params) {\n int hashCode = (baseUrl + params).hashCode();\n return new File(System.getProperty(\"java.io.tmpdir\"), BL_CACHE_FILE + hashCode);\n }", "com.google.ads.googleads.v6.resources.Asset getAsset();", "public FileWithFaultLocations getFile(final String file);", "private File getFile(String fileName, HttpServletRequest request){\n\t\tString fileSite = request.getSession().getServletContext().getRealPath(\"resources/upload\"); // 배포폴더\n\t\treturn new File(fileSite, fileName);\n\t}", "public void fetchDriveFile(DriveId id, final ApiClientTask obj) {\n GoogleApiClient client = buildGoogleApiClient();\n\n RetrieveDriveFileContentsAsyncTask callBackAsyncTask\n = new RetrieveDriveFileContentsAsyncTask(client, obj);\n\n callBackAsyncTask.execute(id);\n\n// Drive.DriveApi.fetchDriveId(mGoogleApiClient, id.toString())\n// .setResultCallback(new ResultCallback<DriveApi.DriveIdResult>() {\n// @Override\n// public void onResult(DriveApi.DriveIdResult result) {\n//\n// // Build a separate google client.\n// GoogleApiClient client = buildGoogleApiClient();\n//\n// RetrieveDriveFileContentsAsyncTask callBackAsyncTask = new RetrieveDriveFileContentsAsyncTask(client, obj);\n//\n// callBackAsyncTask.execute(result.getDriveId());\n// }\n// });\n }" ]
[ "0.56284225", "0.55323195", "0.5333086", "0.53190666", "0.5270437", "0.5264174", "0.52444637", "0.5242371", "0.5216223", "0.521418", "0.51675713", "0.5139618", "0.5129586", "0.5112403", "0.5112403", "0.50662047", "0.5062632", "0.5041076", "0.5029968", "0.5011799", "0.50065047", "0.49463198", "0.49127817", "0.4903476", "0.48968565", "0.48926553", "0.48558894", "0.4848536", "0.48475266", "0.4834225", "0.48211488", "0.48171178", "0.48111156", "0.48010692", "0.48004854", "0.47892085", "0.47825733", "0.47717702", "0.47660515", "0.47642916", "0.47565186", "0.47509906", "0.474517", "0.47409132", "0.47385627", "0.47382966", "0.47237587", "0.4723546", "0.47194225", "0.47033697", "0.46922287", "0.4687161", "0.4684481", "0.4678613", "0.46650305", "0.46632367", "0.46578187", "0.46578187", "0.4657443", "0.4652699", "0.4651132", "0.46510622", "0.46481922", "0.46456164", "0.4643678", "0.4643678", "0.4643678", "0.46422246", "0.46289343", "0.46256617", "0.46221027", "0.46172237", "0.4612816", "0.46053934", "0.45999944", "0.45972466", "0.45972374", "0.45939207", "0.45889473", "0.45819622", "0.45808274", "0.4580339", "0.45777854", "0.45695135", "0.45690882", "0.45662865", "0.45662358", "0.456555", "0.45625833", "0.45558414", "0.45473617", "0.454662", "0.454662", "0.45407793", "0.45384005", "0.4529743", "0.45258054", "0.45188358", "0.45178586", "0.4515191" ]
0.8996006
0
Generates an accessToken before persisting the object.
String saveExternalFileResource(ExternalFileResource externalFileResource);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "public void generateAccessToken(OAuthAccessor accessor)\n throws OAuthException {\n\n try {\n // generate oauth_token and oauth_secret\n // generate token and secret based on consumer_key\n String consumer_key = accessor.consumer.consumerKey;\n \n OAuthAccessorRecord record = findByConsumerKey(accessor.consumer.consumerKey);\n \n // for now use md5 of name + current time as token\n String token_data = consumer_key + System.nanoTime();\n String token = Digester.MD5(token_data);\n\n record.setRequestToken(null);\n record.setAccessToken(token);\n em.persist(record);\n\n } catch (Exception ex) {\n throw new OAuthException(\"ERROR: generating access token\", ex);\n }\n }", "@Transient\n\tpublic String getAccessToken() {\n\t\treturn accessToken;\n\t}", "void setAccessToken(String accessToken);", "@Transactional\n\tprivate void saveOrUpdateAccessToken() {\n\t\tString tfw = null;\n\t\ttry {\n\t\t\ttfw = this.getAccessTokenFromWechatServer();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (tokenConstant == null) {\n\t\t\ttokenConstant = new AccessToken();\n//\t\t\tconstant.setKey(Consts.access_token_key_in_db);\n//\t\t\tconstant.setValue(tfw);\n//\t\t\ttokenConstant.setUpdateTime(new Date());\n//\n//\t\t\tthis.tokenConstant = constant;\n//\t\t\tthis.constantMapper.insert(constant);\n\t\t\tlog.info(\"第一次获取accessToken\");\n\t\t}\n//\t\telse {\n//\t\t\tconstant.setValue(tfw);\n//\t\t\tconstant.setUpdateTime(new Date());\n//\n//\t\t\tthis.tokenConstant = constant;\n//\t\t\tthis.constantMapper.updateAccessToken(constant);\n//\t\t\tlog.info(\"accessToken已经更新\");\n//\t\t}\n\t\tWechatConsts.param_access_token=tfw;\n\t\t\n\t\ttokenConstant.setAccess_token(tfw);\n\t\ttokenConstant.setUpdateTime(new Date());\n\t}", "public String getAccessToken();", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "String getAccessToken();", "String getAccessToken();", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "void setOAuthAccessToken(AccessToken accessToken);", "public static String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public static void setAccessToken(String accessToken) {\n }", "@Override\n\tprotected ServerAccessToken createNewAccessToken(Client client, UserSubject userSub) {\n\t\tBearerAccessToken accessToken = new BearerAccessToken(client,\n\t\t\t\t\"AT:\" + UUID.randomUUID().toString(),\n\t\t\t\tOauth2Factory.ACCESS_TOKEN_EXPIRED_TIME_SECONDS,\n\t\t\t\tOAuthUtils.getIssuedAt());\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"BearerAccessToken={}\", OBJECT_MAPPER.writeValueAsString(accessToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn accessToken;\n\t}", "String createToken(User user);", "public String generateAccessToken(User user, String tenant)\n\t{\n\t\tClaims claims = Jwts.claims().setSubject(user.getId().toString());\n\t\tclaims.put(\"password\", user.getPassword());\n\t\tclaims.put(\"tenant\", tenant);\n\t\treturn buildToken(claims, Integer.MAX_VALUE);\n\t}", "public void generateRequestToken(OAuthAccessor accessor)\n throws OAuthException {\n\n // generate oauth_token and oauth_secret\n String consumer_key = accessor.consumer.consumerKey;\n // generate token and secret based on consumer_key\n\n // for now use md5 of name + current time as token\n String token_data = consumer_key + System.nanoTime();\n \n String token = StringPool.BLANK;\n try {\n token = Digester.MD5(token_data);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(OAuthManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n // for now use md5 of name + current time + token as secret\n String secret_data = consumer_key + System.nanoTime() + token;\n String secret = StringPool.BLANK;\n try {\n secret = Digester.MD5(secret_data);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(OAuthManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n accessor.requestToken = token;\n accessor.tokenSecret = secret;\n accessor.accessToken = null;\n\n // add to the local cache\n addAccessor(accessor);\n }", "public void setAccessToken(String accessToken, String tokenType)\n {\n FileWriter fileWriter;\n try\n {\n fileWriter = new FileWriter(getCache(\"token\"));\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.write(accessToken);\n bufferedWriter.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n try\n {\n fileWriter = new FileWriter(getCache(\"tokenType\"));\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.write(tokenType);\n bufferedWriter.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n this.accessToken = accessToken;\n }", "public String getAccessToken () {\n\t\treturn this.accessToken;\n\t}", "public interface OauthAccessToken {\n byte[] getAuthentication();\n\n String getTokenId();\n\n String getAuthenticationId();\n\n byte[] getToken();\n\n void setTokenId(String tokenId);\n\n void setToken(byte[] token);\n\n void setAuthenticationId(String authenticationId);\n\n void setUsername(String username);\n\n void setAuthentication(byte[] authentication);\n\n void setRefreshToken(String refreshToken);\n\n void setClientId(String clientId);\n}", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "String getAuthorizerAccessToken(String appId);", "@Nullable\n public String getAccessToken() {\n return accessToken;\n }", "public boolean save(Context context, AccessToken accessToken) \n {\n\n Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();\n\n this.token = accessToken.getToken();\n this.tokensecret = accessToken.getTokenSecret();\n editor.putString(TOKEN, token);\n editor.putString(TOKENSECRET, tokensecret);\n \n\n if (editor.commit()) \n {\n singleton = this;\n return true;\n }\n return false;\n }", "public void storeToken(AuthorizationToken token);", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "public String getAccessToken() {\n readLock.lock();\n try {\n return accessToken;\n } finally {\n readLock.unlock();\n }\n }", "public static String getAccessToken() {\n return \"\";\n }", "AccessToken getOAuthAccessToken() throws MoefouException;", "public AccessToken getAccessToken() {\n return token;\n }", "public Token createAuthorizationToken(User user);", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return jwtUtil.generateJwtToken(authentication);\n }", "@Override\n\tprotected RefreshToken doCreateNewRefreshToken(ServerAccessToken at) {\n\t\tRefreshToken refreshToken = super.doCreateNewRefreshToken(at);\n\t\trefreshToken.setTokenKey(\"RT:\" + UUID.randomUUID().toString());\n\t\trefreshToken.setExpiresIn(Oauth2Factory.REFRESH_TOKEN_EXPIRED_TIME_SECONDS);\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"RefreshToken={}\", OBJECT_MAPPER.writeValueAsString(refreshToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn refreshToken;\n\t}", "public String grantToIdentity(String identity, String tkn) throws InternalSkiException {\n byte[] tokenKey = getTokenKey();\n Token otherTkn = th.decodeToken(tkn, tokenKey);\n\n Token newTkn = new Token();\n newTkn.setIdentity(identity);\n newTkn.setKey(otherTkn.getKey());\n // log.info(\"New granted key: \" + newTkn.getKey());\n\n String tknValue = th.encodeToken(newTkn, tokenKey);\n if (tknValue==null) {\n log.warning(\"Failed to encode token during identity grant!\");\n }\n if (log.isLoggable(Level.FINE)) {\n log.fine(\"Created token with value: \" + tknValue);\n }\n return tknValue;\n }", "@Override\r\n\tpublic String accessToken() throws OAuthSystemException {\n\t\treturn null;\r\n\t}", "public void setAccessToken(String accessToken) {\n writeLock.lock();\n try {\n this.accessToken = accessToken;\n } finally {\n writeLock.unlock();\n }\n }", "public String getAccessToken(){\n //return \"3be8b617e076b96b2b0fa6369b6c72ed84318d72\";\n return MobileiaAuth.getInstance(mContext).getCurrentUser().getAccessToken();\n }", "public void setCurrentAccessToken() {\n String userAccessToken = null;\n String moderatorAccessToken = null;\n // Get tokens of local user and logged in moderator if existing.\n localUser = getLocalUser();\n if (localUser != null) {\n userAccessToken = localUser.getServerAccessToken();\n }\n if (loggedInModerator != null) {\n moderatorAccessToken = loggedInModerator.getServerAccessToken();\n }\n // Use the access token of the local moderator if available (logged in).\n accessToken = moderatorAccessToken;\n if (accessToken == null) {\n // Otherwise, use the access token of the local user.\n accessToken = userAccessToken;\n }\n }", "private static OAuth2AccessToken createAccessTokenForUser(UserSnapshot userSnapshot) {\n\t\tClientDetails client = clientDetailsService.loadClientByClientId(clientId);\n\t\tCollection<GrantedAuthority> authorities = client.getAuthorities();\n\t\tSet<String> resourceIds = client.getResourceIds();\n\t\tSet<String> scopes = client.getScope();\n\n\t\t// Default values for other parameters\n\t\tMap<String, String> requestParameters = Collections.emptyMap();\n\t\tboolean approved = true;\n\t\tString redirectUrl = null;\n\t\tSet<String> responseTypes = Collections.emptySet();\n\t\tMap<String, Serializable> extensionProperties = Collections.emptyMap();\n\n\t\t// Create request\n\t\tOAuth2Request oAuth2Request = new OAuth2Request(requestParameters, clientId, authorities, approved, scopes,\n\t\t\t\tresourceIds, redirectUrl, responseTypes, extensionProperties);\n\n\t\t// Create OAuth2AccessToken\n\t\tUser userPrincipal = new User(userSnapshot.getLogin(), \"\", true, true, true, true, authorities);\n\t\tUsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(userPrincipal,\n\t\t\t\tnull, authorities);\n\t\tOAuth2Authentication auth = new OAuth2Authentication(oAuth2Request, authenticationToken);\n\t\treturn tokenService.createAccessToken(auth);\n\t}", "public void generateAzureAccessToken(\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getGenerateAzureAccessTokenMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public void setAccessToken (AccessToken accessToken)\n\t{\n\t\tthis.accessToken = accessToken;\n\t}", "public String getAccessToken() {\n\t\t\n\t\tString access_token = \"\";\n\t\t\n\t\tif (securityContext != null) {\n\t\t\taccess_token = securityContext.getTokenString();\n\t\t}\n\t\t\n\t\treturn access_token;\n\t}", "private static String getAccessToken() throws IOException {\n\t\t \t\n\t\t GoogleCredential googleCredential = GoogleCredential\n\t .fromStream(new FileInputStream(path))\n\t .createScoped(Arrays.asList(SCOPES));\n\t\t \tgoogleCredential.refreshToken();\n\t\t \treturn googleCredential.getAccessToken();\n\t}", "@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICATED;\n UserAuth user = userOptional.get();\n Map<String, Object> claims = new HashMap<>();\n claims.put(\"type\", user.getType().toString());\n claims.put(\"department\", user.getDepartment().getName());\n claims.put(\"dean_admin\", PermissionManager.hasPermission(user.getAuthorities(), Role.DEAN_ADMIN));\n String token = FirebaseAuth.getInstance().createCustomTokenAsync(user.getUsername(), claims).get();\n return fromUser(user, token);\n } catch (InterruptedException | ExecutionException e) {\n return UNAUTHENTICATED;\n }\n }", "@Override\n public Completable setAccessToken(DomainUserModel user) {\n return userService.setAccessToken(user);\n }", "public void setAccessToken(String accessToken) {\n\t\tthis.accessToken = accessToken;\n\t}", "public void setAccessToken(String accessToken) {\n\t\tthis.accessToken = accessToken;\n\t}", "public void setAccessToken(String accessToken) throws IOException {\n this.accessToken = accessToken;\n fetchUserProfile();\n }", "public String getAccessToken()\n {\n if (accessToken == null)\n {\n if (DEBUG)\n {\n System.out.println(\"Access token is empty\");\n }\n try\n {\n FileReader fileReader = new FileReader(getCache(\"token\"));\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n accessToken = bufferedReader.readLine();\n if (DEBUG)\n {\n System.out.println(\"BufferReader line: \" + accessToken);\n }\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return accessToken;\n }", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "private String createAuthToken(User user) {\n // create new Auth Token\n String authToken = userAuthenticationService.generateToken();\n\n // store the token\n userAuthenticationService.storeAuthToken(user, authToken);\n return authToken;\n }", "public interface AesTokenCreationStrategy {\n\n /**\n * Creates a token based on the provided claims and the AES key used for the content encryption\n *\n * @param claims to be represented in the token\n * @param key the base64 encoded AES key\n * @return assembled token\n */\n String toToken(JwtClaims claims, SecretKey key);\n}", "private static String generateToken(Accessor accessor) {\n return generateHash(accessor.getConsumerId() + System.nanoTime());\n }", "public String saveAuthToken() { // basically for signin\n return authTokenAssist.saveMemberToken(getSavedUserBean().get().getMemberAccount());\n }", "protected final String getAccessToken() {\n Session currentSession = sessionTracker.getOpenSession();\n return (currentSession != null) ? currentSession.getAccessToken() : null;\n }", "AccessToken getOAuthAccessToken(RequestToken requestToken, String oauthVerifier) throws MoefouException;", "default void generateAzureAccessToken(\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateAzureAccessTokenMethod(), responseObserver);\n }", "private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }", "public synchronized String accessToken(String knownInvalidToken) {\n if (accessToken == null || (knownInvalidToken != null && accessToken.equals(knownInvalidToken))) {\n loadTokens();\n }\n\n return accessToken;\n }", "void expireComponentAccessToken();", "public void setAccessToken(String accessToken) {\n\t\t\tthis.accessToken = accessToken;\n\t\t}", "private void refreshAccessToken() throws IOException {\n\n if (clientId == null) fetchOauthProperties();\n\n URL url = new URL(tokenURI);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"refresh_token\", refreshToken);\n params.put(\"client_id\", clientId);\n params.put(\"client_secret\", clientSecret);\n params.put(\"grant_type\", \"refresh_token\");\n\n String response = HttpUtils.getInstance().doPost(url, params);\n JsonParser parser = new JsonParser();\n JsonObject obj = parser.parse(response).getAsJsonObject();\n\n JsonPrimitive atprim = obj.getAsJsonPrimitive(\"access_token\");\n if (atprim != null) {\n accessToken = obj.getAsJsonPrimitive(\"access_token\").getAsString();\n expirationTime = System.currentTimeMillis() + (obj.getAsJsonPrimitive(\"expires_in\").getAsInt() * 1000);\n fetchUserProfile();\n } else {\n // Refresh token has failed, reauthorize from scratch\n reauthorize();\n }\n\n }", "AccessToken getOAuthAccessToken(String oauthVerifier) throws MoefouException;", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>\n generateAzureAccessToken(\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGenerateAzureAccessTokenMethod(), getCallOptions()), request);\n }", "@Api(1.0)\n @NonNull\n public String getAccessToken() {\n return mAccessToken;\n }", "GenerateUserAccount () {\r\n }", "public final void mo3471a() {\n try {\n String a = new Gson().mo2101a((Object) this.f1255c, new l20(this).getType());\n SharedPreferences.Editor edit = QN0.a.edit();\n edit.putString(\"oauth_access_token_map_key\", a);\n edit.apply();\n } catch (Exception unused) {\n VN0.a(f1252d, \"Gson serialise AccessTokenMap to json error\", new Object[0]);\n }\n }", "ApiTokenProperty(String seed) {\n apiToken = Secret.fromString(seed);\n }", "protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}", "public TokenTO generateToken(UserTO user) {\n TokenTO res;\n\n res = mgrToken.createToken(Crypto.generateToken() + Crypto.generateToken());\n mgrToken.save(res);\n user.setToken(res);\n getDao().update(user);\n\n return res;\n }", "public static String generateAuthToken() throws EndlosException {\n\t\treturn hash(Utility.generateToken(6) + DateUtility.getCurrentEpoch() + Utility.generateToken(8));\n\t}", "public interface OAuthTokenStoreAdapter {\n\n void storeAccessToken(AccessToken token);\n AccessToken retrieveAccessToken(String value);\n\n void storeRefreshToken(RefreshToken token);\n RefreshToken retrieveRefreshToken(String value);\n}", "public String makeAccessToken(String appName, String username) {\n if (appName == null) {\n throw new IllegalArgumentException(\"Application name required argument\");\n }\n // check for max access tokens limit: log and invalidate all access tokens\n // so that server can continue, (all clients will need to reauthenticate and\n // allocate new tokens)\n if (log.isInfoEnabled()) {\n // Log guard this to avoid needlessly counting token usage\n log.info(\"Attempting to make access token for app '\" + appName + \"'. Usage by application: \" + getAccessTokensByApplication());\n }\n if (accessTokens.size() >= maxAccessTokens) {\n HashMap<String,Integer> accessTokensByApplication = getAccessTokensByApplication();\n accessTokens.clear();\n log.error(\"Maximum number of access tokens reached, (\" + maxAccessTokens + \"), by application: \" + accessTokensByApplication);\n }\n\n // @since 7.2.0 - determine user's authorization by simple convention of configured reader username gets read-only authorization,\n // and configured admin username gets full authorization\n String adminUserName = WSClientConfiguration.getProperty(WSClientConfiguration.WEBSERVICES_USERNAME);\n boolean isAdmin = (adminUserName != null && adminUserName.equals(username));\n\n // create and put access token/application name pair\n String accessToken = UUID.randomUUID().toString();\n accessTokens.put(accessToken, new AuthAccessInfo(appName, accessToken, !isAdmin));\n return accessToken;\n }", "public void setAccessToken(String accessToken) {\n mAccessToken = accessToken;\n retrieveAllUserData();\n }", "Authorizor createAuthorizor();", "private String generateToken(Map<String, Object> claims) {\n return Jwts.builder()\n .setClaims(claims)\n .setExpiration(new Date(System.currentTimeMillis() + 700000000))\n .signWith(SignatureAlgorithm.HS512, SECRET)\n .compact();\n }", "OAuth2Token getToken();", "public static void setAccessToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public static String getCurrentAccessToken() {\n if (StringUtils.isNotNull(cacheAccessToken))\n return cacheAccessToken;\n\n String accessToken = null;\n User user = getCurrentUser();\n if (user != null)\n accessToken = user.secret;\n if (accessToken != null)\n cacheAccessToken = accessToken;\n\n return cacheAccessToken;\n }", "public boolean setAccessToken(JSONObject response){\n boolean ret=false;\n Log.d(TAG, \"setAccessToken: \"+response);\n SharedPreferences.Editor editor=context.getSharedPreferences(Const.LINKAI_SHAREDPREFERENCE_FILE,Context.MODE_PRIVATE).edit();\n try {\n editor.putString(\"access_token\",response.getString(\"access_token\"));\n editor.putString(\"token_type\",response.getString(\"token_type\"));\n editor.putLong(\"expires_in\",Long.valueOf(response.getString(\"expires_in\")));\n// editor.putLong(\"expires_in\",10000);\n editor.putLong(\"token_timestamp\",new Date().getTime());\n editor.commit();\n ret=true;\n }catch (Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "AbstractCredentialModel createOAuthCredential(EmployeeModel employee);", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "@Override\n public void acceptVisitor(AuthServiceVisitor visitor) {\n visitor.visitAccessToken(this);\n }", "@ContractFactory(entites = TokenEntity.class)\npublic interface TokenAPI {\n\n void getAccessToken(String userName, String password);\n\n}", "public void saveToken(String token, long passTime) {\n }", "public AuthValueGeneratorImpl(\n ValueGenerator clientIdGenerator,\n ValueGenerator clientSecretGenerator,\n ValueGenerator authCodeGenerator,\n ValueGenerator accessTokenGenerator) {\n this.clientIdGenerator = clientIdGenerator;\n this.clientSecretGenerator = clientSecretGenerator;\n this.authCodeGenerator = authCodeGenerator;\n this.accessTokenGenerator = accessTokenGenerator;\n }", "GoogleAuthenticatorKey createCredentials();", "public String getAccess_token() {\r\n\t\treturn access_token;\r\n\t}", "private static String getAppTokenId() {\n if (appTokenId == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (appTokenId == null) {\n try {\n if (OAuthProperties.isServerMode()) {\n appTokenId = OAuthServiceUtils.getAdminTokenId();\n }\n else {\n final String username =\n OAuthProperties.get(PathDefs.APP_USER_NAME);\n final String password =\n OAuthProperties.get(PathDefs.APP_USER_PASSWORD);\n appTokenId =\n OAuthServiceUtils.authenticate(username, password, false);\n }\n }\n catch (final OAuthServiceException oe) {\n Logger.getLogger(DefaultEntityManagerImpl.class.getName()).log(\n Level.SEVERE, null, oe);\n throw new WebApplicationException(oe);\n }\n }\n }\n }\n return appTokenId;\n }", "static AccessToken m9937a(Bundle bundle, C2453c cVar, String str) {\n Date a = C2479ad.m9436a(bundle, \"com.facebook.platform.extra.EXPIRES_SECONDS_SINCE_EPOCH\", new Date(0));\n ArrayList stringArrayList = bundle.getStringArrayList(\"com.facebook.platform.extra.PERMISSIONS\");\n String string = bundle.getString(\"com.facebook.platform.extra.ACCESS_TOKEN\");\n if (C2479ad.m9456a(string)) {\n return null;\n }\n AccessToken accessToken = new AccessToken(string, str, bundle.getString(\"com.facebook.platform.extra.USER_ID\"), stringArrayList, null, cVar, a, new Date());\n return accessToken;\n }", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "private String newToken(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n return jwtUtils.generateToken(userDetails);\r\n }", "public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse\n generateAzureAccessToken(\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGenerateAzureAccessTokenMethod(), getCallOptions(), request);\n }", "@Override\n protected OAuth2AccessToken getAccessToken(ClientDetails client, TokenRequest tokenRequest) {\n final String clientId = client.getClientId();\n if (clientId == null) {\n log.error(\"Failed to authenticate client {}\", clientId);\n throw new InvalidRequestException(\"Unknown Client ID.\");\n }\n\n MobileIDSession mobileIDSession = mobileIdSessionStore.get();\n boolean isComplete = mobileIdAuthService.isLoginComplete(mobileIDSession);\n\n if(!isComplete) {\n throw new MobileIdAuthNotCompleteException();\n }\n\n User user = userRepository.findByPersonalCode(mobileIDSession.personalCode);\n\n if (user == null) {\n log.error(\"Failed to authenticate user: couldn't find user with personal code {}\", mobileIDSession.personalCode);\n throw new InvalidRequestException(\"INVALID_USER_CREDENTIALS\");\n }\n\n Authentication userAuthentication = new PersonalCodeAuthentication(user, mobileIDSession, null);\n userAuthentication.setAuthenticated(true);\n\n final OAuth2Request oAuth2Request = tokenRequest.createOAuth2Request(client);\n final OAuth2Authentication oAuth2Authentication = new OAuth2Authentication(oAuth2Request,\n userAuthentication\n );\n\n return getTokenServices().createAccessToken(oAuth2Authentication);\n }" ]
[ "0.7162241", "0.6917269", "0.63389134", "0.6132236", "0.60629624", "0.59942955", "0.5966113", "0.5965403", "0.5965403", "0.59470993", "0.5944969", "0.58933395", "0.58697015", "0.5828162", "0.5826124", "0.5826124", "0.5816684", "0.5724835", "0.5723002", "0.57149297", "0.5675278", "0.5659094", "0.5656826", "0.56439286", "0.56338507", "0.5619508", "0.5605353", "0.55937773", "0.5565511", "0.55613863", "0.55590916", "0.55509675", "0.55290926", "0.55279636", "0.5517532", "0.5508345", "0.5476262", "0.54734516", "0.5455384", "0.5428107", "0.54112464", "0.5409672", "0.53948355", "0.53944355", "0.53885025", "0.53869134", "0.5369059", "0.5350205", "0.53360873", "0.53275585", "0.5327337", "0.5327337", "0.53101146", "0.52889866", "0.52690595", "0.5246494", "0.52301663", "0.52269703", "0.5216341", "0.5215938", "0.5207279", "0.5200308", "0.51991946", "0.5167411", "0.5167046", "0.5150347", "0.5150062", "0.51441747", "0.5144171", "0.51403224", "0.51348644", "0.511813", "0.5116458", "0.5100226", "0.50995976", "0.50941145", "0.506275", "0.5057447", "0.5056969", "0.50542814", "0.50482047", "0.5047871", "0.5041596", "0.5039692", "0.5029664", "0.50261277", "0.5016637", "0.50137514", "0.500573", "0.5004251", "0.5002453", "0.49967796", "0.4989954", "0.49819744", "0.49802038", "0.49789187", "0.49739596", "0.497226", "0.49648434", "0.49635178", "0.49628097" ]
0.0
-1
Creates an empty SignalCanvas
public SignalCanvas() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DummyCanvas() {\n super(null);\n // super(null); ----------------ADDED TO COMPILE -----------------------------------------\n }", "private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}", "public SignalCanvas(DiscreteSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public static vtkCanvas createDummyCanvas(vtkActor actor)\n\t{\n\t\tfinal vtkCanvas canvas = new vtkCanvas()\n\t\t{\n\n\t\t\t/** Workaround for http://www.vtk.org/Bug/view.php?id=6268 */\n\t\t\t@Override\n\t\t\tpublic void setSize(int x, int y)\n\t\t\t{\n\t\t\t\tsuper.setSize(x, y);\n\t\t\t\tLock();\n\t\t\t\trw.SetSize(x, y);\n\t\t\t\tiren.SetSize(x, y);\n\t\t\t\tiren.ConfigureEvent();\n\t\t\t\tUnLock();\n\t\t\t}\n\t\t};\n\t\t// a renderer for the data\n\t\tfinal vtkRenderer ren1 = canvas.GetRenderer();\n\n\t\tren1.AddActor(actor);\n\t\t// background color white\n\t\tren1.SetBackground(1, 1, 1);\n\t\t// Make the canvas resizable with a splitter\n\t\t//layout\n\t\tcanvas.setMinimumSize(new Dimension(0, 0));\n\t\tcanvas.setPreferredSize(new Dimension(0, 0));\n\t\tren1.ResetCamera();\n\t\treturn canvas;\n\t}", "public ImageCanvas() {\r\n super();\r\n }", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(ComplexSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public Canvas(){\r\n\t\tsuper(new FlowLayout());\r\n\t\tthis.setPreferredSize(new Dimension(400, 400));\r\n\t\tthis.setBackground(Color.WHITE);\r\n\t}", "private synchronized void clearCanvasAndChart() {\n this.getLiveContext().clearRect(0, 0, this.getLiveCanvas().getWidth(), this.getLiveCanvas().getHeight());\n this.getxSeries().getData().clear();\n this.getySeries().getData().clear();\n }", "public CanvasPanel( )\n {\n // make this canvas panel listen to mouse\n addMouseListener(new PointListener());\n addMouseMotionListener(new PointListener());\n\n setBackground(Color.BLACK);\n }", "public void clearCanvas() {\n \tgc.setFill(Color.BLACK);\r\n //\tSystem.out.println(xCanvasSize+\" \"+ yCanvasSize);\r\n\t\tgc.fillRect(0, 0, xCanvasSize, yCanvasSize);}", "public Canvas(MainWindow main){\n super();\n this.setBounds(0, 0, Const.WINDOW_SIZE, Const.WINDOW_SIZE); //Seta o tamanho do canvas\n this.init(); //Chama as threads\n }", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public void clearCanvas() {\n bitmap = Bitmap.createBitmap(display.getWidth(), display.getHeight(), Bitmap.Config.ARGB_4444);\n canvas.setBitmap(bitmap);\n mCurrentPathIndex = 0;\n invalidate();\n if (mListener != null) {\n mListener.pathCancelled();\n }\n }", "@Override\n protected void initializeCanvas(final Composite canvasComposite) {\n _plot = new Plot(canvasComposite, initializeModelSpace(), PlotScrolling.NONE);\n\n // Get the various plot components that will be used.\n // TODO: improve the plot API so this is simpler.\n IModelSpaceCanvas canvas = _plot.getModelSpaceCanvas();\n\n RGB colorForeground = new RGB(0, 0, 0);\n RGB colorBackground = new RGB(255, 255, 255);\n\n // Set the background color and grid line properties.\n canvas.setBackgroundColor(colorBackground);\n canvas.setVerticalAxisGridLineProperties(LineStyle.SOLID, colorForeground, 1);\n canvas.setHorizontalAxisGridLineProperties(LineStyle.NONE, colorForeground, 0);\n _plot.setVerticalAxisGridLineDensity(20);\n _plot.setVerticalAxisAnnotationDensity(10);\n\n // Set the formatter for x-coordinates.\n NumberFormat cursorFormatter = NumberFormat.getIntegerInstance();\n _plot.setCursorFormatterX(cursorFormatter);\n\n // Initialize the canvas layout model (label margins, etc).\n CanvasLayoutModel layoutModel = _plot.getCanvasLayoutModel();\n // Hide the top and right axes to save screen space.\n layoutModel.setTopAxisHeight(50);\n layoutModel.setTopLabelHeight(0);\n layoutModel.setBottomLabelHeight(0);\n layoutModel.setBottomAxisHeight(0);\n layoutModel.setRightAxisWidth(0);\n layoutModel.setRightLabelWidth(0);\n _plot.updateCanvasLayout(layoutModel);\n }", "DrawingCanvas() {\n super();\n\n // ArrayList to hold all shape objects\n shapes = new ArrayList<>();\n\n // ArrayList to hold all point objects\n points = new ArrayList<>();\n\n // Initialize colour arrays\n lineColours = new ArrayList<>();\n fillColours = new ArrayList<>();\n\n lineColours.add(Color.black);\n fillColours.add(null);\n\n clickStatus = true;\n activeTool = 1;\n this.addMouseListener(this);\n this.addMouseMotionListener(new MouseMotionAdapter() {\n public void mouseDragged(MouseEvent e) {\n endDrag = new Point(e.getX(), e.getY());\n repaint();\n }\n });\n\n // Initialize the WriteVec object, so it can be written to\n writeFile = new WriteVec();\n\n // Initialize the ShapeCreator object\n newShape = new ShapeCreator();\n\n // Set colours\n currentFillColour = null;\n currentPenColour = Color.BLACK;\n }", "public WaveView() {\n initComponents();\n }", "void clearCanvasAndDraw()\n {\n \tlauncher.clearRect(0, 0, launcherCanvas.getWidth(), launcherCanvas.getHeight());\n \tdrawLauncher(angle);\n \tcanvas.clearRect(0, 0, mainCanvas.getWidth(), mainCanvas.getHeight());\n \tdrawSky();\n \tdrawGrass();\n }", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "public GraphView() {\r\n graphModel = new GraphModel();\r\n graphModel.setNoOfChannels(0);\r\n graphModel.setXLength(1);\r\n initializeGraph();\r\n add(chartPanel);\r\n setVisible(true);\r\n }", "public Plot() {\r\n }", "public PlotDrawer() {\n\n\t}", "public FacePamphletCanvas() {\n\t}", "public BufferVisualization() {\n initComponents();\n }", "private void clearCanvas() {\n updateImageSize(mScale);\n }", "public Canvas() {\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "public void clear(){\r\n canvas.getGraphicsContext2D().clearRect(canvas.getWidth(),canvas.getHeight(),1,1);\r\n pane.getChildren().clear();\r\n }", "public void init() {\n this.addMouseListener(new MouseAdapter() {\n public void mousePressed(MouseEvent e) {\n last_x = e.getX();\n last_y = e.getY();\n }\n });\n\n // Define, instantiate and register a MouseMotionListener object\n this.addMouseMotionListener(new MouseMotionAdapter() {\n public void mouseDragged(MouseEvent e) {\n Graphics g = getGraphics();\n int x = e.getX(), y = e.getY();\n g.setColor(Color.black);\n g.drawLine(last_x, last_y, x, y);\n last_x = x; last_y = y;\n }\n });\n\n // Create a clear button\n Button b = new Button(\"Clear\");\n // Define, instantiate, and register a listener to handle button presses\n b.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) { // clear the scribble\n Graphics g = getGraphics();\n g.setColor(getBackground());\n g.fillRect(0, 0, getSize().width, getSize().height);\n }\n });\n // And add the button to the applet\n this.add(b);\n }", "public TestPlotter() {\n\t\tplot = new Plot2D(title, xLabel, yLabel, true);\n\t\tplot.addChartMouseListener(new PlotListener());\n\t\tplot.addDismissListener(new AL());\n\t\tplot.setDefaultCloseOperation(plotter.EXIT_ON_CLOSE);\n\t\t\n\t}", "private void createGraph() {\r\n graph = new Graph(SHELL, SWT.NONE);\r\n\r\n final GridData gridData = new GridData();\r\n gridData.horizontalAlignment = GridData.FILL;\r\n gridData.verticalAlignment = GridData.FILL;\r\n gridData.grabExcessHorizontalSpace = true;\r\n gridData.grabExcessVerticalSpace = true;\r\n gridData.heightHint = DEFAULT_GRAPH_SIZE;\r\n gridData.widthHint = DEFAULT_GRAPH_SIZE;\r\n graph.setLayoutData(gridData);\r\n }", "public CanvasElement(int width, int height, WatchViewStub stub){\n this.width = width;\n this.height = height;\n this.stub = stub;\n paint = new Paint();\n fillStyle = \"rgb(0,0,0)\";\n parseColors(fillStyle);\n\n lastX = 0;\n lastY = 0;\n\n bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n canvas = new Canvas(bitmap);\n canvas.drawColor(0xffffffff);\n\n }", "public Canvas (Dimension size) {\r\n // set size (a bit of a pain)\r\n setPreferredSize(size);\r\n setSize(size);\r\n // prepare to receive input\r\n setFocusable(true);\r\n requestFocus();\r\n setInputListeners();\r\n }", "private void createDisplay()\n {\n // Creates frame based off of the parameters passed in Display constructor\n frame = new JFrame(title); \n frame.setSize(width, height);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false); \n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n // Creates the canvas that is drawn on\n canvas = new Canvas();\n canvas.setPreferredSize(new Dimension(width,height));\n canvas.setMaximumSize(new Dimension(width,height));\n canvas.setMinimumSize(new Dimension(width,height));\n canvas.setFocusable(false);\n //add the canvas to the window\n frame.add(canvas);\n //pack the window (kinda like sealing it off)\n frame.pack();\n }", "void createDummyPbufferSurface();", "private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }", "public GateCanvas(int type_param)\n {\n super();\n // setBackgroundColor( );\n type = type_param;\n inverted = false;\n // setSize(24, 24);\n setVisible(true);\n }", "public Builder clearSignal() {\n bitField0_ = (bitField0_ & ~0x00020000);\n signal_ = getDefaultInstance().getSignal();\n onChanged();\n return this;\n }", "private Canvas createCanvas(IFramework framework, MouseListener listener) {\r\n\tCanvas canvas = new Canvas(framework);\r\n\tcanvas.setBackground(Color.white);\r\n\tcanvas.addMouseListener(listener);\r\n\treturn canvas;\r\n }", "Sketch createSketch();", "@Override\n public void run() {\n signalPanel.clearChart();\n }", "public void drawCanvas() {\n \n // Change the background color to match the state of the plotter\n if( plotter != null ) {\n int state = plotter.getState();\n switch(state) {\n case 0:\n background(33, 134, 248, 100);\n break;\n case 1:\n background(254, 26, 26, 100);\n break;\n case 2:\n background(28, 247, 12, 100);\n break;\n default:\n background(100);\n }\n } else {\n background(100);\n }\n\n // Draw the canvas rectangle\n translate(SCREEN_PADDING, SCREEN_PADDING);\n scale(screenScale * plotterScale);\n fill(255); \n rect(0, 0, MAX_PLOTTER_X, MAX_PLOTTER_Y);\n \n // Draw the grid\n if(DRAW_GRID) {\n stroke(210);\n int cols = MAX_PLOTTER_X / 100;\n int rows = MAX_PLOTTER_Y / 100;\n \n for(int i=0; i<cols; i++)\n line(i*100, 0, i*100, MAX_PLOTTER_Y);\n \n for(int i=0; i<rows; i++)\n line(0, i*100, MAX_PLOTTER_X, i*100);\n }\n \n // Draw the homing crosshairs\n strokeWeight(1);\n stroke(150);\n line(MAX_PLOTTER_X/2, 0, MAX_PLOTTER_X/2, MAX_PLOTTER_Y);\n line(0, MAX_PLOTTER_Y/2, MAX_PLOTTER_X, MAX_PLOTTER_Y/2);\n\n translate(dx, dy); \n \n // Draw the bounding box of the current shape\n if(DRAW_BOUNDING_BOX) {\n // Bounding box\n RPoint bounds[] = shape.getBoundsPoints();\n strokeWeight(5);\n stroke(255,0,0);\n line( bounds[0].x, bounds[0].y, bounds[1].x, bounds[1].y );\n line( bounds[1].x, bounds[1].y, bounds[2].x, bounds[2].y );\n line( bounds[2].x, bounds[2].y, bounds[3].x, bounds[3].y );\n line( bounds[3].x, bounds[3].y, bounds[0].x, bounds[0].y );\n \n // Center cross hairs\n RPoint center = shape.getCenter();\n line( center.x, bounds[0].y, center.x, bounds[0].y - 200 );\n line( center.x, bounds[3].y, center.x, bounds[3].y + 200 );\n line( bounds[0].x, center.y, bounds[0].x - 200, center.y );\n line( bounds[1].x, center.y, bounds[1].x + 200, center.y );\n }\n \n // Draw the SVG content\n strokeWeight(STROKE_WEIGHT);\n stroke(0);\n drawShape(shape);\n }", "public BroadcastDrawer( String s ){\r\n\t\tsuper(s);\r\n\t\tsetResizable(true);\r\n\t\tsetBounds( 0, 0, WIDTH, HEIGHT);\r\n\t\ttheCanvas = new QTCanvas (QTCanvas.kFreeResize, 0.5F, 0.5F);\r\n\t\t\r\n\t\t/* creating and intializing AWT components */\r\n\t\tsetLayout( new BorderLayout() );\r\n\t\tadd (theCanvas, \"Center\");\r\n\t\tstartBtn = new Button (\"Start Broadcast\");\r\n\t\tButtonListener listener = new ButtonListener();\r\n\t\tstartBtn.addActionListener (listener);\r\n\t\tPanel statusPanel = new Panel();\r\n\t\tadd (statusPanel, \"South\");\r\n\t\tstatusPanel.add( startBtn );\r\n\t\tstatusPanel.setBackground( Color.lightGray );\r\n\t\tLabel timeBaseLabel = new Label( \"Time base:\" );\r\n\t\ttimeBaseLabel.setLocation( 10, 10 );\r\n\t\tLabel rateLabel = new Label(\"Data rate:\" );\r\n\t\trateLabel.setLocation( 10, 50 );\r\n\t\tcurrTimeLabel = new Label( \"00:00:00.00 \" );\r\n\t\tcurrTimeLabel.setLocation( 80, 10 );\r\n\t\tcurrRateLabel = new Label(\"0 \");\r\n\t\tcurrRateLabel.setLocation( 80, 50 );\r\n\t\tstatusPanel.add(timeBaseLabel);\r\n\t\tstatusPanel.add(currTimeLabel);\r\n\t\tstatusPanel.add(rateLabel);\r\n\t\tstatusPanel.add(currRateLabel);\r\n\r\n\t\taddWindowListener( new WindowAdapter() \t//\thandle quit when user closes main window\r\n {\r\n public void windowClosing( WindowEvent we )\r\n {\r\n \tstopBroadcast();\t\t\r\n QTSession.close();\t\t\r\n dispose();\t\t\t\t\t\r\n }\r\n public void windowClosed( WindowEvent we )\r\n {\r\n System.exit( 0 );\t\t\r\n }\r\n });\r\n\t}", "public DrawingPane() {\n this.setBorder(new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT)));\n this.setStyle(\"-fx-background-color : white\");\n\n color = new ObjectPropertyBase<Color>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Color\";\n }\n };\n\n thickness = new ObjectPropertyBase<Integer>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Thickness\";\n }\n };\n\n modifiable = new BooleanPropertyBase(true) {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Modifiability\";\n }\n };\n\n lastLine = new ObjectPropertyBase<DrawingInfos>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Last Line\";\n }\n };\n\n this.canvas = new Canvas();\n this.context = canvas.getGraphicsContext2D();\n this.drawingInfos = new DrawingInfos();\n this.lastLine.setValue(new DrawingInfos());\n this.lastLineList = new DrawingInfos();\n\n getChildren().add(canvas);\n initialize();\n }", "public Visualizador() {\n initComponents();\n inicializar();\n }", "public ColourBinPanel(CameraCanvas canvas)\r\n\t{\r\n\t\tmCameraCanvas = canvas;\r\n\t\tmBinSet = new FeatureWidgetRadioManager();\r\n\t}", "public MenuCanvas() {\n\n //CR 14694\n imageDisplay = new ImageDisplay();\n iCaptureImage = new CaptureImageAudio(this);\n iImageMenu = new CustomMenu(this);\n\n //#if KEYPAD\n //|JG|iKeyHandler = ObjectBuilderFactory.getKeyHandler();\n //|JG|iKeyHandler.setCanvasHandler(this);\n //#endif\n iCustomPopup = new CustomPopup(this);\n iMenu = new CustomMenu(this);\n \n bannerHandler = new CustomBanner(this);\n textboxSize = (short)(8 + CustomCanvas.font.getHeight());\n }", "private void createChart() {\n\t\tchartSpace = CTChartSpace.Factory.newInstance();\n\t\tchart = chartSpace.addNewChart();\n\t\tCTPlotArea plotArea = chart.addNewPlotArea();\n\n\t\tplotArea.addNewLayout();\n\t\tchart.addNewPlotVisOnly().setVal(true);\n\n\t\tCTPrintSettings printSettings = chartSpace.addNewPrintSettings();\n\t\tprintSettings.addNewHeaderFooter();\n\n\t\tCTPageMargins pageMargins = printSettings.addNewPageMargins();\n\t\tpageMargins.setB(0.75);\n\t\tpageMargins.setL(0.70);\n\t\tpageMargins.setR(0.70);\n\t\tpageMargins.setT(0.75);\n\t\tpageMargins.setHeader(0.30);\n\t\tpageMargins.setFooter(0.30);\n\t\tprintSettings.addNewPageSetup();\n\t}", "static void ClearDraw() {\n\t\tshape = new GeneralPath();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\n\t}", "public void clearCanvas() {\n\n path_draw.reset();\n\n invalidate();\n\n }", "public Screen() {\r\n \r\n frame = new JFrame(\"Transmission\");\r\n frame.setSize(screen);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setResizable(false);\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n \r\n panel = new Canvas();\r\n panel.setPreferredSize(screen);\r\n panel.setMaximumSize(screen);\r\n panel.setMinimumSize(screen);\r\n panel.setFocusable(false);\r\n \r\n frame.add(panel);\r\n frame.pack();\r\n }", "public Graph() {\n\t\tthis(new PApplet());\n\t}", "private void setUp()\n {\n path = new Path();\n drawPaint = new Paint();\n brushSize = getResources().getInteger(R.integer.medium_size);\n lastBrushSize = brushSize;\n //initialize paint color\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n //initialize canvas background\n canvasPaint = new Paint(Paint.DITHER_FLAG);\n }", "private static void clearCanvas(Canvas canvas) {\r\n canvas.getGraphicsContext2D().clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n }", "public JXGraph() {\r\n this(0.0, 0.0, -1.0, 1.0, -1.0, 1.0, 0.2, 4, 0.2, 4);\r\n }", "public void clear() { drawData.clear(); }", "public SkinnedMeshCanvas(Display d) \r\n {\r\n super(true); // call base class constructor\r\n mDisplay = d; // store display object\r\n }", "public PaintBucketTool() {\n color = Color.black;\n registerObservers();\n }", "public void clear()\n\t{\n\t\tsignCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);\n\t\tpath.reset();\n\t\tinvalidate();\n\t}", "public PenSample() {\n\t\tthis.x = 0.0d;\n\t\tthis.y = 0.0d;\n\t\tthis.force = 0;\n\t\tthis.timestamp = 0l; // EPOCH ?\n\t}", "public GraphPanel4KochCurve() {\n initComponents();\n }", "public SpectrumPanel() {\n super() ;\n super.setDoubleBuffered( true ) ;\n super.setBackground( Color.RED ) ;\n super.setPreferredSize( new Dimension( 1, 7 ) ) ;\n }", "public void newDrawing()\n {\n //clear the current canvas\n canvas.drawColor(0, PorterDuff.Mode.CLEAR);\n //reprint the screen\n invalidate();\n }", "private Chart(){}", "public Comets()\n {\n \n draw();\n }", "public ICanvas getDefaultCanvas() {\n\t\tif (defaultCanvas==null) {\n\t\t\ttry {\n\t\t\t\tdefaultCanvas = (ICanvas) getObjectInstance(\"com.console.springernature.paint.model.Canvas\");\n\t\t\t\tif (defaultCanvas!=null) {\n\t\t\t\t\tif (defaultDevice==null) {\n\t\t\t\t\t\tthis.getDefaultDevice();\n\t\t\t\t\t}\n\t\t\t\t\tif (defaultDevice!=null) {\n\t\t\t\t\t\tthis.getDefaultDevice();\n\t\t\t\t\t\tdefaultCanvas.assignDevice(defaultDevice);\n\t\t\t\t\t\tdefaultDevice.addCommandListener(defaultCanvas);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlogger.warn(\"(Custom Event) Unable to associate the default device ...\");\n\t\t\t\t\t\tdefaultCanvas = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the default canvas ...\", e);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the default canvas ...\", e);\n\t\t\t}\n\t\t}\n\t\treturn defaultCanvas;\n\t}", "private static void setupWindow() {\n window.setSize((2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n window.add(canvas);\n window.setVisible(true);\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n canvas.createBufferStrategy(2);\n }", "public CreateLineCanvas(CanvasApp canvasApp) {\n\t\tthis.cmdAppliedCanvas=canvasApp;\n\t}", "public Canvas canvas() {\n Canvas canvas = new Canvas(getLowerBound(), getUpperBound());\n canvas.add(this);\n return canvas;\n }", "public samJGraph()\n {\n super(new GraphPane( new GraphModel(), new samGraphController() ) );\n }", "protected Plot() {\r\n }", "public CanvasPanel() {\n\t \t\taddMouseListener(this);\n\t \t\taddMouseMotionListener(this);\n\t }", "public GraphicsFactory() {\n\t\tsuper();\n\t}", "void clearButton_actionPerformed(ActionEvent e) {\n clearPlot(true);\n }", "public DrawingModelImpl() {\r\n objects = new ArrayList<>();\r\n listeners = new ArrayList<>();\r\n }", "public EpsCanvas(GraphicsConfiguration gc) {\n\t\tsuper(gc);\n\t\tepsGraphics = new EpsGraphics2D();\n\t}", "public NoCanvasException(String message) {\n super(message);\n }", "public Oscilloscope(Main tempMain) {\r\n\r\n lowerFixes.add(\"m\");\r\n lowerFixes.add(\"mn\");\r\n lowerFixes.add(\"n\");\r\n lowerFixes.add(\"p\");\r\n\r\n higherFixes.add(\"K\");\r\n higherFixes.add(\"M\");\r\n higherFixes.add(\"G\");\r\n higherFixes.add(\"T\");\r\n\r\n\r\n\r\n //store the reference to main\r\n main=tempMain;\r\n\r\n //then we can add the canvas and graphics for displaying the wave\r\n canvas = new Canvas(canvasSizeXY, canvasSizeXY);\r\n gc = canvas.getGraphicsContext2D();\r\n this.setCenter(canvas);//and display that at the center of the pane\r\n\r\n //make the buttons\r\n\r\n\r\n\r\n\r\n\r\n TitledPane controlsPane = new TitledPane(\"Controls\" , makeControlsPane());\r\n TitledPane divisionsPane = new TitledPane(\"Divisions\" , makeDivisionsPane());\r\n TitledPane triggerPane = new TitledPane(\"Trigger\",makeTriggerPane());\r\n // TitledPane mathematicalWavePane = new TitledPane(\"Mathematical Wave\" , makeMathematicalWavePane());\r\n TitledPane displayPane = new TitledPane(\"Display\" , makeDisplayPane());\r\n TitledPane cursorPane = new TitledPane(\"Cursors\" , makeCursorPane());\r\n\r\n controlsPane.maxWidth(2000);\r\n\r\n\r\n ScrollPane sp=new ScrollPane();\r\n\r\n sp.maxWidth(2000);\r\n\r\n //We add these buttons to a horizontal layout box\r\n VBox Panes = new VBox();\r\n Panes.getChildren().addAll(controlsPane,divisionsPane,triggerPane,displayPane,cursorPane);\r\n Panes.setMaxWidth(2000);\r\n sp.setContent(Panes);\r\n //and add then add this boc to the boarder pane\r\n this.setRight(sp);\r\n\r\n\r\n\r\n //new we will add info for each wave\r\n VBox tempStrings = new VBox(MeasurementFrequency,MeasurementMin,MeasurementMax,MeasurementPeakToPeak,MeasurementRMS);\r\n this.setBottom(tempStrings);\r\n wave1=new ArrayList<>();\r\n wave1.add(0f);\r\n displayAllWaves();\r\n }", "public GraphicLayer() {\r\n super();\r\n }", "public Paint() {\n shapes = new ArrayList<>();\n }", "public void show() {\n\t\tJFrame frame = new JFrame(\"Canvas\");\r\n\r\n\t\tContainer content = frame.getContentPane();\r\n\t\t// set layout on content pane\r\n\t\tcontent.setLayout(new BorderLayout());\r\n\t\t// create draw area\r\n\t\tcanvas = new Canvas(dos, dis);\r\n\t\t\r\n\t\t\r\n\t\t// add to content pane\r\n\t\tcontent.add(canvas, BorderLayout.CENTER);\r\n\t\tJPanel controls = new JPanel();\r\n\t\tframe.addComponentListener(new ComponentListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t/*\tSystem.out.println(\"Frame size : \" + frame.getSize());\r\n\t\t\t\tSystem.out.println(\"Canvas size : \" + canvas.getSize());\r\n\t\t\t\tSystem.out.println(\"Control panel size : \" + controls.getSize());\r\n\t\t\t\tcanvas.validate();*/\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentShown(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t// create controls to apply colors and call clear feature\r\n\t\t/*JPanel controls = new JPanel();*/\r\n\r\n\t\tclearBtn.addActionListener(actionListener);\r\n\t\tblackBtn.addActionListener(actionListener);\r\n\t\tblueBtn.addActionListener(actionListener);\r\n\t\tgreenBtn.addActionListener(actionListener);\r\n\t\tredBtn.addActionListener(actionListener);\r\n\t\tmagentaBtn.addActionListener(actionListener);\r\n\t\tyellowBtn.addActionListener(actionListener);\r\n\r\n\t\t// add to panel\r\n\t\tcontrols.add(greenBtn);\r\n\t\tcontrols.add(blueBtn);\r\n\t\tcontrols.add(blackBtn);\r\n\t\tcontrols.add(redBtn);\r\n\t\tcontrols.add(magentaBtn);\r\n\t\tcontrols.add(yellowBtn);\r\n\t\tcontrols.add(clearBtn);\r\n\r\n\t\t// add to content pane\r\n\t\tcontent.add(controls, BorderLayout.NORTH);\r\n\r\n\t\tframe.setSize(600, 600);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t// show the swing paint result\r\n\t\tframe.setVisible(true);\r\n\t}", "@Override\n public void initialize() {\n double left = getBorder().getStrokes().get(0).getWidths().getLeft();\n canvas.widthProperty().bind(widthProperty().subtract(left * 2));\n canvas.heightProperty().bind(heightProperty().subtract(left * 2));\n canvas.setTranslateX(left);\n canvas.setTranslateY(left);\n\n // init properties value\n color.set(Color.BLUE);\n thickness.set(5);\n\n // addind mouse handlers\n canvas.setOnMousePressed(e -> {\n lastLineList.clear();\n handleMouseEvent(e);\n });\n canvas.setOnMouseDragged(e -> handleMouseEvent(e));\n canvas.setOnMouseReleased(e -> {\n handleMouseEvent(e);\n lastLine.setValue(new DrawingInfos(lastLineList));\n });\n }", "public Visualize() {\n initComponents();\n \n }", "@Override\r\n public void initialiseEmptyPanel()\r\n {\r\n gaugeName = Helpers.createLabel(\"Default\");\r\n \r\n gauge = new Radial();\r\n \r\n gauge.setPreferredSize(new Dimension(300,300));\r\n setTitle(\"Default\");\r\n add(gaugeName);\r\n add(gauge);\r\n \r\n }", "public VisualizerView(Context context, AttributeSet attrs, int defStyle)\n {\n super(context, attrs);\n init();\n }", "public LineChart() {\n init();\n }", "public void clear()\n\t{\n\t\tgetGraphics().clearRect(0, 0, canvasWidth, canvasHeight);\n\t}", "public StreamRecorderDisplay() {\n initialize();\n }", "public Kal()\n {\n setDefaultCloseOperation( EXIT_ON_CLOSE );\n \n setLayout( new FlowLayout() );\n \n allTheShapes = new Shape[1000];\n \n boxButton = new JButton(\"box\");\n add(boxButton);\n boxButton.addActionListener(this);\n \n addMouseListener(this);\n addMouseMotionListener(this);\n \n setSize( 500,500);\n setVisible( true);\n \n theColorPicker = new ColorPicker3();\n \n }", "public LaserCanvas()\r\n\t{\r\n\t\tsuper();\r\n\t\t\r\n\t\tgame = new LaserTutor();\r\n\t\t\r\n\t\tgame.initialize( );\r\n\t}", "public eSketchView(Context context, AttributeSet attrs) {\n super(context, attrs); // pass context to View's constructor\n\n mPaintScreen = new Paint();\n\n mPaintLine = new Paint();\n mPaintLine.setAntiAlias(true); // anti-alias smooths edges\n // set defaults for color, width, solid, rounded line.\n mPaintLine.setColor(Color.BLACK);\n mPaintLine.setStyle(Paint.Style.STROKE);\n mPaintLine.setStrokeWidth(5);\n mPaintLine.setStrokeCap(Paint.Cap.ROUND);\n }", "private void setupDrawing(){\n brushSize = 1;\n lastBrushSize = brushSize;\n drawPath = new Path();\n drawPaint = new Paint();\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n canvasPaint = new Paint(Paint.DITHER_FLAG);\n }", "private void drawNone(){\n drawAbstract(R.color.white);\n }", "public void clear() {\r\n\t\t// Find the last Style commands\r\n\t\tColorCommand lastColorCommand = null;\r\n\t\tLineWidthCommand lastLineWidthCommand = null;\r\n\t\tfor (int i = 0; i < this.commands.size(); i++) {\r\n\t\t\tif (this.commands.get(i) instanceof ColorCommand) {\r\n\t\t\t\tlastColorCommand = (ColorCommand) this.commands.get(i);\r\n\t\t\t}\r\n\t\t\telse if (this.commands.get(i) instanceof LineWidthCommand) {\r\n\t\t\t\tlastLineWidthCommand = (LineWidthCommand) this.commands.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Clear the canvas\r\n\t\tthis.commands.clear();\r\n\t\t\r\n\t\t// Add back last commands\r\n\t\tif (lastColorCommand != null) {\r\n\t\t\tthis.addDrawingCommand(lastColorCommand);\r\n\t\t}\r\n\t\tif (lastLineWidthCommand != null) {\r\n\t\t\tthis.addDrawingCommand(lastLineWidthCommand);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Notify\r\n\t\tthis.setChanged();\r\n\t\tthis.notifyObservers();\r\n\t}", "@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}", "public Builder clearSig() {\n if (sigBuilder_ == null) {\n sig_ = null;\n onChanged();\n } else {\n sig_ = null;\n sigBuilder_ = null;\n }\n\n return this;\n }", "public DrawCanvas(DrawConsoleUI drawConsole) {\n /*Call the super constructor and set the background colour*/\n super();\n this.setBackground(Color.white);\n\n /*Set the size of this component*/\n this.setPreferredSize(new Dimension(970,800));\n\n /*Enable autoscroll for this panel, when there is a need to\n update component's view*/\n this.setAutoscrolls(true);\n\n /*Construct a list that will hold the shapes*/\n //shapesBuffer = Collections.synchronizedList(new ArrayList());\n labelBuffer = Collections.synchronizedList(new ArrayList());\n\n /*Hold a reference to the DrawConsoleUI class*/\n drawConsoleUI = drawConsole;\n\n \n /***\n * Register Listeners to the canvas\n */\n\n /*Mouse move*/\n this.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n //panelMouseMoved(evt);\n }//end mouse motion moved\n\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n try {\n panelMouseDragged(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end mouse motion Dragged\n });\n\n /*Mouse Clicked*/\n this.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n try {\n panelMouseClicked(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Pressed*/\n public void mousePressed(java.awt.event.MouseEvent evt) {\n try {\n panelMousePressed(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Released*/\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n try {\n panelMouseReleased(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n });\n\n\n }", "public Image() {\n\t\t\tthis(Color.white, 0);\n\t\t}", "public Builder clearXAxisCharacteristicIdNull() {\n \n xAxisCharacteristicIdNull_ = false;\n onChanged();\n return this;\n }", "public Builder clearFigure() {\n if (figureBuilder_ == null) {\n figure_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n figureBuilder_.clear();\n }\n return this;\n }" ]
[ "0.6394215", "0.6168345", "0.6120439", "0.6115736", "0.6090836", "0.60606873", "0.60246384", "0.59174615", "0.57534385", "0.5714147", "0.5687733", "0.56735426", "0.55741", "0.55404425", "0.5537213", "0.5511852", "0.55009925", "0.5485765", "0.5448705", "0.5444045", "0.5441337", "0.54368806", "0.5416293", "0.5413041", "0.5407042", "0.5355949", "0.5340343", "0.53101844", "0.5308217", "0.5298049", "0.52872574", "0.5285195", "0.5280095", "0.5271489", "0.5255162", "0.5249534", "0.5247615", "0.523437", "0.51931906", "0.518555", "0.5174896", "0.51444817", "0.5134622", "0.5130932", "0.51227343", "0.51081854", "0.5106475", "0.5103097", "0.5097711", "0.50909835", "0.50833404", "0.5081188", "0.50792086", "0.5071187", "0.50680333", "0.50578433", "0.5053238", "0.50465786", "0.50305784", "0.5028464", "0.50273293", "0.50253093", "0.5023265", "0.50207305", "0.5005466", "0.5003362", "0.4998066", "0.49970117", "0.49947402", "0.49895218", "0.49855846", "0.49798727", "0.4979791", "0.4958652", "0.49455523", "0.49447417", "0.4932378", "0.49318564", "0.4923265", "0.4921363", "0.49187967", "0.49052528", "0.49015343", "0.4896792", "0.48887357", "0.4876288", "0.4874533", "0.48722336", "0.4865562", "0.4856158", "0.48492783", "0.48464087", "0.48461404", "0.48420012", "0.4840427", "0.48376346", "0.48370135", "0.48340914", "0.48338348", "0.483309" ]
0.80231315
0
Creates an SignalCanvas from a DiscreteSignal
public SignalCanvas(DiscreteSignal sig) throws BadSignalException { super(); image = getJavaSignal(sig); jsignal = sig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SignalCanvas(ComplexSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas() {\n\t\tsuper();\n\t}", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public void setSignal(double signal) {_signal = signal;}", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "private DoubleMatrix1D nextSignal() {\n int i = PersistentRandomUtil.getInstance().nextInt(data.rows());\n numSignalsGenerated++;\n return data.viewRow(i);\n }", "public Builder setSignalBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public double getSignal() {return _signal;}", "public SkinnedMeshCanvas(Display d) \r\n {\r\n super(true); // call base class constructor\r\n mDisplay = d; // store display object\r\n }", "Signal getSignal();", "public void draw(short[] samples, int threshold, int width, int height, Graphics2D g) {\n // Fill the background.\n g.setColor(MISSING_COLOR);\n g.fillRect(0, 0, width, height);\n\n // Find the bounds of the samples to draw.\n int minFrame = Integer.MAX_VALUE;\n int maxFrame = Integer.MIN_VALUE;\n for (BitData bitData : mHistory) {\n minFrame = Math.min(Math.min(bitData.getStartFrame(), bitData.getEndFrame()), minFrame);\n maxFrame = Math.max(Math.max(bitData.getStartFrame(), bitData.getEndFrame()), maxFrame);\n }\n // Show a bit past the error point.\n maxFrame = Math.min(maxFrame + 100, samples.length - 1);\n int frameWidth = maxFrame - minFrame + 1;\n\n // Draw all backgrounds.\n for (BitData bitData : mHistory) {\n // Compute the background color for this bit.\n Color backgroundColor;\n switch (bitData.getBitType()) {\n case ZERO:\n backgroundColor = ZERO_BIT_COLOR;\n break;\n\n case ONE:\n backgroundColor = ONE_BIT_COLOR;\n break;\n\n case START:\n backgroundColor = START_BIT_COLOR;\n break;\n\n default:\n case BAD:\n backgroundColor = BAD_BIT_COLOR;\n break;\n }\n\n // Map to image.\n int startX = (bitData.getStartFrame() - minFrame)*width/frameWidth;\n startX = clamp(startX, 0, width - 1);\n int endX = (bitData.getEndFrame() - minFrame)*width/frameWidth;\n endX = clamp(endX, 0, width - 1);\n\n // Draw background.\n g.setColor(backgroundColor);\n g.fillRect(startX, 0, endX - startX, height);\n }\n\n // Draw signal.\n int lastX = -1;\n int lastY = -1;\n g.setColor(LINE_COLOR);\n for (int frame = minFrame; frame < maxFrame; frame++) {\n // Draw line.\n int x = (frame - minFrame)*width/frameWidth;\n x = clamp(x, 0, width - 1);\n\n // *Must* cast to int first or -32768 won't negate properly.\n int y = -(int)samples[frame]*(height/2)/32768 + height/2;\n y = clamp(y, 0, height - 1);\n\n if (lastX != -1) {\n g.drawLine(lastX, lastY, x, y);\n }\n\n lastX = x;\n lastY = y;\n }\n\n // Draw grid.\n g.setColor(Color.GRAY);\n int y = height/2;\n g.drawLine(0, y, width - 1, y);\n if (threshold != 0) {\n y = threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n y = -threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n }\n }", "public static void main(String[] args) {\n String keyboard = \"q2we4r5ty7u8i9op-[=zxdcfvgbnjmk,;/' \";\r\n // number of strings variable\r\n int numberOfStrings = keyboard.length();\r\n GuitarString[] guitarStringsArray = new GuitarString[numberOfStrings];\r\n RingBuffer sampleBuff = new RingBuffer();\r\n \r\n StdDraw.setXscale(0, 100); // sets x scale from 0 to 100\r\n StdDraw.setYscale(-10,10); // sets y scale from -10 to 10 (y should be between -1 and 1)\r\n StdDraw.enableDoubleBuffering(); // drawing takes place on off-screen canvas\r\n \r\n int x = 0;\r\n for (int i = 0; i < numberOfStrings; i++) {\r\n double f = 440.0 * Math.pow(2, (i - 24) / 12.0);\r\n guitarStringsArray[i] = new GuitarString(f);\r\n }\r\n \r\n while (true) {\r\n double sample = 0;\r\n if (StdDraw.hasNextKeyTyped()) {\r\n char key = StdDraw.nextKeyTyped();\r\n if (keyboard.indexOf(key) != -1) {\r\n guitarStringsArray[keyboard.indexOf(key)].pluck();\r\n }\r\n }\r\n\t for (int j = 0; j < guitarStringsArray.length; j++) {\r\n\t sample += guitarStringsArray[j].sample();\r\n\t }\r\n\t //System.out.println(sample);\r\n\t // plays audio\r\n\t StdAudio.play(sample); \r\n\t // enqueues sample into buffer\r\n\t sampleBuff.enqueue(sample);\r\n\t \r\n\t // if buffer size is greater than 1\r\n\t if (sampleBuff.size() > 1) {\r\n\t \tSystem.out.println(\"x: \" + x);\r\n\t // if x == 0 clear the drawing \r\n\t if (x == 100) {\r\n\t \tx = 0;\r\n\t \tStdDraw.clear();\r\n\t }\r\n\t // draws from (x, buff.deq) to (x+1, buff.peek)\r\n\t StdDraw.line(x, sampleBuff.dequeue(), x+1, sampleBuff.peek());\r\n\t // shows and pauses the drawing \r\n\t \r\n\t StdDraw.show();\r\n\t StdDraw.pause(10);\r\n\t \r\n\t // x iterator\r\n\t x++;\r\n\t } \r\n\t \r\n\t for (int j = 0; j < guitarStringsArray.length; j++) {\r\n\t guitarStringsArray[j].tic();\r\n\t } \r\n }\r\n }", "public void getSignalCPT(Guid signalID, Vector activeSignals,\r\n Vector causalCPT, Vector causalOrder);", "public CreateDitaaChart(String d) {\n\t\tdiagram = d;\n\t}", "public void diagramChanged(Diagram diagram, int signal)\r\n\t{\r\n\t}", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public interface SignalInput extends DspObject {\r\n\t/**\r\n\t * Set the signal strength on this signal input. Normally 0.0f means 'no\r\n\t * signal', and normally the range is -1.0 until 1.0 for audio signals.\r\n\t * However, nothing prevents a signal to be outside of this range; and they\r\n\t * will often be. For example mixing multiple signals together will\r\n\t * typically lead to signals getting out of that -1.0 to 1.0 range. And a\r\n\t * signal doesn't need to be audio, but can be any kind of signal (for\r\n\t * example a signal that controls a frequency).<br/>\r\n\t * A signal should be treated as being in the range -1.0f to 1.0f for audio,\r\n\t * but can otherwise be completely arbitrary.\r\n\t * \r\n\t * @param signal\r\n\t * The signal\r\n\t */\r\n\tpublic void set(float signal);\r\n}", "public void displayWave(ArrayList<Float> wave,Color color){\r\n\r\n //find the center pixel's Y value so we know where to start drawing the wave from\r\n //this will ensure the wave is drawn where the distance to the top and the bottom of the screen is equal\r\n int CenterYPixel = canvas.heightProperty().intValue()/2;//this is int division\r\n gc.beginPath();\r\n gc.setStroke(color);\r\n gc.setLineWidth(waveThickness);\r\n\r\n\r\n\r\n if(!drawFromRisingEdge) {\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(0) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = 0; i < wave.size(); i++) {\r\n //for the x value of the lineTo function, we use canvas.widthProperty().intValue()/wave1.size()\r\n //to convert the wave index number to pixels such that it fills the entire width of the canvas\r\n //for the y value, we start from the center CenterYPixel, and then add the value of the wave\r\n //(0,0) of the canvas is top left, so a high y value is lower, so we use the - to flip the wave\r\n //we then scale this by the voltageMultiplier for our user defined divisions\r\n //and lastly scale by pixelsPerDivision so convert the voltage into pixel values (1V is pixelsPerDivision pixels from the center line)\r\n float xPos = (int) (pixelsPerSample * i);\r\n // System.out.println(\"XVal:\"+xPos+\" pix per sample \"+pixelsPerSample);\r\n // gc.lineTo(i * canvas.widthProperty().intValue() / wave.size(), CenterYPixel + Math.round(-wave.get(i) * voltageMultiplier * pixelsPerDivision));\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n }else{\r\n int risingIndex = findRisingEdgeIndex();\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(risingIndex) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = risingIndex; i < wave.size(); i++) {\r\n\r\n float xPos = (int) (pixelsPerSample * (i-risingIndex));\r\n\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n\r\n }\r\n gc.stroke();\r\n }", "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException,\n\t\t\tRuntimeException {\n\n\t\t// int w = 0;\n\t\t// int h = 0;\n\t\tjava.awt.Image jsig = null;\n\n\t\tif (sig instanceof DiscreteSignal) {\n\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\n\t\t\tDiscreteSignal nsig = SignalConverter.toDiscrete(sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif ((short) nsig.get(x) > max)\n\t\t\t\t\tmax = (short) nsig.get(x);\n\t\t\t\tif ((short) nsig.get(x) < min)\n\t\t\t\t\tmin = (short) nsig.get(x);\n\n\t\t\t}\n\n\t\t\tshort[][] new_data = new short[max][nsig.length()];\n\t\t\tGrayImage gimage = new GrayImage(nsig.length(), max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++)\n\t\t\t\t// FIXME: put braces on this for\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, new_data[y][x]);\n\t\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\t\t} else {\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tRealSignal nsig = SignalConverter.toReal((Signal) sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif (nsig.get(x) > max)\n\t\t\t\t\tmax = nsig.get(x);\n\t\t\t\tif (nsig.get(x) < min)\n\t\t\t\t\tmin = nsig.get(x);\n\t\t\t}\n\n\t\t\tfloat[][] new_data = new float[(int) max][nsig.length()];\n\t\t\tRealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\t// try{\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, (int) new_data[y][x]);\n\t\t\t\t\t// }catch (Exception e)\n\t\t\t\t\t// {System.out.println(x+\" uh oh \"+y);}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\n\t\t}\n\n\t}", "@Override\n BackgroundLineChart generateLineChart() {\n\n final BackgroundLineChart lineChart;\n final NumberAxis xAxis = new NumberAxis();\n xAxis.setLabel(\"Time\");\n\n List<XYChart.Series<Number, Number>> seriesList = FXCollections.observableArrayList();\n\n for (DataPoint.Type type : DataPoint.Types.values()) {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(type.getName());\n seriesList.add(series);\n this.getSeriesMap().put(type, series);\n }\n\n lineChart = new BackgroundLineChart(this.captureSession, xAxis, new NumberAxis(), FXCollections.observableArrayList(seriesList));\n\n //@Source - https://stackoverflow.com/a/44957354 - Enables Toggle of Data Series by clicking on their icon in the legend\n for (Node n : lineChart.getChildrenUnmodifiable()) {\n if (n instanceof Legend) {\n Legend l = (Legend) n;\n for (Legend.LegendItem li : l.getItems()) {\n for (XYChart.Series<Number, Number> s : lineChart.getData()) {\n if (s.getName().equals(li.getText())) {\n li.getSymbol().setCursor(Cursor.HAND); // Hint user that legend symbol is clickable\n li.setText(li.getText() + \" On\");\n li.getSymbol().setOnMouseClicked(me -> {\n if (me.getButton() == MouseButton.PRIMARY) {\n s.getNode().setVisible(!s.getNode().isVisible()); // Toggle visibility of line\n\n String[] displayName = li.getText().split(\" \");\n li.setText(String.format(\"%s %s\", String.join(\" \", Arrays.copyOfRange(displayName, 0, displayName.length - 1)), (s.getNode().isVisible() ? \"On\" : \"Off\")));\n for (XYChart.Data<Number, Number> d : s.getData()) {\n if (d.getNode() != null) {\n d.getNode().setVisible(s.getNode().isVisible()); // Toggle visibility of every node in the series\n }\n }\n lineChart.redraw();\n }\n });\n break;\n }\n }\n }\n }\n }\n //---\n\n return lineChart;\n }", "private static JFreeChart createChart(String xaxisName) {\n JFreeChart chart = MimsChartFactory.createMimsXYLineChart(\"\", xaxisName, \"\", null, PlotOrientation.VERTICAL, true, true, false);\n chart.setBackgroundPaint(Color.white);\n // Get a reference to the plot.\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n\n // Create integer x-axis.\n plot.getDomainAxis().setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\n // Set colors.\n plot.setBackgroundPaint(Color.lightGray);\n plot.setDomainGridlinePaint(Color.white);\n plot.setRangeGridlinePaint(Color.white);\n\n // Movable range and domain.\n plot.setDomainPannable(true);\n plot.setRangePannable(true);\n\n // Allow crosshairs to 'focus' in on a given point.\n plot.setDomainCrosshairVisible(true);\n plot.setRangeCrosshairVisible(true);\n\n return chart;\n }", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "public void set(float signal);", "public Builder clearSignal() {\n bitField0_ = (bitField0_ & ~0x00020000);\n signal_ = getDefaultInstance().getSignal();\n onChanged();\n return this;\n }", "public static void showSelectSensorPlot(Context context, final ShimmerService shimmerService, final String bluetoothAddress, final XYPlot dynamicPlot){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(com.shimmerresearch.androidinstrumentdriver.R.layout.dialog_sensor_view);\n final Button buttonSetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.ButtonFilterPlotSignal);\n final Button buttonResetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.buttonResetFilterPlotSignal);\n final Button buttonDone = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.button_done);\n final EditText editTextSignalFilter = (EditText) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.editTextFilterPlotSignal);\n dialog.setCanceledOnTouchOutside(true);\n TextView title = (TextView) dialog.findViewById(android.R.id.title);\n if(title != null) {\n title.setText(\"Select Signal\");\n } else {\n Log.e(\"DialogConfigurations\", \"Title TextView is null!\");\n }\n final ListView listView = (ListView) dialog.findViewById(android.R.id.list);\n listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\n //Temporary list so we have the option of adding additional custom channels\n List<String[]> listOfChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n\n if(mAdditionalSignalsList != null && mAdditionalSignalsList.size() > 0) {\n for (String[] addSignal : mAdditionalSignalsList) {\n listOfChannels.add(addSignal); //Add the custom channel to the list of channels\n }\n }\n\n //Create a temporary list of channels to remove the filter signals while iterating through the original list of channels\n List<String[]> tempListOfChannelsWithSignalsFiltered = new ArrayList<String[]>();\n for(String[] temp : listOfChannels) {\n tempListOfChannelsWithSignalsFiltered.add(temp);\n }\n\n if(mFilteredSignalsList != null && mFilteredSignalsList.size() > 0) {\n for(String[] signalToFilter : mFilteredSignalsList) {\n for(String[] signal : listOfChannels) {\n //Check if the channel name and format (CAL/UNCAL) matches the signal to be filtered\n if(signal[1].equals(signalToFilter[1]) && signal[2].equals(signalToFilter[2])) {\n tempListOfChannelsWithSignalsFiltered.remove(signal);\n }\n }\n }\n }\n\n //Assign the filtered list back to the original list\n listOfChannels = tempListOfChannelsWithSignalsFiltered;\n\n //Join the Strings in each individual array in the list of channels in order to pass them to the ArrayAdapter\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listOfChannels.size();i++) {\n sensorList.add(joinStrings(listOfChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(context, android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n final List<String[]> listOfChannelsFinal = listOfChannels; //Final list so inner methods can access it\n\n buttonDone.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.hide();\n }\n });\n\n buttonSetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n List<String> sensorList = new ArrayList<String>();\n String plotSignaltoFilter = editTextSignalFilter.getText().toString();\n\n for (int i=listOfChannelsFinal.size()-1;i>-1;i--){\n String signal = joinStrings(listOfChannelsFinal.get(i));\n if (!signal.toLowerCase().contains(plotSignaltoFilter.toLowerCase())){\n\n listOfChannelsFinal.remove(i);\n }\n\n }\n\n for(int i=0;i<listOfChannelsFinal.size();i++) {\n sensorList.add(joinStrings(listOfChannelsFinal.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannelsFinal.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n }\n });\n\n buttonResetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n final List<String[]> listofChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listofChannels.size();i++) {\n sensorList.add(joinStrings(listofChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n //listView.setItemChecked(position, value);\n\n for (int p=0;p<listofChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listofChannels.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listofChannels.get(index));\n }\n }\n\n });\n\n\n }\n });\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n dialog.show();\n\n }", "public TSignal(TSignal other) {\n if (other.is_set_destApp()) {\n this.destApp = other.destApp;\n }\n if (other.is_set_destPellet()) {\n this.destPellet = other.destPellet;\n }\n if (other.is_set_data()) {\n this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);\n;\n }\n }", "void setSignalPeriod(double signalPeriod);", "public GraphController(GUI view){\r\n\t\tview.setGvWindowListener(new GvWindowListener(){\r\n\t\t\tpublic void buttonClicked(GraphingEvent ge){\r\n\t\t\t\tmodel = ge.getDJAI_GV();\r\n\t\t\t\tmodel.setDate(ge.getDJAI_GV().getDate());\r\n\t\t\t\tmodel.setValue(ge.getDJAI_GV().getValue());\r\n\t\t\t\tSystem.out.println(ge.getSource());\r\n\t\t\t\t\r\n\t\t\t\tData = new ArrayList<String>();\r\n\t\t\t\tData = DataSaver.dowArray_C;\r\n\t\t\t\t\r\n\t\t\t\tvalue = new double[Data.size()];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Data.size(); i++){\r\n\t\t\t\t\tvalue[i] = Double.parseDouble(Data.get(i).substring(10));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = new Stage();\r\n\t\t\t\tstage.setTitle(\"Graph Data\");\r\n\t\t\t\t\r\n\t\t\t\tfinal CategoryAxis xAxis = new CategoryAxis();\r\n\t\t\t final NumberAxis yAxis = new NumberAxis();\r\n\t\t\t xAxis.setLabel(\"Number of Month\");\r\n\t\t\t final LineChart<String, Number> lineChart = new LineChart<String, Number>(\r\n\t\t\t xAxis, yAxis);\t\t \r\n\t\t\t xAxis.setLabel(\"Date\");\r\n\t\t\t xAxis.setTickMarkVisible(false);\r\n\t\t\t \r\n\t\t\t yAxis.setLabel(\"DJAI Value\");\r\n\t\t\t yAxis.setAutoRanging(false);\r\n\t\t\t yAxis.setTickMarkVisible(false);\r\n\t\t\t yAxis.setUpperBound(20000);\r\n\t\t\t yAxis.setLowerBound(6000);\r\n\t\t\t yAxis.setTickUnit(2000);\r\n\t\t\t yAxis.setMinorTickCount(14);\r\n\t\t\t XYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\r\n\t\t\t series.setName(\"DJAI Chart \");\r\n\t\t\t\r\n\t\t\t for(int i = 0; i < Data.size(); i++){\r\n\t\t\t \tseries.getData().add(new XYChart.Data<String, Number>(Data.get(i).substring(0, 10),\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t value[i]));\r\n\t\t\t }\r\n\t\t\t lineChart.setCreateSymbols(false);\r\n\t\t\t lineChart.getData().add(series);\r\n\t\t\t\tlineChart.isResizable();\r\n\t\t\t Scene scene = new Scene(lineChart,14000,600);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t\tstage.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public void onRender(Canvas canvas, FFTData data, Rect rect)\n {\n }", "public static vtkCanvas createDummyCanvas(vtkActor actor)\n\t{\n\t\tfinal vtkCanvas canvas = new vtkCanvas()\n\t\t{\n\n\t\t\t/** Workaround for http://www.vtk.org/Bug/view.php?id=6268 */\n\t\t\t@Override\n\t\t\tpublic void setSize(int x, int y)\n\t\t\t{\n\t\t\t\tsuper.setSize(x, y);\n\t\t\t\tLock();\n\t\t\t\trw.SetSize(x, y);\n\t\t\t\tiren.SetSize(x, y);\n\t\t\t\tiren.ConfigureEvent();\n\t\t\t\tUnLock();\n\t\t\t}\n\t\t};\n\t\t// a renderer for the data\n\t\tfinal vtkRenderer ren1 = canvas.GetRenderer();\n\n\t\tren1.AddActor(actor);\n\t\t// background color white\n\t\tren1.SetBackground(1, 1, 1);\n\t\t// Make the canvas resizable with a splitter\n\t\t//layout\n\t\tcanvas.setMinimumSize(new Dimension(0, 0));\n\t\tcanvas.setPreferredSize(new Dimension(0, 0));\n\t\tren1.ResetCamera();\n\t\treturn canvas;\n\t}", "private void updateSignal() {\n getGlobals().informationSignal =\n getContext().getPrng().gaussian(0,getGlobals().volatilityInfo).sample();\n\n }", "public GraphPanel4KochCurve() {\n initComponents();\n }", "public void setSignal(java.awt.Image sig) {\n\t\timage = sig;\n\t\tjsignal = null;\n\t}", "private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}", "@Override\n protected void initializeCanvas(final Composite canvasComposite) {\n _plot = new Plot(canvasComposite, initializeModelSpace(), PlotScrolling.NONE);\n\n // Get the various plot components that will be used.\n // TODO: improve the plot API so this is simpler.\n IModelSpaceCanvas canvas = _plot.getModelSpaceCanvas();\n\n RGB colorForeground = new RGB(0, 0, 0);\n RGB colorBackground = new RGB(255, 255, 255);\n\n // Set the background color and grid line properties.\n canvas.setBackgroundColor(colorBackground);\n canvas.setVerticalAxisGridLineProperties(LineStyle.SOLID, colorForeground, 1);\n canvas.setHorizontalAxisGridLineProperties(LineStyle.NONE, colorForeground, 0);\n _plot.setVerticalAxisGridLineDensity(20);\n _plot.setVerticalAxisAnnotationDensity(10);\n\n // Set the formatter for x-coordinates.\n NumberFormat cursorFormatter = NumberFormat.getIntegerInstance();\n _plot.setCursorFormatterX(cursorFormatter);\n\n // Initialize the canvas layout model (label margins, etc).\n CanvasLayoutModel layoutModel = _plot.getCanvasLayoutModel();\n // Hide the top and right axes to save screen space.\n layoutModel.setTopAxisHeight(50);\n layoutModel.setTopLabelHeight(0);\n layoutModel.setBottomLabelHeight(0);\n layoutModel.setBottomAxisHeight(0);\n layoutModel.setRightAxisWidth(0);\n layoutModel.setRightLabelWidth(0);\n _plot.updateCanvasLayout(layoutModel);\n }", "private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }", "public DiscreteTag(){}", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "void genTone(){\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate/freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n }\n }", "public PenSample() {\n\t\tthis.x = 0.0d;\n\t\tthis.y = 0.0d;\n\t\tthis.force = 0;\n\t\tthis.timestamp = 0l; // EPOCH ?\n\t}", "public MagnitudeSignal(MagnitudeSignal s) {\n\t\tsuper(s);\n\t}", "@FXML\n public void drawXButtonPressed()\n {\n //get the GraphicsContent, which is used to draw on the canvas\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n //draw line from top corner to bottom corner\n gc.strokeLine(\n 0,\n 0,\n canvas.getWidth(),\n canvas.getHeight()\n );\n\n //draw line from bottom left corner to upper right corner\n gc.strokeLine(\n 0,\n canvas.getHeight(),\n canvas.getWidth(),\n 0\n );\n }", "private void createChart() {\n LineChart lineChart = (LineChart) findViewById(R.id.line_chart);\n\n // LineChart DataSet\n ArrayList<LineDataSet> dataSets = new ArrayList<>();\n\n // x-coordinate format value\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularity(1f); // only intervals of 1 day\n// xAxis.setValueFormatter(new DayAxisValueFormatter(lineChart));\n\n\n // x-coordinate value\n ArrayList<String> xValues = new ArrayList<>();\n xValues.add(\"No.1\");\n xValues.add(\"No.2\");\n xValues.add(\"No.3\");\n xValues.add(\"No.4\");\n xValues.add(\"No.5\");\n\n // value\n ArrayList<Entry> value = new ArrayList<>();\n String measureItemName = \"\";\n value.add(new Entry(100, 0));\n value.add(new Entry(120, 1));\n value.add(new Entry(150, 2));\n value.add(new Entry(250, 3));\n value.add(new Entry(500, 4));\n\n\n // add value to LineChart's DataSet\n LineDataSet valueDataSet = new LineDataSet(value, measureItemName);\n dataSets.add(valueDataSet);\n\n // set LineChart's DataSet to LineChart\n// lineChart.setData(new LineData(xValues, dataSets));\n lineChart.setData(new LineData(valueDataSet));\n }", "VisualizationAttribute createVisualizationAttribute();", "private static JFreeChart createChart(XYDataset dataset) {\n\n chart = ChartFactory.createTimeSeriesChart(\n \"Stromzählerübersicht\", // Titel\n \"Datum\", // x-Achse label\n \"kWh\", // y-Achse label\n dataset);\n\n chart.setBackgroundPaint(Color.WHITE);\n\n XYPlot plot = (XYPlot) chart.getPlot();\n plot.setBackgroundPaint(Color.LIGHT_GRAY);\n plot.setDomainGridlinePaint(Color.WHITE);\n plot.setRangeGridlinePaint(Color.WHITE);\n plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));\n plot.setDomainCrosshairVisible(true);\n plot.setRangeCrosshairVisible(true);\n\n XYItemRenderer r = plot.getRenderer();\n if (r instanceof XYLineAndShapeRenderer) {\n XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;\n renderer.setDefaultShapesVisible(false);\n renderer.setDefaultShapesFilled(false);\n renderer.setDrawSeriesLineAsPath(true);\n }\n\n DateAxis axis = (DateAxis) plot.getDomainAxis();\n axis.setDateFormatOverride(new SimpleDateFormat(\"dd-MM-yyyy\"));\n\n return chart;\n\n }", "public Oscilloscope(Main tempMain) {\r\n\r\n lowerFixes.add(\"m\");\r\n lowerFixes.add(\"mn\");\r\n lowerFixes.add(\"n\");\r\n lowerFixes.add(\"p\");\r\n\r\n higherFixes.add(\"K\");\r\n higherFixes.add(\"M\");\r\n higherFixes.add(\"G\");\r\n higherFixes.add(\"T\");\r\n\r\n\r\n\r\n //store the reference to main\r\n main=tempMain;\r\n\r\n //then we can add the canvas and graphics for displaying the wave\r\n canvas = new Canvas(canvasSizeXY, canvasSizeXY);\r\n gc = canvas.getGraphicsContext2D();\r\n this.setCenter(canvas);//and display that at the center of the pane\r\n\r\n //make the buttons\r\n\r\n\r\n\r\n\r\n\r\n TitledPane controlsPane = new TitledPane(\"Controls\" , makeControlsPane());\r\n TitledPane divisionsPane = new TitledPane(\"Divisions\" , makeDivisionsPane());\r\n TitledPane triggerPane = new TitledPane(\"Trigger\",makeTriggerPane());\r\n // TitledPane mathematicalWavePane = new TitledPane(\"Mathematical Wave\" , makeMathematicalWavePane());\r\n TitledPane displayPane = new TitledPane(\"Display\" , makeDisplayPane());\r\n TitledPane cursorPane = new TitledPane(\"Cursors\" , makeCursorPane());\r\n\r\n controlsPane.maxWidth(2000);\r\n\r\n\r\n ScrollPane sp=new ScrollPane();\r\n\r\n sp.maxWidth(2000);\r\n\r\n //We add these buttons to a horizontal layout box\r\n VBox Panes = new VBox();\r\n Panes.getChildren().addAll(controlsPane,divisionsPane,triggerPane,displayPane,cursorPane);\r\n Panes.setMaxWidth(2000);\r\n sp.setContent(Panes);\r\n //and add then add this boc to the boarder pane\r\n this.setRight(sp);\r\n\r\n\r\n\r\n //new we will add info for each wave\r\n VBox tempStrings = new VBox(MeasurementFrequency,MeasurementMin,MeasurementMax,MeasurementPeakToPeak,MeasurementRMS);\r\n this.setBottom(tempStrings);\r\n wave1=new ArrayList<>();\r\n wave1.add(0f);\r\n displayAllWaves();\r\n }", "public RoadSignal(String name, int signalPosition) {\n this.name = name;\n green = false;\n this.signalPosition = signalPosition;\n\n }", "DummyCanvas() {\n super(null);\n // super(null); ----------------ADDED TO COMPILE -----------------------------------------\n }", "com.google.protobuf.ByteString\n getSignalBytes();", "JFreeChart generateBox();", "public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }", "public GateCanvas(int type_param)\n {\n super();\n // setBackgroundColor( );\n type = type_param;\n inverted = false;\n // setSize(24, 24);\n setVisible(true);\n }", "public MilStd2525PointGraphic(String sidc)\n {\n this.symbol = this.createSymbol(sidc);\n }", "void genTone() {\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n }\n }", "void genTone() {\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n }\n }", "public DrawingPane() {\n this.setBorder(new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT)));\n this.setStyle(\"-fx-background-color : white\");\n\n color = new ObjectPropertyBase<Color>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Color\";\n }\n };\n\n thickness = new ObjectPropertyBase<Integer>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Thickness\";\n }\n };\n\n modifiable = new BooleanPropertyBase(true) {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Modifiability\";\n }\n };\n\n lastLine = new ObjectPropertyBase<DrawingInfos>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Last Line\";\n }\n };\n\n this.canvas = new Canvas();\n this.context = canvas.getGraphicsContext2D();\n this.drawingInfos = new DrawingInfos();\n this.lastLine.setValue(new DrawingInfos());\n this.lastLineList = new DrawingInfos();\n\n getChildren().add(canvas);\n initialize();\n }", "private void setupVisualizerFxAndUI() {\n\n mLinearLayout = (LinearLayout) findViewById(R.id.linearLayoutVisual);\n // Create a VisualizerView to display the audio waveform for the current settings\n mVisualizerView = new VisualizerView(this);\n mVisualizerView.setLayoutParams(new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n (int) (VISUALIZER_HEIGHT_DIP * getResources().getDisplayMetrics().density)));\n mLinearLayout.addView(mVisualizerView);\n\n // Create the Visualizer object and attach it to our media player.\n\n\n\n\n\n\n mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());\n //mVisualizer = new Visualizer(0);\n mVisualizer.setCaptureSize(Visualizer.getCaptureSizeRange()[1]);\n\n mVisualizer.setDataCaptureListener(new Visualizer.OnDataCaptureListener() {\n public void onWaveFormDataCapture(Visualizer visualizer, byte[] bytes,\n int samplingRate) {\n mVisualizerView.updateVisualizer(bytes);\n }\n\n public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {\n }\n }, Visualizer.getMaxCaptureRate() / 2, true, false);\n }", "public SignalEmitter(BusObject source) {\n this(source, null, BusAttachment.SESSION_ID_ANY, GlobalBroadcast.Off);\n }", "public Canvas (Dimension size) {\r\n // set size (a bit of a pain)\r\n setPreferredSize(size);\r\n setSize(size);\r\n // prepare to receive input\r\n setFocusable(true);\r\n requestFocus();\r\n setInputListeners();\r\n }", "public Object[] plotDS(Object... rhs) throws RemoteException;", "public LineGraph(final String title) {\n super(title);\n final CategoryDataset dataset = createSampleDataset();\n final JFreeChart chart = createChart(dataset);\n final ChartPanel chartPanel = new ChartPanel(chart);\n chartPanel.setPreferredSize(new Dimension(500, 270));\n setContentPane(chartPanel);\n }", "public JComponent addAux1(Color color)\n {\n Category category = new Category(this, \"Aux 1 FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox reverb = new HBox();\n \n comp = new LabelledDial(\"Time\", this, \"aux1time\", color, 0, 127);\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonegain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonefreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Frequency\");\n reverb.add(comp);\n\n comp = new LabelledDial(\"Gate\", this, \"aux1gatethresh\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Threshold\");\n reverb.add(comp);\n \n final HBox echo = new HBox();\n \n comp = new LabelledDial(\"Feedback\", this, \"aux1feedback\", color, 0, 127);\n echo.add(comp);\n \n VBox vbox = new VBox();\n params = AUX_FX_1_TYPES;\n comp = new Chooser(\"Type\", this, \"aux1type\", params)\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n hbox.removeLast();\n if (model.get(\"aux1type\", 0) <= 2) // reverb\n {\n hbox.addLast(reverb);\n }\n else // echo\n {\n hbox.addLast(echo);\n }\n hbox.revalidate();\n hbox.repaint();\n }\n }; \n vbox.add(comp);\n\n comp = new CheckBox(\"Enable\", this, \"aux1mode\");\n vbox.add(comp);\n\n hbox.add(vbox);\n hbox.addLast(reverb);\n \n /// The manual says this only goes to 123, but in fact it goes to 127\n comp = new LabelledDial(\"Gate /\", this, \"aux1gatedelaytime\", color, 0, 127)\n {\n public String map(int value)\n {\n if (value < 111) return \"\" + value;\n else return TIMES[value - 111];\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Delay Time\");\n hbox.add(comp);\n model.setMetricMax(\"aux1gatedelaytime\", 110);\n \n comp = new LabelledDial(\"Depth\", this, \"aux1depth\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre HP\", this, \"aux1prehp\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre Delay\", this, \"aux1predelay\", color, 0, 127);\n hbox.add(comp);\n\n comp = new LabelledDial(\"High\", this, \"aux1highdamp\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Damp\");\n hbox.add(comp);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public JComponent addInsert(Color color)\n {\n Category category = new Category(this, \"Insert FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox[] insert = new HBox[6];\n\n \n // OFF\n insert[0] = new HBox();\n\n\n // EQ Bandpass\n insert[1] = new HBox(); \n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidfreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Freq\");\n insert[1].add(comp);\n \n comp = new LabelledDial(\"Mid\", this, \"bandpassmidgain\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return \"\" + (((value - 64) * 100) / 64) + \"%\";\n else return \"\" + (((value - 64) * 100) / 63) + \"%\";\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[1].add(comp);\n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Q\");\n insert[1].add(comp);\n\n\n // Compressor\n insert[2] = new HBox(); \n\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Threshold\", this, \"compressorthreshold\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Ratio\", this, \"compressorratio\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Makeup\", this, \"compressorgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[2].add(comp);\n\n\n // Auto Wah\n insert[3] = new HBox(); \n\n VBox vbox = new VBox();\n params = AUTO_WAH_TYPES;\n comp = new Chooser(\"Wah Wah Type\", this, \"autowahtype\", params);\n vbox.add(comp);\n insert[3] .add(vbox);\n\n comp = new LabelledDial(\"Cutoff\", this, \"autowahcutoff\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Resonance\", this, \"autowahresonance\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Sensitivity\", this, \"autowahsensitivity\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[3].add(comp);\n \n \n\n // Distortion\n insert[4] = new HBox(); \n\n vbox = new VBox();\n params = DISTORTION_TYPES;\n comp = new Chooser(\"Distortion Type\", this, \"distortiontype\", params);\n vbox.add(comp);\n insert[4].add(vbox);\n\n comp = new LabelledDial(\"Depth\", this, \"distortiondepth\", color, 0, 127);\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Pre\", this, \"distortionpregain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Post\", this, \"distortionpostgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"High\", this, \"distortionhighcutoff\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Cutoff\");\n insert[4].add(comp);\n \n\n // Reducer\n insert[5] = new HBox(); \n\n comp = new LabelledDial(\"Bit\", this, \"reducerbitdepth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Depth\");\n insert[5].add(comp);\n \n comp = new LabelledDial(\"Sample\", this, \"reducersamplerate\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Rate\");\n insert[5].add(comp);\n \n \n /// CHOOSER\n \n final HBox fx = new HBox();\n\n vbox = new VBox();\n params = INSERT_FX_TYPES;\n comp = new Chooser(\"Type\", this, \"channelfxtype\", params) // I *think* this is insert\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n fx.removeLast();\n int channelfxtype = model.get(\"channelfxtype\", 0);\n if (channelfxtype >= 0 && channelfxtype < insert.length)\n fx.addLast(insert[channelfxtype]);\n else Synth.handleException(new Throwable(\"Invalid channel fx type: \" + channelfxtype));\n fx.revalidate();\n fx.repaint();\n }\n }; \n vbox.add(comp);\n hbox.add(vbox);\n fx.add(insert[0]); // empty\n hbox.add(fx);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "public DurationEdge(DurationCapability dc, int sign) {\n\t\t\tsuper();\n\t\t\tthis.dc = dc;\n\t\t\tthis.sign = sign;\n\t\t}", "public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {}", "public JComponent addOscillator(int osc, Color color)\n {\n Category category = new Category(this, \"Oscillator \" + osc, color);\n // category.makePasteable(\"osc\" + osc);\n category.makePasteable(\"osc\");\n\n JComponent comp;\n String[] params;\n HBox hbox = new HBox();\n\n VBox vbox = new VBox();\n params = WAVEFORMS;\n comp = new Chooser(\"Waveform\", this, \"osc\" + osc + \"waveform\", params);\n vbox.add(comp);\n\n comp = new CheckBox(\"Keytrack\", this, \"osc\" + osc + \"keytrack\", true); // flipped\n vbox.add(comp);\n \n if (osc == 1)\n {\n comp = new CheckBox(\"Waveshape\", this, \"waveshape\");\n vbox.add(comp);\n }\n \n if (osc == 2 || osc == 3)\n {\n comp = new CheckBox(\"Osc 1 Sync\", this, \"osc\" + osc + \"sync\");\n vbox.add(comp);\n }\n \n hbox.add(vbox);\n \n comp = new LabelledDial(\"Coarse\", this, \"osc\" + osc + \"coarsetune\", color, 0, 127, 64);\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n\n comp = new LabelledDial(\"Fine\", this, \"osc\" + osc + \"finetune\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return String.format(\"%2.1f\", ((value - 64) / 64.0 * 50.0));\n else return String.format(\"%2.1f\", ((value - 64) / 63.0) * 50.0);\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n \n if (osc == 1)\n {\n comp = new LabelledDial(\"Osc 3 FM\", this, \"fmlevel\", color, 0, 127);\n hbox.add(comp);\n\n comp = new LabelledDial(\"Waveshape\", this, \"waveshapewidth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Width\");\n hbox.add(comp);\n }\n\n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "private static XYDataset createDataset(Double[] x, Double[] y) {\n\t\tlogger.info(\"Creating Dataset\");\n\t\tXYSeries s1 = new XYSeries(Double.valueOf(1));\n\t\tif (x.length != y.length) {\n\t\t\tlogger.error(\"Error in createDataset of ScatterDialog. \" +\n\t\t\t\t\t\"Could not create a dataset for the scatter plot -- missing data\");\n\t\t\treturn null;\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tif (y[i] != null) {\n\t\t\t\ts1.add(x[i], y[i]);\n\t\t\t}\n\t\t}\n\t\tXYSeriesCollection dataset = new XYSeriesCollection();\n\t\tdataset.addSeries(s1);\n\t\treturn dataset;\n\t}", "public LineChart() {\n init();\n }", "public void drawGrid(){\r\n gc.setLineWidth(0.5f);//this is how thick the 'pen' will be, 1 pixel for now\r\n gc.setStroke(divisionsColour);\r\n //this for loop will start at (canvas.widthProperty().intValue()/2)%pixelsPerDivision\r\n //this means that one line will pass through the center of the screen, for 0 which we need\r\n //canvas width and height properties are the width and height of the display of the waves only\r\n //then we draw a line every pixelsPerDivision pixels, this is so one division is pixelsPerDivision pixels.\r\n //the one directly below is for the time domain\r\n for (int x = (canvas.widthProperty().intValue() / 2) % pixelsPerDivision; x < canvas.widthProperty().intValue(); x += pixelsPerDivision) {\r\n //we begin to draw a line\r\n gc.beginPath();\r\n //starting at the top of the page\r\n gc.moveTo(x, 0);\r\n //going to the bottom\r\n gc.lineTo(x, canvas.heightProperty().intValue());\r\n //then finish this line\r\n gc.stroke();\r\n }\r\n\r\n\r\n //the one directly below is for the voltage domain\r\n //this one it is much more important that a line goes through the center as this is where the 0 mark for the waves is\r\n for (int y = (canvas.heightProperty().intValue() / 2) % pixelsPerDivision; y < canvas.heightProperty().intValue(); y += pixelsPerDivision) {\r\n gc.beginPath();\r\n gc.moveTo(0, y);\r\n gc.lineTo(canvas.widthProperty().intValue(), y);\r\n gc.stroke();\r\n }\r\n gc.setStroke(voltageTextColour);\r\n int numberOfPositiveDivisions = (canvas.heightProperty().intValue() / 2) / pixelsPerDivision;\r\n\r\n\r\n\r\n\r\n for (int i = 0; i < numberOfPositiveDivisions; i+=2) {\r\n gc.strokeText(\"+\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"+\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i));\r\n if (i != 0) {\r\n gc.strokeText(\"-\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"-\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i));\r\n }\r\n }\r\n gc.rotate(-90);\r\n\r\n for (int i=4; i<canvasSizeXY/pixelsPerDivision;i+=4){\r\n gc.strokeText(getScienceNumber(i*secondsPerDivision)+\"ms\", -(canvasSizeXY-10),(pixelsPerDivision * i)+5);\r\n }\r\n gc.rotate(90);\r\n //the following will draw a center line over the 0V axis part, but with a thicker pen so we can see 0 clearer\r\n gc.beginPath();\r\n gc.setLineWidth(3);//makes the line thicker\r\n gc.moveTo(0, canvas.heightProperty().intValue() / 2);\r\n gc.lineTo(canvas.widthProperty().intValue(), canvas.heightProperty().intValue() / 2);\r\n gc.stroke();\r\n\r\n }", "public void MakeXYSpline() {\n\t\tXYSplineButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t GetXYSplineChartImage())));\n\t\tXYSplineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"XYSpline Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new XYSplineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(XYSplineButton);\t\n\t}", "public DrawCanvas(DrawConsoleUI drawConsole) {\n /*Call the super constructor and set the background colour*/\n super();\n this.setBackground(Color.white);\n\n /*Set the size of this component*/\n this.setPreferredSize(new Dimension(970,800));\n\n /*Enable autoscroll for this panel, when there is a need to\n update component's view*/\n this.setAutoscrolls(true);\n\n /*Construct a list that will hold the shapes*/\n //shapesBuffer = Collections.synchronizedList(new ArrayList());\n labelBuffer = Collections.synchronizedList(new ArrayList());\n\n /*Hold a reference to the DrawConsoleUI class*/\n drawConsoleUI = drawConsole;\n\n \n /***\n * Register Listeners to the canvas\n */\n\n /*Mouse move*/\n this.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n //panelMouseMoved(evt);\n }//end mouse motion moved\n\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n try {\n panelMouseDragged(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end mouse motion Dragged\n });\n\n /*Mouse Clicked*/\n this.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n try {\n panelMouseClicked(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Pressed*/\n public void mousePressed(java.awt.event.MouseEvent evt) {\n try {\n panelMousePressed(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Released*/\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n try {\n panelMouseReleased(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n });\n\n\n }", "public void genTone() {\n\t\tfor (int i = 0; i < numSamples; ++i) {\n\t\t\tsample[i] = -(Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone)));\n\t\t}\n\n\t\t// convert to 16 bit pcm sound array\n\t\t// assumes the sample buffer is normalised.\n\t\tint idx = 0;\n\t\tfor (final double dVal : sample) {\n\t\t\t// scale to maximum amplitude\n\t\t\tfinal short val = (short) ((dVal * 32767));\n\t\t\t// in 16 bit wav PCM, first byte is the low order byte\n\t\t\tgeneratedSnd[idx++] = (byte) (val & 0x00ff);\n\t\t\tgeneratedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n\t\t}\n\t}", "public SpectrumPanel() {\n super() ;\n super.setDoubleBuffered( true ) ;\n super.setBackground( Color.RED ) ;\n super.setPreferredSize( new Dimension( 1, 7 ) ) ;\n }", "public void visitToneIndicator( DevCat devCat ) {}", "public DrawLineGraph()\n\t{\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"Line Graph\");\n\t\tframe.setSize(600,400);\n\t\tframe.setLayout(new BorderLayout());\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\n\t\tseries = new XYSeries(\"Cross Entropy Cost Function\");\n\t\tXYSeriesCollection dataset = new XYSeriesCollection(series);\n\t\tchart = ChartFactory.createXYLineChart(\"Cross Entropy Cost Function\", \"Epoch\", \"Error\", dataset);\n\t\tframe.add(new ChartPanel(chart), BorderLayout.CENTER);\n\t\t\n\n\t}", "public void generateChart(int[] dataValues) {\n\t\t/*\n\t\t * The XYSeriesCollection object is a set XYSeries series (dataset) that\n\t\t * can be visualized in the same chart\n\t\t */\n\t\tXYSeriesCollection dataset = new XYSeriesCollection();\n\t\t/*\n\t\t * The XYSeries that are loaded in the dataset. There might be many\n\t\t * series in one dataset.\n\t\t */\n\t\tXYSeries data = new XYSeries(\"random values\");\n\n\t\t/*\n\t\t * Populating the XYSeries data object from the input Integer array\n\t\t * values.\n\t\t */\n\t\tfor (int i = 0; i < dataValues.length; i++) {\n\t\t\tdata.add(i, dataValues[i]);\n\t\t}\n\n\t\t// add the series to the dataset\n\t\tdataset.addSeries(data);\n\n\t\tboolean legend = false; // do not visualize a legend\n\t\tboolean tooltips = false; // do not visualize tooltips\n\t\tboolean urls = false; // do not visualize urls\n\n\t\t// Declare and initialize a createXYLineChart JFreeChart\n\t\tJFreeChart chart = ChartFactory.createXYLineChart(\"Grades Histogram\", \"Grades\", \"Frequency\", dataset,\n\t\t\t\tPlotOrientation.VERTICAL, legend, tooltips, urls);\n\n\t\t/*\n\t\t * Initialize a frame for visualizing the chart and attach the\n\t\t * previously created chart.\n\t\t */\n\t\tChartFrame frame = new ChartFrame(\"First\", chart);\n\t\tframe.pack();\n\t\t// makes the previously created frame visible\n\t\tframe.setVisible(true);\n\t}", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private JPanel createResult(){\n\t\tJPanel panel3 = new JPanel(){\n\t @Override\n\t protected void paintComponent (Graphics g) {\n\t super.paintComponent(g);\n\t paint2D((Graphics2D)g); //use to paint the pattern on the GUI\n\t }\n\t /**\n\t * performs a linear mapping from 2D coordinates to other 2D coordinates\n\t */\n\t protected void paint2D (Graphics2D g2) {\n\t AffineTransform tform = AffineTransform.getTranslateInstance( 0, 0);\n\t tform.scale(0.1, 0.1); \n\t //set the properties of g2\n\t g2.setTransform( tform);\n\t g2.setColor( Color.BLUE); \n\t }\n\t @Override\n\t public Dimension getPreferredSize() {\n\t return new Dimension(100, 100);\n\t }\n\t };\n\t\tpanel3.setBackground(Color.gray);\n\t\tGraphics g = panel3.getGraphics();\n\t\t//add mouse listener, if the user clicks mouse, the point will show the X and Y value on the graphics.\n\t\tpanel3.addMouseListener( new MouseAdapter() {\n // define a point \n public void mousePressed( MouseEvent event )\n { \n point = new Point( event.getX(), event.getY() ); //get the X and Y value of point which the user clicked\n controller.setBandwidth(event.getX());\n controller.setSignalToNoise(event.getY()); \n \t\n //g.drawOval( point.x , point.y , 1, 1 ); //show the point on the graphic \n //g.drawString(\"x=\" + point.x + \" y=\" + point.y, point.x, point.y ); //show the X, Y number of the point on the graphic\n \n } // end method mousePressed\n \n });\n\t\treturn panel3;\n\t}", "public ScatterChart(@NamedArg(\"xAxis\") Axis<X> xAxis, @NamedArg(\"yAxis\") Axis<Y> yAxis) {\n this(xAxis, yAxis, FXCollections.<Series<X, Y>>observableArrayList());\n }", "public WaveView() {\n initComponents();\n }", "public abstract void newGuiNoise(long ms, int n);", "private void initializeChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n// int SPLINEPRECISION = chartPrefJSlider2.getValue(); // 1 is highest precision; default = 40\n int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n }\n\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), (double) convertYCoordToFreq(row));\n }\n }\n }\n }\n\n dataset.removeAllSeries();\n dataset.addSeries(xy);\n\n //XYSeriesCollection splineDataset = new XYSeriesCollection();\n dataset.addSeries(xySpline);\n\n JFreeChart chart = ChartFactory.createXYLineChart(\n //JFreeChart chart = ChartFactory.createScatterPlot(\n clip.getFileName(), \"Time (ms)\", \"Frequency (Hz)\", dataset, PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) chart.getPlot();\n xyplot.setRenderer(new XYSplineRenderer());\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShape(0, new java.awt.Rectangle(1, 1, 1, 1));\n xylineandshaperenderer.setSeriesLinesVisible(0, false);\n xylineandshaperenderer.setSeriesShapesVisible(0, true);\n xylineandshaperenderer.setSeriesLinesVisible(1, false);\n xylineandshaperenderer.setSeriesShapesVisible(1, false);\n\n// ChartFrame frame = new ChartFrame(\"First\", chart);\n// frame.pack();\n// frame.setVisible(true);\n\n\n jCheckBox1.setEnabled(true);\n jCheckBox1.setSelected(true);\n\n jCheckBox2.setEnabled(true);\n jCheckBox2.setSelected(false);\n\n jSlider1.setEnabled(true);\n jSlider2.setEnabled(true);\n\n jTextField9.setText(clip.getFileName());\n\n chartPanel = new ChartPanel(chart);\n }", "Series<double[]> makeSeries(int dimension);", "public static PVector fromCanvas( PVector in) {\n\t\treturn fromCanvas( in, 0 );\n\t}", "public void CondSignal(){\n trainCond.signal();\r\n }", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "java.lang.String getSignal();", "public CreateLineCanvas(CanvasApp canvasApp) {\n\t\tthis.cmdAppliedCanvas=canvasApp;\n\t}", "JFreeChart generateDot();", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "private void btnRenderActionPerformed(java.awt.event.ActionEvent evt) {\n \r\n String x = jcbX_Axis.getSelectedItem().toString();\r\n String y = jcbY_Axis.getSelectedItem().toString();\r\n \r\n if(y.equals(\"Depth\")){\r\n //log plot\r\n \r\n WitsmlLogCurve ydata = currentCurves.get(0);\r\n WitsmlLogCurve xdata = null;\r\n // the selected value by looping through the curve object\r\n \r\n for(int i = 1; i < currentCurves.size(); i ++){\r\n if(x.equals(currentCurves.get(i).getDescription())){\r\n xdata = currentCurves.get(i);\r\n // System.out.println(\"got \"+currentCurves.get(i).getDescription());\r\n break;\r\n }\r\n }\r\n \r\n \r\n List<Object> yvalues = ydata.getValues();\r\n List<Object> xvalues = xdata.getValues();\r\n \r\n \r\n String title = \"Depth against \"+xdata.getDescription();\r\n XYSeries series = new XYSeries(title);\r\n for(int i = 0; i<yvalues.size(); i++){\r\n Object vx = xvalues.get(i);\r\n Object vy = yvalues.get(i);\r\n double dx = Double.parseDouble(vx.toString());\r\n double dy = Double.parseDouble(vy.toString());\r\n // System.out.println(\"depth : \"+dy +\" : \"+title+\" : \"+dx);\r\n series.add(dx, dy);\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n \r\n // create a chart using the createYLineChart method...\r\n JFreeChart chart = ChartFactory.createXYLineChart(title, // chart title\r\n xdata.getDescription(), \"Depth\", // x and y axis labels\r\n data); // data\r\n \r\n XYPlot plot = (XYPlot) chart.getPlot();\r\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\r\n renderer.setSeriesLinesVisible(0, true);\r\n renderer.setSeriesShapesVisible(0, false);\r\n renderer.setSeriesLinesVisible(1, false);\r\n renderer.setSeriesShapesVisible(1, true); \r\n plot.setRenderer(renderer);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n \r\n }else{\r\n // trajectory\r\n \r\n ArrayList<Double> ax = getValues(x);\r\n ArrayList<Double> ay = getValues(y);\r\n \r\n XYSeries series = new XYSeries(trajName);\r\n for(int i = 0; i < ax.size(); i++){\r\n series.add(ax.get(i), ay.get(i));\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n JFreeChart chart = ChartFactory.createXYLineChart(trajName, // chart title\r\n x, y, // x and y axis labels\r\n data);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n// call a method to select the method here \r\n }\r\n }", "AnalogPin createAnalogPin();", "public double MACDSignal(int t)\n {\n Series macd = new Series();\n macd.x = new double[macd.size = t + 1];\n for(int i = 0; i<=t; i++)\n macd.x[i] = MACD(i);\n return macd.expMovingAverage(9, t);\n }", "public void setSignalPosition(int signalPosition) {\n this.signalPosition = signalPosition;\n }", "private JPanel createChartPanel(XYSeriesCollection li) {\n\n String chartTitle = \" Movement Chart\";\n String xAxisLabel = \"Matrix Size\";\n String yAxisLabel = \"time in ms\";\n\n XYSeriesCollection dataset = li;\n // System.out.println(\"tesst count \" + dataset.getSeriesCount());\n\n //XYDataset dataset = createDataset(li);\n JFreeChart chart = ChartFactory.createXYLineChart(chartTitle, xAxisLabel, yAxisLabel, dataset);\n XYPlot plot = chart.getXYPlot();\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\n plot.setRenderer(renderer);\n\n return new ChartPanel(chart);\n }" ]
[ "0.65946555", "0.6565148", "0.63817954", "0.6296921", "0.51160556", "0.50308233", "0.47489682", "0.47182837", "0.46774516", "0.46199754", "0.45667312", "0.45539594", "0.45389864", "0.45331582", "0.45287508", "0.45013097", "0.4485337", "0.44822353", "0.4480439", "0.44769558", "0.4475522", "0.44503167", "0.4444367", "0.4411345", "0.44062907", "0.4398549", "0.43393144", "0.43239117", "0.43219844", "0.43154135", "0.43134227", "0.4305163", "0.43036008", "0.43030956", "0.43015426", "0.42998728", "0.42988163", "0.4293342", "0.429239", "0.4281611", "0.42669627", "0.4265536", "0.42630565", "0.42469698", "0.42398876", "0.42351285", "0.42341855", "0.42183962", "0.4211564", "0.4196485", "0.41953364", "0.41928276", "0.41918054", "0.41844088", "0.4156922", "0.41481444", "0.41457075", "0.41457075", "0.41435182", "0.4139436", "0.41361883", "0.4132542", "0.4129901", "0.41296896", "0.412752", "0.41186458", "0.41088486", "0.41088012", "0.41071936", "0.41018978", "0.41007778", "0.4090384", "0.40835607", "0.40827775", "0.408249", "0.40823162", "0.40807185", "0.40798882", "0.40768775", "0.40747815", "0.40734103", "0.4072661", "0.40667343", "0.4063306", "0.40558308", "0.4053002", "0.40424252", "0.404096", "0.40383658", "0.4037624", "0.40266758", "0.40238076", "0.4023628", "0.4020819", "0.40165508", "0.40141335", "0.40125796", "0.4012529", "0.4010858", "0.40087873" ]
0.7059057
0
Creates an SignalCanvas from a RealSignal
public SignalCanvas(RealSignal sig) throws BadSignalException { super(); image = getJavaSignal(sig); jsignal = sig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SignalCanvas(ComplexSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(DiscreteSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas() {\n\t\tsuper();\n\t}", "public void setSignal(double signal) {_signal = signal;}", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "public void setSignal(java.awt.Image sig) {\n\t\timage = sig;\n\t\tjsignal = null;\n\t}", "public Builder setSignalBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public TSignal(TSignal other) {\n if (other.is_set_destApp()) {\n this.destApp = other.destApp;\n }\n if (other.is_set_destPellet()) {\n this.destPellet = other.destPellet;\n }\n if (other.is_set_data()) {\n this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);\n;\n }\n }", "public static void showSelectSensorPlot(Context context, final ShimmerService shimmerService, final String bluetoothAddress, final XYPlot dynamicPlot){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(com.shimmerresearch.androidinstrumentdriver.R.layout.dialog_sensor_view);\n final Button buttonSetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.ButtonFilterPlotSignal);\n final Button buttonResetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.buttonResetFilterPlotSignal);\n final Button buttonDone = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.button_done);\n final EditText editTextSignalFilter = (EditText) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.editTextFilterPlotSignal);\n dialog.setCanceledOnTouchOutside(true);\n TextView title = (TextView) dialog.findViewById(android.R.id.title);\n if(title != null) {\n title.setText(\"Select Signal\");\n } else {\n Log.e(\"DialogConfigurations\", \"Title TextView is null!\");\n }\n final ListView listView = (ListView) dialog.findViewById(android.R.id.list);\n listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\n //Temporary list so we have the option of adding additional custom channels\n List<String[]> listOfChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n\n if(mAdditionalSignalsList != null && mAdditionalSignalsList.size() > 0) {\n for (String[] addSignal : mAdditionalSignalsList) {\n listOfChannels.add(addSignal); //Add the custom channel to the list of channels\n }\n }\n\n //Create a temporary list of channels to remove the filter signals while iterating through the original list of channels\n List<String[]> tempListOfChannelsWithSignalsFiltered = new ArrayList<String[]>();\n for(String[] temp : listOfChannels) {\n tempListOfChannelsWithSignalsFiltered.add(temp);\n }\n\n if(mFilteredSignalsList != null && mFilteredSignalsList.size() > 0) {\n for(String[] signalToFilter : mFilteredSignalsList) {\n for(String[] signal : listOfChannels) {\n //Check if the channel name and format (CAL/UNCAL) matches the signal to be filtered\n if(signal[1].equals(signalToFilter[1]) && signal[2].equals(signalToFilter[2])) {\n tempListOfChannelsWithSignalsFiltered.remove(signal);\n }\n }\n }\n }\n\n //Assign the filtered list back to the original list\n listOfChannels = tempListOfChannelsWithSignalsFiltered;\n\n //Join the Strings in each individual array in the list of channels in order to pass them to the ArrayAdapter\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listOfChannels.size();i++) {\n sensorList.add(joinStrings(listOfChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(context, android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n final List<String[]> listOfChannelsFinal = listOfChannels; //Final list so inner methods can access it\n\n buttonDone.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.hide();\n }\n });\n\n buttonSetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n List<String> sensorList = new ArrayList<String>();\n String plotSignaltoFilter = editTextSignalFilter.getText().toString();\n\n for (int i=listOfChannelsFinal.size()-1;i>-1;i--){\n String signal = joinStrings(listOfChannelsFinal.get(i));\n if (!signal.toLowerCase().contains(plotSignaltoFilter.toLowerCase())){\n\n listOfChannelsFinal.remove(i);\n }\n\n }\n\n for(int i=0;i<listOfChannelsFinal.size();i++) {\n sensorList.add(joinStrings(listOfChannelsFinal.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannelsFinal.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n }\n });\n\n buttonResetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n final List<String[]> listofChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listofChannels.size();i++) {\n sensorList.add(joinStrings(listofChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n //listView.setItemChecked(position, value);\n\n for (int p=0;p<listofChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listofChannels.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listofChannels.get(index));\n }\n }\n\n });\n\n\n }\n });\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n dialog.show();\n\n }", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public ColourBinPanel(CameraCanvas canvas)\r\n\t{\r\n\t\tmCameraCanvas = canvas;\r\n\t\tmBinSet = new FeatureWidgetRadioManager();\r\n\t}", "@Override\n public void onRender(Canvas canvas, FFTData data, Rect rect)\n {\n }", "@Override\n protected void initializeCanvas(final Composite canvasComposite) {\n _plot = new Plot(canvasComposite, initializeModelSpace(), PlotScrolling.NONE);\n\n // Get the various plot components that will be used.\n // TODO: improve the plot API so this is simpler.\n IModelSpaceCanvas canvas = _plot.getModelSpaceCanvas();\n\n RGB colorForeground = new RGB(0, 0, 0);\n RGB colorBackground = new RGB(255, 255, 255);\n\n // Set the background color and grid line properties.\n canvas.setBackgroundColor(colorBackground);\n canvas.setVerticalAxisGridLineProperties(LineStyle.SOLID, colorForeground, 1);\n canvas.setHorizontalAxisGridLineProperties(LineStyle.NONE, colorForeground, 0);\n _plot.setVerticalAxisGridLineDensity(20);\n _plot.setVerticalAxisAnnotationDensity(10);\n\n // Set the formatter for x-coordinates.\n NumberFormat cursorFormatter = NumberFormat.getIntegerInstance();\n _plot.setCursorFormatterX(cursorFormatter);\n\n // Initialize the canvas layout model (label margins, etc).\n CanvasLayoutModel layoutModel = _plot.getCanvasLayoutModel();\n // Hide the top and right axes to save screen space.\n layoutModel.setTopAxisHeight(50);\n layoutModel.setTopLabelHeight(0);\n layoutModel.setBottomLabelHeight(0);\n layoutModel.setBottomAxisHeight(0);\n layoutModel.setRightAxisWidth(0);\n layoutModel.setRightLabelWidth(0);\n _plot.updateCanvasLayout(layoutModel);\n }", "DummyCanvas() {\n super(null);\n // super(null); ----------------ADDED TO COMPILE -----------------------------------------\n }", "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException,\n\t\t\tRuntimeException {\n\n\t\t// int w = 0;\n\t\t// int h = 0;\n\t\tjava.awt.Image jsig = null;\n\n\t\tif (sig instanceof DiscreteSignal) {\n\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\n\t\t\tDiscreteSignal nsig = SignalConverter.toDiscrete(sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif ((short) nsig.get(x) > max)\n\t\t\t\t\tmax = (short) nsig.get(x);\n\t\t\t\tif ((short) nsig.get(x) < min)\n\t\t\t\t\tmin = (short) nsig.get(x);\n\n\t\t\t}\n\n\t\t\tshort[][] new_data = new short[max][nsig.length()];\n\t\t\tGrayImage gimage = new GrayImage(nsig.length(), max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++)\n\t\t\t\t// FIXME: put braces on this for\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, new_data[y][x]);\n\t\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\t\t} else {\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tRealSignal nsig = SignalConverter.toReal((Signal) sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif (nsig.get(x) > max)\n\t\t\t\t\tmax = nsig.get(x);\n\t\t\t\tif (nsig.get(x) < min)\n\t\t\t\t\tmin = nsig.get(x);\n\t\t\t}\n\n\t\t\tfloat[][] new_data = new float[(int) max][nsig.length()];\n\t\t\tRealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\t// try{\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, (int) new_data[y][x]);\n\t\t\t\t\t// }catch (Exception e)\n\t\t\t\t\t// {System.out.println(x+\" uh oh \"+y);}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\n\t\t}\n\n\t}", "public void set(float signal);", "public void setSignal(jigl.signal.Signal sig) throws BadSignalException {\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "Signal getSignal();", "public Builder clearSignal() {\n bitField0_ = (bitField0_ & ~0x00020000);\n signal_ = getDefaultInstance().getSignal();\n onChanged();\n return this;\n }", "public RealBuffer(float[] samples)\n {\n super(samples);\n }", "public static vtkCanvas createDummyCanvas(vtkActor actor)\n\t{\n\t\tfinal vtkCanvas canvas = new vtkCanvas()\n\t\t{\n\n\t\t\t/** Workaround for http://www.vtk.org/Bug/view.php?id=6268 */\n\t\t\t@Override\n\t\t\tpublic void setSize(int x, int y)\n\t\t\t{\n\t\t\t\tsuper.setSize(x, y);\n\t\t\t\tLock();\n\t\t\t\trw.SetSize(x, y);\n\t\t\t\tiren.SetSize(x, y);\n\t\t\t\tiren.ConfigureEvent();\n\t\t\t\tUnLock();\n\t\t\t}\n\t\t};\n\t\t// a renderer for the data\n\t\tfinal vtkRenderer ren1 = canvas.GetRenderer();\n\n\t\tren1.AddActor(actor);\n\t\t// background color white\n\t\tren1.SetBackground(1, 1, 1);\n\t\t// Make the canvas resizable with a splitter\n\t\t//layout\n\t\tcanvas.setMinimumSize(new Dimension(0, 0));\n\t\tcanvas.setPreferredSize(new Dimension(0, 0));\n\t\tren1.ResetCamera();\n\t\treturn canvas;\n\t}", "public MagnitudeSignal(MagnitudeSignal s) {\n\t\tsuper(s);\n\t}", "public CanvasElement(int width, int height, WatchViewStub stub){\n this.width = width;\n this.height = height;\n this.stub = stub;\n paint = new Paint();\n fillStyle = \"rgb(0,0,0)\";\n parseColors(fillStyle);\n\n lastX = 0;\n lastY = 0;\n\n bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n canvas = new Canvas(bitmap);\n canvas.drawColor(0xffffffff);\n\n }", "public SkinnedMeshCanvas(Display d) \r\n {\r\n super(true); // call base class constructor\r\n mDisplay = d; // store display object\r\n }", "public GateCanvas(int type_param)\n {\n super();\n // setBackgroundColor( );\n type = type_param;\n inverted = false;\n // setSize(24, 24);\n setVisible(true);\n }", "public double getSignal() {return _signal;}", "public CreateLineCanvas(CanvasApp canvasApp) {\n\t\tthis.cmdAppliedCanvas=canvasApp;\n\t}", "public void displayWave(ArrayList<Float> wave,Color color){\r\n\r\n //find the center pixel's Y value so we know where to start drawing the wave from\r\n //this will ensure the wave is drawn where the distance to the top and the bottom of the screen is equal\r\n int CenterYPixel = canvas.heightProperty().intValue()/2;//this is int division\r\n gc.beginPath();\r\n gc.setStroke(color);\r\n gc.setLineWidth(waveThickness);\r\n\r\n\r\n\r\n if(!drawFromRisingEdge) {\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(0) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = 0; i < wave.size(); i++) {\r\n //for the x value of the lineTo function, we use canvas.widthProperty().intValue()/wave1.size()\r\n //to convert the wave index number to pixels such that it fills the entire width of the canvas\r\n //for the y value, we start from the center CenterYPixel, and then add the value of the wave\r\n //(0,0) of the canvas is top left, so a high y value is lower, so we use the - to flip the wave\r\n //we then scale this by the voltageMultiplier for our user defined divisions\r\n //and lastly scale by pixelsPerDivision so convert the voltage into pixel values (1V is pixelsPerDivision pixels from the center line)\r\n float xPos = (int) (pixelsPerSample * i);\r\n // System.out.println(\"XVal:\"+xPos+\" pix per sample \"+pixelsPerSample);\r\n // gc.lineTo(i * canvas.widthProperty().intValue() / wave.size(), CenterYPixel + Math.round(-wave.get(i) * voltageMultiplier * pixelsPerDivision));\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n }else{\r\n int risingIndex = findRisingEdgeIndex();\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(risingIndex) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = risingIndex; i < wave.size(); i++) {\r\n\r\n float xPos = (int) (pixelsPerSample * (i-risingIndex));\r\n\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n\r\n }\r\n gc.stroke();\r\n }", "public RoadSignal(String name, int signalPosition) {\n this.name = name;\n green = false;\n this.signalPosition = signalPosition;\n\n }", "public Oscilloscope(Main tempMain) {\r\n\r\n lowerFixes.add(\"m\");\r\n lowerFixes.add(\"mn\");\r\n lowerFixes.add(\"n\");\r\n lowerFixes.add(\"p\");\r\n\r\n higherFixes.add(\"K\");\r\n higherFixes.add(\"M\");\r\n higherFixes.add(\"G\");\r\n higherFixes.add(\"T\");\r\n\r\n\r\n\r\n //store the reference to main\r\n main=tempMain;\r\n\r\n //then we can add the canvas and graphics for displaying the wave\r\n canvas = new Canvas(canvasSizeXY, canvasSizeXY);\r\n gc = canvas.getGraphicsContext2D();\r\n this.setCenter(canvas);//and display that at the center of the pane\r\n\r\n //make the buttons\r\n\r\n\r\n\r\n\r\n\r\n TitledPane controlsPane = new TitledPane(\"Controls\" , makeControlsPane());\r\n TitledPane divisionsPane = new TitledPane(\"Divisions\" , makeDivisionsPane());\r\n TitledPane triggerPane = new TitledPane(\"Trigger\",makeTriggerPane());\r\n // TitledPane mathematicalWavePane = new TitledPane(\"Mathematical Wave\" , makeMathematicalWavePane());\r\n TitledPane displayPane = new TitledPane(\"Display\" , makeDisplayPane());\r\n TitledPane cursorPane = new TitledPane(\"Cursors\" , makeCursorPane());\r\n\r\n controlsPane.maxWidth(2000);\r\n\r\n\r\n ScrollPane sp=new ScrollPane();\r\n\r\n sp.maxWidth(2000);\r\n\r\n //We add these buttons to a horizontal layout box\r\n VBox Panes = new VBox();\r\n Panes.getChildren().addAll(controlsPane,divisionsPane,triggerPane,displayPane,cursorPane);\r\n Panes.setMaxWidth(2000);\r\n sp.setContent(Panes);\r\n //and add then add this boc to the boarder pane\r\n this.setRight(sp);\r\n\r\n\r\n\r\n //new we will add info for each wave\r\n VBox tempStrings = new VBox(MeasurementFrequency,MeasurementMin,MeasurementMax,MeasurementPeakToPeak,MeasurementRMS);\r\n this.setBottom(tempStrings);\r\n wave1=new ArrayList<>();\r\n wave1.add(0f);\r\n displayAllWaves();\r\n }", "public SpectrumPanel() {\n super() ;\n super.setDoubleBuffered( true ) ;\n super.setBackground( Color.RED ) ;\n super.setPreferredSize( new Dimension( 1, 7 ) ) ;\n }", "private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}", "void setSignalPeriod(double signalPeriod);", "public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {}", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }", "public BufferVisualization() {\n initComponents();\n }", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "public void diagramChanged(Diagram diagram, int signal)\r\n\t{\r\n\t}", "public SignalEmitter(BusObject source) {\n this(source, null, BusAttachment.SESSION_ID_ANY, GlobalBroadcast.Off);\n }", "public void draw(short[] samples, int threshold, int width, int height, Graphics2D g) {\n // Fill the background.\n g.setColor(MISSING_COLOR);\n g.fillRect(0, 0, width, height);\n\n // Find the bounds of the samples to draw.\n int minFrame = Integer.MAX_VALUE;\n int maxFrame = Integer.MIN_VALUE;\n for (BitData bitData : mHistory) {\n minFrame = Math.min(Math.min(bitData.getStartFrame(), bitData.getEndFrame()), minFrame);\n maxFrame = Math.max(Math.max(bitData.getStartFrame(), bitData.getEndFrame()), maxFrame);\n }\n // Show a bit past the error point.\n maxFrame = Math.min(maxFrame + 100, samples.length - 1);\n int frameWidth = maxFrame - minFrame + 1;\n\n // Draw all backgrounds.\n for (BitData bitData : mHistory) {\n // Compute the background color for this bit.\n Color backgroundColor;\n switch (bitData.getBitType()) {\n case ZERO:\n backgroundColor = ZERO_BIT_COLOR;\n break;\n\n case ONE:\n backgroundColor = ONE_BIT_COLOR;\n break;\n\n case START:\n backgroundColor = START_BIT_COLOR;\n break;\n\n default:\n case BAD:\n backgroundColor = BAD_BIT_COLOR;\n break;\n }\n\n // Map to image.\n int startX = (bitData.getStartFrame() - minFrame)*width/frameWidth;\n startX = clamp(startX, 0, width - 1);\n int endX = (bitData.getEndFrame() - minFrame)*width/frameWidth;\n endX = clamp(endX, 0, width - 1);\n\n // Draw background.\n g.setColor(backgroundColor);\n g.fillRect(startX, 0, endX - startX, height);\n }\n\n // Draw signal.\n int lastX = -1;\n int lastY = -1;\n g.setColor(LINE_COLOR);\n for (int frame = minFrame; frame < maxFrame; frame++) {\n // Draw line.\n int x = (frame - minFrame)*width/frameWidth;\n x = clamp(x, 0, width - 1);\n\n // *Must* cast to int first or -32768 won't negate properly.\n int y = -(int)samples[frame]*(height/2)/32768 + height/2;\n y = clamp(y, 0, height - 1);\n\n if (lastX != -1) {\n g.drawLine(lastX, lastY, x, y);\n }\n\n lastX = x;\n lastY = y;\n }\n\n // Draw grid.\n g.setColor(Color.GRAY);\n int y = height/2;\n g.drawLine(0, y, width - 1, y);\n if (threshold != 0) {\n y = threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n y = -threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n }\n }", "AnalogPin createAnalogPin();", "public static AssetGroupSignalServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceStub>() {\n @java.lang.Override\n public AssetGroupSignalServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AssetGroupSignalServiceStub(channel, callOptions);\n }\n };\n return AssetGroupSignalServiceStub.newStub(factory, channel);\n }", "public void setSignalPosition(int signalPosition) {\n this.signalPosition = signalPosition;\n }", "public MacAdapter(VisBioFrame bio) { this.bio = bio; }", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "private void setupVisualizerFxAndUI() {\n\n mLinearLayout = (LinearLayout) findViewById(R.id.linearLayoutVisual);\n // Create a VisualizerView to display the audio waveform for the current settings\n mVisualizerView = new VisualizerView(this);\n mVisualizerView.setLayoutParams(new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n (int) (VISUALIZER_HEIGHT_DIP * getResources().getDisplayMetrics().density)));\n mLinearLayout.addView(mVisualizerView);\n\n // Create the Visualizer object and attach it to our media player.\n\n\n\n\n\n\n mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());\n //mVisualizer = new Visualizer(0);\n mVisualizer.setCaptureSize(Visualizer.getCaptureSizeRange()[1]);\n\n mVisualizer.setDataCaptureListener(new Visualizer.OnDataCaptureListener() {\n public void onWaveFormDataCapture(Visualizer visualizer, byte[] bytes,\n int samplingRate) {\n mVisualizerView.updateVisualizer(bytes);\n }\n\n public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {\n }\n }, Visualizer.getMaxCaptureRate() / 2, true, false);\n }", "com.google.protobuf.ByteString\n getSignalBytes();", "public abstract void mo3997b(Canvas canvas);", "public abstract void mo3998c(Canvas canvas);", "public BroadcastDrawer( String s ){\r\n\t\tsuper(s);\r\n\t\tsetResizable(true);\r\n\t\tsetBounds( 0, 0, WIDTH, HEIGHT);\r\n\t\ttheCanvas = new QTCanvas (QTCanvas.kFreeResize, 0.5F, 0.5F);\r\n\t\t\r\n\t\t/* creating and intializing AWT components */\r\n\t\tsetLayout( new BorderLayout() );\r\n\t\tadd (theCanvas, \"Center\");\r\n\t\tstartBtn = new Button (\"Start Broadcast\");\r\n\t\tButtonListener listener = new ButtonListener();\r\n\t\tstartBtn.addActionListener (listener);\r\n\t\tPanel statusPanel = new Panel();\r\n\t\tadd (statusPanel, \"South\");\r\n\t\tstatusPanel.add( startBtn );\r\n\t\tstatusPanel.setBackground( Color.lightGray );\r\n\t\tLabel timeBaseLabel = new Label( \"Time base:\" );\r\n\t\ttimeBaseLabel.setLocation( 10, 10 );\r\n\t\tLabel rateLabel = new Label(\"Data rate:\" );\r\n\t\trateLabel.setLocation( 10, 50 );\r\n\t\tcurrTimeLabel = new Label( \"00:00:00.00 \" );\r\n\t\tcurrTimeLabel.setLocation( 80, 10 );\r\n\t\tcurrRateLabel = new Label(\"0 \");\r\n\t\tcurrRateLabel.setLocation( 80, 50 );\r\n\t\tstatusPanel.add(timeBaseLabel);\r\n\t\tstatusPanel.add(currTimeLabel);\r\n\t\tstatusPanel.add(rateLabel);\r\n\t\tstatusPanel.add(currRateLabel);\r\n\r\n\t\taddWindowListener( new WindowAdapter() \t//\thandle quit when user closes main window\r\n {\r\n public void windowClosing( WindowEvent we )\r\n {\r\n \tstopBroadcast();\t\t\r\n QTSession.close();\t\t\r\n dispose();\t\t\t\t\t\r\n }\r\n public void windowClosed( WindowEvent we )\r\n {\r\n System.exit( 0 );\t\t\r\n }\r\n });\r\n\t}", "protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = sensor.getType();\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "@Override\n public void onSuccess() {\n view = (LineChartView) findViewById(R.id.lineview);\n line = new Line();\n line.setHasLines(true);\n line.setHasPoints(false);\n line.setStrokeWidth(1);\n data = new LineChartData(Arrays.asList(line));\n Axis axisX = new Axis();\n Axis axisY = new Axis().setHasLines(true);\n data.setAxisXBottom(axisX);\n data.setAxisYLeft(axisY);\n// bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);\n// canvas = new Canvas(bitmap);\n// view.setDrawer(new DrawingView.Drawer() {\n// @Override\n// public void draw(Canvas canvas) {\n// canvas.drawBitmap(bitmap, 0, 0, null);\n// }\n// });\n connection = connectionManager.getConnection();\n\n connection.addUpdateListener(new Connection.UpdateListener() {\n @Override\n public void update() {\n if (sensors == null) {\n sensors = connection.getSensors();\n list = (ListView) findViewById(R.id.channellist);\n list.post(new Runnable() {\n @Override\n public void run() {\n list.setAdapter(new ArrayAdapter<Sensor>(MainActivity.this, R.layout.itemview, sensors));\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n activeSensor((Sensor) parent.getAdapter().getItem(position));\n draw();\n }\n });\n }\n });\n list.post(new Runnable() {\n @Override\n public void run() {\n list.setItemChecked(0, true);\n list.performItemClick(list.getChildAt(0), 0, 0);\n }\n });\n }\n draw();\n list.post(new Runnable() {\n @Override\n public void run() {\n int first = list.getFirstVisiblePosition();\n int last = list.getLastVisiblePosition();\n int j = 0;\n for (int i = first; i <= last; i++) {\n ((TextView) list.getChildAt(j++)).setText(sensors[i].toString());\n }\n }\n });\n }\n });\n aDialog.dismiss();\n }", "public MagnitudeSignal(ComplexSignal s) {\n\t\tlength = s.length();\n\t\tdata = new float[length];\n\t\tfloat r, im;\n\t\tfor (int x = 0; x < s.length; x++) {\n\t\t\tr = s.getReal(x);\n\t\t\tim = s.getImag(x);\n\t\t\tdata[x] = (float) Math.sqrt(r * r + im * im);\n\t\t}\n\t}", "public static void showSelectSensorPlotWithAddSignals(Context context, final ShimmerService shimmerService, final String bluetoothAddress, final XYPlot dynamicPlot, List<String[]> additionalSignalsList) {\n mAdditionalSignalsList = additionalSignalsList;\n showSelectSensorPlot(context, shimmerService, bluetoothAddress, dynamicPlot);\n }", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "java.lang.String getSignal();", "@Override\n\tpublic void callButton(TrafficSignal TS) {\n\t\t\n\t}", "protected IFigure getCustomFeedbackFigure(Object modelPart) {\n\t\tIFigure figure;\n\n\t\t// Based on the modelPart, we could create another figure that is shown\n\t\t// during drag\n\t\tfigure = new RectangleFigure();\n\t\t((RectangleFigure) figure).setXOR(true);\n\t\t((RectangleFigure) figure).setFill(true);\n\t\tfigure.setBackgroundColor(background);\n\t\tfigure.setForegroundColor(ColorConstants.white);\n\n\t\treturn figure;\n\t}", "public static void main(String[] args) {\n String keyboard = \"q2we4r5ty7u8i9op-[=zxdcfvgbnjmk,;/' \";\r\n // number of strings variable\r\n int numberOfStrings = keyboard.length();\r\n GuitarString[] guitarStringsArray = new GuitarString[numberOfStrings];\r\n RingBuffer sampleBuff = new RingBuffer();\r\n \r\n StdDraw.setXscale(0, 100); // sets x scale from 0 to 100\r\n StdDraw.setYscale(-10,10); // sets y scale from -10 to 10 (y should be between -1 and 1)\r\n StdDraw.enableDoubleBuffering(); // drawing takes place on off-screen canvas\r\n \r\n int x = 0;\r\n for (int i = 0; i < numberOfStrings; i++) {\r\n double f = 440.0 * Math.pow(2, (i - 24) / 12.0);\r\n guitarStringsArray[i] = new GuitarString(f);\r\n }\r\n \r\n while (true) {\r\n double sample = 0;\r\n if (StdDraw.hasNextKeyTyped()) {\r\n char key = StdDraw.nextKeyTyped();\r\n if (keyboard.indexOf(key) != -1) {\r\n guitarStringsArray[keyboard.indexOf(key)].pluck();\r\n }\r\n }\r\n\t for (int j = 0; j < guitarStringsArray.length; j++) {\r\n\t sample += guitarStringsArray[j].sample();\r\n\t }\r\n\t //System.out.println(sample);\r\n\t // plays audio\r\n\t StdAudio.play(sample); \r\n\t // enqueues sample into buffer\r\n\t sampleBuff.enqueue(sample);\r\n\t \r\n\t // if buffer size is greater than 1\r\n\t if (sampleBuff.size() > 1) {\r\n\t \tSystem.out.println(\"x: \" + x);\r\n\t // if x == 0 clear the drawing \r\n\t if (x == 100) {\r\n\t \tx = 0;\r\n\t \tStdDraw.clear();\r\n\t }\r\n\t // draws from (x, buff.deq) to (x+1, buff.peek)\r\n\t StdDraw.line(x, sampleBuff.dequeue(), x+1, sampleBuff.peek());\r\n\t // shows and pauses the drawing \r\n\t \r\n\t StdDraw.show();\r\n\t StdDraw.pause(10);\r\n\t \r\n\t // x iterator\r\n\t x++;\r\n\t } \r\n\t \r\n\t for (int j = 0; j < guitarStringsArray.length; j++) {\r\n\t guitarStringsArray[j].tic();\r\n\t } \r\n }\r\n }", "public Canvas(){\r\n\t\tsuper(new FlowLayout());\r\n\t\tthis.setPreferredSize(new Dimension(400, 400));\r\n\t\tthis.setBackground(Color.WHITE);\r\n\t}", "@Override\n public void onFftDataCapture(Visualizer visualizer, byte[] fft,\n int samplingRate) {\n\n }", "private synchronized void setSignals(SignalEvent event)\r\n\t{\r\n\t\tfor(int i = 0;i < event.getLeftSignal().length; i++)\r\n\t\t{\r\n\t\t\tif(llleftSamples.size() < maxSize/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY ));\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.removeFirst();\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY));\r\n\t\t\t\tllrightSamples.removeFirst();\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<event.getfftHelperObj().getFFTSignal().length;i++)\r\n\t\t{\t\t\r\n\t\t\tif(llFFTSamples.size() < (fftSize/2)/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY ));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.removeFirst();\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tcnt++;\r\n\t}", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private void updateSignal() {\n getGlobals().informationSignal =\n getContext().getPrng().gaussian(0,getGlobals().volatilityInfo).sample();\n\n }", "public Canvas(IFramework framework) {\r\n\t this.framework = framework;\r\n\t this.data = framework.getData();\r\n\t this.maxRatio = framework.getDisplayMenu().getMaxRatioScale();\r\n\t this.minRatio = framework.getDisplayMenu().getMinRatioScale();\r\n\t}", "public WaveView() {\n initComponents();\n }", "private DoubleMatrix1D nextSignal() {\n int i = PersistentRandomUtil.getInstance().nextInt(data.rows());\n numSignalsGenerated++;\n return data.viewRow(i);\n }", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "public Canvas(MainWindow main){\n super();\n this.setBounds(0, 0, Const.WINDOW_SIZE, Const.WINDOW_SIZE); //Seta o tamanho do canvas\n this.init(); //Chama as threads\n }", "void createEqualizerControls();", "public ImageCanvas() {\r\n super();\r\n }", "private static JFreeChart createChart(XYDataset dataset) {\n\n chart = ChartFactory.createTimeSeriesChart(\n \"Stromzählerübersicht\", // Titel\n \"Datum\", // x-Achse label\n \"kWh\", // y-Achse label\n dataset);\n\n chart.setBackgroundPaint(Color.WHITE);\n\n XYPlot plot = (XYPlot) chart.getPlot();\n plot.setBackgroundPaint(Color.LIGHT_GRAY);\n plot.setDomainGridlinePaint(Color.WHITE);\n plot.setRangeGridlinePaint(Color.WHITE);\n plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));\n plot.setDomainCrosshairVisible(true);\n plot.setRangeCrosshairVisible(true);\n\n XYItemRenderer r = plot.getRenderer();\n if (r instanceof XYLineAndShapeRenderer) {\n XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;\n renderer.setDefaultShapesVisible(false);\n renderer.setDefaultShapesFilled(false);\n renderer.setDrawSeriesLineAsPath(true);\n }\n\n DateAxis axis = (DateAxis) plot.getDomainAxis();\n axis.setDateFormatOverride(new SimpleDateFormat(\"dd-MM-yyyy\"));\n\n return chart;\n\n }", "void genTone(){\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate/freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n }\n }", "protected Connection createConnectionFigure() {\n\t\treturn new SyncFigure();\n\t}", "public interface SignalInput extends DspObject {\r\n\t/**\r\n\t * Set the signal strength on this signal input. Normally 0.0f means 'no\r\n\t * signal', and normally the range is -1.0 until 1.0 for audio signals.\r\n\t * However, nothing prevents a signal to be outside of this range; and they\r\n\t * will often be. For example mixing multiple signals together will\r\n\t * typically lead to signals getting out of that -1.0 to 1.0 range. And a\r\n\t * signal doesn't need to be audio, but can be any kind of signal (for\r\n\t * example a signal that controls a frequency).<br/>\r\n\t * A signal should be treated as being in the range -1.0f to 1.0f for audio,\r\n\t * but can otherwise be completely arbitrary.\r\n\t * \r\n\t * @param signal\r\n\t * The signal\r\n\t */\r\n\tpublic void set(float signal);\r\n}", "public SoundClient(String host, int port){\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n setLayout(new FlowLayout());\n\n add(recordBtn = new JButton(\"Record\"));\n add(stopBtn = new JButton(\"Stop&Send\"));\n add(pauseBtn = new JButton(\"Pause\"));\n add(resumeBtn = new JButton(\"Resume\"));\n add(pauseBtn);\n add(resumeBtn);\n setBtnState();\n\n recordBtn.addActionListener(e -> record());\n stopBtn.addActionListener(e -> {\n recording = false;\n playing = true;\n recorder.stopRecording();\n sendSound(recorder.getStorage());\n setBtnState();\n });\n pauseBtn.addActionListener(e -> {\n line.stop();\n paused = true;\n setBtnState();});\n resumeBtn.addActionListener(e -> {\n paused = false;\n line.start();\n line.loop(line.LOOP_CONTINUOUSLY);\n setBtnState();\n });\n\n setVisible(true);\n pack();\n\n try {\n socket = new Socket(host, port);\n objOut = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n System.out.println(\"Couldn't connect. \" + e.getMessage());\n System.exit(1);\n }\n }", "@Override\n\tpublic void update(MySubject sb) {\n\t\tcanvas = (MyCanvas) sb;\n\n\t}", "public interface GUI {\r\n\r\n public SPLGraph getSoundLevelGraph();\r\n\r\n public int getHeight();\r\n\r\n public int getWidth();\r\n\r\n public float getLabelWidth(String label, boolean antiAlias);\r\n\r\n public float getLabelHeight(String label, boolean antiAlias);\r\n\r\n public void drawLine(NTColor color, float x1, float y1, float x2, float y2, boolean antiAlias, boolean hairline);\r\n\r\n public void drawLabel(String label, NTColor labelColor, float x, float y, boolean antiAlias);\r\n\r\n public void drawSurface(NTColor color, ArrayList<Float> xs, ArrayList<Float> ys, boolean antiAlias);\r\n\r\n }", "public GraphController(GUI view){\r\n\t\tview.setGvWindowListener(new GvWindowListener(){\r\n\t\t\tpublic void buttonClicked(GraphingEvent ge){\r\n\t\t\t\tmodel = ge.getDJAI_GV();\r\n\t\t\t\tmodel.setDate(ge.getDJAI_GV().getDate());\r\n\t\t\t\tmodel.setValue(ge.getDJAI_GV().getValue());\r\n\t\t\t\tSystem.out.println(ge.getSource());\r\n\t\t\t\t\r\n\t\t\t\tData = new ArrayList<String>();\r\n\t\t\t\tData = DataSaver.dowArray_C;\r\n\t\t\t\t\r\n\t\t\t\tvalue = new double[Data.size()];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Data.size(); i++){\r\n\t\t\t\t\tvalue[i] = Double.parseDouble(Data.get(i).substring(10));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = new Stage();\r\n\t\t\t\tstage.setTitle(\"Graph Data\");\r\n\t\t\t\t\r\n\t\t\t\tfinal CategoryAxis xAxis = new CategoryAxis();\r\n\t\t\t final NumberAxis yAxis = new NumberAxis();\r\n\t\t\t xAxis.setLabel(\"Number of Month\");\r\n\t\t\t final LineChart<String, Number> lineChart = new LineChart<String, Number>(\r\n\t\t\t xAxis, yAxis);\t\t \r\n\t\t\t xAxis.setLabel(\"Date\");\r\n\t\t\t xAxis.setTickMarkVisible(false);\r\n\t\t\t \r\n\t\t\t yAxis.setLabel(\"DJAI Value\");\r\n\t\t\t yAxis.setAutoRanging(false);\r\n\t\t\t yAxis.setTickMarkVisible(false);\r\n\t\t\t yAxis.setUpperBound(20000);\r\n\t\t\t yAxis.setLowerBound(6000);\r\n\t\t\t yAxis.setTickUnit(2000);\r\n\t\t\t yAxis.setMinorTickCount(14);\r\n\t\t\t XYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\r\n\t\t\t series.setName(\"DJAI Chart \");\r\n\t\t\t\r\n\t\t\t for(int i = 0; i < Data.size(); i++){\r\n\t\t\t \tseries.getData().add(new XYChart.Data<String, Number>(Data.get(i).substring(0, 10),\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t value[i]));\r\n\t\t\t }\r\n\t\t\t lineChart.setCreateSymbols(false);\r\n\t\t\t lineChart.getData().add(series);\r\n\t\t\t\tlineChart.isResizable();\r\n\t\t\t Scene scene = new Scene(lineChart,14000,600);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t\tstage.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private Canvas createCanvas(IFramework framework, MouseListener listener) {\r\n\tCanvas canvas = new Canvas(framework);\r\n\tcanvas.setBackground(Color.white);\r\n\tcanvas.addMouseListener(listener);\r\n\treturn canvas;\r\n }", "@Override\n BackgroundLineChart generateLineChart() {\n\n final BackgroundLineChart lineChart;\n final NumberAxis xAxis = new NumberAxis();\n xAxis.setLabel(\"Time\");\n\n List<XYChart.Series<Number, Number>> seriesList = FXCollections.observableArrayList();\n\n for (DataPoint.Type type : DataPoint.Types.values()) {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(type.getName());\n seriesList.add(series);\n this.getSeriesMap().put(type, series);\n }\n\n lineChart = new BackgroundLineChart(this.captureSession, xAxis, new NumberAxis(), FXCollections.observableArrayList(seriesList));\n\n //@Source - https://stackoverflow.com/a/44957354 - Enables Toggle of Data Series by clicking on their icon in the legend\n for (Node n : lineChart.getChildrenUnmodifiable()) {\n if (n instanceof Legend) {\n Legend l = (Legend) n;\n for (Legend.LegendItem li : l.getItems()) {\n for (XYChart.Series<Number, Number> s : lineChart.getData()) {\n if (s.getName().equals(li.getText())) {\n li.getSymbol().setCursor(Cursor.HAND); // Hint user that legend symbol is clickable\n li.setText(li.getText() + \" On\");\n li.getSymbol().setOnMouseClicked(me -> {\n if (me.getButton() == MouseButton.PRIMARY) {\n s.getNode().setVisible(!s.getNode().isVisible()); // Toggle visibility of line\n\n String[] displayName = li.getText().split(\" \");\n li.setText(String.format(\"%s %s\", String.join(\" \", Arrays.copyOfRange(displayName, 0, displayName.length - 1)), (s.getNode().isVisible() ? \"On\" : \"Off\")));\n for (XYChart.Data<Number, Number> d : s.getData()) {\n if (d.getNode() != null) {\n d.getNode().setVisible(s.getNode().isVisible()); // Toggle visibility of every node in the series\n }\n }\n lineChart.redraw();\n }\n });\n break;\n }\n }\n }\n }\n }\n //---\n\n return lineChart;\n }", "public TestPlotter() {\n\t\tplot = new Plot2D(title, xLabel, yLabel, true);\n\t\tplot.addChartMouseListener(new PlotListener());\n\t\tplot.addDismissListener(new AL());\n\t\tplot.setDefaultCloseOperation(plotter.EXIT_ON_CLOSE);\n\t\t\n\t}", "private static JFreeChart createChart(String xaxisName) {\n JFreeChart chart = MimsChartFactory.createMimsXYLineChart(\"\", xaxisName, \"\", null, PlotOrientation.VERTICAL, true, true, false);\n chart.setBackgroundPaint(Color.white);\n // Get a reference to the plot.\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n\n // Create integer x-axis.\n plot.getDomainAxis().setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\n // Set colors.\n plot.setBackgroundPaint(Color.lightGray);\n plot.setDomainGridlinePaint(Color.white);\n plot.setRangeGridlinePaint(Color.white);\n\n // Movable range and domain.\n plot.setDomainPannable(true);\n plot.setRangePannable(true);\n\n // Allow crosshairs to 'focus' in on a given point.\n plot.setDomainCrosshairVisible(true);\n plot.setRangeCrosshairVisible(true);\n\n return chart;\n }", "private void setupVisualizerFxAndUi() {\n mVisualizer = new Visualizer(0); // Using system audio session ID\n mVisualizer.setEnabled(false);\n mVisualizer.setCaptureSize(Visualizer.getCaptureSizeRange()[1] );\n mVisualizer.setScalingMode(SCALING_MODE_AS_PLAYED);//SCALING_MODE_NORMALIZED);//\n mVisualizer.setDataCaptureListener(\n new Visualizer.OnDataCaptureListener() {\n public void onWaveFormDataCapture(\n Visualizer visualizer,\n byte[] bytes,\n int samplingRate) {\n // mVisualizerView.updateVisualizer(bytes);\n }\n\n public void onFftDataCapture(\n Visualizer visualizer,\n byte[] bytes,\n int samplingRate) {\n //mVisualizerView.updateVisualizer(bytes);\\\n if(debugModeOn) {\n debugViewModel.update(bytes);\n }\n // Do nothing for now\n }\n }, Visualizer.getMaxCaptureRate()-1 , false, true);\n }", "JFreeChart generateBox();", "protected Connection createConnectionFigure() {\r\n\t\treturn new ImplicitCallFigure();\r\n\t}", "public static PVector fromCanvas( PVector in) {\n\t\treturn fromCanvas( in, 0 );\n\t}", "public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }", "public RasterRenderer(RasterPlot plot) {\n\t\t\tthis.plot = plot;\n\t\t\txColumn = 0;\n\t\t\tyColumn = 1;\n\t\t\tvalueColumn = 2;\n\t\t}", "public void b(Canvas paramCanvas) {\n }", "public static void showSelectSensorPlotWithFilterAddSignals(Context context, final ShimmerService shimmerService, final String bluetoothAddress, final XYPlot dynamicPlot, List<String[]> additionalSignalsList, List<String[]> filteredSignalsList) {\n mFilteredSignalsList = filteredSignalsList;\n mAdditionalSignalsList = additionalSignalsList;\n showSelectSensorPlot(context, shimmerService, bluetoothAddress, dynamicPlot);\n }", "public static void sendSignal(String topology, String nodeName, Serializable value, AbstractSignalConnection con) {\r\n sendSignal(topology, nodeName, SIGNALNAME, value, con);\r\n }", "public abstract void mo3995a(Canvas canvas);", "public interface Canvas {\n\tpublic String LABEL_CHANGE = \"label_change_property\";\n\t/**\n\t * @return name of Canvas or an empty String by default. MAY NOT BE NULL.\n\t */\n\tpublic String getName();\n\t/**\n\t * @return color of Canvas or null by default\n\t */\n\tpublic Color getColor();\n\t/**\n\t * @return the JComponent representation of this Canvas. MAY NOT BE NULL.\n\t */\n\tpublic JComponent getJComponent();\n\t/**\n\t * If this canvas is to be highlighted (because it might\n\t * have focus for example), then getHighlight should return\n\t * the color of that highlight. Otherwise, it should\n\t * return null\n\t * @return highlighting color or null by default.\n\t */\n\tpublic Color getHighlight();\n}", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\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 signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void paint(T compositeDiagram, Rectangle2D canvas, RegularDivider divider);" ]
[ "0.721669", "0.69806826", "0.6918171", "0.6763104", "0.522743", "0.50391686", "0.50080687", "0.4961567", "0.48109052", "0.48007402", "0.47682512", "0.47537544", "0.4685437", "0.46769032", "0.46706665", "0.46673805", "0.46628955", "0.46402848", "0.4626992", "0.45912638", "0.45801106", "0.4547126", "0.45293707", "0.44629478", "0.44578555", "0.4454346", "0.44529104", "0.44329244", "0.441436", "0.44132933", "0.4392558", "0.43739325", "0.43695053", "0.4353031", "0.43497005", "0.4333438", "0.43322623", "0.43230426", "0.43227634", "0.43171626", "0.4312038", "0.4292235", "0.4288791", "0.42855373", "0.4276991", "0.4274247", "0.4262611", "0.42376438", "0.42350903", "0.42197034", "0.42033964", "0.4203047", "0.4199048", "0.41895908", "0.41675186", "0.41647407", "0.4154511", "0.41509157", "0.41481313", "0.41339907", "0.4118722", "0.41176575", "0.4111584", "0.41115588", "0.41102418", "0.41101804", "0.41099098", "0.41091952", "0.41059923", "0.41054967", "0.41052595", "0.40977636", "0.40895712", "0.40881866", "0.40780893", "0.40745208", "0.40743163", "0.4073583", "0.40661448", "0.4065509", "0.40652737", "0.40580505", "0.40563288", "0.40470973", "0.40436217", "0.4042838", "0.40417168", "0.403848", "0.403804", "0.40295285", "0.40280324", "0.4023076", "0.40210366", "0.40202227", "0.40194717", "0.40177315", "0.401505", "0.40145847", "0.40121445", "0.40080738" ]
0.7324956
0
Creates an SignalCanvas from a ComplexSignal
public SignalCanvas(ComplexSignal sig) throws BadSignalException { super(); image = getJavaSignal(sig); jsignal = sig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SignalCanvas() {\n\t\tsuper();\n\t}", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(DiscreteSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public MagnitudeSignal(ComplexSignal s) {\n\t\tlength = s.length();\n\t\tdata = new float[length];\n\t\tfloat r, im;\n\t\tfor (int x = 0; x < s.length; x++) {\n\t\t\tr = s.getReal(x);\n\t\t\tim = s.getImag(x);\n\t\t\tdata[x] = (float) Math.sqrt(r * r + im * im);\n\t\t}\n\t}", "public Complex() {\n initComponents();\n }", "public ColourBinPanel(CameraCanvas canvas)\r\n\t{\r\n\t\tmCameraCanvas = canvas;\r\n\t\tmBinSet = new FeatureWidgetRadioManager();\r\n\t}", "@Override\n protected void initializeCanvas(final Composite canvasComposite) {\n _plot = new Plot(canvasComposite, initializeModelSpace(), PlotScrolling.NONE);\n\n // Get the various plot components that will be used.\n // TODO: improve the plot API so this is simpler.\n IModelSpaceCanvas canvas = _plot.getModelSpaceCanvas();\n\n RGB colorForeground = new RGB(0, 0, 0);\n RGB colorBackground = new RGB(255, 255, 255);\n\n // Set the background color and grid line properties.\n canvas.setBackgroundColor(colorBackground);\n canvas.setVerticalAxisGridLineProperties(LineStyle.SOLID, colorForeground, 1);\n canvas.setHorizontalAxisGridLineProperties(LineStyle.NONE, colorForeground, 0);\n _plot.setVerticalAxisGridLineDensity(20);\n _plot.setVerticalAxisAnnotationDensity(10);\n\n // Set the formatter for x-coordinates.\n NumberFormat cursorFormatter = NumberFormat.getIntegerInstance();\n _plot.setCursorFormatterX(cursorFormatter);\n\n // Initialize the canvas layout model (label margins, etc).\n CanvasLayoutModel layoutModel = _plot.getCanvasLayoutModel();\n // Hide the top and right axes to save screen space.\n layoutModel.setTopAxisHeight(50);\n layoutModel.setTopLabelHeight(0);\n layoutModel.setBottomLabelHeight(0);\n layoutModel.setBottomAxisHeight(0);\n layoutModel.setRightAxisWidth(0);\n layoutModel.setRightLabelWidth(0);\n _plot.updateCanvasLayout(layoutModel);\n }", "public void displayWave(ArrayList<Float> wave,Color color){\r\n\r\n //find the center pixel's Y value so we know where to start drawing the wave from\r\n //this will ensure the wave is drawn where the distance to the top and the bottom of the screen is equal\r\n int CenterYPixel = canvas.heightProperty().intValue()/2;//this is int division\r\n gc.beginPath();\r\n gc.setStroke(color);\r\n gc.setLineWidth(waveThickness);\r\n\r\n\r\n\r\n if(!drawFromRisingEdge) {\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(0) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = 0; i < wave.size(); i++) {\r\n //for the x value of the lineTo function, we use canvas.widthProperty().intValue()/wave1.size()\r\n //to convert the wave index number to pixels such that it fills the entire width of the canvas\r\n //for the y value, we start from the center CenterYPixel, and then add the value of the wave\r\n //(0,0) of the canvas is top left, so a high y value is lower, so we use the - to flip the wave\r\n //we then scale this by the voltageMultiplier for our user defined divisions\r\n //and lastly scale by pixelsPerDivision so convert the voltage into pixel values (1V is pixelsPerDivision pixels from the center line)\r\n float xPos = (int) (pixelsPerSample * i);\r\n // System.out.println(\"XVal:\"+xPos+\" pix per sample \"+pixelsPerSample);\r\n // gc.lineTo(i * canvas.widthProperty().intValue() / wave.size(), CenterYPixel + Math.round(-wave.get(i) * voltageMultiplier * pixelsPerDivision));\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n }else{\r\n int risingIndex = findRisingEdgeIndex();\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(risingIndex) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = risingIndex; i < wave.size(); i++) {\r\n\r\n float xPos = (int) (pixelsPerSample * (i-risingIndex));\r\n\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n\r\n }\r\n gc.stroke();\r\n }", "DummyCanvas() {\n super(null);\n // super(null); ----------------ADDED TO COMPILE -----------------------------------------\n }", "public Builder setSignalBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public Complex(){\r\n\t this(0,0);\r\n\t}", "public SkinnedMeshCanvas(Display d) \r\n {\r\n super(true); // call base class constructor\r\n mDisplay = d; // store display object\r\n }", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "public void setSignal(double signal) {_signal = signal;}", "public JComponent addOscillator(int osc, Color color)\n {\n Category category = new Category(this, \"Oscillator \" + osc, color);\n // category.makePasteable(\"osc\" + osc);\n category.makePasteable(\"osc\");\n\n JComponent comp;\n String[] params;\n HBox hbox = new HBox();\n\n VBox vbox = new VBox();\n params = WAVEFORMS;\n comp = new Chooser(\"Waveform\", this, \"osc\" + osc + \"waveform\", params);\n vbox.add(comp);\n\n comp = new CheckBox(\"Keytrack\", this, \"osc\" + osc + \"keytrack\", true); // flipped\n vbox.add(comp);\n \n if (osc == 1)\n {\n comp = new CheckBox(\"Waveshape\", this, \"waveshape\");\n vbox.add(comp);\n }\n \n if (osc == 2 || osc == 3)\n {\n comp = new CheckBox(\"Osc 1 Sync\", this, \"osc\" + osc + \"sync\");\n vbox.add(comp);\n }\n \n hbox.add(vbox);\n \n comp = new LabelledDial(\"Coarse\", this, \"osc\" + osc + \"coarsetune\", color, 0, 127, 64);\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n\n comp = new LabelledDial(\"Fine\", this, \"osc\" + osc + \"finetune\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return String.format(\"%2.1f\", ((value - 64) / 64.0 * 50.0));\n else return String.format(\"%2.1f\", ((value - 64) / 63.0) * 50.0);\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n \n if (osc == 1)\n {\n comp = new LabelledDial(\"Osc 3 FM\", this, \"fmlevel\", color, 0, 127);\n hbox.add(comp);\n\n comp = new LabelledDial(\"Waveshape\", this, \"waveshapewidth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Width\");\n hbox.add(comp);\n }\n\n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "Complex() {\n real = 0.0;\n imag = 0.0;\n }", "public Oscilloscope(Main tempMain) {\r\n\r\n lowerFixes.add(\"m\");\r\n lowerFixes.add(\"mn\");\r\n lowerFixes.add(\"n\");\r\n lowerFixes.add(\"p\");\r\n\r\n higherFixes.add(\"K\");\r\n higherFixes.add(\"M\");\r\n higherFixes.add(\"G\");\r\n higherFixes.add(\"T\");\r\n\r\n\r\n\r\n //store the reference to main\r\n main=tempMain;\r\n\r\n //then we can add the canvas and graphics for displaying the wave\r\n canvas = new Canvas(canvasSizeXY, canvasSizeXY);\r\n gc = canvas.getGraphicsContext2D();\r\n this.setCenter(canvas);//and display that at the center of the pane\r\n\r\n //make the buttons\r\n\r\n\r\n\r\n\r\n\r\n TitledPane controlsPane = new TitledPane(\"Controls\" , makeControlsPane());\r\n TitledPane divisionsPane = new TitledPane(\"Divisions\" , makeDivisionsPane());\r\n TitledPane triggerPane = new TitledPane(\"Trigger\",makeTriggerPane());\r\n // TitledPane mathematicalWavePane = new TitledPane(\"Mathematical Wave\" , makeMathematicalWavePane());\r\n TitledPane displayPane = new TitledPane(\"Display\" , makeDisplayPane());\r\n TitledPane cursorPane = new TitledPane(\"Cursors\" , makeCursorPane());\r\n\r\n controlsPane.maxWidth(2000);\r\n\r\n\r\n ScrollPane sp=new ScrollPane();\r\n\r\n sp.maxWidth(2000);\r\n\r\n //We add these buttons to a horizontal layout box\r\n VBox Panes = new VBox();\r\n Panes.getChildren().addAll(controlsPane,divisionsPane,triggerPane,displayPane,cursorPane);\r\n Panes.setMaxWidth(2000);\r\n sp.setContent(Panes);\r\n //and add then add this boc to the boarder pane\r\n this.setRight(sp);\r\n\r\n\r\n\r\n //new we will add info for each wave\r\n VBox tempStrings = new VBox(MeasurementFrequency,MeasurementMin,MeasurementMax,MeasurementPeakToPeak,MeasurementRMS);\r\n this.setBottom(tempStrings);\r\n wave1=new ArrayList<>();\r\n wave1.add(0f);\r\n displayAllWaves();\r\n }", "public static void showSelectSensorPlot(Context context, final ShimmerService shimmerService, final String bluetoothAddress, final XYPlot dynamicPlot){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(com.shimmerresearch.androidinstrumentdriver.R.layout.dialog_sensor_view);\n final Button buttonSetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.ButtonFilterPlotSignal);\n final Button buttonResetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.buttonResetFilterPlotSignal);\n final Button buttonDone = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.button_done);\n final EditText editTextSignalFilter = (EditText) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.editTextFilterPlotSignal);\n dialog.setCanceledOnTouchOutside(true);\n TextView title = (TextView) dialog.findViewById(android.R.id.title);\n if(title != null) {\n title.setText(\"Select Signal\");\n } else {\n Log.e(\"DialogConfigurations\", \"Title TextView is null!\");\n }\n final ListView listView = (ListView) dialog.findViewById(android.R.id.list);\n listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\n //Temporary list so we have the option of adding additional custom channels\n List<String[]> listOfChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n\n if(mAdditionalSignalsList != null && mAdditionalSignalsList.size() > 0) {\n for (String[] addSignal : mAdditionalSignalsList) {\n listOfChannels.add(addSignal); //Add the custom channel to the list of channels\n }\n }\n\n //Create a temporary list of channels to remove the filter signals while iterating through the original list of channels\n List<String[]> tempListOfChannelsWithSignalsFiltered = new ArrayList<String[]>();\n for(String[] temp : listOfChannels) {\n tempListOfChannelsWithSignalsFiltered.add(temp);\n }\n\n if(mFilteredSignalsList != null && mFilteredSignalsList.size() > 0) {\n for(String[] signalToFilter : mFilteredSignalsList) {\n for(String[] signal : listOfChannels) {\n //Check if the channel name and format (CAL/UNCAL) matches the signal to be filtered\n if(signal[1].equals(signalToFilter[1]) && signal[2].equals(signalToFilter[2])) {\n tempListOfChannelsWithSignalsFiltered.remove(signal);\n }\n }\n }\n }\n\n //Assign the filtered list back to the original list\n listOfChannels = tempListOfChannelsWithSignalsFiltered;\n\n //Join the Strings in each individual array in the list of channels in order to pass them to the ArrayAdapter\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listOfChannels.size();i++) {\n sensorList.add(joinStrings(listOfChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(context, android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n final List<String[]> listOfChannelsFinal = listOfChannels; //Final list so inner methods can access it\n\n buttonDone.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.hide();\n }\n });\n\n buttonSetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n List<String> sensorList = new ArrayList<String>();\n String plotSignaltoFilter = editTextSignalFilter.getText().toString();\n\n for (int i=listOfChannelsFinal.size()-1;i>-1;i--){\n String signal = joinStrings(listOfChannelsFinal.get(i));\n if (!signal.toLowerCase().contains(plotSignaltoFilter.toLowerCase())){\n\n listOfChannelsFinal.remove(i);\n }\n\n }\n\n for(int i=0;i<listOfChannelsFinal.size();i++) {\n sensorList.add(joinStrings(listOfChannelsFinal.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannelsFinal.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n }\n });\n\n buttonResetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n final List<String[]> listofChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listofChannels.size();i++) {\n sensorList.add(joinStrings(listofChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n //listView.setItemChecked(position, value);\n\n for (int p=0;p<listofChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listofChannels.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listofChannels.get(index));\n }\n }\n\n });\n\n\n }\n });\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n dialog.show();\n\n }", "public void getSignalCPT(Guid signalID, Vector activeSignals,\r\n Vector causalCPT, Vector causalOrder);", "public WaveView() {\n initComponents();\n }", "public CanvasElement(int width, int height, WatchViewStub stub){\n this.width = width;\n this.height = height;\n this.stub = stub;\n paint = new Paint();\n fillStyle = \"rgb(0,0,0)\";\n parseColors(fillStyle);\n\n lastX = 0;\n lastY = 0;\n\n bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n canvas = new Canvas(bitmap);\n canvas.drawColor(0xffffffff);\n\n }", "public ICanvas getNamedCanvas(String simpleName, IDevice device) {\n\t\ttry {\n\t\t\tICanvas canvas = (ICanvas) getObjectInstance(\"com.console.springernature.paint.model.\"+simpleName);\n\t\t\tif (device!=null) {\n\t\t\t\tcanvas.assignDevice(device);\n\t\t\t\tdevice.addCommandListener(canvas);\n\t\t\t\treturn canvas;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlogger.warn(\"(Custom Event) Unable to associate the given device to the canvas : \"+simpleName+\" ...\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (ClassCastException e) {\n\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the named canvas : \"+simpleName+\" ...\", e);\n\t\t} catch (Throwable e) {\n\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the named canvas : \"+simpleName+\" ...\", e);\n\t\t}\n\t\treturn null;\n\t}", "public static vtkCanvas createDummyCanvas(vtkActor actor)\n\t{\n\t\tfinal vtkCanvas canvas = new vtkCanvas()\n\t\t{\n\n\t\t\t/** Workaround for http://www.vtk.org/Bug/view.php?id=6268 */\n\t\t\t@Override\n\t\t\tpublic void setSize(int x, int y)\n\t\t\t{\n\t\t\t\tsuper.setSize(x, y);\n\t\t\t\tLock();\n\t\t\t\trw.SetSize(x, y);\n\t\t\t\tiren.SetSize(x, y);\n\t\t\t\tiren.ConfigureEvent();\n\t\t\t\tUnLock();\n\t\t\t}\n\t\t};\n\t\t// a renderer for the data\n\t\tfinal vtkRenderer ren1 = canvas.GetRenderer();\n\n\t\tren1.AddActor(actor);\n\t\t// background color white\n\t\tren1.SetBackground(1, 1, 1);\n\t\t// Make the canvas resizable with a splitter\n\t\t//layout\n\t\tcanvas.setMinimumSize(new Dimension(0, 0));\n\t\tcanvas.setPreferredSize(new Dimension(0, 0));\n\t\tren1.ResetCamera();\n\t\treturn canvas;\n\t}", "JFreeChart generateBox();", "public Builder clearSignal() {\n bitField0_ = (bitField0_ & ~0x00020000);\n signal_ = getDefaultInstance().getSignal();\n onChanged();\n return this;\n }", "public static /* varargs */ Object polygon(Complex initial, Object ... more$Mnpoints) {\n generalPath = new GeneralPath();\n n$Mnpoints = more$Mnpoints.length;\n path.moveTo(numbers.realPart(initial).doubleValue(), numbers.imagPart(initial).doubleValue());\n i = 0;\n do lbl-1000: // 2 sources:\n {\n if (i >= n$Mnpoints) {\n path.closePath();\n return path;\n }\n object2 = Promise.force(more$Mnpoints[i], Complex.class);\n pt = (Complex)object2;\n break;\n } while (true);\n catch (ClassCastException v0) {\n throw new WrongType(v0, \"pt\", -2, object2);\n }\n {\n path.lineTo(numbers.realPart(pt).doubleValue(), numbers.imagPart(pt).doubleValue());\n ++i;\n ** while (true)\n }\n }\n\n public static Composite compositeSrcOver() {\n return gui.compositeSrcOver(1.0f);\n }\n\n public static Composite compositeSrcOver(float alpha) {\n return AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);\n }\n\n public static Composite compositeSrc() {\n return gui.compositeSrc(1.0f);\n }\n\n public static Composite compositeSrc(float alpha) {\n return AlphaComposite.getInstance(AlphaComposite.SRC, alpha);\n }\n\n public static AffineTransform rotation(double theta) {\n return AffineTransform.getRotateInstance(theta);\n }\n\n public static Color asColor(Object value) {\n return value instanceof Color ? (Color)Promise.force(value, Color.class) : (value instanceof Integer ? new Color((Integer)Promise.force(value, Integer.class)) : (value instanceof IntNum ? new Color(IntNum.intValue(value)) : (Color)Promise.force(((Procedure)SlotGet.staticField).apply2(Lit0, value.toString()), Color.class)));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Button button(Object ... args) {\n String name;\n KAttr attr;\n Button button = new Button();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.buttonKeyword(button, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.buttonKeyword(button, name, value);\n ++i;\n continue;\n }\n gui.buttonNonKeyword(button, arg);\n ++i;\n }\n return button;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n static void buttonKeyword(Button button, String name, Object value) {\n if (name == \"foreground\") {\n button.setForeground(gui.asColor(value));\n return;\n }\n if (name == \"background\") {\n button.setBackground(gui.asColor(value));\n return;\n }\n if (name == \"action\") {\n button.setAction(value);\n return;\n }\n if (name == \"text\") {\n Object object2 = Promise.force(value, String.class);\n button.setText((String)(object2 == null ? null : object2.toString()));\n return;\n }\n if (name != \"disabled\") {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown button attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n Object object2 = Promise.force(value);\n try {\n button.setDisabled(KawaConvert.isTrue(object2));\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.kawa.models.Button.setDisabled(boolean)\", 2, object2);\n }\n }\n\n static boolean buttonNonKeyword(Button button, Object arg) {\n return true;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Button Button(Object ... args) {\n String name;\n KAttr attr;\n Button button = new Button();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.buttonKeyword(button, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.buttonKeyword(button, name, value);\n ++i;\n continue;\n }\n gui.buttonNonKeyword(button, arg);\n ++i;\n }\n return button;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Label Label(Object ... args) {\n String name;\n KAttr attr;\n Label instance = new Label();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.labelKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.labelKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.labelNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void labelKeyword(Label instance, String name, Object value) {\n if (name != Lit1) {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown label attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n Object object2 = Promise.force(value, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n static void labelNonKeyword(Label instance, Object arg) {\n Object object2 = Promise.force(arg, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Text Text(Object ... args) {\n String name;\n KAttr attr;\n Text instance = new Text();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.textKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.textKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.textNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void textKeyword(Text instance, String name, Object value) {\n if (name != Lit1) {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown text attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n Object object2 = Promise.force(value, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n static void textNonKeyword(Text instance, Object arg) {\n Object object2 = Promise.force(arg, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Row Row(Object ... args) {\n String name;\n KAttr attr;\n Row instance = new Row();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.boxKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.boxKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.boxNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void boxKeyword(Box instance, String name, Object value) {\n if (name != Lit2) {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown box attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n instance.setCellSpacing(value);\n }\n\n static void boxNonKeyword(Box box, Object arg) {\n box.add(gui.asModel(arg));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Column Column(Object ... args) {\n String name;\n KAttr attr;\n Column instance = new Column();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.boxKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.boxKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.boxNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n public static void setContent(Window window, Object pane) {\n window.setContent(pane);\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Window Window(Object ... args) {\n String name;\n KAttr attr;\n Window instance = Display.getInstance().makeWindow();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.windowKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.windowKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.windowNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void windowKeyword(Window instance, String name, Object value) {\n if (name == \"title\") {\n Object object2 = Promise.force(value, String.class);\n instance.setTitle((String)(object2 == null ? null : object2.toString()));\n } else if (name == \"content\") {\n instance.setContent(value);\n } else if (name == \"menubar\") {\n instance.setMenuBar(value);\n } else {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown window attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n }\n\n static void windowNonKeyword(Window instance, Object arg) {\n instance.setContent(arg);\n }\n\n static Model asModel(Object arg) {\n return Display.getInstance().coerceToModel(arg);\n }\n\n public static {\n Lit20 = new Object[0];\n Lit18 = Symbol.valueOf(\"run-application\");\n Lit19 = new SyntaxRules(Lit20, new SyntaxRule[]{new SyntaxRule(new SyntaxPattern(\"\\f\\u0018\\f\\u0007\\b\", Lit20, 1, \"gui.scm:193\"), \"\\u0001\", \"\\u0011\\u0018\\u0004\\b\\u0003\", new Object[]{PairWithPosition.make(Symbol.valueOf(\"$lookup$\"), Pair.make(Symbol.valueOf(\"gnu.kawa.models.Window\"), Pair.make(Pair.make(Symbol.valueOf(\"quasiquote\"), Pair.make(Symbol.valueOf(\"open\"), LList.Empty)), LList.Empty)), \"/mnt/hgfs/trunk/kawaForAndroid/kawa-2.4/gnu/kawa/slib/gui.scm\", 794631)}, 0)}, 1, Lit18);\n Lit17 = Symbol.valueOf(\"Window\");\n Lit16 = Symbol.valueOf(\"set-content\");\n Lit15 = Symbol.valueOf(\"Column\");\n Lit14 = Symbol.valueOf(\"Row\");\n Lit13 = Symbol.valueOf(\"Text\");\n Lit12 = Symbol.valueOf(\"Label\");\n Lit10 = Symbol.valueOf(\"Image\");\n Lit11 = new SyntaxRules(Lit20, new SyntaxRule[]{new SyntaxRule(new SyntaxPattern(\"\\f\\u0018\\u0003\", Lit20, 1, \"gui.scm:87\"), \"\\u0000\", \"\\u0011\\u0018\\u0004\\u0011\\u0018\\f\\u0002\", new Object[]{Symbol.valueOf(\"make\"), Symbol.valueOf(\"<gnu.kawa.models.DrawImage>\")}, 0)}, 1, Lit10);\n Lit9 = Symbol.valueOf(\"Button\");\n Lit8 = Symbol.valueOf(\"button\");\n Lit7 = Symbol.valueOf(\"as-color\");\n Lit6 = Symbol.valueOf(\"rotation\");\n Lit5 = Symbol.valueOf(\"composite-src\");\n Lit4 = Symbol.valueOf(\"composite-src-over\");\n Lit3 = Symbol.valueOf(\"polygon\");\n Lit2 = Symbol.valueOf(\"cell-spacing\");\n Lit1 = Symbol.valueOf(\"text\");\n Lit0 = Color.class;\n $instance = new gui();\n make$MnPoint = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"make$MnPoint\");\n P = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"P\");\n circle = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"circle\");\n fill = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"fill\");\n draw = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"draw\");\n image$Mnread = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"image$Mnread\");\n image$Mnwidth = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"image$Mnwidth\");\n image$Mnheight = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"image$Mnheight\");\n with$Mnpaint = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"with$Mnpaint\");\n with$Mntransform = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"with$Mntransform\");\n with$Mncomposite = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"with$Mncomposite\");\n process$Mnkeywords = StaticFieldLocation.make(\"kawa.lib.kawa.process-keywords\", \"process$Mnkeywords\");\n gui gui2 = $instance;\n polygon = new ModuleMethod(gui2, 1, Lit3, -4095);\n composite$Mnsrc$Mnover = new ModuleMethod(gui2, 2, Lit4, 4096);\n composite$Mnsrc = new ModuleMethod(gui2, 4, Lit5, 4096);\n rotation = new ModuleMethod(gui2, 6, Lit6, 4097);\n as$Mncolor = new ModuleMethod(gui2, 7, Lit7, 4097);\n button = new ModuleMethod(gui2, 8, Lit8, -4096);\n Button = new ModuleMethod(gui2, 9, Lit9, -4096);\n Image = Macro.make(Lit10, Lit11, \"gnu.kawa.slib.gui\");\n Label = new ModuleMethod(gui2, 10, Lit12, -4096);\n Text = new ModuleMethod(gui2, 11, Lit13, -4096);\n Row = new ModuleMethod(gui2, 12, Lit14, -4096);\n Column = new ModuleMethod(gui2, 13, Lit15, -4096);\n set$Mncontent = new ModuleMethod(gui2, 14, Lit16, 8194);\n Window = new ModuleMethod(gui2, 15, Lit17, -4096);\n run$Mnapplication = Macro.make(Lit18, Lit19, \"gnu.kawa.slib.gui\");\n gui.$runBody$();\n }\n\n public gui() {\n ModuleInfo.register(this);\n }", "public void paint(T compositeDiagram, Rectangle2D canvas, RegularDivider divider);", "private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public JComponent addAux1(Color color)\n {\n Category category = new Category(this, \"Aux 1 FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox reverb = new HBox();\n \n comp = new LabelledDial(\"Time\", this, \"aux1time\", color, 0, 127);\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonegain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonefreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Frequency\");\n reverb.add(comp);\n\n comp = new LabelledDial(\"Gate\", this, \"aux1gatethresh\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Threshold\");\n reverb.add(comp);\n \n final HBox echo = new HBox();\n \n comp = new LabelledDial(\"Feedback\", this, \"aux1feedback\", color, 0, 127);\n echo.add(comp);\n \n VBox vbox = new VBox();\n params = AUX_FX_1_TYPES;\n comp = new Chooser(\"Type\", this, \"aux1type\", params)\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n hbox.removeLast();\n if (model.get(\"aux1type\", 0) <= 2) // reverb\n {\n hbox.addLast(reverb);\n }\n else // echo\n {\n hbox.addLast(echo);\n }\n hbox.revalidate();\n hbox.repaint();\n }\n }; \n vbox.add(comp);\n\n comp = new CheckBox(\"Enable\", this, \"aux1mode\");\n vbox.add(comp);\n\n hbox.add(vbox);\n hbox.addLast(reverb);\n \n /// The manual says this only goes to 123, but in fact it goes to 127\n comp = new LabelledDial(\"Gate /\", this, \"aux1gatedelaytime\", color, 0, 127)\n {\n public String map(int value)\n {\n if (value < 111) return \"\" + value;\n else return TIMES[value - 111];\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Delay Time\");\n hbox.add(comp);\n model.setMetricMax(\"aux1gatedelaytime\", 110);\n \n comp = new LabelledDial(\"Depth\", this, \"aux1depth\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre HP\", this, \"aux1prehp\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre Delay\", this, \"aux1predelay\", color, 0, 127);\n hbox.add(comp);\n\n comp = new LabelledDial(\"High\", this, \"aux1highdamp\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Damp\");\n hbox.add(comp);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public void paint(T compositeDiagram, Point2d center, ILayout layout);", "public Composite(Queue<Shape> shapes, Queue<Constraint> constraints, \n\t\t Canvas canvas) {\n\tthis.shapes = shapes;\n\tthis.canvas = canvas;\n\tthis.constraints = constraints;\n\n\t// add shapes to canvas\n\tfor (Shape s : this.shapes)\n\t this.canvas.addShape(s);\n\n\t// add constraints to canvas\n\tfor (Constraint c : this.constraints) {\n\t //\t if (c.getClass().equals(SamePointConstraint.class))\n\t //\t\tthis.canvas.addConstraint((SamePointConstraint) c);\n\t if (c.getClass().equals(SameLengthConstraint.class))\n\t\tthis.canvas.addConstraint((SameLengthConstraint) c);\n\t if (c.getClass().equals(ParallelLineConstraint.class))\n\t\tthis.canvas.addConstraint((ParallelLineConstraint) c);\n\t if (c.getClass().equals(PerpendicularLineConstraint.class))\n\t\tthis.canvas.addConstraint((PerpendicularLineConstraint) c);\n\t}\n\n\t// check for same points and add constraints\n\tQueue<Point> all_points = new Queue<Point>();\n\tTreeMap<Point, TreeSet<Point>> unique_points = \n\t new TreeMap<Point, TreeSet<Point>>();\n\tfor (Shape s : this.shapes) {\n\t for (Point p : s.getPoints())\n\t\tall_points.enqueue(p);\n\t}\n\n\tfor (Point p : all_points) {\n\t if (!unique_points.containsKey(p)) \n\t\tunique_points.put(p, new TreeSet<Point>());\n\t else\n\t\tunique_points.get(p).add(p); // looks weird, I know...\n\t}\n\n\tfor (Map.Entry<Point, TreeSet<Point>> entry : unique_points.entrySet()) {\n\t Point p1 = entry.getKey();\n\t \n\t for (Point p2 : entry.getValue()) {\n\t\tSamePointConstraint c = new SamePointConstraint(p2, p1, this.canvas);\n\t\tthis.canvas.addConstraint(c);\n\t }\n\t}\n\n\tSystem.out.printf(\"Copied %d shapes and %d constraints.\\n\", \n\t\t\t this.shapes.size(),\n\t\t\t this.constraints.size());\n }", "public DrawingPane() {\n this.setBorder(new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT)));\n this.setStyle(\"-fx-background-color : white\");\n\n color = new ObjectPropertyBase<Color>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Color\";\n }\n };\n\n thickness = new ObjectPropertyBase<Integer>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Thickness\";\n }\n };\n\n modifiable = new BooleanPropertyBase(true) {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Modifiability\";\n }\n };\n\n lastLine = new ObjectPropertyBase<DrawingInfos>() {\n @Override\n public Object getBean() {\n return this;\n }\n\n @Override\n public String getName() {\n return \"Last Line\";\n }\n };\n\n this.canvas = new Canvas();\n this.context = canvas.getGraphicsContext2D();\n this.drawingInfos = new DrawingInfos();\n this.lastLine.setValue(new DrawingInfos());\n this.lastLineList = new DrawingInfos();\n\n getChildren().add(canvas);\n initialize();\n }", "public GateCanvas(int type_param)\n {\n super();\n // setBackgroundColor( );\n type = type_param;\n inverted = false;\n // setSize(24, 24);\n setVisible(true);\n }", "Complex(double r, double i) {\n real = r;\n imag = i;\n }", "public MagnitudeSignal(MagnitudeSignal s) {\n\t\tsuper(s);\n\t}", "public CubicSegment(double[][] coef) {\n\t\t\n\t}", "public TSignal(TSignal other) {\n if (other.is_set_destApp()) {\n this.destApp = other.destApp;\n }\n if (other.is_set_destPellet()) {\n this.destPellet = other.destPellet;\n }\n if (other.is_set_data()) {\n this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);\n;\n }\n }", "public abstract void mo3998c(Canvas canvas);", "public ControlPanel(DrawingPanel c){\n canvas = c;\n this.colorButton = new JButton(\"Pick Color\");\n add(colorButton);\n panel = new JPanel();\n panel.setBackground(Color.BLUE);\n add(panel);\n this.circleButton = new JButton(\"Add Circle\");\n add(circleButton);\n this.squareButton = new JButton(\"Add Square\");\n add(squareButton);\n \n ClickListener listener = new ClickListener();\n this.colorButton.addActionListener(listener);\n this.circleButton.addActionListener(listener);\n this.squareButton.addActionListener(listener);}", "public Complex() {\n this(0);\n }", "public ComplexFrame toComplexFrame(float[] fftValues) {\n int length = resolution / 2 + 1;\n float[] real = new float[length];\n float[] imag = new float[length];\n\n //bin 0 and n/2 always have an imaginary value of 0\n real[0] = fftValues[0];\n imag[0] = 0;\n real[length - 1] = fftValues[1];\n imag[length - 1] = 0;\n for (int i = 1; i < resolution / 2; i++) {\n real[i] = fftValues[2 * i];\n imag[i] = fftValues[2 * i + 1];\n }\n return new ComplexFrame(real, imag);\n }", "public JComponent addVoice(Color color)\n {\n Category category = new Category(this, \"Voice\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n VBox vbox = new VBox();\n comp = new CheckBox(\"Polyphonic\", this, \"voicemode\");\n ((CheckBox)comp).addToWidth(1);\n vbox.add(comp);\n comp = new CheckBox(\"Unison\", this, \"unisonmode\");\n vbox.add(comp);\n hbox.add(vbox);\n\n comp = new LabelledDial(\"Unison\", this, \"unisoncount\", color, 2, 12);\n ((LabelledDial)comp).addAdditionalLabel(\"Voices\");\n hbox.add(comp);\n \n comp = new LabelledDial(\"Unison\", this, \"unisondetune\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Detune\");\n hbox.add(comp);\n \n comp = new LabelledDial(\"Coarse\", this, \"coarsetune\", color, 0, 127, 64);\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n\n comp = new LabelledDial(\"Fine\", this, \"finetune\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return String.format(\"%2.1f\", ((value - 64) / 64.0 * 50.0));\n else return String.format(\"%2.1f\", ((value - 64) / 63.0) * 50.0);\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }", "public void diagramChanged(Diagram diagram, int signal)\r\n\t{\r\n\t}", "public static PVector fromCanvas( PVector in) {\n\t\treturn fromCanvas( in, 0 );\n\t}", "public interface Canvas {\n\tpublic String LABEL_CHANGE = \"label_change_property\";\n\t/**\n\t * @return name of Canvas or an empty String by default. MAY NOT BE NULL.\n\t */\n\tpublic String getName();\n\t/**\n\t * @return color of Canvas or null by default\n\t */\n\tpublic Color getColor();\n\t/**\n\t * @return the JComponent representation of this Canvas. MAY NOT BE NULL.\n\t */\n\tpublic JComponent getJComponent();\n\t/**\n\t * If this canvas is to be highlighted (because it might\n\t * have focus for example), then getHighlight should return\n\t * the color of that highlight. Otherwise, it should\n\t * return null\n\t * @return highlighting color or null by default.\n\t */\n\tpublic Color getHighlight();\n}", "public Complex(String cStr){\r\n\t\tthis(cStr.replaceAll(\" \", \"\").split(\"(?=\\\\+)|(?=\\\\-)\")); // splits cStr at + or - into an array of strings having two elements\r\n\t\t// The first element of the resultant array will be the real portion, \r\n\t\t// while the second is the imaginary portion. This array is passed to the next constructor.\r\n\t}", "public BufferVisualization() {\n initComponents();\n }", "public void MakeScatter() {\n\t\tScatterButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(\n\t\t\t\tGetScatterPlotChartImage())));\n\t\tScatterButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Scatter Plot Chart \", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new ScatterGraph(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(ScatterButton);\n\t}", "@Override\n public void onRender(Canvas canvas, FFTData data, Rect rect)\n {\n }", "public void b(Canvas paramCanvas) {\n }", "private JPanel createResult(){\n\t\tJPanel panel3 = new JPanel(){\n\t @Override\n\t protected void paintComponent (Graphics g) {\n\t super.paintComponent(g);\n\t paint2D((Graphics2D)g); //use to paint the pattern on the GUI\n\t }\n\t /**\n\t * performs a linear mapping from 2D coordinates to other 2D coordinates\n\t */\n\t protected void paint2D (Graphics2D g2) {\n\t AffineTransform tform = AffineTransform.getTranslateInstance( 0, 0);\n\t tform.scale(0.1, 0.1); \n\t //set the properties of g2\n\t g2.setTransform( tform);\n\t g2.setColor( Color.BLUE); \n\t }\n\t @Override\n\t public Dimension getPreferredSize() {\n\t return new Dimension(100, 100);\n\t }\n\t };\n\t\tpanel3.setBackground(Color.gray);\n\t\tGraphics g = panel3.getGraphics();\n\t\t//add mouse listener, if the user clicks mouse, the point will show the X and Y value on the graphics.\n\t\tpanel3.addMouseListener( new MouseAdapter() {\n // define a point \n public void mousePressed( MouseEvent event )\n { \n point = new Point( event.getX(), event.getY() ); //get the X and Y value of point which the user clicked\n controller.setBandwidth(event.getX());\n controller.setSignalToNoise(event.getY()); \n \t\n //g.drawOval( point.x , point.y , 1, 1 ); //show the point on the graphic \n //g.drawString(\"x=\" + point.x + \" y=\" + point.y, point.x, point.y ); //show the X, Y number of the point on the graphic\n \n } // end method mousePressed\n \n });\n\t\treturn panel3;\n\t}", "public Complex(double real, double imaginary) {\n r = real;\n i = imaginary;\n }", "public abstract void mo3997b(Canvas canvas);", "public Complex(Complex c) {\n r = c.r;\n i = c.i;\n }", "private void createGUI() {\r\n\r\n cgRect modelSpace = new cgRect(0, 0, 11, 11);\r\n cgRect deviceSpace = new cgRect(0, 0, 600, 600);\r\n\r\n cgTransformation tr = new cgTransformation(modelSpace, deviceSpace, false, false);\r\n\r\n /**\r\n *\r\n */\r\n // The formatter of axis' labels will use default locale and pattern\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n // We will use \"fixed size\" axis renderer for all axes\r\n \r\n // 参数一:标签刻度长度大小 参数二:标签数字长度大小 参数三:数字和刻度之间的距离大小,长度为像素\r\n cgAxisRenderer ar = new cgFixedSizeAxisRenderer(5, 15, 50, nf);\r\n\r\n // ----------------------------------------------------\r\n // First axis - values match the model coordinates,\r\n // model origin is at 0.0\r\n // ----------------------------------------------------\r\n \r\n // 第三个参数为显示的数字数\r\n cgRect bbox1 = new cgRect(0, 0, 11, 1);\r\n TickGenerator tg1 = new NumericTickGenerator(1.0);\r\n cgAxisShape axis1 = new cgAxisShape(cgAxisShape.NORTH, bbox1, tg1, ar);\r\n\r\n cgShapeListLayer layer = new cgShapeListLayer();\r\n\r\n layer.addShape(axis1);\r\n\r\n /**\r\n *\r\n */\r\n // ----------------------------------------------------\r\n // Create grid using regular grid renderer\r\n // ----------------------------------------------------\r\n cgRect bbox = new cgRect(0, 0, 10, 10);\r\n TickGenerator htg = new NumericTickGenerator(1.0);\r\n TickGenerator vtg = new NumericTickGenerator(1.0);\r\n cgGridRenderer gr = new cgRegularGridRenderer();\r\n cgGridShape grid = new cgGridShape(bbox, htg, vtg, gr);\r\n\r\n // ----------------------------------------------------\r\n // Create view\r\n // ----------------------------------------------------\r\n// cgShapeListLayer layer = new cgShapeListLayer();\r\n// layer.addShape( grid );\r\n cgContainerModel model = new cgContainerModel();\r\n model.setBoundingBox(modelSpace);\r\n model.addLayer(layer);\r\n\r\n cgPlotView view = new cgPlotView(model, tr);\r\n\r\n // ----------------------------------------------------\r\n // Create plot\r\n // ----------------------------------------------------\r\n cgPlot plot = new cgPlot(view);\r\n\r\n plot.addScrollbar(cgGenericPlotLayout.SOUTH);\r\n plot.addScrollbar(cgGenericPlotLayout.EAST);\r\n\r\n getContentPane().add(plot);\r\n\r\n // ----------------------------------------------------\r\n // Set up listeners\r\n // ----------------------------------------------------\r\n // Set window listener\r\n addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n System.exit(0);\r\n }\r\n });\r\n }", "private void setupVisualizerFxAndUI() {\n\n mLinearLayout = (LinearLayout) findViewById(R.id.linearLayoutVisual);\n // Create a VisualizerView to display the audio waveform for the current settings\n mVisualizerView = new VisualizerView(this);\n mVisualizerView.setLayoutParams(new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n (int) (VISUALIZER_HEIGHT_DIP * getResources().getDisplayMetrics().density)));\n mLinearLayout.addView(mVisualizerView);\n\n // Create the Visualizer object and attach it to our media player.\n\n\n\n\n\n\n mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());\n //mVisualizer = new Visualizer(0);\n mVisualizer.setCaptureSize(Visualizer.getCaptureSizeRange()[1]);\n\n mVisualizer.setDataCaptureListener(new Visualizer.OnDataCaptureListener() {\n public void onWaveFormDataCapture(Visualizer visualizer, byte[] bytes,\n int samplingRate) {\n mVisualizerView.updateVisualizer(bytes);\n }\n\n public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {\n }\n }, Visualizer.getMaxCaptureRate() / 2, true, false);\n }", "public void setSignal(java.awt.Image sig) {\n\t\timage = sig;\n\t\tjsignal = null;\n\t}", "private void resampleAbdomenVOI( int sliceIdx, VOIContour curve ) {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM(sliceIdx);\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n \r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n int x = xcm;\r\n int y = ycm;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && curve.contains(x, y)) {\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && curve.contains(x, y)) {\r\n\r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && curve.contains(x, y)) {\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && curve.contains(x, y)) {\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n }\r\n } // end for (angle = 0; ...\r\n \r\n// ViewUserInterface.getReference().getMessageFrame().append(\"resample VOI number of points: \" +xValsAbdomenVOI.size());\r\n\r\n curve.clear();\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n curve.add( new Vector3f( xValsAbdomenVOI.get(idx), yValsAbdomenVOI.get(idx), sliceIdx ) );\r\n }\r\n }", "void createEqualizerControls();", "public ImageCanvas() {\r\n super();\r\n }", "public GraphController(GUI view){\r\n\t\tview.setGvWindowListener(new GvWindowListener(){\r\n\t\t\tpublic void buttonClicked(GraphingEvent ge){\r\n\t\t\t\tmodel = ge.getDJAI_GV();\r\n\t\t\t\tmodel.setDate(ge.getDJAI_GV().getDate());\r\n\t\t\t\tmodel.setValue(ge.getDJAI_GV().getValue());\r\n\t\t\t\tSystem.out.println(ge.getSource());\r\n\t\t\t\t\r\n\t\t\t\tData = new ArrayList<String>();\r\n\t\t\t\tData = DataSaver.dowArray_C;\r\n\t\t\t\t\r\n\t\t\t\tvalue = new double[Data.size()];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Data.size(); i++){\r\n\t\t\t\t\tvalue[i] = Double.parseDouble(Data.get(i).substring(10));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = new Stage();\r\n\t\t\t\tstage.setTitle(\"Graph Data\");\r\n\t\t\t\t\r\n\t\t\t\tfinal CategoryAxis xAxis = new CategoryAxis();\r\n\t\t\t final NumberAxis yAxis = new NumberAxis();\r\n\t\t\t xAxis.setLabel(\"Number of Month\");\r\n\t\t\t final LineChart<String, Number> lineChart = new LineChart<String, Number>(\r\n\t\t\t xAxis, yAxis);\t\t \r\n\t\t\t xAxis.setLabel(\"Date\");\r\n\t\t\t xAxis.setTickMarkVisible(false);\r\n\t\t\t \r\n\t\t\t yAxis.setLabel(\"DJAI Value\");\r\n\t\t\t yAxis.setAutoRanging(false);\r\n\t\t\t yAxis.setTickMarkVisible(false);\r\n\t\t\t yAxis.setUpperBound(20000);\r\n\t\t\t yAxis.setLowerBound(6000);\r\n\t\t\t yAxis.setTickUnit(2000);\r\n\t\t\t yAxis.setMinorTickCount(14);\r\n\t\t\t XYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\r\n\t\t\t series.setName(\"DJAI Chart \");\r\n\t\t\t\r\n\t\t\t for(int i = 0; i < Data.size(); i++){\r\n\t\t\t \tseries.getData().add(new XYChart.Data<String, Number>(Data.get(i).substring(0, 10),\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t value[i]));\r\n\t\t\t }\r\n\t\t\t lineChart.setCreateSymbols(false);\r\n\t\t\t lineChart.getData().add(series);\r\n\t\t\t\tlineChart.isResizable();\r\n\t\t\t Scene scene = new Scene(lineChart,14000,600);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t\tstage.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public GraphPanel4KochCurve() {\n initComponents();\n }", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "public Complex(double real, double imaginary) {\r\n this.real = real;\r\n this.imaginary = imaginary;\r\n }", "public Canvas canvas() {\n Canvas canvas = new Canvas(getLowerBound(), getUpperBound());\n canvas.add(this);\n return canvas;\n }", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "public Canvas(GLCapabilities capabilities) {\n super(capabilities);\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "public static ComplexImage toComplex(ComplexImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tComplexImage newimg = null;\n\t\tnewimg = new ComplexImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.setReal(x, y, img.getReal(x, y));\n\t\t\t\tnewimg.setImag(x, y, img.getImag(x, y));\n\t\t\t}\n\t\t}\n\t\treturn newimg;\n\t}", "public Visualize() {\n initComponents();\n \n }", "public Onde(IConfigurationLoader configuration) throws UnsupportedEncodingException {\t\t\n\t\t\n\t\tString language= configuration.getLanguage();\n\t\t\n\t\tsetLayout(null);\n\t\twaveGroup = new ButtonGroup();\n\t\tif(language == \"Chinese\")\n\t\t\tcarre = new JCheckBox(new String(configuration.getProperties().getProperty( \"module.VCO.onde.carre\").getBytes(\"iso8859-1\"), \"utf-8\"));\n\t\telse\n\t\t\tcarre = new JCheckBox(configuration.getProperties().getProperty( \"module.VCO.onde.carre\"));\n\t\twaveGroup.add(carre);\n\t\tcarre.setSize( 80,20 );\n\t\tcarre.setBackground( Color.gray );\n\t\tcarre.setForeground( Color.white );\n\t\tif(language == \"Chinese\")\n\t\t\ttriangle = new JCheckBox(new String(configuration.getProperties().getProperty( \"module.VCO.onde.triangle\").getBytes(\"iso8859-1\"), \"utf-8\"));\n\t\telse\n\t\t\ttriangle = new JCheckBox(configuration.getProperties().getProperty( \"module.VCO.onde.triangle\"));\n\t\twaveGroup.add(triangle);\n\t\ttriangle.setSize( 80,20 );\n\t\ttriangle.setBackground( Color.gray );\n\t\ttriangle.setForeground( Color.white );\n\t\tif(language == \"Chinese\")\n\t\t\tscie = new JCheckBox(new String(configuration.getProperties().getProperty( \"module.VCO.onde.scie\").getBytes(\"iso8859-1\"), \"utf-8\"));\n\t\telse\n\t\t\tscie = new JCheckBox(configuration.getProperties().getProperty( \"module.VCO.onde.scie\"));\n\t\twaveGroup.add(scie);\n\t\tscie.setSize( 80,20 );\n\t\tscie.setBackground( Color.gray );\n\t\tscie.setForeground( Color.white );\n\t\t\n\t\ticone1 = new ImageIcon ( this.getClass().getResource( \"/images/signal-carre.jpg\" ) ) ;\n\t\tsignalcarre = new JLabel( icone1 );\n\t\tsignalcarre.setSize( icone1.getIconWidth(), icone1.getIconHeight() );\n\t\ticone2 = new ImageIcon ( this.getClass().getResource( \"/images/signal-triangle.jpg\" ) );\n\t\tsignaltriangle = new JLabel( icone2 );\n\t\tsignaltriangle.setSize( icone2.getIconWidth(), icone2.getIconHeight() );\n\t\t\n\t\ticone3 = new ImageIcon ( this.getClass().getResource( \"/images/signal-scie.jpg\" ) );\n\t\tsignalscie = new JLabel( icone3 );\n\t\tsignalscie.setSize( icone3.getIconWidth(), icone3.getIconHeight() );\n\t\t\t\n\t\tadd( carre );\n\t\tadd( triangle );\n add( scie );\n add( signalcarre );\n add( signaltriangle );\n add( signalscie );\n \n setVisible( true );\n\t}", "public final void mT__55() throws RecognitionException {\n try {\n int _type = T__55;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalEsm.g:49:7: ( 'COMPLEX' )\n // InternalEsm.g:49:9: 'COMPLEX'\n {\n match(\"COMPLEX\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public abstract void mo3995a(Canvas canvas);", "public Canvas() {\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }", "public RoadSignal(String name, int signalPosition) {\n this.name = name;\n green = false;\n this.signalPosition = signalPosition;\n\n }", "public CanvasAWT(Graphics2D graphic){\r\n\t\ttarget = graphic;\r\n\t}", "private Chart(){}", "public void onModuleLoad() {\n\t\tcanvas = Canvas.createIfSupported();\n\n\t\tif (canvas == null) {\n\t\t\tRootPanel\n\t\t\t\t\t.get()\n\t\t\t\t\t.add(new Label(\n\t\t\t\t\t\t\t\"Sorry, your browser doesn't support the HTML5 Canvas element\"));\n\t\t\treturn;\n\t\t}\n\n\t\tcanvas.setStyleName(\"mainCanvas\");\n\t\tcanvas.setWidth(canvasWidth + \"px\");\n\t\tcanvas.setCoordinateSpaceWidth(canvasWidth);\n\n\t\tcanvas.setHeight(canvasHeight + \"px\");\n\t\tcanvas.setCoordinateSpaceHeight(canvasHeight);\n\n\t\tg = new Graph(canvas.getContext2d(), canvasWidth, canvasHeight);\n\n\t\ttxtExpression = new TextBox();\n\t\ttxtExpression.setText(\"R=5*SIN(4*T)\");\n\t\ttxtExpression.setWidth(\"400px\");\n\t\tbutDraw = new Button();\n\t\tbutDraw.setText(\"Draw\");\n\t\tbutDraw.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString exp = txtExpression.getText().trim().toUpperCase();\n\t\t\t\tg.DrawAxis();\n\t\t\t\tif (exp.startsWith(\"Y=\"))\n\t\t\t\t\tg.DrawYX(clYellow, exp, -10, 10);\n\t\t\t\telse if (exp.startsWith(\"X=\"))\n\t\t\t\t\tg.DrawXY(clYellow, exp, -10, 10);\n\t\t\t\telse if (exp.startsWith(\"R=\"))\n\t\t\t\t\tg.DrawRT(clYellow, exp, -180, 180);\n\t\t\t\telse if (exp.startsWith(\"XT=\"))\n\t\t\t\t\tg.DrawYXT(clYellow, exp, -10, 10);\n\t\t\t\telse\n\t\t\t\t\tWindow.alert(\"Invalid expression!\");\n\t\t\t}\n\t\t});\n\t\tpanelInput = new HorizontalPanel();\n\t\tpanelInput.add(txtExpression);\n\t\tpanelInput.add(butDraw);\n\t\tRootPanel.get().add(panelInput);\n\n\t\tlabel = new Label(\n\t\t\t\t\"For example: Y=X*COS(X); R=T*T; X=Y*Y; XT=T*SIN(T)_YT=T*COS(T)...\");\n\t\tRootPanel.get().add(label);\n\n\t\tRootPanel.get().add(canvas);\n\n\t\tHTML html = new HTML(\n\t\t\t\t\"Source code: <a href='http://www.bk02.net/mobilemath'>http://www.bk02.net/mobilemath</a> - <a href='http://code.google.com/p/mobilemath/'>http://code.google.com/p/mobilemath/</a>\");\n\t\tRootPanel.get().add(html);\n\n\t\tg.DrawAxis();\n\t\tg.DrawRT(clYellow, \"R=5*SIN(4*T)\", -180, 180);\n\t}", "public Complex(String[] cStr){\r\n\t this(cStr[0], cStr[1]);\r\n\t}", "public CreateLineCanvas(CanvasApp canvasApp) {\n\t\tthis.cmdAppliedCanvas=canvasApp;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"pa.contour.draw(source.ohci(true), \"+strokeWeight+\", \"+penColor+\");\";\n\t}", "@Override\n\tprotected void drawSub(Canvas canvas) {\n\t\tpaint.setTextSize(30);\n\t\tcanvas.drawText(\"Logic View\", rx, 30, paint);\n\t\t\n\t\tcanvas.drawArc(oval, 0, sweepAngle, true, paint);\n\n\t}", "public static ComplexImage toComplex(GrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tfloat gray;\n\t\tComplexImage newimg = new ComplexImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tgray = (float) img.get(x, y);\n\t\t\t\tnewimg.setReal(x, y, gray);\n\t\t\t\tnewimg.setImag(x, y, 0f);\n\t\t\t}\n\t\t}\n\t\treturn newimg;\n\t}", "public Plot() {\r\n }", "public QuadCurve () {\n }", "public Complex(double real, double imag) {\r\n this.real_part = real;\r\n this.imaginary_part = imag;\r\n }", "public @NotNull PersistentDataContainer toPrimitive(@NotNull Waypoint complex, @NotNull PersistentDataAdapterContext context) {\n return complex.toNBTTag(context.newPersistentDataContainer());\n }", "public Complex() {\r\n real = 0;\r\n imaginary = 0;\r\n }", "public void add(Complex c){\n\t\tre += c.getRe();\n\t\tim += c.getIm();\n\t}", "VisualizationAttribute createVisualizationAttribute();", "public MComplex() {\r\n\t\ta = b = r = phi = 0;\r\n\t\tcartesian = polar = true;\r\n\t}", "public void draw(short[] samples, int threshold, int width, int height, Graphics2D g) {\n // Fill the background.\n g.setColor(MISSING_COLOR);\n g.fillRect(0, 0, width, height);\n\n // Find the bounds of the samples to draw.\n int minFrame = Integer.MAX_VALUE;\n int maxFrame = Integer.MIN_VALUE;\n for (BitData bitData : mHistory) {\n minFrame = Math.min(Math.min(bitData.getStartFrame(), bitData.getEndFrame()), minFrame);\n maxFrame = Math.max(Math.max(bitData.getStartFrame(), bitData.getEndFrame()), maxFrame);\n }\n // Show a bit past the error point.\n maxFrame = Math.min(maxFrame + 100, samples.length - 1);\n int frameWidth = maxFrame - minFrame + 1;\n\n // Draw all backgrounds.\n for (BitData bitData : mHistory) {\n // Compute the background color for this bit.\n Color backgroundColor;\n switch (bitData.getBitType()) {\n case ZERO:\n backgroundColor = ZERO_BIT_COLOR;\n break;\n\n case ONE:\n backgroundColor = ONE_BIT_COLOR;\n break;\n\n case START:\n backgroundColor = START_BIT_COLOR;\n break;\n\n default:\n case BAD:\n backgroundColor = BAD_BIT_COLOR;\n break;\n }\n\n // Map to image.\n int startX = (bitData.getStartFrame() - minFrame)*width/frameWidth;\n startX = clamp(startX, 0, width - 1);\n int endX = (bitData.getEndFrame() - minFrame)*width/frameWidth;\n endX = clamp(endX, 0, width - 1);\n\n // Draw background.\n g.setColor(backgroundColor);\n g.fillRect(startX, 0, endX - startX, height);\n }\n\n // Draw signal.\n int lastX = -1;\n int lastY = -1;\n g.setColor(LINE_COLOR);\n for (int frame = minFrame; frame < maxFrame; frame++) {\n // Draw line.\n int x = (frame - minFrame)*width/frameWidth;\n x = clamp(x, 0, width - 1);\n\n // *Must* cast to int first or -32768 won't negate properly.\n int y = -(int)samples[frame]*(height/2)/32768 + height/2;\n y = clamp(y, 0, height - 1);\n\n if (lastX != -1) {\n g.drawLine(lastX, lastY, x, y);\n }\n\n lastX = x;\n lastY = y;\n }\n\n // Draw grid.\n g.setColor(Color.GRAY);\n int y = height/2;\n g.drawLine(0, y, width - 1, y);\n if (threshold != 0) {\n y = threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n y = -threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n }\n }", "public static AssetGroupSignalServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceStub>() {\n @java.lang.Override\n public AssetGroupSignalServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AssetGroupSignalServiceStub(channel, callOptions);\n }\n };\n return AssetGroupSignalServiceStub.newStub(factory, channel);\n }", "public Chart(double[][] result, double[][] observed){\n //Create a new Frame object\n final Frame f1 = new Frame(\"Model Fit\");\n\t//Set the Frame object size\t\n\tf1.setSize(600,400);\n //Add a window listener to the Frame to close it\n\tf1.addWindowListener(new WindowAdapter() {\n @Override\n\t\tpublic void windowClosing(WindowEvent we) {\n\t\t\tf1.dispose();\n\t\t}\n\t});\n \n //add in the code to create the chart\n //create a data object to hold the XY data\n DefaultXYDataset data = new DefaultXYDataset();\n //cycle through the origins\n for (int i = 0; i < observed.length; i++) {\n //create a two dimensional array to hold the observed and result\n double dataArray[][] = new double[2][observed[i].length];\n //put the observed data in element 0\n dataArray[0]=observed[i];\n //put the result data in element 1\n dataArray[1]=result[i];\n //add the data series with a unique name\n data.addSeries(\"Origin \"+i, dataArray);\n }\n\t//Create the chart with the correct title and axis names and data etc.\n\tJFreeChart chart = ChartFactory.createScatterPlot(\"Observed vs. Results\", \n\t\t\"Observed\", // x axis label\n\t\t\"Results\", // y axis label\n\t\tdata, // data\n\t\tPlotOrientation.VERTICAL, // orientation\n\t\ttrue, // legend\n\t\ttrue, // tooltips\n\t\tfalse // URLs\n\t);\n\t//get the plot area and format it to the desired colours\n\tXYPlot plot = (XYPlot) chart.getPlot();\n\tplot.setBackgroundPaint(Color.white);\n\tplot.setDomainGridlinePaint(Color.darkGray);\n\tplot.setDomainGridlinesVisible(true);\n\tplot.setRangeGridlinePaint(Color.black);\n\t\n\t// We're going to add some regression stuff here shortly.\n double[] coeffs = Regression.getOLSRegression(createTwoDArray(result, observed));\n\tLineFunction2D linefunction2d = new LineFunction2D(coeffs[0], coeffs[1]);\n\tXYDataset series2 = DatasetUtilities.sampleFunction2D(linefunction2d, 10, 50, 5, \"Linear Regression Line\");\n\tplot.setDataset(2, series2); \n\tXYLineAndShapeRenderer lineDrawer = new XYLineAndShapeRenderer(true, false);\n\tlineDrawer.setSeriesPaint(0, Color.BLACK);\n\tplot.setRenderer(2, lineDrawer);\n\t\n //create a chart panel to render to the screnn\n\tChartPanel chartPanel = new ChartPanel(chart);\n //add the chart panel to the frame\n\tf1.add(chartPanel);\n //set the frame to be visible\n\tf1.setVisible(true);\n }" ]
[ "0.65155363", "0.64424944", "0.6442057", "0.6236634", "0.48634028", "0.4702932", "0.47002763", "0.46908605", "0.46856922", "0.46693552", "0.46556386", "0.4599493", "0.45981517", "0.4597571", "0.45925853", "0.45730022", "0.45677686", "0.4562207", "0.45182145", "0.45164275", "0.45118013", "0.4511774", "0.44410425", "0.44396895", "0.44327193", "0.44293627", "0.44292542", "0.44264323", "0.4417759", "0.44085506", "0.44044298", "0.4399624", "0.43993872", "0.43847546", "0.4374001", "0.43574268", "0.4353518", "0.43511847", "0.43470442", "0.4332247", "0.43103144", "0.4309863", "0.42939827", "0.42916748", "0.4290958", "0.4261879", "0.42469206", "0.42435122", "0.42298707", "0.4225943", "0.4223716", "0.42204323", "0.4190556", "0.41879135", "0.41790113", "0.41711843", "0.41703784", "0.4169826", "0.41583142", "0.41564596", "0.4153487", "0.41527694", "0.41470125", "0.4145161", "0.4133842", "0.4127566", "0.41258597", "0.41241655", "0.41237634", "0.41237232", "0.41237125", "0.41214836", "0.41168615", "0.41117206", "0.41103464", "0.40988156", "0.40968138", "0.4092911", "0.40918002", "0.4088607", "0.40869164", "0.4081908", "0.40784773", "0.40751967", "0.40731934", "0.40709478", "0.40692613", "0.40657726", "0.4054164", "0.40501052", "0.40489846", "0.40480816", "0.40472874", "0.40456355", "0.40439543", "0.40362975", "0.40295067", "0.40255225", "0.4023921", "0.40212786" ]
0.7481427
0
Creates an SignalCanvas from a JIGL Signal
public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException { super(); image = getJavaSignal(sig); jsignal = sig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SignalCanvas(ComplexSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas(DiscreteSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public SignalCanvas() {\n\t\tsuper();\n\t}", "public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException,\n\t\t\tRuntimeException {\n\n\t\t// int w = 0;\n\t\t// int h = 0;\n\t\tjava.awt.Image jsig = null;\n\n\t\tif (sig instanceof DiscreteSignal) {\n\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\n\t\t\tDiscreteSignal nsig = SignalConverter.toDiscrete(sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif ((short) nsig.get(x) > max)\n\t\t\t\t\tmax = (short) nsig.get(x);\n\t\t\t\tif ((short) nsig.get(x) < min)\n\t\t\t\t\tmin = (short) nsig.get(x);\n\n\t\t\t}\n\n\t\t\tshort[][] new_data = new short[max][nsig.length()];\n\t\t\tGrayImage gimage = new GrayImage(nsig.length(), max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++)\n\t\t\t\t// FIXME: put braces on this for\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, new_data[y][x]);\n\t\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\t\t} else {\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tRealSignal nsig = SignalConverter.toReal((Signal) sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif (nsig.get(x) > max)\n\t\t\t\t\tmax = nsig.get(x);\n\t\t\t\tif (nsig.get(x) < min)\n\t\t\t\t\tmin = nsig.get(x);\n\t\t\t}\n\n\t\t\tfloat[][] new_data = new float[(int) max][nsig.length()];\n\t\t\tRealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\t// try{\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, (int) new_data[y][x]);\n\t\t\t\t\t// }catch (Exception e)\n\t\t\t\t\t// {System.out.println(x+\" uh oh \"+y);}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\n\t\t}\n\n\t}", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "public GraphController(GUI view){\r\n\t\tview.setGvWindowListener(new GvWindowListener(){\r\n\t\t\tpublic void buttonClicked(GraphingEvent ge){\r\n\t\t\t\tmodel = ge.getDJAI_GV();\r\n\t\t\t\tmodel.setDate(ge.getDJAI_GV().getDate());\r\n\t\t\t\tmodel.setValue(ge.getDJAI_GV().getValue());\r\n\t\t\t\tSystem.out.println(ge.getSource());\r\n\t\t\t\t\r\n\t\t\t\tData = new ArrayList<String>();\r\n\t\t\t\tData = DataSaver.dowArray_C;\r\n\t\t\t\t\r\n\t\t\t\tvalue = new double[Data.size()];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < Data.size(); i++){\r\n\t\t\t\t\tvalue[i] = Double.parseDouble(Data.get(i).substring(10));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = new Stage();\r\n\t\t\t\tstage.setTitle(\"Graph Data\");\r\n\t\t\t\t\r\n\t\t\t\tfinal CategoryAxis xAxis = new CategoryAxis();\r\n\t\t\t final NumberAxis yAxis = new NumberAxis();\r\n\t\t\t xAxis.setLabel(\"Number of Month\");\r\n\t\t\t final LineChart<String, Number> lineChart = new LineChart<String, Number>(\r\n\t\t\t xAxis, yAxis);\t\t \r\n\t\t\t xAxis.setLabel(\"Date\");\r\n\t\t\t xAxis.setTickMarkVisible(false);\r\n\t\t\t \r\n\t\t\t yAxis.setLabel(\"DJAI Value\");\r\n\t\t\t yAxis.setAutoRanging(false);\r\n\t\t\t yAxis.setTickMarkVisible(false);\r\n\t\t\t yAxis.setUpperBound(20000);\r\n\t\t\t yAxis.setLowerBound(6000);\r\n\t\t\t yAxis.setTickUnit(2000);\r\n\t\t\t yAxis.setMinorTickCount(14);\r\n\t\t\t XYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\r\n\t\t\t series.setName(\"DJAI Chart \");\r\n\t\t\t\r\n\t\t\t for(int i = 0; i < Data.size(); i++){\r\n\t\t\t \tseries.getData().add(new XYChart.Data<String, Number>(Data.get(i).substring(0, 10),\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t value[i]));\r\n\t\t\t }\r\n\t\t\t lineChart.setCreateSymbols(false);\r\n\t\t\t lineChart.getData().add(series);\r\n\t\t\t\tlineChart.isResizable();\r\n\t\t\t Scene scene = new Scene(lineChart,14000,600);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t\tstage.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "public BufferVisualization() {\n initComponents();\n }", "public interface GUI {\r\n\r\n public SPLGraph getSoundLevelGraph();\r\n\r\n public int getHeight();\r\n\r\n public int getWidth();\r\n\r\n public float getLabelWidth(String label, boolean antiAlias);\r\n\r\n public float getLabelHeight(String label, boolean antiAlias);\r\n\r\n public void drawLine(NTColor color, float x1, float y1, float x2, float y2, boolean antiAlias, boolean hairline);\r\n\r\n public void drawLabel(String label, NTColor labelColor, float x, float y, boolean antiAlias);\r\n\r\n public void drawSurface(NTColor color, ArrayList<Float> xs, ArrayList<Float> ys, boolean antiAlias);\r\n\r\n }", "public void setSignal(java.awt.Image sig) {\n\t\timage = sig;\n\t\tjsignal = null;\n\t}", "public void setSignal(double signal) {_signal = signal;}", "public Canvas(GLCapabilities capabilities) {\n super(capabilities);\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public void setSignal(jigl.signal.Signal sig) throws BadSignalException {\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public samJGraph()\n {\n super(new GraphPane( new GraphModel(), new samGraphController() ) );\n }", "private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}", "@Override\n\tpublic void init() {\n\t\tGraph<Number,Number> ig = Graphs.<Number,Number>synchronizedDirectedGraph(new DirectedSparseMultigraph<Number,Number>());\n\t\tObservableGraph<Number,Number> og = new ObservableGraph<Number,Number>(ig);\n\t\tog.addGraphEventListener(new GraphEventListener<Number,Number>() {\n\n\t\t\tpublic void handleGraphEvent(GraphEvent<Number, Number> evt) {\n\t\t\t\tSystem.err.println(\"got \"+evt);\n\n\t\t\t}});\n\t\tthis.g = og;\n\n\t\tthis.timer = new Timer();\n\t\tthis.layout = new FRLayout2<Number,Number>(g);\n\t\t// ((FRLayout)layout).setMaxIterations(200);\n\t\t// create a simple pickable layout\n\t\tthis.vv = new VisualizationViewer<Number,Number>(layout, new Dimension(600,600));\n\n\n\n\t}", "Signal getSignal();", "public Onde(IConfigurationLoader configuration) throws UnsupportedEncodingException {\t\t\n\t\t\n\t\tString language= configuration.getLanguage();\n\t\t\n\t\tsetLayout(null);\n\t\twaveGroup = new ButtonGroup();\n\t\tif(language == \"Chinese\")\n\t\t\tcarre = new JCheckBox(new String(configuration.getProperties().getProperty( \"module.VCO.onde.carre\").getBytes(\"iso8859-1\"), \"utf-8\"));\n\t\telse\n\t\t\tcarre = new JCheckBox(configuration.getProperties().getProperty( \"module.VCO.onde.carre\"));\n\t\twaveGroup.add(carre);\n\t\tcarre.setSize( 80,20 );\n\t\tcarre.setBackground( Color.gray );\n\t\tcarre.setForeground( Color.white );\n\t\tif(language == \"Chinese\")\n\t\t\ttriangle = new JCheckBox(new String(configuration.getProperties().getProperty( \"module.VCO.onde.triangle\").getBytes(\"iso8859-1\"), \"utf-8\"));\n\t\telse\n\t\t\ttriangle = new JCheckBox(configuration.getProperties().getProperty( \"module.VCO.onde.triangle\"));\n\t\twaveGroup.add(triangle);\n\t\ttriangle.setSize( 80,20 );\n\t\ttriangle.setBackground( Color.gray );\n\t\ttriangle.setForeground( Color.white );\n\t\tif(language == \"Chinese\")\n\t\t\tscie = new JCheckBox(new String(configuration.getProperties().getProperty( \"module.VCO.onde.scie\").getBytes(\"iso8859-1\"), \"utf-8\"));\n\t\telse\n\t\t\tscie = new JCheckBox(configuration.getProperties().getProperty( \"module.VCO.onde.scie\"));\n\t\twaveGroup.add(scie);\n\t\tscie.setSize( 80,20 );\n\t\tscie.setBackground( Color.gray );\n\t\tscie.setForeground( Color.white );\n\t\t\n\t\ticone1 = new ImageIcon ( this.getClass().getResource( \"/images/signal-carre.jpg\" ) ) ;\n\t\tsignalcarre = new JLabel( icone1 );\n\t\tsignalcarre.setSize( icone1.getIconWidth(), icone1.getIconHeight() );\n\t\ticone2 = new ImageIcon ( this.getClass().getResource( \"/images/signal-triangle.jpg\" ) );\n\t\tsignaltriangle = new JLabel( icone2 );\n\t\tsignaltriangle.setSize( icone2.getIconWidth(), icone2.getIconHeight() );\n\t\t\n\t\ticone3 = new ImageIcon ( this.getClass().getResource( \"/images/signal-scie.jpg\" ) );\n\t\tsignalscie = new JLabel( icone3 );\n\t\tsignalscie.setSize( icone3.getIconWidth(), icone3.getIconHeight() );\n\t\t\t\n\t\tadd( carre );\n\t\tadd( triangle );\n add( scie );\n add( signalcarre );\n add( signaltriangle );\n add( signalscie );\n \n setVisible( true );\n\t}", "public jigl.signal.Signal getSignal() {\n\t\treturn jsignal;\n\t}", "public WaveView() {\n initComponents();\n }", "public java.awt.Image getJavaSignal() {\n\t\treturn image;\n\t}", "public void draw(short[] samples, int threshold, int width, int height, Graphics2D g) {\n // Fill the background.\n g.setColor(MISSING_COLOR);\n g.fillRect(0, 0, width, height);\n\n // Find the bounds of the samples to draw.\n int minFrame = Integer.MAX_VALUE;\n int maxFrame = Integer.MIN_VALUE;\n for (BitData bitData : mHistory) {\n minFrame = Math.min(Math.min(bitData.getStartFrame(), bitData.getEndFrame()), minFrame);\n maxFrame = Math.max(Math.max(bitData.getStartFrame(), bitData.getEndFrame()), maxFrame);\n }\n // Show a bit past the error point.\n maxFrame = Math.min(maxFrame + 100, samples.length - 1);\n int frameWidth = maxFrame - minFrame + 1;\n\n // Draw all backgrounds.\n for (BitData bitData : mHistory) {\n // Compute the background color for this bit.\n Color backgroundColor;\n switch (bitData.getBitType()) {\n case ZERO:\n backgroundColor = ZERO_BIT_COLOR;\n break;\n\n case ONE:\n backgroundColor = ONE_BIT_COLOR;\n break;\n\n case START:\n backgroundColor = START_BIT_COLOR;\n break;\n\n default:\n case BAD:\n backgroundColor = BAD_BIT_COLOR;\n break;\n }\n\n // Map to image.\n int startX = (bitData.getStartFrame() - minFrame)*width/frameWidth;\n startX = clamp(startX, 0, width - 1);\n int endX = (bitData.getEndFrame() - minFrame)*width/frameWidth;\n endX = clamp(endX, 0, width - 1);\n\n // Draw background.\n g.setColor(backgroundColor);\n g.fillRect(startX, 0, endX - startX, height);\n }\n\n // Draw signal.\n int lastX = -1;\n int lastY = -1;\n g.setColor(LINE_COLOR);\n for (int frame = minFrame; frame < maxFrame; frame++) {\n // Draw line.\n int x = (frame - minFrame)*width/frameWidth;\n x = clamp(x, 0, width - 1);\n\n // *Must* cast to int first or -32768 won't negate properly.\n int y = -(int)samples[frame]*(height/2)/32768 + height/2;\n y = clamp(y, 0, height - 1);\n\n if (lastX != -1) {\n g.drawLine(lastX, lastY, x, y);\n }\n\n lastX = x;\n lastY = y;\n }\n\n // Draw grid.\n g.setColor(Color.GRAY);\n int y = height/2;\n g.drawLine(0, y, width - 1, y);\n if (threshold != 0) {\n y = threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n y = -threshold*(height/2)/32768 + height/2;\n g.drawLine(0, y, width - 1, y);\n }\n }", "public void run() {\n\n GCanvas gc = this.getGCanvas();\n\n this.setSize(1000,1000);\n GOval wheel = new GOval(100, 100, 800, 800);\n this.add(wheel);\n GLine horzline = new GLine(105,500, 895, 500);\n this.add(horzline);\n GLine vertline = new GLine(500,105, 500, 895);\n this.add(vertline);\n\n GLabel Quad1 = new GLabel(\"(+,+)\", 700, 100);\n Quad1.setFont(\"Arial-PLAIN-28\");\n this.add(Quad1);\n\n GLabel Quad2 = new GLabel(\"(-,+)\", 300, 100);\n Quad2.setFont(\"Arial-PLAIN-28\");\n this.add(Quad2);\n\n GLabel Quad3 = new GLabel(\"(-,-)\", 300, 900);\n Quad3.setFont(\"Arial-PLAIN-28\");\n this.add(Quad3);\n\n GLabel Quad4 = new GLabel(\"(+,-)\", 700, 900);\n Quad4.setFont(\"Arial-PLAIN-28\");\n this.add(Quad4);\n\n //TwoPi\n GLabel TwoPiShow = new GLabel(\"2π\");\n GOval twopi = new GOval(890, 490, 20,20);\n this.add(twopi);\n twopi.setFilled(true);\n twopi.setFillColor(Color.BLACK);\n TwoPiShow.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(TwoPiShow, 915, 510);\n\n GLabel TwoPiSin = new GLabel(\"(0)\");\n TwoPiSin.setFont(\"Arial-PLAIN-18\");\n TwoPiSin.setColor(Color.GREEN);\n\n\n GLabel TwoPiCos = new GLabel(\"(1)\");\n TwoPiCos.setFont(\"Arial-PLAIN-18\");\n TwoPiCos.setColor(Color.BLUE);\n\n GLabel TwoPiTan = new GLabel(\"(0)\");\n TwoPiTan.setFont(\"Arial-PLAIN-18\");\n TwoPiTan.setColor(Color.RED);\n\n GLabel TwoPiSec = new GLabel(\"(1)\");\n TwoPiSec.setFont(\"Arial-PLAIN-18\");\n TwoPiSec.setColor(Color.CYAN);\n\n GLabel TwoPiCsc = new GLabel(\"(undefined)\");\n TwoPiCsc.setFont(\"Arial-PLAIN-18\");\n TwoPiCsc.setColor(Color.ORANGE);\n\n /*\n Make Mouse Listener Thing for:\n\n Sin(2pi) = 0\n Cos(2pi) = 1\n\n\n\n */\n\n\n //Zero\n GLabel Zero = new GLabel(\"0\");\n Zero.setFont(\"Arial-PLAIN-18\");\n this.add(Zero, 915, 495);\n\n /*\n Make Mouse Listener Thing for:\n\n Or I guess make a button to show these:\n\n Sin(0) = 0\n Cos(0) = 1\n Tan(0)\n Sec(0)\n Csc(0)\n Cot(0)\n\n Mouse Scroll Over --> show that:\n\n Tan = (sin)/(cos)\n\n Sec = 1/(cos)\n\n Cot = 1/(tan)\n\n Csc = 1/(sin)\n\n\n\n */\n\n\n // Quad 1\n\n //Pi6\n GLabel Pi6Show = new GLabel(\"(π/6)\");\n GOval Pi6 = new GOval(840, 300, 20,20);\n this.add(Pi6);\n Pi6.setFilled(true);\n Pi6.setFillColor(Color.BLACK);\n Pi6Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(Pi6Show, 860, 300);\n\n GLabel Pi6Sin = new GLabel(\"(1/2)\");\n Pi6Sin.setFont(\"Arial-PLAIN-18\");\n Pi6Sin.setColor(Color.GREEN);\n\n\n\n GLabel Pi6Cos = new GLabel(\"(√3/2)\");\n Pi6Cos.setFont(\"Arial-PLAIN-18\");\n Pi6Cos.setColor(Color.BLUE);\n\n GLabel Pi6Tan = new GLabel(\"(√3/3)\");\n Pi6Tan.setFont(\"Arial-PLAIN-18\");\n Pi6Tan.setColor(Color.RED);\n\n GLabel Pi6Cot = new GLabel(\"(√3)\");\n Pi6Cot.setFont(\"Arial-PLAIN-18\");\n Pi6Cot.setColor(Color.MAGENTA);\n\n GLabel Pi6Csc = new GLabel(\"2\");\n Pi6Csc.setFont(\"Arial-PLAIN-18\");\n Pi6Csc.setColor(Color.CYAN);\n\n GLabel Pi6Sec = new GLabel(\"(2√3/3)\");\n Pi6Sec.setFont(\"Arial-PLAIN-18\");\n Pi6Sec.setColor(Color.ORANGE);\n\n\n\n\n /*\n Make Mouse Listener Thing for:\n\n Sin(pi/6) = 1/2\n Cos(pi/6) = sqrt(3)/2\n\n\n */\n\n //Pi4\n GLabel Pi4Show = new GLabel(\"(π/4)\");\n GOval Pi4 = new GOval(770, 200, 20,20);\n this.add(Pi4);\n Pi4.setFilled(true);\n Pi4.setFillColor(Color.BLACK);\n Pi4Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(Pi4Show, 800, 200);\n\n GLabel Pi4Sin = new GLabel(\"(√2/2)\");\n Pi4Sin.setFont(\"Arial-PLAIN-18\");\n Pi4Sin.setColor(Color.GREEN);\n\n\n GLabel Pi4Cos = new GLabel(\"(√2/2)\");\n Pi4Cos.setFont(\"Arial-PLAIN-18\");\n Pi4Cos.setColor(Color.blue);\n\n GLabel Pi4Tan = new GLabel(\"1\");\n Pi4Cos.setFont(\"Arial-PLAIN-18\");\n Pi4Cos.setColor(Color.RED);\n\n GLabel Pi4Sec = new GLabel(\"(2√2/2)\");\n Pi4Cos.setFont(\"Arial-PLAIN-18\");\n Pi4Cos.setColor(Color.ORANGE);\n\n GLabel Pi4Csc = new GLabel(\"(2√2/2)\");\n Pi4Cos.setFont(\"Arial-PLAIN-18\");\n Pi4Cos.setColor(Color.CYAN);\n\n\n //Pi3\n GLabel Pi3Show = new GLabel(\"(π/3)\");\n GOval Pi3 = new GOval(650, 120, 20,20);\n this.add(Pi3);\n Pi3.setFilled(true);\n Pi3.setFillColor(Color.BLACK);\n Pi3Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(Pi3Show, 670, 120);\n\n GLabel Pi3Sin = new GLabel(\"(√3/2)\");\n Pi3Sin.setFont(\"Arial-PLAIN-18\");\n Pi3Sin.setColor(Color.GREEN);\n\n\n GLabel Pi3Cos = new GLabel(\"(1/2)\");\n Pi3Cos.setFont(\"Arial-PLAIN-18\");\n Pi3Cos.setColor(Color.BLUE);\n\n GLabel Pi3Tan = new GLabel(\"(√3)\");\n Pi3Tan.setFont(\"Arial-PLAIN-18\");\n Pi3Tan.setColor(Color.RED);\n\n GLabel Pi3Sec = new GLabel(\"2\");\n Pi3Sec.setFont(\"Arial-PLAIN-18\");\n Pi3Sec.setColor(Color.ORANGE);\n\n GLabel Pi3Csc = new GLabel(\"(2√3/3)\");\n Pi3Csc.setFont(\"Arial-PLAIN-18\");\n Pi3Csc.setColor(Color.CYAN);\n\n\n //Pi2\n GLabel Pi2Show = new GLabel(\"(π/2)\");\n GOval Pi2 = new GOval(490, 90, 20,20);\n this.add(Pi2);\n Pi2.setFilled(true);\n Pi2.setFillColor(Color.BLACK);\n Pi2Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(Pi2Show, 490, 90);\n\n GLabel Pi2Sin = new GLabel(\"(1)\");\n Pi2Sin.setFont(\"Arial-PLAIN-18\");\n Pi2Sin.setColor(Color.GREEN);\n\n\n GLabel Pi2Cos = new GLabel(\"(0)\");\n Pi2Cos.setFont(\"Arial-PLAIN-18\");\n Pi2Cos.setColor(Color.BLUE);\n\n GLabel Pi2Tan = new GLabel(\"(undefined)\");\n Pi2Tan.setFont(\"Arial-PLAIN-18\");\n Pi2Tan.setColor(Color.RED);\n\n GLabel Pi2Sec = new GLabel(\"(undefined)\");\n Pi2Sec.setFont(\"Arial-PLAIN-18\");\n Pi2Sec.setColor(Color.ORANGE);\n\n GLabel Pi2Csc = new GLabel(\"(1)\");\n Pi2Csc.setFont(\"Arial-PLAIN-18\");\n Pi2Csc.setColor(Color.CYAN);\n\n\n\n // Quad 2\n\n //2Pi3\n GLabel TwoPi3Show = new GLabel(\"(2π/3)\");\n GOval TwoPi3 = new GOval(340, 115, 20,20);\n this.add(TwoPi3);\n TwoPi3.setFilled(true);\n TwoPi3.setFillColor(Color.BLACK);\n TwoPi3Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(TwoPi3Show, 285, 125);\n\n\n GLabel TwoPi3Sin = new GLabel(\"(√3/2)\");\n TwoPi3Sin.setFont(\"Arial-PLAIN-18\");\n TwoPi3Sin.setColor(Color.GREEN);\n\n\n GLabel TwoPi3Cos = new GLabel(\"(-1/2)\");\n TwoPi3Cos.setFont(\"Arial-PLAIN-18\");\n TwoPi3Cos.setColor(Color.BLUE);\n\n GLabel TwoPi3Tan = new GLabel(\"(-√3)\");\n TwoPi3Tan.setFont(\"Arial-PLAIN-18\");\n Pi2Tan.setColor(Color.RED);\n\n GLabel TwoPi3Sec = new GLabel(\"(-2)\");\n TwoPi3Sec.setFont(\"Arial-PLAIN-18\");\n TwoPi3Sec.setColor(Color.ORANGE);\n\n GLabel TwoPi3Csc = new GLabel(\"(2√3/3)\");\n TwoPi3Csc.setFont(\"Arial-PLAIN-18\");\n TwoPi3Csc.setColor(Color.CYAN);\n\n //3Pi4\n GLabel ThreePi4Show = new GLabel(\"(3π/4)\");\n GOval ThreePi4 = new GOval(225, 190, 20,20);\n this.add(ThreePi4);\n ThreePi4.setFilled(true);\n ThreePi4.setFillColor(Color.BLACK);\n ThreePi4Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(ThreePi4Show, 160, 205);\n\n\n GLabel ThreePi4Sin = new GLabel(\"(√2/2)\");\n ThreePi4Sin.setFont(\"Arial-PLAIN-18\");\n ThreePi4Sin.setColor(Color.GREEN);\n\n\n GLabel ThreePi4Cos = new GLabel(\"(-√2/2)\");\n ThreePi4Cos.setFont(\"Arial-PLAIN-18\");\n ThreePi4Cos.setColor(Color.BLUE);\n\n GLabel ThreePi4Tan = new GLabel(\"(-1)\");\n ThreePi4Tan.setFont(\"Arial-PLAIN-18\");\n ThreePi4Tan.setColor(Color.RED);\n\n GLabel ThreePi4Sec = new GLabel(\"(-2√2/2)\");\n ThreePi4Sec.setFont(\"Arial-PLAIN-18\");\n ThreePi4Sec.setColor(Color.ORANGE);\n\n GLabel ThreePi4Csc = new GLabel(\"(2√3/3)\");\n ThreePi4Csc.setFont(\"Arial-PLAIN-18\");\n ThreePi4Csc.setColor(Color.CYAN);\n\n //5Pi6\n\n GLabel FivePi6Show = new GLabel(\"(5π/6)\");\n GOval FivePi6 = new GOval(135, 290, 20,20);\n this.add(FivePi6);\n FivePi6.setFilled(true);\n FivePi6.setFillColor(Color.BLACK);\n FivePi6Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(FivePi6Show, 80, 310);\n\n GLabel FivePi6Sin = new GLabel(\"(1/2)\");\n FivePi6Sin.setFont(\"Arial-PLAIN-18\");\n FivePi6Sin.setColor(Color.GREEN);\n\n\n GLabel FivePi6Cos = new GLabel(\"(-√3/2)\");\n FivePi6Cos.setFont(\"Arial-PLAIN-18\");\n FivePi6Cos.setColor(Color.BLUE);\n\n GLabel FivePi6Tan = new GLabel(\"(-√3/3)\");\n FivePi6Tan.setFont(\"Arial-PLAIN-18\");\n FivePi6Tan.setColor(Color.RED);\n\n GLabel FivePi6Sec = new GLabel(\"(-2√2/2)\");\n FivePi6Sec.setFont(\"Arial-PLAIN-18\");\n FivePi6Sec.setColor(Color.ORANGE);\n\n GLabel FivePi6Csc = new GLabel(\"(2)\");\n FivePi6Csc.setFont(\"Arial-PLAIN-18\");\n FivePi6Csc.setColor(Color.CYAN);\n\n //Pi\n\n GLabel PiShow = new GLabel(\"π\");\n GOval pi = new GOval(90, 490, 20,20);\n this.add(pi);\n pi.setFilled(true);\n pi.setFillColor(Color.BLACK);\n PiShow.setFont(\"Arial-PLAIN-22\");\n //Make into Mouse Listener\n this.add(PiShow, 75, 510);\n\n GLabel PiSin = new GLabel(\"(0)\");\n PiSin.setFont(\"Arial-PLAIN-18\");\n PiSin.setColor(Color.GREEN);\n\n\n GLabel PiCos = new GLabel(\"(-1)\");\n PiCos.setFont(\"Arial-PLAIN-18\");\n PiCos.setColor(Color.BLUE);\n\n GLabel PiTan = new GLabel(\"(0)\");\n PiTan.setFont(\"Arial-PLAIN-18\");\n PiTan.setColor(Color.RED);\n\n GLabel PiSec = new GLabel(\"(-1)\");\n PiSec.setFont(\"Arial-PLAIN-18\");\n PiSec.setColor(Color.ORANGE);\n\n GLabel PiCsc = new GLabel(\"(undefined)\");\n PiCsc.setFont(\"Arial-PLAIN-18\");\n PiCsc.setColor(Color.CYAN);\n\n//Quad 3\n\n //7Pi6\n\n GLabel SevenPi6Show = new GLabel(\"(7π/6)\");\n GOval SevenPi6 = new GOval(145, 680, 20,20);\n this.add(SevenPi6);\n SevenPi6.setFilled(true);\n SevenPi6.setFillColor(Color.BLACK);\n SevenPi6Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(SevenPi6Show, 90, 690);\n\n GLabel SevenPi6Sin = new GLabel(\"(-1/2)\");\n SevenPi6Sin.setFont(\"Arial-PLAIN-18\");\n SevenPi6Sin.setColor(Color.GREEN);\n\n\n GLabel SevenPi6Cos = new GLabel(\"(-√3/2)\");\n SevenPi6Cos.setFont(\"Arial-PLAIN-18\");\n SevenPi6Cos.setColor(Color.BLUE);\n\n GLabel SevenPi6Tan = new GLabel(\"(√3/3)\");\n SevenPi6Tan.setFont(\"Arial-PLAIN-18\");\n SevenPi6Tan.setColor(Color.RED);\n\n GLabel SevenPi6Sec = new GLabel(\"(-2√3/3)\");\n SevenPi6Sec.setFont(\"Arial-PLAIN-18\");\n SevenPi6Sec.setColor(Color.ORANGE);\n\n GLabel SevenPi6Csc = new GLabel(\"(-2)\");\n SevenPi6Csc.setFont(\"Arial-PLAIN-18\");\n SevenPi6Csc.setColor(Color.CYAN);\n\n //5Pi4\n\n GLabel FivePi4Show = new GLabel(\"(5π/4)\");\n GOval FivePi4 = new GOval(205, 780, 20,20);\n this.add(FivePi4);\n FivePi4.setFilled(true);\n FivePi4.setFillColor(Color.BLACK);\n FivePi4Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(FivePi4Show, 150, 790);\n\n GLabel FivePi4Sin = new GLabel(\"(-√2/2)\");\n FivePi4Sin.setFont(\"Arial-PLAIN-18\");\n FivePi4Sin.setColor(Color.GREEN);\n\n GLabel FivePi4Cos = new GLabel(\"(-√2/2)\");\n FivePi4Cos.setFont(\"Arial-PLAIN-18\");\n FivePi4Cos.setColor(Color.BLUE);\n\n GLabel FivePi4Tan = new GLabel(\"(1)\");\n FivePi4Tan.setFont(\"Arial-PLAIN-18\");\n FivePi4Tan.setColor(Color.RED);\n\n\n GLabel FivePi4Csc = new GLabel(\"(-2√2/2)\");\n FivePi4Csc.setFont(\"Arial-PLAIN-18\");\n FivePi4Csc.setColor(Color.CYAN);\n\n GLabel FivePi4Sec = new GLabel(\"(-2√2/2)\");\n FivePi4Sec.setFont(\"Arial-PLAIN-18\");\n FivePi4Sec.setColor(Color.ORANGE);\n\n\n\n //4Pi3\n\n GLabel FourPi3Show = new GLabel(\"(4π/3)\");\n GOval FourPi3 = new GOval(335, 860, 20,20);\n this.add(FourPi3);\n FourPi3.setFilled(true);\n FourPi3.setFillColor(Color.BLACK);\n FourPi3Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(FourPi3Show, 275, 870);\n\n GLabel FourPi3Sin = new GLabel(\"(-√3/2)\");\n FourPi3Sin.setFont(\"Arial-PLAIN-18\");\n FourPi3Sin.setColor(Color.GREEN);\n\n\n GLabel FourPi3Cos = new GLabel(\"(-1/2)\");\n FourPi3Cos.setFont(\"Arial-PLAIN-18\");\n FourPi3Cos.setColor(Color.blue);\n\n GLabel FourPi3Tan = new GLabel(\"(√3)\");\n FourPi3Cos.setFont(\"Arial-PLAIN-18\");\n FourPi3Cos.setColor(Color.RED);\n\n GLabel FourPi3Sec = new GLabel(\"(-2)\");\n FourPi3Cos.setFont(\"Arial-PLAIN-18\");\n FourPi3Cos.setColor(Color.ORANGE);\n\n GLabel FourPi3Csc = new GLabel(\"(-2√3/3)\");\n FourPi3Cos.setFont(\"Arial-PLAIN-18\");\n FourPi3Cos.setColor(Color.CYAN);\n\n/*\n //TwoPi\n GLabel TwoPiShow = new GLabel(\"2π\");\n GOval twopi = new GOval(890, 490, 20,20);\n this.add(twopi);\n twopi.setFilled(true);\n twopi.setFillColor(Color.BLACK);\n TwoPiShow.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(TwoPiShow, 915, 510);\n\n\n*/\n\n //3Pi2\n GLabel ThreePi2Show = new GLabel(\"(3π/2)\");\n GOval ThreePi2 = new GOval(490, 890, 20,20);\n this.add(ThreePi2);\n ThreePi2.setFilled(true);\n ThreePi2.setFillColor(Color.BLACK);\n ThreePi2Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(ThreePi2Show, 480, 890);\n\n GLabel ThreePi2Sin = new GLabel(\"(-1)\");\n ThreePi2Sin.setFont(\"Arial-PLAIN-18\");\n ThreePi2Sin.setColor(Color.GREEN);\n\n GLabel ThreePi2Cos = new GLabel(\"(0)\");\n ThreePi2Cos.setFont(\"Arial-PLAIN-18\");\n ThreePi2Cos.setColor(Color.BLUE);\n\n GLabel ThreePi2Tan = new GLabel(\"(undefined)\");\n ThreePi2Tan.setFont(\"Arial-PLAIN-18\");\n ThreePi2Tan.setColor(Color.RED);\n\n GLabel ThreePi2Cot = new GLabel(\"(0)\");\n ThreePi2Cot.setFont(\"Arial-PLAIN-18\");\n ThreePi2Cot.setColor(Color.MAGENTA);\n\n GLabel ThreePi2Csc = new GLabel(\"(-1)\");\n ThreePi2Csc.setFont(\"Arial-PLAIN-18\");\n ThreePi2Csc.setColor(Color.CYAN);\n\n GLabel ThreePi2Sec = new GLabel(\"(undefined)\");\n ThreePi2Sec.setFont(\"Arial-PLAIN-18\");\n ThreePi2Sec.setColor(Color.ORANGE);\n\n //FivePi3\n GLabel FivePi3Show = new GLabel(\"(5π/3)\");\n GOval FivePi3 = new GOval(655, 855, 20,20);\n this.add(FivePi3);\n FivePi3.setFilled(true);\n FivePi3.setFillColor(Color.BLACK);\n FivePi3Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(FivePi3Show, 685, 865);\n\n GLabel FivePi3Sin = new GLabel(\"(-√3/2)\");\n FivePi3Sin.setFont(\"Arial-PLAIN-18\");\n FivePi3Sin.setColor(Color.GREEN);\n\n GLabel FivePi3Cos = new GLabel(\"(1/2)\");\n FivePi3Cos.setFont(\"Arial-PLAIN-18\");\n FivePi3Cos.setColor(Color.BLUE);\n\n GLabel FivePi3Tan = new GLabel(\"(-√3)\");\n FivePi3Tan.setFont(\"Arial-PLAIN-18\");\n FivePi3Tan.setColor(Color.RED);\n\n\n GLabel FivePi3Csc = new GLabel(\"(-2√3/3)\");\n FivePi3Csc.setFont(\"Arial-PLAIN-18\");\n FivePi3Csc.setColor(Color.CYAN);\n\n GLabel FivePi3Sec = new GLabel(\"2\");\n FivePi3Sec.setFont(\"Arial-PLAIN-18\");\n FivePi3Sec.setColor(Color.ORANGE);\n\n\n\n //SevenPi4\n GLabel SevenPi4Show = new GLabel(\"(7π/4)\");\n GOval SevenPi4 = new GOval(785, 760, 20,20);\n this.add(SevenPi4);\n SevenPi4.setFilled(true);\n SevenPi4.setFillColor(Color.BLACK);\n SevenPi4Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(SevenPi4Show, 810, 770);\n\n GLabel SevenPi4Sin = new GLabel(\"(-√2/2)\");\n SevenPi4Sin.setFont(\"Arial-PLAIN-18\");\n SevenPi4Sin.setColor(Color.GREEN);\n\n GLabel SevenPi4Cos = new GLabel(\"(√2/2)\");\n SevenPi4Cos.setFont(\"Arial-PLAIN-18\");\n FivePi3Cos.setColor(Color.BLUE);\n\n GLabel SevenPi4Tan = new GLabel(\"(-1)\");\n SevenPi4Tan.setFont(\"Arial-PLAIN-18\");\n SevenPi4Tan.setColor(Color.RED);\n\n\n GLabel SevenPi4Csc = new GLabel(\"(-2√2/2)\");\n SevenPi4Csc.setFont(\"Arial-PLAIN-18\");\n SevenPi4Csc.setColor(Color.CYAN);\n\n GLabel SevenPi4Sec = new GLabel(\"(2√2/2)\");\n SevenPi4Sec.setFont(\"Arial-PLAIN-18\");\n SevenPi4Sec.setColor(Color.ORANGE);\n\n //ElevenPi6\n GLabel ElevenPi6Show = new GLabel(\"(11π/4)\");\n GOval ElevenPi6 = new GOval(855, 660, 20,20);\n this.add(ElevenPi6);\n ElevenPi6.setFilled(true);\n ElevenPi6.setFillColor(Color.BLACK);\n SevenPi4Show.setFont(\"Arial-PLAIN-18\");\n //Make into Mouse Listener\n this.add(ElevenPi6Show, 885, 670);\n\n GLabel ElevenPi6Sin = new GLabel(\"(-1/2)\");\n ElevenPi6Sin.setFont(\"Arial-PLAIN-18\");\n ElevenPi6Sin.setColor(Color.GREEN);\n\n GLabel ElevenPi6Cos = new GLabel(\"(√3/2)\");\n ElevenPi6Cos.setFont(\"Arial-PLAIN-18\");\n ElevenPi6Cos.setColor(Color.BLUE);\n\n GLabel ElevenPi6Tan = new GLabel(\"(-√3/3)\");\n ElevenPi6Tan.setFont(\"Arial-PLAIN-18\");\n ElevenPi6Tan.setColor(Color.RED);\n\n GLabel ElevenPi6Csc = new GLabel(\"(-2)\");\n ElevenPi6Csc.setFont(\"Arial-PLAIN-18\");\n ElevenPi6Csc.setColor(Color.CYAN);\n\n GLabel ElevenPi6Sec = new GLabel(\"(2√3/3)\");\n ElevenPi6Sec.setFont(\"Arial-PLAIN-18\");\n ElevenPi6Sec.setColor(Color.ORANGE);\n\n\n\n\n//Now add mouse listeners and lines\n // Add buttons (action listeners) too with sin, cos, tan, sec, csc, cot\n //And then a key listener for a quiz\n\n/*\n Pi6.addMouseMotionListener(\n new MouseMotionListener() {\n @Override\n public void mouseDragged(MouseEvent e) { }\n @Override\n public void mouseMoved(MouseEvent e) {\n GLine LinePi6 = new GLine(400, 400, 840, 300);\n LinePi6.setColor(Color.GREEN);\n canvas.add(LinePi6);\n\n }\n }\n\n\n );\n\n */\n\n JButton buttonSin = new JButton(\"Sin(x)\");\n this.add(buttonSin, SOUTH);\n JButton buttonCos = new JButton(\"Cos(x)\");\n this.add(buttonCos, SOUTH);\n JButton buttonTan = new JButton(\"Tan(x)\");\n this.add(buttonTan, SOUTH);\n JButton buttonCot = new JButton(\"Cot(x)\");\n this.add(buttonCos, SOUTH);\n JButton buttonCsc = new JButton(\"Csc(x)\");\n this.add(buttonCsc, SOUTH);\n JButton buttonSec = new JButton(\"Sec(x)\");\n this.add(buttonSec, SOUTH);\n\n buttonSin.getParent().revalidate();\n\n buttonSin.addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n GCanvas canvas = TrigWheel.this.getGCanvas();\n canvas.add(Pi6Sin, 900, 300);\n canvas.add(Pi4Sin,840, 200);\n canvas.add(Pi3Sin,710, 120);\n canvas.add(Pi2Sin, 530, 90);\n canvas.add(TwoPiSin,955, 510);\n\n canvas.add(TwoPi3Sin, 235, 125);\n canvas.add(ThreePi4Sin,100, 205);\n canvas.add(FivePi6Sin,40, 300);\n canvas.add(PiSin,35, 510);\n\n canvas.add(FourPi3Sin, 215, 870);\n canvas.add(FivePi4Sin,90, 790);\n canvas.add(SevenPi6Sin,40, 690);\n\n canvas.add(FivePi3Sin, 740, 865);\n canvas.add(SevenPi4Sin,860, 770);\n canvas.add(ElevenPi6Sin,935, 670);\n\n }\n }\n\n\n );\n\n buttonCos.addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n GCanvas canvas = TrigWheel.this.getGCanvas();\n canvas.add(Pi6Cos, 900, 300);\n canvas.add(Pi4Cos,840, 200);\n canvas.add(Pi3Cos,710, 120);\n canvas.add(Pi2Cos, 530, 90);\n canvas.add(TwoPiCos,955, 510);\n\n canvas.add(TwoPi3Cos, 235, 125);\n canvas.add(ThreePi4Cos,100, 205);\n canvas.add(FivePi6Cos,40, 300);\n canvas.add(PiCos,35, 510);\n\n canvas.add(FourPi3Cos, 215, 870);\n canvas.add(FivePi4Cos,90, 790);\n canvas.add(SevenPi6Cos,40, 690);\n\n canvas.add(FivePi3Cos, 740, 865);\n canvas.add(SevenPi4Cos,860, 770);\n canvas.add(ElevenPi6Cos,935, 670);\n\n\n }\n }\n\n\n );\n\n buttonTan.addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n GCanvas canvas = TrigWheel.this.getGCanvas();\n canvas.add(Pi6Tan, 900, 300);\n canvas.add(Pi4Tan,840, 200);\n canvas.add(Pi3Tan,710, 120);\n canvas.add(Pi2Tan, 530, 90);\n canvas.add(TwoPiTan,955, 510);\n\n canvas.add(TwoPi3Tan, 235, 125);\n canvas.add(ThreePi4Tan,100, 205);\n canvas.add(FivePi6Tan,40, 300);\n canvas.add(PiTan,35, 510);\n\n canvas.add(FourPi3Tan, 215, 870);\n canvas.add(FivePi4Tan,90, 790);\n canvas.add(SevenPi6Tan,40, 690);\n\n canvas.add(FivePi3Tan, 740, 865);\n canvas.add(SevenPi4Tan,860, 770);\n canvas.add(ElevenPi6Tan,935, 670);\n\n\n }\n }\n\n\n );\n\n buttonSec.addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n GCanvas canvas = TrigWheel.this.getGCanvas();\n canvas.add(Pi6Sec, 900, 300);\n canvas.add(Pi4Sec,840, 200);\n canvas.add(Pi3Sec,720, 120);\n canvas.add(Pi2Sec, 530, 90);\n canvas.add(TwoPiSec,955, 510);\n\n canvas.add(TwoPi3Sec, 235, 125);\n canvas.add(ThreePi4Sec,90, 205);\n canvas.add(FivePi6Sec,40, 290);\n canvas.add(PiSec,35, 510);\n\n canvas.add(FourPi3Sec, 215, 870);\n canvas.add(FivePi4Sec,80, 790);\n canvas.add(SevenPi6Sec,40, 670);\n\n canvas.add(FivePi3Sec, 740, 865);\n canvas.add(SevenPi4Sec,860, 770);\n canvas.add(ElevenPi6Sec,935, 670);\n\n\n }\n }\n\n\n );\n\n buttonCsc.addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n GCanvas canvas = TrigWheel.this.getGCanvas();\n canvas.add(Pi6Csc, 900, 300);\n canvas.add(Pi4Csc,840, 200);\n canvas.add(Pi3Csc,720, 120);\n canvas.add(Pi2Csc, 530, 90);\n canvas.add(TwoPiCsc,890, 480);\n\n canvas.add(TwoPi3Csc, 215, 125);\n canvas.add(ThreePi4Csc,90, 205);\n canvas.add(FivePi6Csc,40, 300);\n canvas.add(PiCsc,35, 490);\n\n canvas.add(FourPi3Csc, 215, 870);\n canvas.add(FivePi4Csc,80, 790);\n canvas.add(SevenPi6Csc,40, 680);\n\n canvas.add(FivePi3Csc, 740, 865);\n canvas.add(SevenPi4Csc,860, 770);\n canvas.add(ElevenPi6Csc,935, 670);\n\n\n\n }\n }\n\n\n );\n\n/*\n Pi6.addMouseListener(\n new MouseListener() {\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n @Override\n public void mouseReleased(MouseEvent e) {}\n @Override\n public void mouseEntered(MouseEvent e) {}\n @Override\n public void mouseExited(MouseEvent e) {}\n @Override\n public void mouseClicked(MouseEvent e) {}\n }\n );\n*/\n\n\n\n\n\n }", "private void createGUI() {\r\n\r\n cgRect modelSpace = new cgRect(0, 0, 11, 11);\r\n cgRect deviceSpace = new cgRect(0, 0, 600, 600);\r\n\r\n cgTransformation tr = new cgTransformation(modelSpace, deviceSpace, false, false);\r\n\r\n /**\r\n *\r\n */\r\n // The formatter of axis' labels will use default locale and pattern\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n // We will use \"fixed size\" axis renderer for all axes\r\n \r\n // 参数一:标签刻度长度大小 参数二:标签数字长度大小 参数三:数字和刻度之间的距离大小,长度为像素\r\n cgAxisRenderer ar = new cgFixedSizeAxisRenderer(5, 15, 50, nf);\r\n\r\n // ----------------------------------------------------\r\n // First axis - values match the model coordinates,\r\n // model origin is at 0.0\r\n // ----------------------------------------------------\r\n \r\n // 第三个参数为显示的数字数\r\n cgRect bbox1 = new cgRect(0, 0, 11, 1);\r\n TickGenerator tg1 = new NumericTickGenerator(1.0);\r\n cgAxisShape axis1 = new cgAxisShape(cgAxisShape.NORTH, bbox1, tg1, ar);\r\n\r\n cgShapeListLayer layer = new cgShapeListLayer();\r\n\r\n layer.addShape(axis1);\r\n\r\n /**\r\n *\r\n */\r\n // ----------------------------------------------------\r\n // Create grid using regular grid renderer\r\n // ----------------------------------------------------\r\n cgRect bbox = new cgRect(0, 0, 10, 10);\r\n TickGenerator htg = new NumericTickGenerator(1.0);\r\n TickGenerator vtg = new NumericTickGenerator(1.0);\r\n cgGridRenderer gr = new cgRegularGridRenderer();\r\n cgGridShape grid = new cgGridShape(bbox, htg, vtg, gr);\r\n\r\n // ----------------------------------------------------\r\n // Create view\r\n // ----------------------------------------------------\r\n// cgShapeListLayer layer = new cgShapeListLayer();\r\n// layer.addShape( grid );\r\n cgContainerModel model = new cgContainerModel();\r\n model.setBoundingBox(modelSpace);\r\n model.addLayer(layer);\r\n\r\n cgPlotView view = new cgPlotView(model, tr);\r\n\r\n // ----------------------------------------------------\r\n // Create plot\r\n // ----------------------------------------------------\r\n cgPlot plot = new cgPlot(view);\r\n\r\n plot.addScrollbar(cgGenericPlotLayout.SOUTH);\r\n plot.addScrollbar(cgGenericPlotLayout.EAST);\r\n\r\n getContentPane().add(plot);\r\n\r\n // ----------------------------------------------------\r\n // Set up listeners\r\n // ----------------------------------------------------\r\n // Set window listener\r\n addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n System.exit(0);\r\n }\r\n });\r\n }", "private void setupVisualizerFxAndUI() {\n\n mLinearLayout = (LinearLayout) findViewById(R.id.linearLayoutVisual);\n // Create a VisualizerView to display the audio waveform for the current settings\n mVisualizerView = new VisualizerView(this);\n mVisualizerView.setLayoutParams(new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n (int) (VISUALIZER_HEIGHT_DIP * getResources().getDisplayMetrics().density)));\n mLinearLayout.addView(mVisualizerView);\n\n // Create the Visualizer object and attach it to our media player.\n\n\n\n\n\n\n mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());\n //mVisualizer = new Visualizer(0);\n mVisualizer.setCaptureSize(Visualizer.getCaptureSizeRange()[1]);\n\n mVisualizer.setDataCaptureListener(new Visualizer.OnDataCaptureListener() {\n public void onWaveFormDataCapture(Visualizer visualizer, byte[] bytes,\n int samplingRate) {\n mVisualizerView.updateVisualizer(bytes);\n }\n\n public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {\n }\n }, Visualizer.getMaxCaptureRate() / 2, true, false);\n }", "public Builder setSignalBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public Buffer(String label){\n channelLabel = label;\n }", "public void onModuleLoad() {\n\t\tcanvas = Canvas.createIfSupported();\n\n\t\tif (canvas == null) {\n\t\t\tRootPanel\n\t\t\t\t\t.get()\n\t\t\t\t\t.add(new Label(\n\t\t\t\t\t\t\t\"Sorry, your browser doesn't support the HTML5 Canvas element\"));\n\t\t\treturn;\n\t\t}\n\n\t\tcanvas.setStyleName(\"mainCanvas\");\n\t\tcanvas.setWidth(canvasWidth + \"px\");\n\t\tcanvas.setCoordinateSpaceWidth(canvasWidth);\n\n\t\tcanvas.setHeight(canvasHeight + \"px\");\n\t\tcanvas.setCoordinateSpaceHeight(canvasHeight);\n\n\t\tg = new Graph(canvas.getContext2d(), canvasWidth, canvasHeight);\n\n\t\ttxtExpression = new TextBox();\n\t\ttxtExpression.setText(\"R=5*SIN(4*T)\");\n\t\ttxtExpression.setWidth(\"400px\");\n\t\tbutDraw = new Button();\n\t\tbutDraw.setText(\"Draw\");\n\t\tbutDraw.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString exp = txtExpression.getText().trim().toUpperCase();\n\t\t\t\tg.DrawAxis();\n\t\t\t\tif (exp.startsWith(\"Y=\"))\n\t\t\t\t\tg.DrawYX(clYellow, exp, -10, 10);\n\t\t\t\telse if (exp.startsWith(\"X=\"))\n\t\t\t\t\tg.DrawXY(clYellow, exp, -10, 10);\n\t\t\t\telse if (exp.startsWith(\"R=\"))\n\t\t\t\t\tg.DrawRT(clYellow, exp, -180, 180);\n\t\t\t\telse if (exp.startsWith(\"XT=\"))\n\t\t\t\t\tg.DrawYXT(clYellow, exp, -10, 10);\n\t\t\t\telse\n\t\t\t\t\tWindow.alert(\"Invalid expression!\");\n\t\t\t}\n\t\t});\n\t\tpanelInput = new HorizontalPanel();\n\t\tpanelInput.add(txtExpression);\n\t\tpanelInput.add(butDraw);\n\t\tRootPanel.get().add(panelInput);\n\n\t\tlabel = new Label(\n\t\t\t\t\"For example: Y=X*COS(X); R=T*T; X=Y*Y; XT=T*SIN(T)_YT=T*COS(T)...\");\n\t\tRootPanel.get().add(label);\n\n\t\tRootPanel.get().add(canvas);\n\n\t\tHTML html = new HTML(\n\t\t\t\t\"Source code: <a href='http://www.bk02.net/mobilemath'>http://www.bk02.net/mobilemath</a> - <a href='http://code.google.com/p/mobilemath/'>http://code.google.com/p/mobilemath/</a>\");\n\t\tRootPanel.get().add(html);\n\n\t\tg.DrawAxis();\n\t\tg.DrawRT(clYellow, \"R=5*SIN(4*T)\", -180, 180);\n\t}", "public Canvas() {\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "public JXGraph() {\r\n this(0.0, 0.0, -1.0, 1.0, -1.0, 1.0, 0.2, 4, 0.2, 4);\r\n }", "@Override\n public void componentOpened() {\n\n java.awt.EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() {\n\n /*\n Create and start JMEVisualization instance\n */\n jmeVisualization = new JMEVisualization();\n jmeVisualization.setRotated(false);\n jmeVisualization.setWidth(getVisualizationPanel().getWidth() - 15);\n jmeVisualization.setHeight(getVisualizationPanel().getHeight() - 30);\n jmeVisualization.startApplication();\n\n /*\n Fetch Canvas from JMEVisualization instance\n */\n jmeCanvas = jmeVisualization.getJmeCanvasContext().getCanvas();\n\n getVisualizationPanel().setLayout(new FlowLayout());\n getVisualizationPanel().add(jmeCanvas);\n getVisualizationPanel().revalidate();\n\n }\n });\n }", "public static DrawingLibraryInterface createNewInterface(Graph graph) {\n return new JGraphXInterface(graph);\n }", "@Override\n public void run() {\n jmeVisualization = new JMEVisualization();\n jmeVisualization.setRotated(false);\n jmeVisualization.setWidth(getVisualizationPanel().getWidth() - 15);\n jmeVisualization.setHeight(getVisualizationPanel().getHeight() - 30);\n jmeVisualization.startApplication();\n\n /*\n Fetch Canvas from JMEVisualization instance\n */\n jmeCanvas = jmeVisualization.getJmeCanvasContext().getCanvas();\n\n getVisualizationPanel().setLayout(new FlowLayout());\n getVisualizationPanel().add(jmeCanvas);\n getVisualizationPanel().revalidate();\n\n }", "private void ajouterItemCircuit(final BuilderPlugin p_builder) {\r\n\t\tJLabel label = new JLabel(p_builder.getImage());\r\n\t\t\r\n\t\tlabel.setToolTipText(p_builder.getName());\r\n\t\tthis.m_panelLabels.add(label);\r\n\t\t\r\n\t\tlabel.addMouseListener(new MouseListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tm_builder = p_builder;\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {}\r\n\t\t});\r\n\t}", "public TestPlotter() {\n\t\tplot = new Plot2D(title, xLabel, yLabel, true);\n\t\tplot.addChartMouseListener(new PlotListener());\n\t\tplot.addDismissListener(new AL());\n\t\tplot.setDefaultCloseOperation(plotter.EXIT_ON_CLOSE);\n\t\t\n\t}", "private Canvas createCanvas(IFramework framework, MouseListener listener) {\r\n\tCanvas canvas = new Canvas(framework);\r\n\tcanvas.setBackground(Color.white);\r\n\tcanvas.addMouseListener(listener);\r\n\treturn canvas;\r\n }", "public FXImageSink(AppSink sink) {\n this.sink = sink;\n sink.set(\"emit-signals\", true);\n newSampleListener = new NewSampleListener();\n newPrerollListener = new NewPrerollListener();\n sink.connect(newSampleListener);\n sink.connect(newPrerollListener);\n sink.setCaps(Caps.fromString(DEFAULT_CAPS));\n image = new ReadOnlyObjectWrapper<>();\n pending = new AtomicReference<>();\n }", "private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }", "JFreeChart generateBox();", "public interface Canvas {\n\tpublic String LABEL_CHANGE = \"label_change_property\";\n\t/**\n\t * @return name of Canvas or an empty String by default. MAY NOT BE NULL.\n\t */\n\tpublic String getName();\n\t/**\n\t * @return color of Canvas or null by default\n\t */\n\tpublic Color getColor();\n\t/**\n\t * @return the JComponent representation of this Canvas. MAY NOT BE NULL.\n\t */\n\tpublic JComponent getJComponent();\n\t/**\n\t * If this canvas is to be highlighted (because it might\n\t * have focus for example), then getHighlight should return\n\t * the color of that highlight. Otherwise, it should\n\t * return null\n\t * @return highlighting color or null by default.\n\t */\n\tpublic Color getHighlight();\n}", "public Canvas(IFramework framework) {\r\n\t this.framework = framework;\r\n\t this.data = framework.getData();\r\n\t this.maxRatio = framework.getDisplayMenu().getMaxRatioScale();\r\n\t this.minRatio = framework.getDisplayMenu().getMinRatioScale();\r\n\t}", "VisualizationAttribute createVisualizationAttribute();", "public GraphPanel4KochCurve() {\n initComponents();\n }", "public GateCanvas(int type_param)\n {\n super();\n // setBackgroundColor( );\n type = type_param;\n inverted = false;\n // setSize(24, 24);\n setVisible(true);\n }", "public JComponent addAux1(Color color)\n {\n Category category = new Category(this, \"Aux 1 FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox reverb = new HBox();\n \n comp = new LabelledDial(\"Time\", this, \"aux1time\", color, 0, 127);\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonegain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonefreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Frequency\");\n reverb.add(comp);\n\n comp = new LabelledDial(\"Gate\", this, \"aux1gatethresh\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Threshold\");\n reverb.add(comp);\n \n final HBox echo = new HBox();\n \n comp = new LabelledDial(\"Feedback\", this, \"aux1feedback\", color, 0, 127);\n echo.add(comp);\n \n VBox vbox = new VBox();\n params = AUX_FX_1_TYPES;\n comp = new Chooser(\"Type\", this, \"aux1type\", params)\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n hbox.removeLast();\n if (model.get(\"aux1type\", 0) <= 2) // reverb\n {\n hbox.addLast(reverb);\n }\n else // echo\n {\n hbox.addLast(echo);\n }\n hbox.revalidate();\n hbox.repaint();\n }\n }; \n vbox.add(comp);\n\n comp = new CheckBox(\"Enable\", this, \"aux1mode\");\n vbox.add(comp);\n\n hbox.add(vbox);\n hbox.addLast(reverb);\n \n /// The manual says this only goes to 123, but in fact it goes to 127\n comp = new LabelledDial(\"Gate /\", this, \"aux1gatedelaytime\", color, 0, 127)\n {\n public String map(int value)\n {\n if (value < 111) return \"\" + value;\n else return TIMES[value - 111];\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Delay Time\");\n hbox.add(comp);\n model.setMetricMax(\"aux1gatedelaytime\", 110);\n \n comp = new LabelledDial(\"Depth\", this, \"aux1depth\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre HP\", this, \"aux1prehp\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre Delay\", this, \"aux1predelay\", color, 0, 127);\n hbox.add(comp);\n\n comp = new LabelledDial(\"High\", this, \"aux1highdamp\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Damp\");\n hbox.add(comp);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "GraphLayout createGraphLayout();", "public MacAdapter(VisBioFrame bio) { this.bio = bio; }", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "public RoadSignal(String name, int signalPosition) {\n this.name = name;\n green = false;\n this.signalPosition = signalPosition;\n\n }", "void addMidiControls() { \r\n // Add a slider to control the tempo \r\n final JSlider tempo = new JSlider(50, 200); \r\n tempo.setValue((int) (sequencer.getTempoFactor() * 100)); \r\n tempo.setBorder(new TitledBorder(\"Tempo Adjustment (%)\")); \r\n java.util.Hashtable labels = new java.util.Hashtable(); \r\n labels.put(new Integer(50), new JLabel(\"50%\")); \r\n labels.put(new Integer(100), new JLabel(\"100%\")); \r\n labels.put(new Integer(200), new JLabel(\"200%\")); \r\n tempo.setLabelTable(labels); \r\n tempo.setPaintLabels(true); \r\n // The event listener actually changes the tempo \r\n tempo.addChangeListener(new ChangeListener() { \r\n public void stateChanged(ChangeEvent e) { \r\n sequencer.setTempoFactor(tempo.getValue() / 100.0f); \r\n } \r\n }); \r\n \r\n this.add(tempo); \r\n \r\n // Create rows of solo and checkboxes for each track \r\n Track[] tracks = sequence.getTracks(); \r\n for (int i = 0; i < tracks.length; i++) { \r\n final int tracknum = i; \r\n // Two checkboxes per track \r\n final JCheckBox solo = new JCheckBox(\"solo\"); \r\n final JCheckBox mute = new JCheckBox(\"mute\"); \r\n // The listeners solo or mute the track \r\n solo.addActionListener(new ActionListener() { \r\n public void actionPerformed(ActionEvent e) { \r\n sequencer.setTrackSolo(tracknum, solo.isSelected()); \r\n } \r\n }); \r\n mute.addActionListener(new ActionListener() { \r\n public void actionPerformed(ActionEvent e) { \r\n sequencer.setTrackMute(tracknum, mute.isSelected()); \r\n } \r\n }); \r\n \r\n // Build up a row \r\n Box box = Box.createHorizontalBox(); \r\n box.add(new JLabel(\"Track \" + tracknum)); \r\n box.add(Box.createHorizontalStrut(10)); \r\n box.add(solo); \r\n box.add(Box.createHorizontalStrut(10)); \r\n box.add(mute); \r\n box.add(Box.createHorizontalGlue()); \r\n // And add it to this component \r\n this.add(box); \r\n } \r\n }", "public ColourBinPanel(CameraCanvas canvas)\r\n\t{\r\n\t\tmCameraCanvas = canvas;\r\n\t\tmBinSet = new FeatureWidgetRadioManager();\r\n\t}", "public SignalEmitter(BusObject source) {\n this(source, null, BusAttachment.SESSION_ID_ANY, GlobalBroadcast.Off);\n }", "public GraphView() {\r\n graphModel = new GraphModel();\r\n graphModel.setNoOfChannels(0);\r\n graphModel.setXLength(1);\r\n initializeGraph();\r\n add(chartPanel);\r\n setVisible(true);\r\n }", "public double getSignal() {return _signal;}", "public static void DrawIt (Graph<Integer,String> g) {\n\t\tISOMLayout<Integer,String> layout = new ISOMLayout<Integer,String>(g);\r\n\t\t// The Layout<V, E> is parameterized by the vertex and edge types\r\n\t\tlayout.setSize(new Dimension(650,650)); // sets the initial size of the space\r\n\t\t// The BasicVisualizationServer<V,E> is parameterized by the edge types\r\n\t\tBasicVisualizationServer<Integer,String> vv =\r\n\t\tnew BasicVisualizationServer<Integer,String>(layout);\r\n\t\tvv.setPreferredSize(new Dimension(650,650)); //Sets the viewing area size\r\n\t\tJFrame frame = new JFrame(\"Simple Graph View\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().add(vv);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\r\n\t}", "public JComponent addOscillator(int osc, Color color)\n {\n Category category = new Category(this, \"Oscillator \" + osc, color);\n // category.makePasteable(\"osc\" + osc);\n category.makePasteable(\"osc\");\n\n JComponent comp;\n String[] params;\n HBox hbox = new HBox();\n\n VBox vbox = new VBox();\n params = WAVEFORMS;\n comp = new Chooser(\"Waveform\", this, \"osc\" + osc + \"waveform\", params);\n vbox.add(comp);\n\n comp = new CheckBox(\"Keytrack\", this, \"osc\" + osc + \"keytrack\", true); // flipped\n vbox.add(comp);\n \n if (osc == 1)\n {\n comp = new CheckBox(\"Waveshape\", this, \"waveshape\");\n vbox.add(comp);\n }\n \n if (osc == 2 || osc == 3)\n {\n comp = new CheckBox(\"Osc 1 Sync\", this, \"osc\" + osc + \"sync\");\n vbox.add(comp);\n }\n \n hbox.add(vbox);\n \n comp = new LabelledDial(\"Coarse\", this, \"osc\" + osc + \"coarsetune\", color, 0, 127, 64);\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n\n comp = new LabelledDial(\"Fine\", this, \"osc\" + osc + \"finetune\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return String.format(\"%2.1f\", ((value - 64) / 64.0 * 50.0));\n else return String.format(\"%2.1f\", ((value - 64) / 63.0) * 50.0);\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Tune\");\n hbox.add(comp);\n \n if (osc == 1)\n {\n comp = new LabelledDial(\"Osc 3 FM\", this, \"fmlevel\", color, 0, 127);\n hbox.add(comp);\n\n comp = new LabelledDial(\"Waveshape\", this, \"waveshapewidth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Width\");\n hbox.add(comp);\n }\n\n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public LabeledImageObjectAdapter( ImageObject imageObject ) \n\t{\n\t\tsuper(imageObject);\n\t\to = getImageObject();\n\t}", "private UI() {\r\n window = new JFrame();\r\n window.setSize(800, 450);\r\n window.setResizable(false);\r\n window.setLocation(0, 0);\r\n window.setVisible(true);\r\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n window.setTitle(\"RadarApp\");\r\n windowgfx = window.getGraphics();\r\n try{\r\n sound = Audio.getInstance();\r\n } catch(MidiUnavailableException e){\r\n sound = null;\r\n }\r\n\r\n \r\n }", "public void displayWave(ArrayList<Float> wave,Color color){\r\n\r\n //find the center pixel's Y value so we know where to start drawing the wave from\r\n //this will ensure the wave is drawn where the distance to the top and the bottom of the screen is equal\r\n int CenterYPixel = canvas.heightProperty().intValue()/2;//this is int division\r\n gc.beginPath();\r\n gc.setStroke(color);\r\n gc.setLineWidth(waveThickness);\r\n\r\n\r\n\r\n if(!drawFromRisingEdge) {\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(0) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = 0; i < wave.size(); i++) {\r\n //for the x value of the lineTo function, we use canvas.widthProperty().intValue()/wave1.size()\r\n //to convert the wave index number to pixels such that it fills the entire width of the canvas\r\n //for the y value, we start from the center CenterYPixel, and then add the value of the wave\r\n //(0,0) of the canvas is top left, so a high y value is lower, so we use the - to flip the wave\r\n //we then scale this by the voltageMultiplier for our user defined divisions\r\n //and lastly scale by pixelsPerDivision so convert the voltage into pixel values (1V is pixelsPerDivision pixels from the center line)\r\n float xPos = (int) (pixelsPerSample * i);\r\n // System.out.println(\"XVal:\"+xPos+\" pix per sample \"+pixelsPerSample);\r\n // gc.lineTo(i * canvas.widthProperty().intValue() / wave.size(), CenterYPixel + Math.round(-wave.get(i) * voltageMultiplier * pixelsPerDivision));\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n }else{\r\n int risingIndex = findRisingEdgeIndex();\r\n gc.moveTo(0, CenterYPixel + Math.round(-wave.get(risingIndex) / VoltagePerDivision * pixelsPerDivision));\r\n for (int i = risingIndex; i < wave.size(); i++) {\r\n\r\n float xPos = (int) (pixelsPerSample * (i-risingIndex));\r\n\r\n gc.lineTo(xPos, CenterYPixel + Math.round(-wave.get(i) / VoltagePerDivision * pixelsPerDivision));\r\n }\r\n\r\n }\r\n gc.stroke();\r\n }", "public SkinnedMeshCanvas(Display d) \r\n {\r\n super(true); // call base class constructor\r\n mDisplay = d; // store display object\r\n }", "java.lang.String getSignal();", "public Visualize() {\n initComponents();\n \n }", "public interface GUISound extends GUI, GraphicsText {\n\n /**\n * Set text a back button.\n * @param textBtnBack for button.\n */\n void setTextButtonBack(String textBtnBack);\n\n /**\n * Set text a list of TypeUnitSound.\n * @param listText for list of TypeUnitSound.\n */\n void setTypeUnitSound(List<TypeUnitSound> listText);\n\n /**\n * Set title a all TypeUnitSound.\n * @param listTitle for all TypeUnitSound.\n */\n void setTitleUnitSound(List<String> listTitle);\n\n /**\n * Get a list of TypeUnitSound.\n * @return SliderType is unit sound.\n */\n List<SliderType> getSlidersSound();\n\n /**\n * Get slider from the mixer from the unit type if present.\n * @param typeUnitSound is type of unit sound.\n * @return SliderType is unit sound.\n */\n Optional<SliderType> getSliderTypeofMixer(TypeUnitSound typeUnitSound);\n\n /**\n * Get button from the mixer from the unit type if present.\n * @param typeUnitSound is type of unit sound.\n * @return ButtonSliderType is button switch for unit sound.\n */\n Optional<ButtonSliderType> getBtnSwitch(TypeUnitSound typeUnitSound);\n\n /**\n * Set value a mixer sound, set value all unit sound.\n * @param value for set.\n */\n void setValueMixerSound(int value);\n\n /**\n * Set linkAction a back buttonLink.\n * @param mainAction is linkAction a current GUI.\n * @param linkAction for link previous GUI.\n */\n void setActionBtnBack(LinkActionGUI mainAction, LinkActionGUI linkAction);\n\n /**\n * Get a list of switches button.\n * @return List of ButtonSliderType\n */\n List<ButtonSliderType> getBtnSwitches();\n\n /**\n * Set iconImage for buttons switches sound.\n * @param path for iconImage.\n */\n void setIconBtnSwitches(List<String> path);\n\n /**\n * Set font spacing slider.\n * @param font for spacing slider.\n */\n void setFontSpacingSlider(Font font);\n\n}", "public TSignal(TSignal other) {\n if (other.is_set_destApp()) {\n this.destApp = other.destApp;\n }\n if (other.is_set_destPellet()) {\n this.destPellet = other.destPellet;\n }\n if (other.is_set_data()) {\n this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);\n;\n }\n }", "@Override\n protected void initializeCanvas(final Composite canvasComposite) {\n _plot = new Plot(canvasComposite, initializeModelSpace(), PlotScrolling.NONE);\n\n // Get the various plot components that will be used.\n // TODO: improve the plot API so this is simpler.\n IModelSpaceCanvas canvas = _plot.getModelSpaceCanvas();\n\n RGB colorForeground = new RGB(0, 0, 0);\n RGB colorBackground = new RGB(255, 255, 255);\n\n // Set the background color and grid line properties.\n canvas.setBackgroundColor(colorBackground);\n canvas.setVerticalAxisGridLineProperties(LineStyle.SOLID, colorForeground, 1);\n canvas.setHorizontalAxisGridLineProperties(LineStyle.NONE, colorForeground, 0);\n _plot.setVerticalAxisGridLineDensity(20);\n _plot.setVerticalAxisAnnotationDensity(10);\n\n // Set the formatter for x-coordinates.\n NumberFormat cursorFormatter = NumberFormat.getIntegerInstance();\n _plot.setCursorFormatterX(cursorFormatter);\n\n // Initialize the canvas layout model (label margins, etc).\n CanvasLayoutModel layoutModel = _plot.getCanvasLayoutModel();\n // Hide the top and right axes to save screen space.\n layoutModel.setTopAxisHeight(50);\n layoutModel.setTopLabelHeight(0);\n layoutModel.setBottomLabelHeight(0);\n layoutModel.setBottomAxisHeight(0);\n layoutModel.setRightAxisWidth(0);\n layoutModel.setRightLabelWidth(0);\n _plot.updateCanvasLayout(layoutModel);\n }", "SignatureSink createSignatureSink();", "@AutoGenerated\r\n\tprivate GridLayout buildGridLayout_5() {\n\t\tgridLayout_5 = new GridLayout();\r\n\t\tgridLayout_5.setWidth(\"100.0%\");\r\n\t\tgridLayout_5.setHeight(\"100.0%\");\r\n\t\tgridLayout_5.setImmediate(false);\r\n\t\tgridLayout_5.setMargin(false);\r\n\t\tgridLayout_5.setSpacing(true);\r\n\t\tgridLayout_5.setColumns(4);\r\n\t\tgridLayout_5.setRows(7);\r\n\t\t\r\n\t\t// chnlsLbl\r\n\t\tchnlsLbl = new Label();\r\n\t\tchnlsLbl.setWidth(\"-1px\");\r\n\t\tchnlsLbl.setHeight(\"-1px\");\r\n\t\tchnlsLbl.setValue(\"Channels\");\r\n\t\tchnlsLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(chnlsLbl, 0, 1);\r\n\t\t\r\n\t\t// slctChnls\r\n\t\tslctChnls = new NativeSelect();\r\n\t\tslctChnls.setWidth(\"-1px\");\r\n\t\tslctChnls.setHeight(\"-1px\");\r\n\t\tslctChnls.setImmediate(false);\r\n\t\tslctChnls.addItem(1);\r\n\t\tslctChnls.addItem(2);\r\n\t\tslctChnls.setValue(2); //set default number of channels\r\n\t\tgridLayout_5.addComponent(slctChnls, 1, 1);\r\n\t\t\r\n\t\t// smplSzLbl\r\n\t\tsmplSzLbl = new Label();\r\n\t\tsmplSzLbl.setWidth(\"-1px\");\r\n\t\tsmplSzLbl.setHeight(\"-1px\");\r\n\t\tsmplSzLbl.setValue(\"Sample size\");\r\n\t\tsmplSzLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(smplSzLbl, 0, 2);\r\n\t\t\r\n\t\t// slctSmplSz\r\n\t\tslctSmplSz = new NativeSelect();\r\n\t\tslctSmplSz.setWidth(\"-1px\");\r\n\t\tslctSmplSz.setHeight(\"-1px\");\r\n\t\tslctSmplSz.setImmediate(false);\r\n\t\tslctSmplSz.addItem(\"8-bit\");\r\n\t\tslctSmplSz.addItem(\"16-bit\");\r\n\t\tslctSmplSz.setValue(\"16-bit\"); //set default sample size\r\n\t\tgridLayout_5.addComponent(slctSmplSz, 1, 2);\r\n\t\t\r\n\t\t// splRtLbl\r\n\t\tsplRtLbl = new Label();\r\n\t\tsplRtLbl.setWidth(\"-1px\");\r\n\t\tsplRtLbl.setHeight(\"-1px\");\r\n\t\tsplRtLbl.setValue(\"Sample rate\");\r\n\t\tsplRtLbl.setImmediate(false);\r\n\t\tgridLayout_5.addComponent(splRtLbl, 0, 3);\r\n\t\t\r\n\t\t// slctSmplRt\r\n\t\tslctSmplRt = new NativeSelect();\r\n\t\tslctSmplRt.setWidth(\"-1px\");\r\n\t\tslctSmplRt.setHeight(\"-1px\");\r\n\t\tslctSmplRt.setImmediate(false);\r\n\t\tslctSmplRt.addItem(8000);\r\n\t\tslctSmplRt.addItem(11025);\r\n\t\tslctSmplRt.addItem(16000);\r\n\t\tslctSmplRt.addItem(22050);\r\n\t\tslctSmplRt.addItem(44100);\r\n\t\tslctSmplRt.setValue(44100); //set default sample rate\r\n\t\tgridLayout_5.addComponent(slctSmplRt, 1, 3);\r\n\t\t\r\n\t\treturn gridLayout_5;\r\n\t}", "public static AssetGroupSignalServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<AssetGroupSignalServiceStub>() {\n @java.lang.Override\n public AssetGroupSignalServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new AssetGroupSignalServiceStub(channel, callOptions);\n }\n };\n return AssetGroupSignalServiceStub.newStub(factory, channel);\n }", "public static PVector fromCanvas( PVector in) {\n\t\treturn fromCanvas( in, 0 );\n\t}", "public void set(float signal);", "public HSIImage()\r\n {\r\n }", "public interface Painter extends Serializable {\n\n /**\n * Paints the specified component using a Graphics2D context.\n *\n * @param component The <tt>VisualGraphComponent</tt> to be painted.\n * @param g2d The context to which the component will be painted.\n */\n public void paint( VisualGraphComponent component, Graphics2D g2d );\n\n}", "private JPanel createResult(){\n\t\tJPanel panel3 = new JPanel(){\n\t @Override\n\t protected void paintComponent (Graphics g) {\n\t super.paintComponent(g);\n\t paint2D((Graphics2D)g); //use to paint the pattern on the GUI\n\t }\n\t /**\n\t * performs a linear mapping from 2D coordinates to other 2D coordinates\n\t */\n\t protected void paint2D (Graphics2D g2) {\n\t AffineTransform tform = AffineTransform.getTranslateInstance( 0, 0);\n\t tform.scale(0.1, 0.1); \n\t //set the properties of g2\n\t g2.setTransform( tform);\n\t g2.setColor( Color.BLUE); \n\t }\n\t @Override\n\t public Dimension getPreferredSize() {\n\t return new Dimension(100, 100);\n\t }\n\t };\n\t\tpanel3.setBackground(Color.gray);\n\t\tGraphics g = panel3.getGraphics();\n\t\t//add mouse listener, if the user clicks mouse, the point will show the X and Y value on the graphics.\n\t\tpanel3.addMouseListener( new MouseAdapter() {\n // define a point \n public void mousePressed( MouseEvent event )\n { \n point = new Point( event.getX(), event.getY() ); //get the X and Y value of point which the user clicked\n controller.setBandwidth(event.getX());\n controller.setSignalToNoise(event.getY()); \n \t\n //g.drawOval( point.x , point.y , 1, 1 ); //show the point on the graphic \n //g.drawString(\"x=\" + point.x + \" y=\" + point.y, point.x, point.y ); //show the X, Y number of the point on the graphic\n \n } // end method mousePressed\n \n });\n\t\treturn panel3;\n\t}", "public interface ChartGenerator {\n /**\n * 生成jfreechart对象\n * @param list\n * @param title\n * @param chartType\n * @return\n * @throws Exception\n */\n public JFreeChart generateChart(List<ChartPoint> list\n , String title\n , ChartTypeEnum chartType) throws Exception;\n\n /**\n * 得到折线图的折点数据列表\n * @param events\n * @param begin\n * @param end\n * @param dataType\n * @return\n */\n public List<ChartPoint> getChartPoints(List<DailyEvent> events, long begin, long end, ChartDataTypeEnum dataType);\n\n /**\n * 将jfreechart 转换为base64编码的字符串\n * @param chart\n * @return\n * @throws Exception\n */\n public String chartToBASE64(JFreeChart chart) throws Exception;\n}", "com.google.protobuf.ByteString\n getSignalBytes();", "public Plot() {\r\n }", "AudioGenerator() {\n minim = new Minim(this);\n // use the getLineOut method of the Minim object to get an AudioOutput object\n out = minim.getLineOut();\n }", "public static void showSelectSensorPlot(Context context, final ShimmerService shimmerService, final String bluetoothAddress, final XYPlot dynamicPlot){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(com.shimmerresearch.androidinstrumentdriver.R.layout.dialog_sensor_view);\n final Button buttonSetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.ButtonFilterPlotSignal);\n final Button buttonResetPlotSignalFilter = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.buttonResetFilterPlotSignal);\n final Button buttonDone = (Button) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.button_done);\n final EditText editTextSignalFilter = (EditText) dialog.findViewById(com.shimmerresearch.androidinstrumentdriver.R.id.editTextFilterPlotSignal);\n dialog.setCanceledOnTouchOutside(true);\n TextView title = (TextView) dialog.findViewById(android.R.id.title);\n if(title != null) {\n title.setText(\"Select Signal\");\n } else {\n Log.e(\"DialogConfigurations\", \"Title TextView is null!\");\n }\n final ListView listView = (ListView) dialog.findViewById(android.R.id.list);\n listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\n //Temporary list so we have the option of adding additional custom channels\n List<String[]> listOfChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n\n if(mAdditionalSignalsList != null && mAdditionalSignalsList.size() > 0) {\n for (String[] addSignal : mAdditionalSignalsList) {\n listOfChannels.add(addSignal); //Add the custom channel to the list of channels\n }\n }\n\n //Create a temporary list of channels to remove the filter signals while iterating through the original list of channels\n List<String[]> tempListOfChannelsWithSignalsFiltered = new ArrayList<String[]>();\n for(String[] temp : listOfChannels) {\n tempListOfChannelsWithSignalsFiltered.add(temp);\n }\n\n if(mFilteredSignalsList != null && mFilteredSignalsList.size() > 0) {\n for(String[] signalToFilter : mFilteredSignalsList) {\n for(String[] signal : listOfChannels) {\n //Check if the channel name and format (CAL/UNCAL) matches the signal to be filtered\n if(signal[1].equals(signalToFilter[1]) && signal[2].equals(signalToFilter[2])) {\n tempListOfChannelsWithSignalsFiltered.remove(signal);\n }\n }\n }\n }\n\n //Assign the filtered list back to the original list\n listOfChannels = tempListOfChannelsWithSignalsFiltered;\n\n //Join the Strings in each individual array in the list of channels in order to pass them to the ArrayAdapter\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listOfChannels.size();i++) {\n sensorList.add(joinStrings(listOfChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(context, android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n final List<String[]> listOfChannelsFinal = listOfChannels; //Final list so inner methods can access it\n\n buttonDone.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.hide();\n }\n });\n\n buttonSetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n List<String> sensorList = new ArrayList<String>();\n String plotSignaltoFilter = editTextSignalFilter.getText().toString();\n\n for (int i=listOfChannelsFinal.size()-1;i>-1;i--){\n String signal = joinStrings(listOfChannelsFinal.get(i));\n if (!signal.toLowerCase().contains(plotSignaltoFilter.toLowerCase())){\n\n listOfChannelsFinal.remove(i);\n }\n\n }\n\n for(int i=0;i<listOfChannelsFinal.size();i++) {\n sensorList.add(joinStrings(listOfChannelsFinal.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n\n for (int p=0;p<listOfChannelsFinal.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n }\n });\n\n buttonResetPlotSignalFilter.setOnClickListener(new View.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n final List<String[]> listofChannels = shimmerService.getListofEnabledSensorSignals(bluetoothAddress);\n List<String> sensorList = new ArrayList<String>();\n for(int i=0;i<listofChannels.size();i++) {\n sensorList.add(joinStrings(listofChannels.get(i)));\n }\n\n final String[] sensorNames = sensorList.toArray(new String[sensorList.size()]);\n\n final ArrayAdapter<String> adapterSensorNames = new ArrayAdapter<String>(dialog.getContext(), android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, sensorNames);\n listView.setAdapter(adapterSensorNames);\n listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n //listView.setItemChecked(position, value);\n\n for (int p=0;p<listofChannels.size();p++){\n if (shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(p))){\n listView.setItemChecked(p, true);\n }\n }\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listofChannels.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listofChannels.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listofChannels.get(index));\n }\n }\n\n });\n\n\n }\n });\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n long arg3) {\n CheckedTextView cb = (CheckedTextView) arg1;\n if (!shimmerService.mPlotManager.checkIfPropertyExist(listOfChannelsFinal.get(index))){\n try {\n shimmerService.mPlotManager.addSignal(listOfChannelsFinal.get(index), dynamicPlot);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n shimmerService.mPlotManager.removeSignal(listOfChannelsFinal.get(index));\n }\n }\n\n });\n\n dialog.show();\n\n }", "public static void createAndShowGUI(){\n\n //the main graph frame\n JFrame mainFrame = new JFrame(\"Graphit\");\n mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n mainFrame.setSize(CANVAS_WIDTH, CANVAS_HEIGHT);\n\n gc = new NGraphitController();\n\n p = new Point(0,0);\n\n // Viewport is to man through the graph.\n vp = new JViewport();\n vp.setSize(100, 100);\n vp.setView(gc);\n mainFrame.add(vp);\n\n mainFrame.pack();\n mainFrame.setLocationRelativeTo(null);\n mainFrame.setVisible(true);\n\n }", "public void init() {\n this.addMouseListener(new MouseAdapter() {\n public void mousePressed(MouseEvent e) {\n last_x = e.getX();\n last_y = e.getY();\n }\n });\n\n // Define, instantiate and register a MouseMotionListener object\n this.addMouseMotionListener(new MouseMotionAdapter() {\n public void mouseDragged(MouseEvent e) {\n Graphics g = getGraphics();\n int x = e.getX(), y = e.getY();\n g.setColor(Color.black);\n g.drawLine(last_x, last_y, x, y);\n last_x = x; last_y = y;\n }\n });\n\n // Create a clear button\n Button b = new Button(\"Clear\");\n // Define, instantiate, and register a listener to handle button presses\n b.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) { // clear the scribble\n Graphics g = getGraphics();\n g.setColor(getBackground());\n g.fillRect(0, 0, getSize().width, getSize().height);\n }\n });\n // And add the button to the applet\n this.add(b);\n }", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "public static void main(String[] args) {\n String keyboard = \"q2we4r5ty7u8i9op-[=zxdcfvgbnjmk,;/' \";\r\n // number of strings variable\r\n int numberOfStrings = keyboard.length();\r\n GuitarString[] guitarStringsArray = new GuitarString[numberOfStrings];\r\n RingBuffer sampleBuff = new RingBuffer();\r\n \r\n StdDraw.setXscale(0, 100); // sets x scale from 0 to 100\r\n StdDraw.setYscale(-10,10); // sets y scale from -10 to 10 (y should be between -1 and 1)\r\n StdDraw.enableDoubleBuffering(); // drawing takes place on off-screen canvas\r\n \r\n int x = 0;\r\n for (int i = 0; i < numberOfStrings; i++) {\r\n double f = 440.0 * Math.pow(2, (i - 24) / 12.0);\r\n guitarStringsArray[i] = new GuitarString(f);\r\n }\r\n \r\n while (true) {\r\n double sample = 0;\r\n if (StdDraw.hasNextKeyTyped()) {\r\n char key = StdDraw.nextKeyTyped();\r\n if (keyboard.indexOf(key) != -1) {\r\n guitarStringsArray[keyboard.indexOf(key)].pluck();\r\n }\r\n }\r\n\t for (int j = 0; j < guitarStringsArray.length; j++) {\r\n\t sample += guitarStringsArray[j].sample();\r\n\t }\r\n\t //System.out.println(sample);\r\n\t // plays audio\r\n\t StdAudio.play(sample); \r\n\t // enqueues sample into buffer\r\n\t sampleBuff.enqueue(sample);\r\n\t \r\n\t // if buffer size is greater than 1\r\n\t if (sampleBuff.size() > 1) {\r\n\t \tSystem.out.println(\"x: \" + x);\r\n\t // if x == 0 clear the drawing \r\n\t if (x == 100) {\r\n\t \tx = 0;\r\n\t \tStdDraw.clear();\r\n\t }\r\n\t // draws from (x, buff.deq) to (x+1, buff.peek)\r\n\t StdDraw.line(x, sampleBuff.dequeue(), x+1, sampleBuff.peek());\r\n\t // shows and pauses the drawing \r\n\t \r\n\t StdDraw.show();\r\n\t StdDraw.pause(10);\r\n\t \r\n\t // x iterator\r\n\t x++;\r\n\t } \r\n\t \r\n\t for (int j = 0; j < guitarStringsArray.length; j++) {\r\n\t guitarStringsArray[j].tic();\r\n\t } \r\n }\r\n }", "public AnalogInputSim(int channel) {\n m_index = channel;\n }", "public JComponent addInsert(Color color)\n {\n Category category = new Category(this, \"Insert FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox[] insert = new HBox[6];\n\n \n // OFF\n insert[0] = new HBox();\n\n\n // EQ Bandpass\n insert[1] = new HBox(); \n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidfreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Freq\");\n insert[1].add(comp);\n \n comp = new LabelledDial(\"Mid\", this, \"bandpassmidgain\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return \"\" + (((value - 64) * 100) / 64) + \"%\";\n else return \"\" + (((value - 64) * 100) / 63) + \"%\";\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[1].add(comp);\n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Q\");\n insert[1].add(comp);\n\n\n // Compressor\n insert[2] = new HBox(); \n\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Threshold\", this, \"compressorthreshold\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Ratio\", this, \"compressorratio\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Makeup\", this, \"compressorgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[2].add(comp);\n\n\n // Auto Wah\n insert[3] = new HBox(); \n\n VBox vbox = new VBox();\n params = AUTO_WAH_TYPES;\n comp = new Chooser(\"Wah Wah Type\", this, \"autowahtype\", params);\n vbox.add(comp);\n insert[3] .add(vbox);\n\n comp = new LabelledDial(\"Cutoff\", this, \"autowahcutoff\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Resonance\", this, \"autowahresonance\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Sensitivity\", this, \"autowahsensitivity\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[3].add(comp);\n \n \n\n // Distortion\n insert[4] = new HBox(); \n\n vbox = new VBox();\n params = DISTORTION_TYPES;\n comp = new Chooser(\"Distortion Type\", this, \"distortiontype\", params);\n vbox.add(comp);\n insert[4].add(vbox);\n\n comp = new LabelledDial(\"Depth\", this, \"distortiondepth\", color, 0, 127);\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Pre\", this, \"distortionpregain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Post\", this, \"distortionpostgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"High\", this, \"distortionhighcutoff\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Cutoff\");\n insert[4].add(comp);\n \n\n // Reducer\n insert[5] = new HBox(); \n\n comp = new LabelledDial(\"Bit\", this, \"reducerbitdepth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Depth\");\n insert[5].add(comp);\n \n comp = new LabelledDial(\"Sample\", this, \"reducersamplerate\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Rate\");\n insert[5].add(comp);\n \n \n /// CHOOSER\n \n final HBox fx = new HBox();\n\n vbox = new VBox();\n params = INSERT_FX_TYPES;\n comp = new Chooser(\"Type\", this, \"channelfxtype\", params) // I *think* this is insert\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n fx.removeLast();\n int channelfxtype = model.get(\"channelfxtype\", 0);\n if (channelfxtype >= 0 && channelfxtype < insert.length)\n fx.addLast(insert[channelfxtype]);\n else Synth.handleException(new Throwable(\"Invalid channel fx type: \" + channelfxtype));\n fx.revalidate();\n fx.repaint();\n }\n }; \n vbox.add(comp);\n hbox.add(vbox);\n fx.add(insert[0]); // empty\n hbox.add(fx);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public Builder clearSignal() {\n bitField0_ = (bitField0_ & ~0x00020000);\n signal_ = getDefaultInstance().getSignal();\n onChanged();\n return this;\n }", "@Override\n public void onRender(Canvas canvas, FFTData data, Rect rect)\n {\n }", "@Override\n public void init() throws Exception {\n Mapper mapper = new Mapper() {\n public double f(double x, double y) {\n try {\n return i3d.evaluate(x, y);\n } catch (InterpolationException e) {\n e.printStackTrace();\n return 0;\n }\n }\n };\n \n // Define range and precision for the function to plot\n Range rangeX = new Range((float)i3d.lowerA(), (float)i3d.upperA());\n int stepsX = 100;\n Range rangeY = new Range((float)i3d.lowerB(), (float)i3d.upperB());\n int stepsY = 100;\n \n AbstractDrawable drawable;\n // Create the object to represent the surface\n final Shape surface = Builder.buildOrthonormal(new OrthonormalGrid(rangeX, stepsX, rangeY, stepsY), mapper);\n surface.setColorMapper(new ColorMapper(new ColorMapRainbow(),\n surface.getBounds().getZmin(), surface.getBounds().getZmax(), COLOR_BASE));\n surface.setWireframeDisplayed(true);\n surface.setWireframeWidth(1);\n surface.setWireframeColor(COLOR_WIRE);\n surface.setFaceDisplayed(true);\n drawable = surface;\n \n // Create a chart\n chart = AWTChartComponentFactory.chart(Quality.Advanced);\n chart.getAxeLayout().setXTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setYTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setZTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setFaceDisplayed(false);\n chart.getAxeLayout().setMainColor(COLOR_MAIN);\n chart.getView().setBackgroundColor(COLOR_BG);\n chart.getScene().getGraph().add(drawable);\n \n chart.getAxeLayout().setXAxeLabel(\"Length\");\n chart.getAxeLayout().setYAxeLabel(\"Time\");\n chart.getAxeLayout().setZAxeLabel(\"Temperature\");\n }", "private BufferedImage createPlotImage() {\r\n final BufferedImage img = new BufferedImage(getWidth(), getHeight(), \r\n Transparency.BITMASK);\r\n final Graphics g = img.getGraphics();\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n \r\n g.setColor(GUIConstants.color6);\r\n for(int i = 0; i < scatterData.size; i++) {\r\n drawItem(g, scatterData.xAxis.co[i], \r\n scatterData.yAxis.co[i], false, false);\r\n }\r\n return img;\r\n }", "public LineGraph(final String title) {\n super(title);\n final CategoryDataset dataset = createSampleDataset();\n final JFreeChart chart = createChart(dataset);\n final ChartPanel chartPanel = new ChartPanel(chart);\n chartPanel.setPreferredSize(new Dimension(500, 270));\n setContentPane(chartPanel);\n }", "public LineChart() {\n init();\n }", "@FXML\n public void drawLPatternButtonPressed()\n {\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n // loop to draw lines for each number of lines\n for(int i = 0; i <= lines; i++) {\n\n // draw L shape in bottom left\n gc.strokeLine(\n 0,\n (canvas.getHeight()/lines)*i,\n (canvas.getWidth()/lines)*i,\n canvas.getHeight()\n );\n\n }\n }", "void draw(Graphics g, float interp) {\n float x = (float)(Math.sin(angle.x) * amplitude.x);\n //Oscillating on the y-axis\n float y = (float) (Math.sin(angle.y) * amplitude.y);\n \n // Translate (x + width/2)\n x += 250; \n y += 250;\n \n //Drawing the Oscillator as a line connecting a circle \n// g.setColor(Color.BLACK);\n// g.drawLine(250,250, (int)x + 8,(int) y + 8);\n g.setColor(bobColor);\n g.fillOval((int)x,(int) y, 20, 20);\n g.setColor(Color.black);\n g.drawOval((int)x,(int) y, 20, 20);\n }", "public BroadcastDrawer( String s ){\r\n\t\tsuper(s);\r\n\t\tsetResizable(true);\r\n\t\tsetBounds( 0, 0, WIDTH, HEIGHT);\r\n\t\ttheCanvas = new QTCanvas (QTCanvas.kFreeResize, 0.5F, 0.5F);\r\n\t\t\r\n\t\t/* creating and intializing AWT components */\r\n\t\tsetLayout( new BorderLayout() );\r\n\t\tadd (theCanvas, \"Center\");\r\n\t\tstartBtn = new Button (\"Start Broadcast\");\r\n\t\tButtonListener listener = new ButtonListener();\r\n\t\tstartBtn.addActionListener (listener);\r\n\t\tPanel statusPanel = new Panel();\r\n\t\tadd (statusPanel, \"South\");\r\n\t\tstatusPanel.add( startBtn );\r\n\t\tstatusPanel.setBackground( Color.lightGray );\r\n\t\tLabel timeBaseLabel = new Label( \"Time base:\" );\r\n\t\ttimeBaseLabel.setLocation( 10, 10 );\r\n\t\tLabel rateLabel = new Label(\"Data rate:\" );\r\n\t\trateLabel.setLocation( 10, 50 );\r\n\t\tcurrTimeLabel = new Label( \"00:00:00.00 \" );\r\n\t\tcurrTimeLabel.setLocation( 80, 10 );\r\n\t\tcurrRateLabel = new Label(\"0 \");\r\n\t\tcurrRateLabel.setLocation( 80, 50 );\r\n\t\tstatusPanel.add(timeBaseLabel);\r\n\t\tstatusPanel.add(currTimeLabel);\r\n\t\tstatusPanel.add(rateLabel);\r\n\t\tstatusPanel.add(currRateLabel);\r\n\r\n\t\taddWindowListener( new WindowAdapter() \t//\thandle quit when user closes main window\r\n {\r\n public void windowClosing( WindowEvent we )\r\n {\r\n \tstopBroadcast();\t\t\r\n QTSession.close();\t\t\r\n dispose();\t\t\t\t\t\r\n }\r\n public void windowClosed( WindowEvent we )\r\n {\r\n System.exit( 0 );\t\t\r\n }\r\n });\r\n\t}", "private synchronized void setSignals(SignalEvent event)\r\n\t{\r\n\t\tfor(int i = 0;i < event.getLeftSignal().length; i++)\r\n\t\t{\r\n\t\t\tif(llleftSamples.size() < maxSize/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY ));\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.removeFirst();\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY));\r\n\t\t\t\tllrightSamples.removeFirst();\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<event.getfftHelperObj().getFFTSignal().length;i++)\r\n\t\t{\t\t\r\n\t\t\tif(llFFTSamples.size() < (fftSize/2)/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY ));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.removeFirst();\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tcnt++;\r\n\t}", "DummyCanvas() {\n super(null);\n // super(null); ----------------ADDED TO COMPILE -----------------------------------------\n }", "void init ( String awtOrSwt) {\n this.gui.wdgInputText.setText(\"any text input\");\n this.gui.gralMng.createGraphic(awtOrSwt, 'E', this.log);\n }" ]
[ "0.6845584", "0.66512764", "0.66418993", "0.6608965", "0.53179437", "0.51046985", "0.5008996", "0.4992387", "0.4948676", "0.49334797", "0.4898513", "0.47639915", "0.47444493", "0.47139615", "0.47115055", "0.46704572", "0.46628267", "0.46434745", "0.46397376", "0.46279052", "0.4622158", "0.45755956", "0.45475522", "0.45409423", "0.45371744", "0.45345548", "0.4526562", "0.45244002", "0.45093945", "0.4508903", "0.44995207", "0.44986194", "0.44921574", "0.44837105", "0.44690216", "0.4463757", "0.44607326", "0.44330484", "0.4426852", "0.44128078", "0.44092116", "0.4403633", "0.4401068", "0.4399089", "0.43961054", "0.43900505", "0.43883607", "0.43875834", "0.4383207", "0.43800822", "0.43754107", "0.43561193", "0.43543723", "0.43266788", "0.4316", "0.42972687", "0.42913705", "0.4291196", "0.42906108", "0.4272609", "0.4269666", "0.4267488", "0.42669266", "0.4262478", "0.42569968", "0.42541194", "0.42436293", "0.4242971", "0.42419297", "0.42297027", "0.42278093", "0.42237937", "0.42163688", "0.42156565", "0.42149273", "0.42134196", "0.42118666", "0.42060938", "0.4200737", "0.41950932", "0.4188624", "0.41865128", "0.41847998", "0.41837886", "0.41801003", "0.41764274", "0.41745192", "0.41658548", "0.41585356", "0.4144432", "0.41431996", "0.41408098", "0.41377613", "0.4132473", "0.41324374", "0.41309953", "0.41307834", "0.4130644", "0.41299114", "0.41297817" ]
0.69019693
0
Sets the Java signal to sig and jsignal to null
public void setSignal(java.awt.Image sig) { image = sig; jsignal = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSignal(jigl.signal.Signal sig) throws BadSignalException {\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "void signal();", "public void setSignal(double signal) {_signal = signal;}", "public jigl.signal.Signal getSignal() {\n\t\treturn jsignal;\n\t}", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "Signal getSignal();", "public void setRootSignal(Signal signal) {\n\t\tint now = GameEngine.getSimulationTimeInMillis();\n\t\tthis.queue.setEntrance(signal, now);\n\t}", "void OnSignalLost();", "public void setJcmdsig(Integer jcmdsig) {\n this.jcmdsig = jcmdsig;\n }", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "void unsetSignalPeriod();", "public Builder clearSignal() {\n bitField0_ = (bitField0_ & ~0x00020000);\n signal_ = getDefaultInstance().getSignal();\n onChanged();\n return this;\n }", "@Override\n\tpublic List<Signal> getSignals() {\n\t\treturn null;\n\t}", "private int sys_kill(int pid, int signal) {\n // This will only be called by raise() in newlib to invoke the default handler\n // We don't have to worry about actually delivering the signal\n if(pid != pid) return -ESRCH;\n if(signal < 0 || signal >= 32) return -EINVAL;\n switch(signal) {\n case 0: return 0;\n case 17: // SIGSTOP\n case 18: // SIGTSTP\n case 21: // SIGTTIN\n case 22: // SIGTTOU\n case 19: // SIGCONT\n case 20: // SIGCHLD\n case 23: // SIGIO\n case 28: // SIGWINCH\n break;\n default:\n exit(128+signal, true);\n }\n return 0;\n }", "public Builder clearSig() {\n bitField0_ = (bitField0_ & ~0x00000002);\n sig_ = getDefaultInstance().getSig();\n onChanged();\n return this;\n }", "public synchronized static void signal( byte code, Object src_obj, Exception e ) {\n if(e!=null) {\n if(e.getMessage()!=null)\n signal( code, src_obj, e.getMessage() );\n else\n signal( code, src_obj, e.toString() );\n }\n else\n signal( code, src_obj, \"<null exception>\" );\n\n if( displayExceptionStack && e!=null )\n out.println( \"EXCEPTION STACK: \"+getStackTrace(e) );\n }", "public Builder clearSig() {\n if (sigBuilder_ == null) {\n sig_ = null;\n onChanged();\n } else {\n sig_ = null;\n sigBuilder_ = null;\n }\n\n return this;\n }", "public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException,\n\t\t\tRuntimeException {\n\n\t\t// int w = 0;\n\t\t// int h = 0;\n\t\tjava.awt.Image jsig = null;\n\n\t\tif (sig instanceof DiscreteSignal) {\n\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\n\t\t\tDiscreteSignal nsig = SignalConverter.toDiscrete(sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif ((short) nsig.get(x) > max)\n\t\t\t\t\tmax = (short) nsig.get(x);\n\t\t\t\tif ((short) nsig.get(x) < min)\n\t\t\t\t\tmin = (short) nsig.get(x);\n\n\t\t\t}\n\n\t\t\tshort[][] new_data = new short[max][nsig.length()];\n\t\t\tGrayImage gimage = new GrayImage(nsig.length(), max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++)\n\t\t\t\t// FIXME: put braces on this for\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, new_data[y][x]);\n\t\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\t\t} else {\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tRealSignal nsig = SignalConverter.toReal((Signal) sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif (nsig.get(x) > max)\n\t\t\t\t\tmax = nsig.get(x);\n\t\t\t\tif (nsig.get(x) < min)\n\t\t\t\t\tmin = nsig.get(x);\n\t\t\t}\n\n\t\t\tfloat[][] new_data = new float[(int) max][nsig.length()];\n\t\t\tRealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\t// try{\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, (int) new_data[y][x]);\n\t\t\t\t\t// }catch (Exception e)\n\t\t\t\t\t// {System.out.println(x+\" uh oh \"+y);}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\n\t\t}\n\n\t}", "public void setSigle(String sigle) {\r\n this.sigle = sigle;\r\n }", "public SignalCanvas(DiscreteSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "@Override\r\n\tprotected void userDefinedReset() {\r\n\t\tif (OSPRuntime.isJS)\r\n\t\t\treturn;\r\n\t}", "public double getSignal() {return _signal;}", "public final void mo31286b() {\n this.f13976a.lock();\n try {\n this.f13979d = 1000;\n this.f13981f.signal();\n } finally {\n this.f13976a.unlock();\n }\n }", "public SignalCanvas(ComplexSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public final void setSignalConnection(SignalConnection signalConnection) {\n\n if (isStarted()){\n stop();\n }\n\n this.signalConnection = signalConnection;\n }", "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "java.lang.String getSignal();", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "@Override\n public int getSignal() {\n return signal & 0xFF;\n }", "@JsonProperty(\"ignoreSignals\")\r\n @JacksonXmlProperty(localName = \"ignore_signals\", isAttribute = true)\r\n public void setIgnoreSignals(String ignoreSignals) {\r\n this.ignoreSignals = ignoreSignals;\r\n }", "public synchronized void signalEvent()\r\n\t{\r\n\t\tnotifyAll();\r\n\t}", "public void setJint(Integer jint) {\n this.jint = jint;\n }", "public void set(float signal);", "public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}", "public java.awt.Image getJavaSignal() {\n\t\treturn image;\n\t}", "public void setSigntype(Integer signtype) {\n\t\tthis.signtype = signtype;\n\t}", "public final void rule__DronesBehavior__SignalsAssignment_3_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17015:1: ( ( ruleSignal ) )\r\n // InternalDroneScript.g:17016:2: ( ruleSignal )\r\n {\r\n // InternalDroneScript.g:17016:2: ( ruleSignal )\r\n // InternalDroneScript.g:17017:3: ruleSignal\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignal();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "boolean k2h_set_bumup_debug_signal_user1();", "public void process(Object signal)\r\n/* 25: */ {\r\n/* 26:23 */ System.out.println(\"Cause observed!\");\r\n/* 27: */ }", "public Builder setSig(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n sig_ = value;\n onChanged();\n return this;\n }", "@java.lang.SuppressWarnings(\"all\")\n\t@javax.annotation.Generated(\"lombok\")\n\tpublic void setScriptSig(final ScriptSig scriptSig) {\n\t\tthis.scriptSig = scriptSig;\n\t}", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "void setSignalPeriod(double signalPeriod);", "void unsetEvent();", "public SignalEmitter(BusObject source) {\n this(source, null, BusAttachment.SESSION_ID_ANY, GlobalBroadcast.Off);\n }", "public final void setSiguiente(final Celda siguienteN) {\r\n siguiente = siguienteN;\r\n\r\n }", "public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }", "public final void rule__DronesBehavior__SignalsAssignment_3_0_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17030:1: ( ( ruleSignal ) )\r\n // InternalDroneScript.g:17031:2: ( ruleSignal )\r\n {\r\n // InternalDroneScript.g:17031:2: ( ruleSignal )\r\n // InternalDroneScript.g:17032:3: ruleSignal\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_2_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignal();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_2_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\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 signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n }\n }", "void xsetSignalPeriod(org.apache.xmlbeans.XmlDouble signalPeriod);", "public void sendSignal (String signal, String message ){\r\n if (btSocket != null)\r\n {\r\n try{\r\n btSocket.getOutputStream().write(signal.getBytes());\r\n msg(message,0);\r\n } catch (IOException e) {\r\n msg(\"Error\", 0);\r\n }\r\n }\r\n\r\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic void signalToUi(int type, Object data) {\n\t\t\n\t}", "public void setSign(String sign) {\n this.sign = sign == null ? null : sign.trim();\n }", "public void onInputSignalChange(String input, boolean hasSignal) {\n\n\t\t}", "public void sendSignal(int sig) {\n try {\n dOut.writeInt(sig);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send number of players\");\n e.printStackTrace();\n }\n }", "public static void signalStart() {\n\t\tif (!instrumenting) return;\n\t\t\n\t\trunning = true;\n\t}", "private void jmiExitActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\r\n }", "public Builder setSignalBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public void signalTheWaiter();", "com.google.protobuf.ByteString\n getSignalBytes();", "public void CondSignal(){\n trainCond.signal();\r\n }", "public void warningSound() {\n\t\tSystem.out.println(signal);\n\t}", "public SignalEntry notifyShutdown(ShutdownSignal signal) {\r\n return log(NAME_SHUTDOWN, null, null);\r\n }", "public void setSignalPosition(int signalPosition) {\n this.signalPosition = signalPosition;\n }", "public SignalCanvas() {\n\t\tsuper();\n\t}", "public native static int cancel();", "public final void mo5203SI() {\n AppMethodBeat.m2504i(129935);\n C4996ah.getContext().unregisterReceiver(this);\n this.hjc.clear();\n AppMethodBeat.m2505o(129935);\n }", "@Subroutine(\"signal\")\n public static LispObject signal (LispSymbol errorSymbol, LispList data) {\n String msg = \"\";// '[' + ((errorMessage instanceof LispString) ? ((LispString) errorMessage).getData() : \"peculiar error\") + \"] \";\n msg += '(' + errorSymbol.getName() + ' ';\n msg += (data.length() == 1 ? data.car().toString() : data.toString()) + ')';\n // System.out.println(msg);\n throw new LispException(msg);\n }", "@JsonProperty(\"ignoreSignals\")\r\n @JacksonXmlProperty(localName = \"ignore_signals\", isAttribute = true)\r\n public String getIgnoreSignals() {\r\n return ignoreSignals;\r\n }", "private synchronized void setSignals(SignalEvent event)\r\n\t{\r\n\t\tfor(int i = 0;i < event.getLeftSignal().length; i++)\r\n\t\t{\r\n\t\t\tif(llleftSamples.size() < maxSize/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY ));\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.removeFirst();\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY));\r\n\t\t\t\tllrightSamples.removeFirst();\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<event.getfftHelperObj().getFFTSignal().length;i++)\r\n\t\t{\t\t\r\n\t\t\tif(llFFTSamples.size() < (fftSize/2)/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY ));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.removeFirst();\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tcnt++;\r\n\t}", "public void mo9261j() {\n this.f1300c = null;\n }", "public TSignal(TSignal other) {\n if (other.is_set_destApp()) {\n this.destApp = other.destApp;\n }\n if (other.is_set_destPellet()) {\n this.destPellet = other.destPellet;\n }\n if (other.is_set_data()) {\n this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);\n;\n }\n }", "public final SignalConnection getSignalConnection() {\n return signalConnection;\n }", "private void resignBActionPerformed(java.awt.event.ActionEvent evt) {\n controller.resign();\n }", "private static native void stopAnalogActionMomentum(long pointer,\n long controllerHandle,\n long analogActionHandle);", "public synchronized void signalStep() {\n s = true;\n notifyAll();\n }", "boolean isSignal();", "public void arm_kill() {\n arm_analog(0);\n }", "public final void mo115436b() {\n nativeCancel(this.f119482o);\n }", "final synchronized public void signalFinalize()\n {\n\n // run stop in a seperate thread:\n //System.err.println(\"--- Signal finalize ---\");\n \n ActionTask stopTask = new ActionTask(this.taskSource,\n \"Stopping viewer:\" + this)\n {\n public void doTask()\n {\n try\n {\n finalizeViewer(); \n }\n catch (Error e)\n {\n System.out.println(\"***Error: Exception:\" + e);\n e.printStackTrace();\n // setText(\"*** Exception occured ***\\n\"+e.toString());\n }\n }\n\n public void stopTask()\n {\n }; // nothing to stop/dispose:this IS already a stop/dispose task!!! \n };\n\n stopTask.startTask();\n }", "private void signalFree() {\n block.release();\n }", "void unsetSOID();", "static final void initSystemErr() /* hard-coded method signature */\n {\n uncaughtHandler = new UncaughtHandler();\n if (mainVMThread == null) /* hack */\n {\n jniExceptionDescribe0X(new Throwable()); /* hack */\n destroyJavaVM0X(null, 0); /* hack */\n }\n }", "public void m21461j() {\n this.f18796b = null;\n }", "public void destroy(){\n Log.i(Constant.TAG, \"destroy...\") ;\n //if sim1 signal listener not null, unregister it\n if (null != mSim1SignalListener) {\n Log.i(Constant.TAG, \"destroy unregister mSim1SignalListener...\") ;\n mTelephonyManager.listen(mSim1SignalListener, PhoneStateListener.LISTEN_NONE);\n mSim1SignalListener = null ;\n }\n\n //if sim1 signal listener not null, unregister it\n if (null != mSim2SignalListener) {\n Log.i(Constant.TAG, \"destroy unregister mSim2SignalListener...\") ;\n mTelephonyManager.listen(mSim2SignalListener, PhoneStateListener.LISTEN_NONE);\n mSim2SignalListener = null ;\n }\n\n // if sim state receiver not null, unregister it\n if (mSimStateReceiver != null && mContext.get() != null){\n Log.i(Constant.TAG, \"destroy unregister mSimStateReceiver...\") ;\n try {\n mContext.get().unregisterReceiver(mSimStateReceiver);\n }catch (Exception e){}\n mSimStateReceiver = null ;\n }\n\n //clear sim state listeners\n if (mSignalStateListeners != null){\n Log.i(Constant.TAG, \"destroy clear mSignalStateListeners...\") ;\n mSignalStateListeners.clear();\n mSignalStateListeners = null ;\n }\n //set instance to null\n Log.i(Constant.TAG, \"destroy set sInstance to null...\") ;\n sInstance = null ;\n }", "public void unset(){\n\t\tcurrentInst = -1;\n\t}", "@Override\n\tpublic void nullifyEventHandlers() {\n\t\tshape.setOnMousePressed(null);\n\t\tshape.setOnMouseDragged(null);\n\t\tshape.setOnMouseClicked(null);\n\t\tshape.setOnMouseReleased(null);\n\t\t\n\t}", "private void jButtonCancelActionPerformed() {\r\n\t\texit();\r\n\t}", "private void sairButtonActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }", "public final void entryRuleSignal() throws RecognitionException {\r\n try {\r\n // InternalDroneScript.g:80:1: ( ruleSignal EOF )\r\n // InternalDroneScript.g:81:1: ruleSignal EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignalRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleSignal();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignalRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public Integer getJcmdsig() {\n return jcmdsig;\n }", "@Override\n public void setNull() {\n\n }", "private void updateSignal() {\n getGlobals().informationSignal =\n getContext().getPrng().gaussian(0,getGlobals().volatilityInfo).sample();\n\n }", "public synchronized static void signal( byte code, Object src_obj, String info )\n {\n if(code<level)\n \t return;\n\n String debug_msg = \"\";\n\n switch( code ) {\n case FAILURE:\n\t debug_msg += \"FAILURE\"; break;\n case CRITICAL:\n debug_msg += \"CRITICAL\"; break;\n case ERROR:\n debug_msg += \"ERROR\"; break;\n case WARNING:\n debug_msg += \"WARNING\"; break;\n case NOTICE:\n debug_msg += \"NOTICE\"; break;\n default:\n\t debug_msg += \"UNKNOWN\"; break;\n }\n\n if(src_obj!=null)\n debug_msg += \" - \" + src_obj.getClass().getName() +\"\\n \"+info;\n else \n debug_msg += \" - \" +info;\n \n out.println( debug_msg );\n }", "public void setSignFlag(String signFlag) {\n this.signFlag = signFlag == null ? null : signFlag.trim();\n }", "private void clearSignature() {\n bitField0_ = (bitField0_ & ~0x00000010);\n signature_ = getDefaultInstance().getSignature();\n }", "@Override\n public void kill()\n {\n }", "@Override\n\tpublic void handleShutdownSignal(String consumerTag,\n\t\t\tShutdownSignalException sig) {\n\t\t\n\t}" ]
[ "0.7305969", "0.6486004", "0.6327156", "0.59703517", "0.5926034", "0.58333343", "0.57159853", "0.5707469", "0.5681929", "0.55960566", "0.55717635", "0.5458357", "0.5445538", "0.53355086", "0.52972096", "0.52671075", "0.51662356", "0.5160308", "0.5154251", "0.5144623", "0.51364917", "0.5116878", "0.50886744", "0.50822335", "0.50247806", "0.50185114", "0.50090814", "0.50012684", "0.4969104", "0.49317047", "0.4916444", "0.48943198", "0.48479652", "0.48262197", "0.48168397", "0.47787228", "0.4769148", "0.4768095", "0.476492", "0.47548395", "0.4740846", "0.471476", "0.46663672", "0.46656525", "0.4661185", "0.4659288", "0.46561056", "0.46479824", "0.46453503", "0.46444315", "0.4623224", "0.45834613", "0.45634547", "0.45450467", "0.45406815", "0.45307934", "0.45065", "0.4503716", "0.44991034", "0.44860792", "0.44835383", "0.44719908", "0.44608864", "0.44534972", "0.44470036", "0.4436211", "0.4422915", "0.44090828", "0.43927872", "0.43890107", "0.43875256", "0.43785003", "0.43783054", "0.43767843", "0.43742776", "0.4372468", "0.43507433", "0.43481374", "0.43355423", "0.4332696", "0.4313439", "0.43109828", "0.42998114", "0.429865", "0.4294542", "0.42925042", "0.42906782", "0.42885828", "0.42882746", "0.42773864", "0.427474", "0.4270985", "0.4261713", "0.42534113", "0.42520708", "0.4250562", "0.42275125", "0.4221795", "0.42206842", "0.42151606" ]
0.7313587
0
Sets the Java signal to sig and jsignal to sig
public void setSignal(jigl.signal.Signal sig) throws BadSignalException { image = getJavaSignal(sig); jsignal = sig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSignal(java.awt.Image sig) {\n\t\timage = sig;\n\t\tjsignal = null;\n\t}", "public void setSignal(double signal) {_signal = signal;}", "void signal();", "public void setJcmdsig(Integer jcmdsig) {\n this.jcmdsig = jcmdsig;\n }", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public jigl.signal.Signal getSignal() {\n\t\treturn jsignal;\n\t}", "Signal getSignal();", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException,\n\t\t\tRuntimeException {\n\n\t\t// int w = 0;\n\t\t// int h = 0;\n\t\tjava.awt.Image jsig = null;\n\n\t\tif (sig instanceof DiscreteSignal) {\n\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\n\t\t\tDiscreteSignal nsig = SignalConverter.toDiscrete(sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif ((short) nsig.get(x) > max)\n\t\t\t\t\tmax = (short) nsig.get(x);\n\t\t\t\tif ((short) nsig.get(x) < min)\n\t\t\t\t\tmin = (short) nsig.get(x);\n\n\t\t\t}\n\n\t\t\tshort[][] new_data = new short[max][nsig.length()];\n\t\t\tGrayImage gimage = new GrayImage(nsig.length(), max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++)\n\t\t\t\t// FIXME: put braces on this for\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, new_data[y][x]);\n\t\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\t\t} else {\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tRealSignal nsig = SignalConverter.toReal((Signal) sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif (nsig.get(x) > max)\n\t\t\t\t\tmax = nsig.get(x);\n\t\t\t\tif (nsig.get(x) < min)\n\t\t\t\t\tmin = nsig.get(x);\n\t\t\t}\n\n\t\t\tfloat[][] new_data = new float[(int) max][nsig.length()];\n\t\t\tRealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\t// try{\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, (int) new_data[y][x]);\n\t\t\t\t\t// }catch (Exception e)\n\t\t\t\t\t// {System.out.println(x+\" uh oh \"+y);}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\n\t\t}\n\n\t}", "public void setRootSignal(Signal signal) {\n\t\tint now = GameEngine.getSimulationTimeInMillis();\n\t\tthis.queue.setEntrance(signal, now);\n\t}", "public void setSigle(String sigle) {\r\n this.sigle = sigle;\r\n }", "public SignalCanvas(DiscreteSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public void set(float signal);", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "void OnSignalLost();", "public double getSignal() {return _signal;}", "public SignalCanvas(ComplexSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "private int sys_kill(int pid, int signal) {\n // This will only be called by raise() in newlib to invoke the default handler\n // We don't have to worry about actually delivering the signal\n if(pid != pid) return -ESRCH;\n if(signal < 0 || signal >= 32) return -EINVAL;\n switch(signal) {\n case 0: return 0;\n case 17: // SIGSTOP\n case 18: // SIGTSTP\n case 21: // SIGTTIN\n case 22: // SIGTTOU\n case 19: // SIGCONT\n case 20: // SIGCHLD\n case 23: // SIGIO\n case 28: // SIGWINCH\n break;\n default:\n exit(128+signal, true);\n }\n return 0;\n }", "public void sendSignal(int sig) {\n try {\n dOut.writeInt(sig);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send number of players\");\n e.printStackTrace();\n }\n }", "@Override\n public int getSignal() {\n return signal & 0xFF;\n }", "public void sendSignal (String signal, String message ){\r\n if (btSocket != null)\r\n {\r\n try{\r\n btSocket.getOutputStream().write(signal.getBytes());\r\n msg(message,0);\r\n } catch (IOException e) {\r\n msg(\"Error\", 0);\r\n }\r\n }\r\n\r\n }", "public void setJint(Integer jint) {\n this.jint = jint;\n }", "java.lang.String getSignal();", "public final void setSignalConnection(SignalConnection signalConnection) {\n\n if (isStarted()){\n stop();\n }\n\n this.signalConnection = signalConnection;\n }", "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public void setSigntype(Integer signtype) {\n\t\tthis.signtype = signtype;\n\t}", "public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}", "void setSignalPeriod(double signalPeriod);", "public final void rule__DronesBehavior__SignalsAssignment_3_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17015:1: ( ( ruleSignal ) )\r\n // InternalDroneScript.g:17016:2: ( ruleSignal )\r\n {\r\n // InternalDroneScript.g:17016:2: ( ruleSignal )\r\n // InternalDroneScript.g:17017:3: ruleSignal\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignal();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@java.lang.SuppressWarnings(\"all\")\n\t@javax.annotation.Generated(\"lombok\")\n\tpublic void setScriptSig(final ScriptSig scriptSig) {\n\t\tthis.scriptSig = scriptSig;\n\t}", "public java.awt.Image getJavaSignal() {\n\t\treturn image;\n\t}", "public final void rule__DronesBehavior__SignalsAssignment_3_0_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17030:1: ( ( ruleSignal ) )\r\n // InternalDroneScript.g:17031:2: ( ruleSignal )\r\n {\r\n // InternalDroneScript.g:17031:2: ( ruleSignal )\r\n // InternalDroneScript.g:17032:3: ruleSignal\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_2_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignal();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDronesBehaviorAccess().getSignalsSignalParserRuleCall_3_0_2_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public synchronized static void signal( byte code, Object src_obj, Exception e ) {\n if(e!=null) {\n if(e.getMessage()!=null)\n signal( code, src_obj, e.getMessage() );\n else\n signal( code, src_obj, e.toString() );\n }\n else\n signal( code, src_obj, \"<null exception>\" );\n\n if( displayExceptionStack && e!=null )\n out.println( \"EXCEPTION STACK: \"+getStackTrace(e) );\n }", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public synchronized void signalEvent()\r\n\t{\r\n\t\tnotifyAll();\r\n\t}", "public Builder setSig(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n sig_ = value;\n onChanged();\n return this;\n }", "public final void mo31286b() {\n this.f13976a.lock();\n try {\n this.f13979d = 1000;\n this.f13981f.signal();\n } finally {\n this.f13976a.unlock();\n }\n }", "void xsetSignalPeriod(org.apache.xmlbeans.XmlDouble signalPeriod);", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\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 signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "boolean k2h_set_bumup_debug_signal_user1();", "public Integer getJcmdsig() {\n return jcmdsig;\n }", "public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }", "public void onInputSignalChange(String input, boolean hasSignal) {\n\n\t\t}", "@Override\n\tpublic List<Signal> getSignals() {\n\t\treturn null;\n\t}", "private synchronized void setSignals(SignalEvent event)\r\n\t{\r\n\t\tfor(int i = 0;i < event.getLeftSignal().length; i++)\r\n\t\t{\r\n\t\t\tif(llleftSamples.size() < maxSize/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY ));\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllleftSamples.removeFirst();\r\n\t\t\t\tllleftSamples.add((int) (100 - event.getLeftSignal()[i] * 100 * zoomY));\r\n\t\t\t\tllrightSamples.removeFirst();\r\n\t\t\t\tllrightSamples.add((int) (100 - event.getRightSignal()[i] * 100 * zoomY));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<event.getfftHelperObj().getFFTSignal().length;i++)\r\n\t\t{\t\t\r\n\t\t\tif(llFFTSamples.size() < (fftSize/2)/zoomX)\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY ));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tllFFTSamples.removeFirst();\r\n\t\t\t\tllFFTSamples.add((int) (maxSizeFFt * event.getfftHelperObj().getFFTSignal()[i] * zoomY));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tcnt++;\r\n\t}", "public void setSignalPosition(int signalPosition) {\n this.signalPosition = signalPosition;\n }", "public Builder setSignalBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public final void setSiguiente(final Celda siguienteN) {\r\n siguiente = siguienteN;\r\n\r\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n }\n }", "com.google.protobuf.ByteString\n getSignalBytes();", "public synchronized void signalStep() {\n s = true;\n notifyAll();\n }", "public void onSignalChange(boolean hasSignal) {\n\t\t\tif (mSelListeners != null && mSelListeners.size() > 0) {\n\t\t\t\tfor (IChannelSelectorListener mSelListener : mSelListeners) {\n\t\t\t\t\tmSelListener.signalChange(hasSignal);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@JNICALL\n public void setSigners(JNIEnv env, @THIS KReference ref, @JNIPARAM(\"java.lang.Object[]\") KReference signers) {\n //TODO FIX ME\n }", "private void updateSignal() {\n getGlobals().informationSignal =\n getContext().getPrng().gaussian(0,getGlobals().volatilityInfo).sample();\n\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic void signalToUi(int type, Object data) {\n\t\t\n\t}", "public ZoomAction(JSignalMonitor jsm, String signalName, int value) {\n this.jsm = jsm;\n this.signalName = signalName;\n this.value = value;\n this.putValue(NAME, String.valueOf(value));\n this.putValue(SHORT_DESCRIPTION, \"Set the zoom at \" + value + \" %\");\n\n }", "public SignalEntry notifyShutdown(ShutdownSignal signal) {\r\n return log(NAME_SHUTDOWN, null, null);\r\n }", "@Subroutine(\"signal\")\n public static LispObject signal (LispSymbol errorSymbol, LispList data) {\n String msg = \"\";// '[' + ((errorMessage instanceof LispString) ? ((LispString) errorMessage).getData() : \"peculiar error\") + \"] \";\n msg += '(' + errorSymbol.getName() + ' ';\n msg += (data.length() == 1 ? data.car().toString() : data.toString()) + ')';\n // System.out.println(msg);\n throw new LispException(msg);\n }", "boolean isSignal();", "@JsonProperty(\"ignoreSignals\")\r\n @JacksonXmlProperty(localName = \"ignore_signals\", isAttribute = true)\r\n public void setIgnoreSignals(String ignoreSignals) {\r\n this.ignoreSignals = ignoreSignals;\r\n }", "void unsetSignalPeriod();", "public void setSign(String sign) {\n\n this.sign = sign;\n }", "public void CondSignal(){\n trainCond.signal();\r\n }", "public void process(Object signal)\r\n/* 25: */ {\r\n/* 26:23 */ System.out.println(\"Cause observed!\");\r\n/* 27: */ }", "public static void signalStart() {\n\t\tif (!instrumenting) return;\n\t\t\n\t\trunning = true;\n\t}", "public Signal[] getSignals() {\n Signal[] signals = new Signal[getSignalsCount()];\n\n this.signals.toArray(signals);\n\n return signals;\n }", "public final SignalConnection getSignalConnection() {\n return signalConnection;\n }", "public TSignal(TSignal other) {\n if (other.is_set_destApp()) {\n this.destApp = other.destApp;\n }\n if (other.is_set_destPellet()) {\n this.destPellet = other.destPellet;\n }\n if (other.is_set_data()) {\n this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);\n;\n }\n }", "public static void marshal(long msgArg, String sig, Object arg) throws BusException {\n try {\n int value = getEnumValue(arg);\n switch (sig.charAt(0)) {\n case ALLJOYN_BYTE:\n if (value != -1) {\n set(msgArg, sig, (byte) value);\n } else {\n set(msgArg, sig, ((Number) arg).byteValue());\n }\n break;\n case ALLJOYN_BOOLEAN:\n set(msgArg, sig, ((Boolean) arg).booleanValue());\n break;\n case ALLJOYN_INT16:\n case ALLJOYN_UINT16:\n if (value != -1) {\n set(msgArg, sig, (short) value);\n } else {\n set(msgArg, sig, ((Number) arg).shortValue());\n }\n break;\n case ALLJOYN_INT32:\n case ALLJOYN_UINT32:\n if (value != -1) {\n set(msgArg, sig, value);\n } else {\n set(msgArg, sig, ((Number) arg).intValue());\n }\n break;\n case ALLJOYN_INT64:\n case ALLJOYN_UINT64:\n if (value != -1) {\n set(msgArg, sig, (long) value);\n } else {\n set(msgArg, sig, ((Number) arg).longValue());\n }\n break;\n case ALLJOYN_DOUBLE:\n set(msgArg, sig, ((Number) arg).doubleValue());\n break;\n case ALLJOYN_STRING:\n case ALLJOYN_SIGNATURE:\n case ALLJOYN_OBJECT_PATH:\n if (arg == null) {\n throw new MarshalBusException(\"cannot marshal null into '\" + sig + \"'\");\n }\n set(msgArg, sig, (String) arg);\n break;\n case ALLJOYN_ARRAY:\n if (arg == null) {\n throw new MarshalBusException(\"cannot marshal null into '\" + sig + \"'\");\n }\n char elementTypeId = sig.charAt(1);\n if (ALLJOYN_DICT_ENTRY_OPEN == elementTypeId) {\n arg = ((Map<?, ?>) arg).entrySet().toArray();\n }\n switch (elementTypeId) {\n case ALLJOYN_BYTE:\n set(msgArg, sig, (byte[]) arg);\n break;\n case ALLJOYN_BOOLEAN:\n if (arg instanceof boolean[]) {\n set(msgArg, sig, (boolean[]) arg);\n } else {\n set(msgArg, sig, (Boolean[]) arg);\n }\n break;\n case ALLJOYN_INT16:\n case ALLJOYN_UINT16:\n set(msgArg, sig, (short[]) arg);\n break;\n case ALLJOYN_INT32:\n case ALLJOYN_UINT32:\n set(msgArg, sig, (int[]) arg);\n break;\n case ALLJOYN_INT64:\n case ALLJOYN_UINT64:\n set(msgArg, sig, (long[]) arg);\n break;\n case ALLJOYN_DOUBLE:\n set(msgArg, sig, (double[]) arg);\n break;\n default:\n String elemSig = sig.substring(1);\n Object[] args = (Object[]) arg;\n setArray(msgArg, elemSig, args.length);\n for (int i = 0; i < getNumElements(msgArg); ++i) {\n marshal(getElement(msgArg, i), elemSig, args[i]);\n }\n break;\n }\n break;\n case ALLJOYN_STRUCT_OPEN:\n Object[] args = Signature.structArgs(arg);\n String[] memberSigs = Signature.split(sig.substring(1, sig.length() - 1));\n if (memberSigs == null) {\n throw new MarshalBusException(\"cannot marshal \" + arg.getClass() + \" into '\"\n + sig + \"'\");\n }\n setStruct(msgArg, memberSigs.length);\n for (int i = 0; i < getNumMembers(msgArg); ++i) {\n marshal(getMember(msgArg, i), memberSigs[i], args[i]);\n }\n break;\n case ALLJOYN_VARIANT:\n Variant variant = (Variant) arg;\n if (variant.getMsgArg() != 0) {\n setVariant(msgArg, sig, variant.getMsgArg());\n } else {\n setVariant(msgArg);\n marshal(getVal(msgArg), variant.getSignature(), variant.getValue());\n }\n break;\n case ALLJOYN_DICT_ENTRY_OPEN:\n Map.Entry<?, ?> entry = (Map.Entry<?, ?>) arg;\n String[] sigs = Signature.split(sig.substring(1, sig.length() - 1));\n if (sigs == null) {\n throw new MarshalBusException(\"cannot marshal \" + arg.getClass() + \" into '\"\n + sig + \"'\");\n }\n setDictEntry(msgArg);\n marshal(getKey(msgArg), sigs[0], entry.getKey());\n marshal(getVal(msgArg), sigs[1], entry.getValue());\n break;\n default:\n throw new MarshalBusException(\"unimplemented '\" + sig + \"'\");\n }\n } catch (Throwable th) {\n throw new MarshalBusException(\"cannot marshal \" +\n ((arg == null) ? \"null\" : arg.getClass()) +\n \" into '\" + sig + \"'\", th);\n }\n }", "public void setJ(boolean j) {\n\tthis.j = j;\n }", "public Builder clearSignal() {\n bitField0_ = (bitField0_ & ~0x00020000);\n signal_ = getDefaultInstance().getSignal();\n onChanged();\n return this;\n }", "public Builder clearSig() {\n bitField0_ = (bitField0_ & ~0x00000002);\n sig_ = getDefaultInstance().getSig();\n onChanged();\n return this;\n }", "Future<T> then(Signal<T> result);", "public com.google.ads.googleads.v14.services.MutateAssetGroupSignalsResponse mutateAssetGroupSignals(com.google.ads.googleads.v14.services.MutateAssetGroupSignalsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getMutateAssetGroupSignalsMethod(), getCallOptions(), request);\n }", "public void setSignature(short signature) {\n\t\ttry {\n\t\t\tgetStream().setInt(this.signature, signature);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "public Integer getSigntype() {\n\t\treturn signtype;\n\t}", "public static native long set(long msgArg, String signature, byte arg) throws BusException;", "public void set(long j, CoreMorphComponent coreMorphComponent) {\r\n CoreJni.setInCoreMorphComponentManager0(this.agpCptrMorphComponentMgr, this, j, CoreMorphComponent.getCptr(coreMorphComponent), coreMorphComponent);\r\n }", "public final void entryRuleSignal() throws RecognitionException {\r\n try {\r\n // InternalDroneScript.g:80:1: ( ruleSignal EOF )\r\n // InternalDroneScript.g:81:1: ruleSignal EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignalRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleSignal();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignalRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public interface SignalStateListener{\n\n void onSimStateChanged(boolean sim1Exist, boolean sim2Exist) ;\n\n void onSignalStrengthsChanged(int simId, SimSignalInfo signalInfo) ;\n }", "public void warningSound() {\n\t\tSystem.out.println(signal);\n\t}", "public void signalTheWaiter();", "public void setSigla(String sigla) {\n this.sigla = sigla;\n }", "private void defineSignalSet() {\n\t\tevents = new ArrayList<OutputEventPort>();\t\t\n\n\t\tfor (ThreadImplementation tw : allThreads) {\n\t\t\tevents.addAll(tw.getOutputEventPortList());\n\t\t\tevents.addAll(tw.getOutputEventDataPortList());\n\t\t}\n\t}", "public static void sendSignal(String topology, String nodeName, Serializable value, AbstractSignalConnection con) {\r\n sendSignal(topology, nodeName, SIGNALNAME, value, con);\r\n }", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "public synchronized static void signal( byte code, Object src_obj, String info )\n {\n if(code<level)\n \t return;\n\n String debug_msg = \"\";\n\n switch( code ) {\n case FAILURE:\n\t debug_msg += \"FAILURE\"; break;\n case CRITICAL:\n debug_msg += \"CRITICAL\"; break;\n case ERROR:\n debug_msg += \"ERROR\"; break;\n case WARNING:\n debug_msg += \"WARNING\"; break;\n case NOTICE:\n debug_msg += \"NOTICE\"; break;\n default:\n\t debug_msg += \"UNKNOWN\"; break;\n }\n\n if(src_obj!=null)\n debug_msg += \" - \" + src_obj.getClass().getName() +\"\\n \"+info;\n else \n debug_msg += \" - \" +info;\n \n out.println( debug_msg );\n }", "public void enlazarSiguiente(NodoB siguiente) {\r\n\t\tthis.siguiente = siguiente;\r\n\t}", "public com.google.protobuf.ByteString getSig() {\n return sig_;\n }", "public void setSign(String sign) {\n this.sign = sign == null ? null : sign.trim();\n }", "private void resignBActionPerformed(java.awt.event.ActionEvent evt) {\n controller.resign();\n }", "public com.google.protobuf.ByteString getSig() {\n return sig_;\n }", "public void setSigRequest() { //method for setting the sigRequest of any loginIndex object, no parameter required, generates it all on its own\r\n \tString ikey = \"DIIDEISCSE5SPOZR41KL\"; //Given by Duo in the Web SDK\r\n \tString skey = \"PJEgxAWQOwumI0TE6yT7vfIDyDB0FIxpcvREJFMh\"; //Given by Duo in the Web SDK\r\n \tString akey = \"b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6bb6b6b66b6b6b6b6\"; //This is randomly generated and should be stored separate from Duo\r\n \tString sig_request = DuoWeb.signRequest(ikey, skey, akey, username); //Generates the signed request by calling on the DuoWeb.java given by Duo\r\n \tthis.sigRequest = sig_request;\r\n }", "boolean hasSignal();", "public void setJtype(Integer jtype) {\n this.jtype = jtype;\n }", "public String getSigRequest() {\n return sigRequest;\r\n }", "public void setSignDate(Date signDate) {\n this.signDate = signDate;\n }", "public String getSigle() {\r\n return sigle;\r\n }", "public static synchronized void setKeyClickTone(int key, int freq) {\r\n\t\tButton.keys.setKeyClickTone(key, freq);\r\n\t}" ]
[ "0.7372023", "0.67595184", "0.6429641", "0.6291945", "0.6125371", "0.6117031", "0.60318506", "0.5778602", "0.5579635", "0.55537236", "0.5499173", "0.5438174", "0.5394025", "0.5342947", "0.5319742", "0.53191036", "0.5293073", "0.5291116", "0.5269681", "0.5263827", "0.52187836", "0.51897097", "0.51792324", "0.5090233", "0.5088537", "0.50788677", "0.505966", "0.50464314", "0.5013579", "0.49770123", "0.496057", "0.49403277", "0.4935836", "0.49236327", "0.49019384", "0.48836628", "0.48714095", "0.48582143", "0.4847027", "0.48158288", "0.47994295", "0.47945738", "0.4787169", "0.47865266", "0.47765276", "0.47334877", "0.4725964", "0.4700941", "0.46631834", "0.46534598", "0.46442413", "0.4624934", "0.46091944", "0.46062016", "0.46039584", "0.45865285", "0.45316982", "0.45294026", "0.4517554", "0.45125565", "0.45112985", "0.45074645", "0.44971627", "0.44965586", "0.44962743", "0.4487584", "0.44863692", "0.4470976", "0.44624144", "0.4425229", "0.442379", "0.4411443", "0.44011077", "0.43860027", "0.4368794", "0.43614975", "0.4361437", "0.43536285", "0.43474752", "0.43337524", "0.4332687", "0.4332518", "0.43180504", "0.43039238", "0.42880723", "0.4281779", "0.4279163", "0.42777267", "0.4277307", "0.4274962", "0.42719564", "0.42695007", "0.42554548", "0.42349422", "0.42171764", "0.41959178", "0.41589075", "0.41582704", "0.41476643", "0.41469327" ]
0.7748346
0
Returns the JIGL signal
public jigl.signal.Signal getSignal() { return jsignal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getSignal() {return _signal;}", "java.lang.String getSignal();", "public int getAudioJittcomp();", "public Float getLsjg() {\n return lsjg;\n }", "Signal getSignal();", "public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}", "public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException,\n\t\t\tRuntimeException {\n\n\t\t// int w = 0;\n\t\t// int h = 0;\n\t\tjava.awt.Image jsig = null;\n\n\t\tif (sig instanceof DiscreteSignal) {\n\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\n\t\t\tDiscreteSignal nsig = SignalConverter.toDiscrete(sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif ((short) nsig.get(x) > max)\n\t\t\t\t\tmax = (short) nsig.get(x);\n\t\t\t\tif ((short) nsig.get(x) < min)\n\t\t\t\t\tmin = (short) nsig.get(x);\n\n\t\t\t}\n\n\t\t\tshort[][] new_data = new short[max][nsig.length()];\n\t\t\tGrayImage gimage = new GrayImage(nsig.length(), max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++)\n\t\t\t\t// FIXME: put braces on this for\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, new_data[y][x]);\n\t\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\t\t} else {\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tRealSignal nsig = SignalConverter.toReal((Signal) sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif (nsig.get(x) > max)\n\t\t\t\t\tmax = nsig.get(x);\n\t\t\t\tif (nsig.get(x) < min)\n\t\t\t\t\tmin = nsig.get(x);\n\t\t\t}\n\n\t\t\tfloat[][] new_data = new float[(int) max][nsig.length()];\n\t\t\tRealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\t// try{\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, (int) new_data[y][x]);\n\t\t\t\t\t// }catch (Exception e)\n\t\t\t\t\t// {System.out.println(x+\" uh oh \"+y);}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\n\t\t}\n\n\t}", "public java.awt.Image getJavaSignal() {\n\t\treturn image;\n\t}", "@Override\n public int getSignal() {\n return signal & 0xFF;\n }", "private double getSignal(double[] params, StejskalTannerScheme scheme, int i) {\r\n\r\n\t\tif (scheme.zero(i)) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\r\n\t\tdouble signal;\r\n\r\n\t\tdouble R = params[1];\r\n\t\tdouble b = scheme.getB_Value(i);\r\n\t\tdouble DELTA = scheme.getDELTA(i);\r\n\t\tdouble delta = scheme.getDelta(i);\r\n \tdouble modG = scheme.getModG(i);\r\n\t\tdouble[] ghat = scheme.getG_Dir(i);\r\n\t\tdouble[] G = new double[3];\r\n\t\tfor (int j = 0; j < G.length; j++) {\r\n\t\t\tG[j] = ghat[j] * modG;\r\n\t\t}\r\n\r\n\t\tdouble[] am1 = new double[am.length];\r\n\r\n\t\tfor (int i1 = 0; i1 < am.length; i1++) {\r\n\t\t\tam1[i1] = am[i1] / R;\r\n\r\n\t\t}\r\n\r\n\t\t/** calculating the sum for the perpendicular intra-cellular signal */\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i1 = 0; i1 < am1.length; i1++) {\r\n\t\t\t// d*am^2\r\n\t\t\tdouble dam = params[0] * am1[i1] * am1[i1];\r\n\t\t\t// -d*am^2*delta\r\n\t\t\tdouble e11 = -dam * delta;\r\n\t\t\t// -d*am^2*DELTA\r\n\t\t\tdouble e2 = -dam * DELTA;\r\n\t\t\t// -d*am^2*(DELTA-delta)\r\n\t\t\tdouble dif = DELTA - delta;\r\n\t\t\tdouble e3 = -dam * dif;\r\n\t\t\t// -d*am^2*(DELTA+delta)\r\n\t\t\tdouble plus = DELTA + delta;\r\n\t\t\tdouble e4 = -dam * plus;\r\n\t\t\t// numerator of the fraction\r\n\t\t\tdouble nom = 2 * dam * delta - 2 + (2 * Math.exp(e11))\r\n\t\t\t\t\t+ (2 * Math.exp(e2)) - Math.exp(e3) - Math.exp(e4);\r\n\r\n\t\t\t// denominator\r\n\t\t\tdouble denom = dam * dam * am1[i1] * am1[i1]\r\n\t\t\t\t\t* (R * R * am1[i1] * am1[i1] - 1);\r\n\r\n\t\t\t// the sum of the fraction\r\n\t\t\tsum += (nom / denom);\r\n\t\t}\r\n\t\t// the perpendicular component\r\n\t\tdouble lperp = (-2 * GAMMA * GAMMA * sum);\r\n\r\n\t\t// parallel component\r\n\t\tdouble lpar = -b * 1/(modG*modG) * params[0];\r\n\r\n\t\t// the isotropic restricted signal\r\n\t\ttry {\r\n\t\t\tsignal = Math.sqrt(Math.PI) * 1\r\n\t\t\t\t\t/ (2 * modG * Math.sqrt(lperp - lpar))\r\n\t\t\t\t\t* Math.exp(modG * modG * lperp)\r\n\t\t\t\t\t* ErrorFunction.erf(modG * Math.sqrt((lperp - lpar)));\r\n\t\t} catch (ErrorFunctionException erfe) {\r\n\t\t\tthrow new LoggedException(erfe);\r\n\r\n\t\t}\r\n\r\n\t\treturn signal;\r\n\t}", "public double getJx()\n {\n return m_Jx;\n }", "public void setLsjg(Float lsjg) {\n this.lsjg = lsjg;\n }", "public double getSignal(double[] params, DW_Scheme rawScheme, int i) {\r\n\r\n\t\tStejskalTannerScheme scheme;\r\n\r\n\t\ttry {\r\n\t\t\tscheme = (StejskalTannerScheme) rawScheme;\r\n\t\t} catch (ClassCastException cce) {\r\n\t\t\tthrow new LoggedException(\r\n\t\t\t\t\t\"scheme object passed to cylinder compartment is not a StejskalTanner sequence\");\r\n\t\t}\r\n\r\n\t\treturn getSignal(params, scheme, i);\r\n\t}", "public float getJInv() {\n\n return inv_J;\n }", "public String getSigle() {\r\n return sigle;\r\n }", "public double[] processSignal(double[] input){\r\n if(input.length == 784){\r\n neuralNetwork.setInput(input);\r\n neuralNetwork.calculate();\r\n double[] output = neuralNetwork.getOutput();\r\n String s = \"\";\r\n for(double d : output){\r\n s += String.valueOf(d) + \",\";\r\n }\r\n return output;\r\n } else {\r\n return null;\r\n }\r\n }", "com.google.protobuf.ByteString\n getSignalBytes();", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n }\n }", "public double getSignal() {\r\n return signals.lastEntry().getValue();\r\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "public float getSignalValue(int index);", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "public String getJx() {\n return jx;\n }", "public synchronized float j() {\n return this.j;\n }", "public void setSignal(double signal) {_signal = signal;}", "double a_hinge_power ()\n {\n double l_return = 0.0;\n\n if (hinge != null) {\n l_return = hinge.getPower();\n }\n\n return l_return;\n }", "double getSignalPeriod();", "public int mo3828p() {\n return this.f1435J;\n }", "public byte[] getJ() {\n return j;\n }", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public double getJy()\n {\n return m_Jy;\n }", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\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 signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private double getMMI() {\n\t\tdouble pgv, pga;\n\t\tString S = \".getMMI()\";\n\n\t\t// get PGA\n\t\tcoeffBJF = (BJF_1997_AttenRelCoefficients) coefficientsBJF.get(PGA_Param.NAME);\n\t\tcoeffSM = (BJF_1997_AttenRelCoefficients) coefficientsSM.get(PGA_Param.NAME);\n\t\tdouble b_pga = getRockMean();\n\t\tpga = b_pga + Math.log(getAmpFactor(PGA_Param.NAME));\n\t\t// Convert to linear domain\n\t\tpga = Math.exp(pga);\n\n\t\tif (D) {\n\t\t\tSystem.out.println(C + S + \" pga = \" + (float) pga);\n\t\t}\n\n\t\t// get PGV\n\t\tcoeffBJF = (BJF_1997_AttenRelCoefficients) coefficientsBJF.get(PGV_Param.NAME);\n\t\tcoeffSM = (BJF_1997_AttenRelCoefficients) coefficientsSM.get(PGV_Param.NAME);\n\t\tdouble b_pgv = getRockMean();\n\t\tpgv = b_pgv + Math.log(getAmpFactor(PGV_Param.NAME));\n\t\t// Convert to linear domain (what's needed below)\n\t\tpgv = Math.exp(pgv);\n\n\t\tif (D) {\n\t\t\tSystem.out.println(\" pgv = \" + (float) pgv);\n\t\t}\n\n\t\treturn Wald_MMI_Calc.getMMI(pga, pgv);\n\n\t}", "private int getBinJ(Location l)\r\n {\r\n return (int)((l.getY()-bl.getY())/dj);\r\n }", "@Override\n public int getRedwireSignal(int dir) {\n return getSignal();\n }", "private void updateSignal() {\n getGlobals().informationSignal =\n getContext().getPrng().gaussian(0,getGlobals().volatilityInfo).sample();\n\n }", "public Integer getJint() {\n return jint;\n }", "public int getVibrationState() {\n return -1;\n }", "public float getWavelength() {\n/* 52 */ return this.wavelength;\n/* */ }", "float mo199g() throws RemoteException;", "public String getSignalName(int index);", "public int getLaSign() {\n return laSign;\n }", "public float mo3810g(int i) {\n if (i == 0) {\n return this.f1443S;\n }\n if (i == 1) {\n return this.f1444T;\n }\n return -1.0f;\n }", "@Override\n\tprotected String wavRegleJeu() {\n\t\treturn null;\n\t}", "public float getAmplitude() {\n/* 70 */ return this.amplitude;\n/* */ }", "double getLuong();", "public SoundEvent getStepSound() {\n/* 91 */ return this.stepSound;\n/* */ }", "dkk mo4508f();", "public void CondSignal(){\n trainCond.signal();\r\n }", "public abstract double get( int i, int j ) throws JWaveException;", "public String getJoperator() {\n return joperator;\n }", "public final void mo26918gp(long j) {\n AppMethodBeat.m2504i(131625);\n C7060h.pYm.mo8378a(600, j, 1, false);\n AppMethodBeat.m2505o(131625);\n }", "public abstract float mo9744i();", "public double getG();", "public String getLsjgcc() {\n return lsjgcc;\n }", "public int getLoSign() {\n return loSign;\n }", "public void setSignal(jigl.signal.Signal sig) throws BadSignalException {\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public Integer getJcmdsig() {\n return jcmdsig;\n }", "public float getSpring_damping_ang_x() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 116);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 108);\n\t\t}\n\t}", "public String getLuaJ() {\n\t\tString core = getLuaJCore();\n\t\treturn core;\n\t}", "public String getXkjg() {\n\t\treturn xkjg;\n\t}", "public int getSignalNameNumber(String name);", "float getLgap();", "double computeSignal(RadioInfo srcInfo, Location srcLoc, Location dst);", "double a_hang_power ()\n {\n double l_return = 0.0;\n\n if (hang_motor != null) {\n l_return = hang_motor.getPower();\n }\n\n return l_return;\n }", "boolean isSignal();", "protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }", "public static native void Conjugate(long lpjFbxDualQuaternion);", "String getSign();", "public String getGslly() {\r\n return gslly;\r\n }", "public float getMicGainDb();", "public static boolean getJumble() {\n\t\treturn jumble;\n\t}", "@Override\n public Switch lowPressureSwitch() {\n return pcm::getPressureSwitchValue;\n }", "public final void mo9818g(long j) {\n if (C3670m.f9104c) {\n long j2 = (long) this.f9108f;\n while ((j & -128) != 0) {\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n C3691q1.m8815a(bArr, (long) i, (byte) ((((int) j) & 127) | 128));\n j >>>= 7;\n }\n byte[] bArr2 = this.f9106d;\n int i2 = this.f9108f;\n this.f9108f = i2 + 1;\n C3691q1.m8815a(bArr2, (long) i2, (byte) ((int) j));\n this.f9109g += (int) (((long) this.f9108f) - j2);\n return;\n }\n while ((j & -128) != 0) {\n byte[] bArr3 = this.f9106d;\n int i3 = this.f9108f;\n this.f9108f = i3 + 1;\n bArr3[i3] = (byte) ((((int) j) & 127) | 128);\n this.f9109g++;\n j >>>= 7;\n }\n byte[] bArr4 = this.f9106d;\n int i4 = this.f9108f;\n this.f9108f = i4 + 1;\n bArr4[i4] = (byte) ((int) j);\n this.f9109g++;\n }", "Landsat8OLISensor(imgViewer applet)\n {\n super(applet,\"Landsat 8 OLI\", \"l8oli\", \"LANDSAT_8\",\n \"showbrowse.cgi\", \"showmetadata.cgi\", \"USGS_logo.gif\",\n \"http://www.usgs.gov\",\n \"https://lta.cr.usgs.gov/L8\",\n \"http://landsat.usgs.gov/tools_acq.php\",\n resolutions,borderX,borderY,Color.YELLOW);\n\n numQualityValues = 1; // Yes, L8 only has 1\n qualityLimit = 9;\n\n // the Landsat L1T scenes are downloadable\n isDownloadable = true;\n mightBeDownloadable = true;\n maxScenesPerOrder = 100;\n\n // set the navigation model to the WRS-2 descending model\n navModel = new WRS2Model();\n }", "public float getBreakingImpulse() {\n return Native3DConstraint.getBreakingImpulse(getNative());\n }", "public double SigmaKol(int j) {\r\n\t\tdouble ans = 0;\r\n\t\t\r\n\t\tfor (int i=0; i<BrsEff; i++) {\r\n\t\t ans = ans + Elmt[i][j];\r\n\t\t}\r\n\t\t\r\n\t\treturn ans;\r\n\t}", "public C0088i mo286d() {\n return this.f269g;\n }", "String getMidiTarget();", "public Polynom inputPow(Polynom polynom, CanonicForms g) {F newF;\n if ( (polynom.coeffs[0].numbElementType() < Ring.Polynom) && (polynom.coeffs[0].Im(g.newRing).isZero(g.newRing)) ) {// т.е. у него числовой коэффициент\n for (int p = polynom.powers.length - 1; p > g.RING.varNames.length - 1; p--) {\n if (polynom.powers[p] != 0) {\n if (polynom.powers[p] == 1) {Element simb=g.List_of_Change.get(p - g.RING.varNames.length);\n if (simb instanceof F ) {\n F func = (F) simb;\n if (func.name == F.LN || func.name == F.LG) {\n newF= new F(func.name, func.X[0].pow(polynom.coeffs[0].abs(g.newRing), g.newRing));\n } else if (func.name == F.LOG) {\n newF= new F(func.name, func.X[0], func.X[1].pow(polynom.coeffs[0].abs(g.newRing), g.newRing));\n } else continue;\n Polynom newPol=(Polynom)g.addNewElement(newF, 1);\n newPol.coeffs[0]= (polynom.coeffs[0].isNegative())? NumberZ.MINUS_ONE: NumberZ.ONE;\n for (int i = 0; i < polynom.powers.length; i++) newPol.powers[i]+=polynom.powers[i]; \n newPol.powers[p]=0;\n return newPol;\n }} \n }\n }\n }\n return polynom;\n }", "public float getSpring_stiffness_ang_x() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 92);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 84);\n\t\t}\n\t}", "private String getQuantityFromWeighScale() {\r\n // Read data from weigh scale through serial port\r\n\r\n // Convert data to string and return the value to calling function\r\n\r\n return \"1\";\r\n }", "@AnyLogicInternalCodegenAPI\n public double _DeathRisk_DefaultValue_xjal() {\n final Main self = this;\n return \n0.01 \n;\n }", "public int /* sound_sample */output() {\n\t\treturn Vo;\n\t}", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "public final aji mo15444g() {\n return this.f13323b;\n }", "private DoubleMatrix1D nextSignal() {\n int i = PersistentRandomUtil.getInstance().nextInt(data.rows());\n numSignalsGenerated++;\n return data.viewRow(i);\n }", "public int j() {\n \treturn j; \n }", "public String getJiffleName() {\n return jiffleName;\n }", "@VisibleForTesting\n public final long g(long j) {\n long j2 = j - this.f10062b;\n this.f10062b = j;\n return j2;\n }", "@AnyLogicInternalCodegenAPI\n public double _InfectionRisk_DefaultValue_xjal() {\n final Main self = this;\n return \n0.08 \n;\n }", "public final C3902jg mo15449l() {\n C3902jg jgVar;\n synchronized (this.f13322a) {\n jgVar = this.f13325d;\n }\n return jgVar;\n }", "public void setJGSL(String jgsl) {\n //To change body of implemented methods use File | Settings | File Templates.\n }", "private C0320g m1278j(C0317d dVar) {\n return (C0320g) dVar.mo2181b();\n }", "@Override\n\t\tpublic float getInterpolation(float input) {\n\t\t\t\n//\t\t\tfloat t = a*(float) Math.sin(Math.PI * 2/2.8f * input);\n//\t\t\tLog.d(\"debug\", \"input = \"+input+\",,\"+ \"t = \"+t);\n//\t\t\treturn t ;\n\t\t\treturn input;\n\t\t}", "@AnyLogicInternalCodegenAPI\n public int _EncounterRate_DefaultValue_xjal() {\n final Main self = this;\n return \n10 \n;\n }", "public static double toGon(double winkel) {\n\t\treturn winkel / Math.PI * 200;\n\t}", "void OnSignalLost();" ]
[ "0.6373346", "0.60480154", "0.6039412", "0.6018302", "0.5992645", "0.5980137", "0.592029", "0.5587014", "0.5525518", "0.5481695", "0.545074", "0.5440513", "0.539756", "0.5316811", "0.53120774", "0.5289503", "0.52628815", "0.5227565", "0.5209528", "0.5202448", "0.5151488", "0.51254153", "0.5120012", "0.5105137", "0.50817686", "0.5066449", "0.5065047", "0.5047311", "0.5045914", "0.5037774", "0.5003044", "0.4996603", "0.4973231", "0.49663472", "0.49654096", "0.49571216", "0.49504498", "0.4948108", "0.48935768", "0.48329172", "0.4815857", "0.48141652", "0.48123085", "0.4807272", "0.47836038", "0.47808975", "0.47785974", "0.4777946", "0.47747964", "0.47641385", "0.47567394", "0.4756575", "0.47510585", "0.47296134", "0.47213957", "0.4721156", "0.4719205", "0.47162238", "0.47043976", "0.46996322", "0.4687161", "0.46726522", "0.46682847", "0.46632636", "0.4656093", "0.4650274", "0.46430317", "0.46407288", "0.462496", "0.46237385", "0.4623716", "0.4607587", "0.46046227", "0.4601672", "0.45975408", "0.45958772", "0.45901453", "0.4588733", "0.45844555", "0.45829087", "0.45804155", "0.45720682", "0.4562096", "0.45604542", "0.45546514", "0.4548027", "0.45462024", "0.45412844", "0.4540888", "0.4532568", "0.4529943", "0.4528667", "0.45251969", "0.4516333", "0.45140183", "0.4509785", "0.4509143", "0.45024776", "0.44983792", "0.44973782" ]
0.66679466
0
Returns the Java signal
public java.awt.Image getJavaSignal() { return image; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSignal();", "public jigl.signal.Signal getSignal() {\n\t\treturn jsignal;\n\t}", "Signal getSignal();", "@Override\n public int getSignal() {\n return signal & 0xFF;\n }", "public double getSignal() {return _signal;}", "public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n }\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.ByteString\n getSignalBytes();", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public double getSignal() {\r\n return signals.lastEntry().getValue();\r\n }", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\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 signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException,\n\t\t\tRuntimeException {\n\n\t\t// int w = 0;\n\t\t// int h = 0;\n\t\tjava.awt.Image jsig = null;\n\n\t\tif (sig instanceof DiscreteSignal) {\n\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\n\t\t\tDiscreteSignal nsig = SignalConverter.toDiscrete(sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif ((short) nsig.get(x) > max)\n\t\t\t\t\tmax = (short) nsig.get(x);\n\t\t\t\tif ((short) nsig.get(x) < min)\n\t\t\t\t\tmin = (short) nsig.get(x);\n\n\t\t\t}\n\n\t\t\tshort[][] new_data = new short[max][nsig.length()];\n\t\t\tGrayImage gimage = new GrayImage(nsig.length(), max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++)\n\t\t\t\t// FIXME: put braces on this for\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, new_data[y][x]);\n\t\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\t\t} else {\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tRealSignal nsig = SignalConverter.toReal((Signal) sig);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tif (nsig.get(x) > max)\n\t\t\t\t\tmax = nsig.get(x);\n\t\t\t\tif (nsig.get(x) < min)\n\t\t\t\t\tmin = nsig.get(x);\n\t\t\t}\n\n\t\t\tfloat[][] new_data = new float[(int) max][nsig.length()];\n\t\t\tRealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max);\n\t\t\tfor (int x = 0; x < nsig.length(); x++) {\n\t\t\t\tfor (int y = 0; y < max; y++) {\n\t\t\t\t\t// try{\n\t\t\t\t\tif ((max - y) < nsig.get(x))\n\t\t\t\t\t\tnew_data[y][x] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnew_data[y][x] = 255;\n\t\t\t\t\tgimage.set(x, y, (int) new_data[y][x]);\n\t\t\t\t\t// }catch (Exception e)\n\t\t\t\t\t// {System.out.println(x+\" uh oh \"+y);}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// w = gimage.X();\n\t\t\t// h = gimage.Y();\n\t\t\tjsig = createImage(gimage.getJavaImage());\n\t\t\treturn jsig;\n\n\t\t}\n\n\t}", "boolean isSignal();", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "public int getAudioJittcomp();", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "void OnSignalLost();", "@Override\n public int getRedwireSignal(int dir) {\n return getSignal();\n }", "public void setSignal(double signal) {_signal = signal;}", "public String getSigle() {\r\n return sigle;\r\n }", "public SignalType getType() {\n return type;\n }", "public int receiveSignal() {\n try {\n return dIn.readInt();\n } catch (IOException e) {\n System.out.println(\"Signal not received\");\n e.printStackTrace();\n }\n return -1;\n }", "public String getSignalName(int index);", "void signal();", "public Integer getJcmdsig() {\n return jcmdsig;\n }", "public Signal stateDescription();", "public float getSignalValue(int index);", "public boolean receivedSignal() {\r\n return receivedSignal;\r\n }", "boolean hasSignal();", "public int getSignalNameNumber(String name);", "public Signal getRootSignal() {\n\t\treturn this.queue.getEntrance();\n\t}", "public java.lang.Short getSignalingTonePackageId() {\r\n return signalingTonePackageId;\r\n }", "public final SignalConnection getSignalConnection() {\n return signalConnection;\n }", "public com.google.protobuf.ByteString getSig() {\n return sig_;\n }", "double getSignalPeriod();", "public Signal[] getSignals() {\n Signal[] signals = new Signal[getSignalsCount()];\n\n this.signals.toArray(signals);\n\n return signals;\n }", "public String getRemoteRingbackTone();", "public int getNumberOfSignals();", "public com.google.protobuf.ByteString getSig() {\n return sig_;\n }", "public int getVibrationState() {\n return -1;\n }", "public void process(Object signal)\r\n/* 25: */ {\r\n/* 26:23 */ System.out.println(\"Cause observed!\");\r\n/* 27: */ }", "public void setSignal(jigl.signal.Signal sig) throws BadSignalException {\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "@Override\n\tpublic List<Signal> getSignals() {\n\t\treturn null;\n\t}", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "public String getEventName();", "int getEventValue();", "protected String getCallingClassSignature() {\r\n \treturn Watcher.getCallingClassSignature(5) ;\r\n }", "public String getSigRequest() {\n return sigRequest;\r\n }", "public SoundEvent getStepSound() {\n/* 91 */ return this.stepSound;\n/* */ }", "public Integer getJint() {\n return jint;\n }", "@Override\n public Switch lowPressureSwitch() {\n return pcm::getPressureSwitchValue;\n }", "public void warningSound() {\n\t\tSystem.out.println(signal);\n\t}", "public double getSignal(double[] params, DW_Scheme rawScheme, int i) {\r\n\r\n\t\tStejskalTannerScheme scheme;\r\n\r\n\t\ttry {\r\n\t\t\tscheme = (StejskalTannerScheme) rawScheme;\r\n\t\t} catch (ClassCastException cce) {\r\n\t\t\tthrow new LoggedException(\r\n\t\t\t\t\t\"scheme object passed to cylinder compartment is not a StejskalTanner sequence\");\r\n\t\t}\r\n\r\n\t\treturn getSignal(params, scheme, i);\r\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-24 16:07:21.737 -0400\", hash_original_method = \"92AD08E60042E3A3AB4EAFAA413A4446\", hash_generated_method = \"98747B73D26BF7E8C67C5D40BBA28F1C\")\n \npublic static String signalPoll() {\n return doStringCommand(\"SIGNAL_POLL\");\n }", "public String getPushEvent();", "com.google.protobuf.ByteString getSig();", "public Sig getSignature() {\n return this.sig;\n }", "public String getJava() {\n return null; //To change body of implemented methods use File | Settings | File Templates.\n }", "String getMidiTarget();", "public int getSignalStrength() {\n return mSignalStrength;\n }", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public int getTone(){\n\t\tint keyAsTone = (int) (Math.pow(2.0, (((double)key)-49.0)/12)*440);\n\t\treturn keyAsTone;\n\t}", "public static Object eventModemTemperature() {\n\t\treturn null;\n\t}", "public int /* sound_sample */output() {\n\t\treturn Vo;\n\t}", "public io.lightcone.data.types.EdDSASignature getSig() {\n if (sigBuilder_ == null) {\n return sig_ == null ? io.lightcone.data.types.EdDSASignature.getDefaultInstance() : sig_;\n } else {\n return sigBuilder_.getMessage();\n }\n }", "public void CondSignal(){\n trainCond.signal();\r\n }", "public OctetString getMsg1009()\n {\n\treturn this.msg1009;\n }", "public Integer getSigntype() {\n\t\treturn signtype;\n\t}", "String getEventType();", "public java.lang.Integer getMONO() {\n return MONO;\n }", "org.apache.xmlbeans.XmlDouble xgetSignalPeriod();", "public String getJx() {\n return jx;\n }", "public final Celda getSiguiente() {\r\n return siguiente;\r\n }", "public JSimProcess getReceiver();", "public boolean iCurrentInputSourceHasSignal() {\n\t\treturn mTVInputManager.getDefaultOutput().hasSignal();\n\t}", "public void setSignal(java.awt.Image sig) {\n\t\timage = sig;\n\t\tjsignal = null;\n\t}", "java.lang.String getEventType();", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "boolean k2h_set_bumup_debug_signal_user1();", "public String toString()\n\t{\n\t\treturn \"java\";\n\t}", "public int getAudioDscp();", "EventType getEvent();", "public byte[] getJ() {\n return j;\n }", "Event getEvent();", "@Override\r\n\tpublic Sound sound() {\n\t\treturn Sound.CLICK;\r\n\t}", "int getLastVibrationFrequency();", "public String getPress() {\n return press;\n }", "public abstract int pulse();", "private Javier getJavier() {\r\n\t\tif(javier == null) {\r\n\t\t String ttsProvider = \"org.javier.browser.handlers.SAPIOutputHandler\";\r\n\t\t String voiceName = \"\";\r\n\t\t String logFile = \"Javier.log\";\r\n\t\t homeAddress = \"http://localhost/javier/default.vxml\";\r\n\t\t\t\r\n\t\t try {\r\n\t\t\t Properties properties = new Properties();\r\n\t\t\t \r\n\t\t properties.load(new FileInputStream(\"JavierGUI.conf\"));\r\n\t\t ttsProvider = properties.getProperty(\"tts_class\", ttsProvider);\r\n\t\t\t voiceName = properties.getProperty(\"tts_voice\", voiceName);\r\n\t\t \thomeAddress = properties.getProperty(\"home_address\", homeAddress);\r\n\t\t \tlogFile = properties.getProperty(\"log_file\", logFile);\r\n\t\t } catch (IOException e) {\r\n\t\t \t\r\n\t\t }\r\n\t\t\t\r\n\t\t\tjavier = new Javier(this,new MSXMLHTTPNetworkHandler());\r\n\t\t\tjavier.addJavierListener(this);\r\n\t\t\tjavier.addOutputListener(this);\r\n\t\t\tjavier.addOutputListener(new SAPIOutputHandler(voiceName));\r\n\t\t\tjavier.addErrorListener(this);\r\n\t\t\t/*\r\n\t\t\tjavier.addLogListener(new ConsoleLogHandler());\r\n\t\t\t*/\t\r\n\t\t\t/*\r\n\t\t\ttry {\r\n\t\t\t\tjavier.mainLoop(homeAddress);\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\treturn javier;\r\n\t}", "double computeSignal(RadioInfo srcInfo, Location srcLoc, Location dst);", "public boolean hasSignal() {\n return ((bitField0_ & 0x00020000) == 0x00020000);\n }", "public final int mo71885j() {\n Pair pair = this.f152266k;\n if (pair != null) {\n return ((bmhs) pair.second).f129484c;\n }\n return 16;\n }", "public interface VisemeEvent {\n /**\n * Returns the speech Stream identifier.\n * @return speech Stream identifier\n */\n public long getStream();\n /**\n * Returns the current Viseme at the time of the event.\n * @return current Viseme at the time of the event\n */\n public Viseme getCurrentViseme();\n /**\n * Returns the Viseme to transition to.\n * @return Viseme to transition to\n */\n public Viseme getNextViseme();\n /**\n * Returns the number of milliseconds for the transition to the next Viseme.\n * @return number of milliseconds for the transition to the next Viseme\n */\n public int getDuration();\n /**\n * Returns the timestamp of the VisemeEvent.\n * @return timestamp of the VisemeEvent\n */\n public long getTimestampMillisecUTC();\n}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.500 -0400\", hash_original_method = \"31B90A45F9451B6FAB059CF68DCF26BD\", hash_generated_method = \"8CE24A3E847DEC6B396A5F750249816F\")\n \n public static String waitForEvent(){\n \t//Formerly a native method\n \tdouble taintDouble = 0;\n \n \tString retObj = new String(); \n \tretObj.addTaint(taintDouble);\n \treturn retObj;\n }", "public Sign getSign() {\n return sign;\n }", "public static Joystick OP_JOY() {\n\t\treturn operator;\n}", "public static Joystick OP_JOY() {\n\t\treturn operator;\n}", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "public double getJx()\n {\n return m_Jx;\n }" ]
[ "0.75119716", "0.75023705", "0.7401125", "0.72095406", "0.7038541", "0.68577415", "0.66647995", "0.6616708", "0.6445268", "0.62512857", "0.6202227", "0.6183916", "0.6096247", "0.59030616", "0.5887211", "0.58457", "0.58014685", "0.57796997", "0.5777481", "0.5653654", "0.56433094", "0.5633712", "0.56278324", "0.56211317", "0.5587486", "0.55627006", "0.5532657", "0.54819775", "0.5457236", "0.54456496", "0.5440021", "0.5369957", "0.53628296", "0.53295356", "0.5300196", "0.5296625", "0.5293834", "0.5291418", "0.52896893", "0.5252743", "0.5246624", "0.5234276", "0.52168995", "0.5210783", "0.5196139", "0.5165249", "0.51476437", "0.5140831", "0.5140456", "0.5087364", "0.5065396", "0.50397456", "0.50347865", "0.5032333", "0.5010319", "0.5004793", "0.50007135", "0.49994177", "0.49967304", "0.49864402", "0.4945128", "0.49304137", "0.4930185", "0.49281973", "0.4920528", "0.48977548", "0.48876506", "0.48703325", "0.4855177", "0.48497027", "0.4838238", "0.48336026", "0.48315248", "0.4828283", "0.48205283", "0.48204812", "0.48039392", "0.48030546", "0.47971186", "0.47919142", "0.4784823", "0.4782962", "0.4782462", "0.47674415", "0.47637087", "0.47565556", "0.47512656", "0.47415173", "0.47352412", "0.47340214", "0.4727011", "0.47263402", "0.4717332", "0.4715523", "0.47037888", "0.46945596", "0.46925133", "0.46925133", "0.46908793", "0.4687316" ]
0.70699304
4
Returns an instance of Graphics that, when modified, modifies the Java signal
public Graphics setOffScreen() { java.awt.Image tempSignal; Graphics g; tempSignal = image; image = this.createImage(image.getWidth(this), image.getHeight(this)); g = image.getGraphics(); g.drawImage(tempSignal, 0, 0, this); return g; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawOn(Graphics g);", "public Graphics getGraphics()\n\t{\n\t\treturn g;\n\t}", "public Graphics2D createGraphics() {\n\treturn recorder.createGraphics();\n }", "private void doDrawing(Graphics g) {//Void function takes in g from Old graphics class\r\n\r\n Graphics2D g2d = (Graphics2D) g; //Extends the old Graphics class into the newer more advanced\r\n g2d.drawString(\"Hello World!\", 50, 50);//Draws string on the panel with the draw string method\r\n }", "void setGraphicsCreator(Graphics g, Object creator);", "public abstract void selfPaint(Graphics g);", "public Object getGraphicsCreator(Graphics g);", "protected abstract GraphicsWriter newGraphicsWriter();", "public Graphics getGraphics() {\n return graphics_;\n }", "public void paintComponent(Graphics g);", "public GraphicsPainter(Graphics g) {\n\t\tthis._g = g;\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2d = (Graphics2D) g;\n drawAxis(g2d);\n \n drawCurve(g2d);\n \n drawPoints(g2d);\n \n // drawObject(g2d); **\n // El panel, por defecto no es \"focusable\". \n // Hay que incluir estas líneas para que el panel pueda\n // agregarse como KeyListsener.\n this.setFocusable(true);\n this.requestFocusInWindow();\n }", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}", "public interface GraphicsNode\n/* */ {\n/* */ public static final int VISIBLE_PAINTED = 0;\n/* */ public static final int VISIBLE_FILL = 1;\n/* */ public static final int VISIBLE_STROKE = 2;\n/* */ public static final int VISIBLE = 3;\n/* */ public static final int PAINTED = 4;\n/* */ public static final int FILL = 5;\n/* */ public static final int STROKE = 6;\n/* */ public static final int ALL = 7;\n/* */ public static final int NONE = 8;\n/* 102 */ public static final AffineTransform IDENTITY = new AffineTransform();\n/* */ \n/* */ WeakReference getWeakReference();\n/* */ \n/* */ int getPointerEventType();\n/* */ \n/* */ void setPointerEventType(int paramInt);\n/* */ \n/* */ void setTransform(AffineTransform paramAffineTransform);\n/* */ \n/* */ AffineTransform getTransform();\n/* */ \n/* */ AffineTransform getInverseTransform();\n/* */ \n/* */ AffineTransform getGlobalTransform();\n/* */ \n/* */ void setComposite(Composite paramComposite);\n/* */ \n/* */ Composite getComposite();\n/* */ \n/* */ void setVisible(boolean paramBoolean);\n/* */ \n/* */ boolean isVisible();\n/* */ \n/* */ void setClip(ClipRable paramClipRable);\n/* */ \n/* */ ClipRable getClip();\n/* */ \n/* */ void setRenderingHint(RenderingHints.Key paramKey, Object paramObject);\n/* */ \n/* */ void setRenderingHints(Map paramMap);\n/* */ \n/* */ void setRenderingHints(RenderingHints paramRenderingHints);\n/* */ \n/* */ RenderingHints getRenderingHints();\n/* */ \n/* */ void setMask(Mask paramMask);\n/* */ \n/* */ Mask getMask();\n/* */ \n/* */ void setFilter(Filter paramFilter);\n/* */ \n/* */ Filter getFilter();\n/* */ \n/* */ Filter getGraphicsNodeRable(boolean paramBoolean);\n/* */ \n/* */ Filter getEnableBackgroundGraphicsNodeRable(boolean paramBoolean);\n/* */ \n/* */ void paint(Graphics2D paramGraphics2D);\n/* */ \n/* */ void primitivePaint(Graphics2D paramGraphics2D);\n/* */ \n/* */ CompositeGraphicsNode getParent();\n/* */ \n/* */ RootGraphicsNode getRoot();\n/* */ \n/* */ Rectangle2D getBounds();\n/* */ \n/* */ Rectangle2D getTransformedBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getPrimitiveBounds();\n/* */ \n/* */ Rectangle2D getTransformedPrimitiveBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getGeometryBounds();\n/* */ \n/* */ Rectangle2D getTransformedGeometryBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getSensitiveBounds();\n/* */ \n/* */ Rectangle2D getTransformedSensitiveBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ boolean contains(Point2D paramPoint2D);\n/* */ \n/* */ boolean intersects(Rectangle2D paramRectangle2D);\n/* */ \n/* */ GraphicsNode nodeHitAt(Point2D paramPoint2D);\n/* */ \n/* */ Shape getOutline();\n/* */ }", "public void visualChange();", "public void toutDessiner(Graphics g);", "@Override\n public void paintComponent(Graphics g)\n {\n m_g = g;\n // Not sure what our parent is doing, but this seems safe\n super.paintComponent(g);\n // Setup, then blank out with white, so we always start fresh\n g.setColor(Color.white);\n g.setFont(null);\n g.clearRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.fillRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.setColor(Color.red);\n //g.drawRect(10,10,0,0);\n //drawPoint(20,20);\n \n // Call spiffy functions for the training presentation\n m_app.drawOnTheCanvas(new ExposedDrawingCanvas(this));\n m_app.drawOnTheCanvasAdvanced(g);\n \n // ADVANCED EXERCISE: YOU CAN DRAW IN HERE\n \n // END ADVANCED EXERCISE SPACE\n \n // Clear the special reference we made - don't want to abuse this\n m_g = null;\n \n \n // Schedule the next repaint\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n m_app.repaint();\n try\n {\n Thread.sleep(100);\n }\n catch (Exception e)\n { \n \n }\n }\n }); \n }", "@Override\n\tpublic void BuildShape(Graphics g) {\n\t\t\n\t}", "@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }", "public PGraphics pushCopy(PGraphics pg) {\n\t\tPGraphics pgCopy = papplet.createGraphics(pg.width, pg.height);\n\t\tpgCopy.clear();\n\t\tpgCopy.copy(pg, 0, 0, pg.width, pg.height, 0, 0, pg.width, pg.height);\n\t\treturn push(pgCopy);\n\t}", "@Override\n public void paint(Graphics g) {\n }", "@Override\n\tpublic Graphic clone() throws CloneNotSupportedException {\n\t\treturn (Graphic)super.clone();\n\t}", "public void update(Graphics g){\n paint (g);\r\n \r\n }", "public void paintComponent(Graphics g)\r\n\t{\n\t}", "protected void paintComponent(Graphics g)\n\t{\n\t}", "public void paint(Graphics g){\n\t\t\n\t}", "public Graphics2D getGraphics()\n \t{\n \t\tif(g2==null)\n \t\t{\n \t\t\tg2=getImage().createGraphics();\n \t\t\tboolean bAntiAlias;\n \t\t\ttry\n \t\t\t{\n \t\t\t\tbAntiAlias=getBoolean(\"antialias\");\n \t\t\t}\n \t\t\tcatch(OmDeveloperException e)\n \t\t\t{\n \t\t\t\tthrow new OmUnexpectedException(e);\n \t\t\t}\n \t\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n \t\t\t\tbAntiAlias ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);\n \t\t\tg2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n \t\t\t\tbAntiAlias ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);\n \n \t\t\tdouble dZoom=getQuestion().getZoom();\n \t\t\tif(dZoom!=1.0) g2.scale(dZoom,dZoom);\n \t\t}\n \t\treturn g2;\n \t}", "@Override\n public void onPaint(Graphics2D g) {\n\n }", "public void draw(Graphics g){\n\t}", "@Override\n\tpublic void render(Graphics g)\n\t{\n\t}", "public void polygone (Graphics g){\n\t}", "public void draw(Graphics g);", "public void draw(Graphics g);", "@Override\n public void update(Graphics g) {\n paint(g);\n }", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "public SimpleGraphics( Graphics2D graphics ) {\n\t\tthis.graphics = graphics;\n\t\tscale = 1.0;\n\t\treloadRenderingSettings();\n\t}", "public Graphics create()\r\n\t{\r\n\t\t// System.out.println(\"create\");\r\n\t\treturn null;\r\n\t}", "public void update(Graphics param1Graphics) {\n/* 252 */ paint(param1Graphics);\n/* */ }", "public VectorGraphics2D createGraphics() {\n\t\treturn new VectorGraphics2D(new Graphics2DContext(), operations);\n\t}", "void paintComponent(Graphics g);", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "public abstract void draw(Graphics g);", "public abstract void draw(Graphics g);", "public abstract void draw(Graphics g);", "public abstract void draw(Graphics g);", "public void paint(Graphics g) {\n }", "public void paint(Graphics g) {\n }", "public Graphics getGraphics() {\r\n\t\treturn this.graphics;\r\n\t}", "public void paint(Graphics g) {\n\t\t\n\t}", "public void update(Graphics g, JComponent c)\n/* */ {\n/* 304 */ super.update(g, c);\n/* */ }", "public void paint (Graphics g)\r\n {\n }", "public void draw(Graphics g) {\n\t\t\n\t}", "public void repaint(Graphic graphic, Rectangle2D objectiveArea, Rectangle displayArea) {\n }", "private void paintPainter(Graphics g)\n/* */ {\n/* 165 */ if (this.painter == null) { return;\n/* */ }\n/* */ \n/* */ \n/* 169 */ Graphics2D scratch = (Graphics2D)g.create();\n/* */ try {\n/* 171 */ this.painter.paint(scratch, this, getWidth(), getHeight());\n/* */ }\n/* */ finally {\n/* 174 */ scratch.dispose();\n/* */ }\n/* */ }", "@Override\n\tprotected void repaintView(ViewGraphics g) {\n\t}", "public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg2 = (Graphics2D) g;\n\t\tdibujar(g);\n\t\tactualizar();\n\t}", "public abstract void paint(Graphics g);", "public void restoreGraphics() {\n\n if ( g2 instanceof AimxcelGraphics2D ) {\n AimxcelGraphics2D aimxcelGraphics2D = (AimxcelGraphics2D) g2;\n aimxcelGraphics2D.popState();\n }\n else {\n if ( g2.getRenderingHints() != renderingHints ) {\n g2.setRenderingHints( renderingHints );\n }\n if ( g2.getPaint() != paint ) {\n g2.setPaint( paint );\n }\n if ( g2.getColor() != color ) {\n g2.setColor( color );\n }\n if ( g2.getStroke() != stroke ) {\n g2.setStroke( stroke );\n }\n if ( g2.getComposite() != composite ) {\n g2.setComposite( composite );\n }\n if ( g2.getTransform() != transform ) {\n g2.setTransform( transform );\n }\n if ( g2.getFont() != font ) {\n g2.setFont( font );\n }\n if ( g2.getClip() != clip ) {\n g2.setClip( clip );\n }\n if ( g2.getBackground() != background ) {\n g2.setBackground( background );\n }\n }\n }", "public void paint(Graphics g)\n/* */ {\n/* 100 */ Graphics2D g2d = (Graphics2D)g.create();\n/* */ try\n/* */ {\n/* 103 */ this.painter.paint(g2d, this.c, this.c.getWidth(), this.c.getHeight());\n/* */ } finally {\n/* 105 */ g2d.dispose();\n/* */ }\n/* */ }", "public void update(Graphics g){\n paint(g);\n }", "@Override //paint component is overridden to allow super.paintCompnent to be called\r\n public void paintComponent(Graphics g) {\n \tsuper.paintComponent(g); //The super.paintComponent() method calls the method of the parent class, prepare a component for drawing\r\n doDrawing(g); //The drawing is delegated inside the doDrawing() method\r\n }", "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "protected void paintComponentWithPainter(Graphics2D g)\n/* */ {\n/* 200 */ if (this.ui != null)\n/* */ {\n/* */ \n/* */ \n/* 204 */ Graphics2D scratchGraphics = (Graphics2D)g.create();\n/* */ try {\n/* 206 */ scratchGraphics.setColor(getBackground());\n/* 207 */ scratchGraphics.fillRect(0, 0, getWidth(), getHeight());\n/* 208 */ paintPainter(g);\n/* 209 */ this.ui.paint(scratchGraphics, this);\n/* */ }\n/* */ finally {\n/* 212 */ scratchGraphics.dispose();\n/* */ }\n/* */ }\n/* */ }", "public java.awt.Image getJavaSignal() {\n\t\treturn image;\n\t}", "public PGraphics copy() {\n\t\tPGraphics pgCopy = papplet\n\t\t\t\t.createGraphics(papplet.width, papplet.height);\n\t\tpgCopy.clear();\n\t\tpgCopy.copy(papplet.g, 0, 0, papplet.g.width, papplet.g.height, 0, 0,\n\t\t\t\tpapplet.g.width, papplet.g.height);\n\t\treturn pgCopy;\n\t}", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public void paintComponent(Graphics g)\r\n\t{\r\n\t\t//Sets the size and locations.\r\n\t\tsuper.paintComponent(g);\r\n\t\tsetSize(205,95);\r\n\t\tsetLocation(445,380);\r\n\r\n\t\t//Draws the outer rectangle of the slider.\r\n\t\tg.setColor(Color.black);\r\n\t\tg.drawRect(0, 20, 200, 30);\r\n\r\n\t\t//Draws the button that is moved when controlling the system.\r\n\t\tg.fillRect(border, 22, 25, 25);\r\n\t\tg.setColor(Color.red);\r\n\r\n\t\t//Sets the middle line, indicating the current value.\r\n\t\tg.drawLine((int)getCurrentValue(), 22, (int)getCurrentValue(), 46);\r\n\r\n\t\t//Markers for the inside of the Controller\r\n\t\tg.setColor(Color.GRAY);\r\n\t\tg.drawLine(100, 25, 100, 50); //Med\r\n\r\n\t\tfor (int i = 0; i<20; i++)\r\n\t\t\tg.drawLine(14+i*9, 28, 14+i*9, 42);\r\n\r\n\t\t//Draws the OFF, MED and MAX markers for the controller.\r\n\t\tg.setColor(Color.black);\r\n\t\tg.drawString(\"O\", 10, 65);\r\n\t\tg.drawString(\"F\", 10, 78);\r\n\t\tg.drawString(\"F\", 10, 91);\r\n\t\tg.drawString(\"M\", 96, 65);\r\n\t\tg.drawString(\"E\", 96, 78);\r\n\t\tg.drawString(\"D\", 96, 91);\r\n\t\tg.drawString(\"M\", 181, 65);\r\n\t\tg.drawString(\"A\", 181, 78);\r\n\t\tg.drawString(\"X\", 181, 91);\r\n\r\n\t\tg.drawString(\"System Controller\", 50, 15);\r\n\r\n\t}", "public void draw(Graphics g) {\r\n\t\t\r\n\t}", "public void draw(Graphics g) {\n\t\t\r\n\t}", "@Override\n\tpublic void draw(Graphics2D g) {\n\t\t\n\t}", "public void repaint() {}", "abstract public void draw(Graphics g);", "public void draw(Graphics graphics);", "final void drawobj(java.awt.Graphics g) {\n\t\tdraw(g, Engine.scaleX(x), Engine.scaleY(y));\n\t}", "public void paintComponent(Graphics myGraphic) \n\t{\n\t\tsuper.paintComponent(myGraphic);\t\n\t}", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n draw(g);\n }", "public void repaint();", "public abstract void render(Graphics g);", "public void draw(Graphics window);", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void requestRepaint() {\n }", "public void paint(Graphics g) {\n super.paint(g);\n update(g);\n }", "public Graphics getCurrentGraphics() {\r\n return currentGraphics;\r\n }", "public void paint(Graphics g) {\n\tupdate(g);\n }", "@Override\r\n\tprotected void draw(PGraphics pg) {\r\n\t\tif(font == null) {\r\n\t\t\tfont = rootContainer.getPApplet().createFont(\"Arial\", ((int)this.height * 0.8F));\r\n\t\t}\r\n\t\tpg.stroke(0);\r\n\t\tpg.strokeWeight(3);\r\n\t\tpg.noFill();\r\n\t\tif(activated == false) {\r\n\t\t}else {\r\n\t\t\tpg.line(x, y, x+height, y+height);\r\n\t\t\tpg.line(x+height, y, x, y+height);\r\n\t\t}\r\n\t\tpg.rect(x, y, height, height);\r\n\t\tpg.textAlign(PApplet.LEFT, PApplet.CENTER);\r\n\t\tpg.textFont(font);\r\n\t\tpg.fill(this.textColor.red, textColor.green, textColor.blue, textColor.alpha);\r\n\t\tpg.text(this.text, x+height+(height/2), y-3, width-height, height);\r\n\t}", "public void paint(Graphics g)\r\n {\r\n // place content of current note in the text area\r\n text.setText(snp.getNote());\r\n }", "public void render(Graphics g) {\n\t}", "@Override\n\tpublic Graphics getGraphics() {\n\t\treturn null;\n\t}", "public Graphic getGraphic(){\r\n\t\treturn this.graphic;\r\n\t}", "protected abstract void render(Graphics g);", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public GraphicsNode getGraphicsNode() {\n/* 87 */ return this.node;\n/* */ }", "@Override\n\tpublic void draw(Graphics g, JPanel panel) {\n\t\t\n\t}", "public void paint (Graphics g){\n \r\n }", "public void paint(Graphics g) {\n super.paint(g);\n\n }" ]
[ "0.608085", "0.6044968", "0.59459364", "0.5934204", "0.5930969", "0.58749956", "0.58290565", "0.580177", "0.578292", "0.57730746", "0.5766495", "0.5754581", "0.57305694", "0.57305694", "0.5729031", "0.5721121", "0.571961", "0.57030946", "0.5698589", "0.5691786", "0.5688943", "0.5654217", "0.5643141", "0.5637745", "0.56305915", "0.5629824", "0.562829", "0.5623572", "0.5619867", "0.5600617", "0.559847", "0.5577959", "0.55764484", "0.55758035", "0.5574881", "0.5574881", "0.55725116", "0.55718386", "0.55718386", "0.5568881", "0.5565663", "0.55546236", "0.55480117", "0.55474573", "0.55455315", "0.55271596", "0.55271596", "0.55271596", "0.55271596", "0.55258024", "0.55258024", "0.5522377", "0.5512691", "0.5503242", "0.54958886", "0.54917526", "0.5490558", "0.5484661", "0.54745847", "0.5470991", "0.54637265", "0.54508805", "0.5449806", "0.54495054", "0.54454994", "0.5445219", "0.5433695", "0.5424557", "0.54240835", "0.54181486", "0.5417656", "0.5417571", "0.5414914", "0.5399953", "0.5397956", "0.53915405", "0.5388938", "0.53823364", "0.5369508", "0.53694934", "0.535842", "0.53521013", "0.5348498", "0.5344392", "0.5344392", "0.5341581", "0.5334226", "0.5333755", "0.533246", "0.5332448", "0.5322731", "0.5322547", "0.5319714", "0.5318601", "0.53180623", "0.5316047", "0.5311791", "0.53077143", "0.52919257", "0.5288904" ]
0.5499092
54
Returns an instance of Graphics that, when modified, modifies the Java signal
public Graphics setOffScreen(double xfactor, double yfactor) { java.awt.Image tempSignal; Graphics g; tempSignal = image; image = this.createImage((int) (image.getWidth(this) * xfactor), (int) (image .getHeight(this) * yfactor)); g = image.getGraphics(); g.drawImage(tempSignal, 0, 00, (int) (tempSignal.getWidth(this) * xfactor), (int) (tempSignal.getHeight(this) * yfactor), this); return g; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawOn(Graphics g);", "public Graphics getGraphics()\n\t{\n\t\treturn g;\n\t}", "public Graphics2D createGraphics() {\n\treturn recorder.createGraphics();\n }", "private void doDrawing(Graphics g) {//Void function takes in g from Old graphics class\r\n\r\n Graphics2D g2d = (Graphics2D) g; //Extends the old Graphics class into the newer more advanced\r\n g2d.drawString(\"Hello World!\", 50, 50);//Draws string on the panel with the draw string method\r\n }", "void setGraphicsCreator(Graphics g, Object creator);", "public abstract void selfPaint(Graphics g);", "public Object getGraphicsCreator(Graphics g);", "protected abstract GraphicsWriter newGraphicsWriter();", "public Graphics getGraphics() {\n return graphics_;\n }", "public void paintComponent(Graphics g);", "public GraphicsPainter(Graphics g) {\n\t\tthis._g = g;\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2d = (Graphics2D) g;\n drawAxis(g2d);\n \n drawCurve(g2d);\n \n drawPoints(g2d);\n \n // drawObject(g2d); **\n // El panel, por defecto no es \"focusable\". \n // Hay que incluir estas líneas para que el panel pueda\n // agregarse como KeyListsener.\n this.setFocusable(true);\n this.requestFocusInWindow();\n }", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}", "public interface GraphicsNode\n/* */ {\n/* */ public static final int VISIBLE_PAINTED = 0;\n/* */ public static final int VISIBLE_FILL = 1;\n/* */ public static final int VISIBLE_STROKE = 2;\n/* */ public static final int VISIBLE = 3;\n/* */ public static final int PAINTED = 4;\n/* */ public static final int FILL = 5;\n/* */ public static final int STROKE = 6;\n/* */ public static final int ALL = 7;\n/* */ public static final int NONE = 8;\n/* 102 */ public static final AffineTransform IDENTITY = new AffineTransform();\n/* */ \n/* */ WeakReference getWeakReference();\n/* */ \n/* */ int getPointerEventType();\n/* */ \n/* */ void setPointerEventType(int paramInt);\n/* */ \n/* */ void setTransform(AffineTransform paramAffineTransform);\n/* */ \n/* */ AffineTransform getTransform();\n/* */ \n/* */ AffineTransform getInverseTransform();\n/* */ \n/* */ AffineTransform getGlobalTransform();\n/* */ \n/* */ void setComposite(Composite paramComposite);\n/* */ \n/* */ Composite getComposite();\n/* */ \n/* */ void setVisible(boolean paramBoolean);\n/* */ \n/* */ boolean isVisible();\n/* */ \n/* */ void setClip(ClipRable paramClipRable);\n/* */ \n/* */ ClipRable getClip();\n/* */ \n/* */ void setRenderingHint(RenderingHints.Key paramKey, Object paramObject);\n/* */ \n/* */ void setRenderingHints(Map paramMap);\n/* */ \n/* */ void setRenderingHints(RenderingHints paramRenderingHints);\n/* */ \n/* */ RenderingHints getRenderingHints();\n/* */ \n/* */ void setMask(Mask paramMask);\n/* */ \n/* */ Mask getMask();\n/* */ \n/* */ void setFilter(Filter paramFilter);\n/* */ \n/* */ Filter getFilter();\n/* */ \n/* */ Filter getGraphicsNodeRable(boolean paramBoolean);\n/* */ \n/* */ Filter getEnableBackgroundGraphicsNodeRable(boolean paramBoolean);\n/* */ \n/* */ void paint(Graphics2D paramGraphics2D);\n/* */ \n/* */ void primitivePaint(Graphics2D paramGraphics2D);\n/* */ \n/* */ CompositeGraphicsNode getParent();\n/* */ \n/* */ RootGraphicsNode getRoot();\n/* */ \n/* */ Rectangle2D getBounds();\n/* */ \n/* */ Rectangle2D getTransformedBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getPrimitiveBounds();\n/* */ \n/* */ Rectangle2D getTransformedPrimitiveBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getGeometryBounds();\n/* */ \n/* */ Rectangle2D getTransformedGeometryBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getSensitiveBounds();\n/* */ \n/* */ Rectangle2D getTransformedSensitiveBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ boolean contains(Point2D paramPoint2D);\n/* */ \n/* */ boolean intersects(Rectangle2D paramRectangle2D);\n/* */ \n/* */ GraphicsNode nodeHitAt(Point2D paramPoint2D);\n/* */ \n/* */ Shape getOutline();\n/* */ }", "public void visualChange();", "public void toutDessiner(Graphics g);", "@Override\n public void paintComponent(Graphics g)\n {\n m_g = g;\n // Not sure what our parent is doing, but this seems safe\n super.paintComponent(g);\n // Setup, then blank out with white, so we always start fresh\n g.setColor(Color.white);\n g.setFont(null);\n g.clearRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.fillRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.setColor(Color.red);\n //g.drawRect(10,10,0,0);\n //drawPoint(20,20);\n \n // Call spiffy functions for the training presentation\n m_app.drawOnTheCanvas(new ExposedDrawingCanvas(this));\n m_app.drawOnTheCanvasAdvanced(g);\n \n // ADVANCED EXERCISE: YOU CAN DRAW IN HERE\n \n // END ADVANCED EXERCISE SPACE\n \n // Clear the special reference we made - don't want to abuse this\n m_g = null;\n \n \n // Schedule the next repaint\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n m_app.repaint();\n try\n {\n Thread.sleep(100);\n }\n catch (Exception e)\n { \n \n }\n }\n }); \n }", "@Override\n\tpublic void BuildShape(Graphics g) {\n\t\t\n\t}", "@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }", "public PGraphics pushCopy(PGraphics pg) {\n\t\tPGraphics pgCopy = papplet.createGraphics(pg.width, pg.height);\n\t\tpgCopy.clear();\n\t\tpgCopy.copy(pg, 0, 0, pg.width, pg.height, 0, 0, pg.width, pg.height);\n\t\treturn push(pgCopy);\n\t}", "@Override\n public void paint(Graphics g) {\n }", "@Override\n\tpublic Graphic clone() throws CloneNotSupportedException {\n\t\treturn (Graphic)super.clone();\n\t}", "public void update(Graphics g){\n paint (g);\r\n \r\n }", "public void paintComponent(Graphics g)\r\n\t{\n\t}", "protected void paintComponent(Graphics g)\n\t{\n\t}", "public void paint(Graphics g){\n\t\t\n\t}", "public Graphics2D getGraphics()\n \t{\n \t\tif(g2==null)\n \t\t{\n \t\t\tg2=getImage().createGraphics();\n \t\t\tboolean bAntiAlias;\n \t\t\ttry\n \t\t\t{\n \t\t\t\tbAntiAlias=getBoolean(\"antialias\");\n \t\t\t}\n \t\t\tcatch(OmDeveloperException e)\n \t\t\t{\n \t\t\t\tthrow new OmUnexpectedException(e);\n \t\t\t}\n \t\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n \t\t\t\tbAntiAlias ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);\n \t\t\tg2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n \t\t\t\tbAntiAlias ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);\n \n \t\t\tdouble dZoom=getQuestion().getZoom();\n \t\t\tif(dZoom!=1.0) g2.scale(dZoom,dZoom);\n \t\t}\n \t\treturn g2;\n \t}", "@Override\n public void onPaint(Graphics2D g) {\n\n }", "public void draw(Graphics g){\n\t}", "@Override\n\tpublic void render(Graphics g)\n\t{\n\t}", "public void polygone (Graphics g){\n\t}", "public void draw(Graphics g);", "public void draw(Graphics g);", "@Override\n public void update(Graphics g) {\n paint(g);\n }", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "public SimpleGraphics( Graphics2D graphics ) {\n\t\tthis.graphics = graphics;\n\t\tscale = 1.0;\n\t\treloadRenderingSettings();\n\t}", "public Graphics create()\r\n\t{\r\n\t\t// System.out.println(\"create\");\r\n\t\treturn null;\r\n\t}", "public void update(Graphics param1Graphics) {\n/* 252 */ paint(param1Graphics);\n/* */ }", "public VectorGraphics2D createGraphics() {\n\t\treturn new VectorGraphics2D(new Graphics2DContext(), operations);\n\t}", "void paintComponent(Graphics g);", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "public abstract void draw(Graphics g);", "public abstract void draw(Graphics g);", "public abstract void draw(Graphics g);", "public abstract void draw(Graphics g);", "public void paint(Graphics g) {\n }", "public void paint(Graphics g) {\n }", "public Graphics getGraphics() {\r\n\t\treturn this.graphics;\r\n\t}", "public void paint(Graphics g) {\n\t\t\n\t}", "public void update(Graphics g, JComponent c)\n/* */ {\n/* 304 */ super.update(g, c);\n/* */ }", "public Graphics setOffScreen() {\n\t\tjava.awt.Image tempSignal;\n\t\tGraphics g;\n\n\t\ttempSignal = image;\n\t\timage = this.createImage(image.getWidth(this), image.getHeight(this));\n\t\tg = image.getGraphics();\n\t\tg.drawImage(tempSignal, 0, 0, this);\n\n\t\treturn g;\n\n\t}", "public void paint (Graphics g)\r\n {\n }", "public void draw(Graphics g) {\n\t\t\n\t}", "public void repaint(Graphic graphic, Rectangle2D objectiveArea, Rectangle displayArea) {\n }", "private void paintPainter(Graphics g)\n/* */ {\n/* 165 */ if (this.painter == null) { return;\n/* */ }\n/* */ \n/* */ \n/* 169 */ Graphics2D scratch = (Graphics2D)g.create();\n/* */ try {\n/* 171 */ this.painter.paint(scratch, this, getWidth(), getHeight());\n/* */ }\n/* */ finally {\n/* 174 */ scratch.dispose();\n/* */ }\n/* */ }", "@Override\n\tprotected void repaintView(ViewGraphics g) {\n\t}", "public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg2 = (Graphics2D) g;\n\t\tdibujar(g);\n\t\tactualizar();\n\t}", "public abstract void paint(Graphics g);", "public void restoreGraphics() {\n\n if ( g2 instanceof AimxcelGraphics2D ) {\n AimxcelGraphics2D aimxcelGraphics2D = (AimxcelGraphics2D) g2;\n aimxcelGraphics2D.popState();\n }\n else {\n if ( g2.getRenderingHints() != renderingHints ) {\n g2.setRenderingHints( renderingHints );\n }\n if ( g2.getPaint() != paint ) {\n g2.setPaint( paint );\n }\n if ( g2.getColor() != color ) {\n g2.setColor( color );\n }\n if ( g2.getStroke() != stroke ) {\n g2.setStroke( stroke );\n }\n if ( g2.getComposite() != composite ) {\n g2.setComposite( composite );\n }\n if ( g2.getTransform() != transform ) {\n g2.setTransform( transform );\n }\n if ( g2.getFont() != font ) {\n g2.setFont( font );\n }\n if ( g2.getClip() != clip ) {\n g2.setClip( clip );\n }\n if ( g2.getBackground() != background ) {\n g2.setBackground( background );\n }\n }\n }", "public void paint(Graphics g)\n/* */ {\n/* 100 */ Graphics2D g2d = (Graphics2D)g.create();\n/* */ try\n/* */ {\n/* 103 */ this.painter.paint(g2d, this.c, this.c.getWidth(), this.c.getHeight());\n/* */ } finally {\n/* 105 */ g2d.dispose();\n/* */ }\n/* */ }", "public void update(Graphics g){\n paint(g);\n }", "@Override //paint component is overridden to allow super.paintCompnent to be called\r\n public void paintComponent(Graphics g) {\n \tsuper.paintComponent(g); //The super.paintComponent() method calls the method of the parent class, prepare a component for drawing\r\n doDrawing(g); //The drawing is delegated inside the doDrawing() method\r\n }", "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "protected void paintComponentWithPainter(Graphics2D g)\n/* */ {\n/* 200 */ if (this.ui != null)\n/* */ {\n/* */ \n/* */ \n/* 204 */ Graphics2D scratchGraphics = (Graphics2D)g.create();\n/* */ try {\n/* 206 */ scratchGraphics.setColor(getBackground());\n/* 207 */ scratchGraphics.fillRect(0, 0, getWidth(), getHeight());\n/* 208 */ paintPainter(g);\n/* 209 */ this.ui.paint(scratchGraphics, this);\n/* */ }\n/* */ finally {\n/* 212 */ scratchGraphics.dispose();\n/* */ }\n/* */ }\n/* */ }", "public java.awt.Image getJavaSignal() {\n\t\treturn image;\n\t}", "public PGraphics copy() {\n\t\tPGraphics pgCopy = papplet\n\t\t\t\t.createGraphics(papplet.width, papplet.height);\n\t\tpgCopy.clear();\n\t\tpgCopy.copy(papplet.g, 0, 0, papplet.g.width, papplet.g.height, 0, 0,\n\t\t\t\tpapplet.g.width, papplet.g.height);\n\t\treturn pgCopy;\n\t}", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public void paintComponent(Graphics g)\r\n\t{\r\n\t\t//Sets the size and locations.\r\n\t\tsuper.paintComponent(g);\r\n\t\tsetSize(205,95);\r\n\t\tsetLocation(445,380);\r\n\r\n\t\t//Draws the outer rectangle of the slider.\r\n\t\tg.setColor(Color.black);\r\n\t\tg.drawRect(0, 20, 200, 30);\r\n\r\n\t\t//Draws the button that is moved when controlling the system.\r\n\t\tg.fillRect(border, 22, 25, 25);\r\n\t\tg.setColor(Color.red);\r\n\r\n\t\t//Sets the middle line, indicating the current value.\r\n\t\tg.drawLine((int)getCurrentValue(), 22, (int)getCurrentValue(), 46);\r\n\r\n\t\t//Markers for the inside of the Controller\r\n\t\tg.setColor(Color.GRAY);\r\n\t\tg.drawLine(100, 25, 100, 50); //Med\r\n\r\n\t\tfor (int i = 0; i<20; i++)\r\n\t\t\tg.drawLine(14+i*9, 28, 14+i*9, 42);\r\n\r\n\t\t//Draws the OFF, MED and MAX markers for the controller.\r\n\t\tg.setColor(Color.black);\r\n\t\tg.drawString(\"O\", 10, 65);\r\n\t\tg.drawString(\"F\", 10, 78);\r\n\t\tg.drawString(\"F\", 10, 91);\r\n\t\tg.drawString(\"M\", 96, 65);\r\n\t\tg.drawString(\"E\", 96, 78);\r\n\t\tg.drawString(\"D\", 96, 91);\r\n\t\tg.drawString(\"M\", 181, 65);\r\n\t\tg.drawString(\"A\", 181, 78);\r\n\t\tg.drawString(\"X\", 181, 91);\r\n\r\n\t\tg.drawString(\"System Controller\", 50, 15);\r\n\r\n\t}", "public void draw(Graphics g) {\r\n\t\t\r\n\t}", "public void draw(Graphics g) {\n\t\t\r\n\t}", "@Override\n\tpublic void draw(Graphics2D g) {\n\t\t\n\t}", "public void repaint() {}", "abstract public void draw(Graphics g);", "public void draw(Graphics graphics);", "final void drawobj(java.awt.Graphics g) {\n\t\tdraw(g, Engine.scaleX(x), Engine.scaleY(y));\n\t}", "public void paintComponent(Graphics myGraphic) \n\t{\n\t\tsuper.paintComponent(myGraphic);\t\n\t}", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n draw(g);\n }", "public void repaint();", "public abstract void render(Graphics g);", "public void draw(Graphics window);", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void requestRepaint() {\n }", "public void paint(Graphics g) {\n super.paint(g);\n update(g);\n }", "public Graphics getCurrentGraphics() {\r\n return currentGraphics;\r\n }", "public void paint(Graphics g) {\n\tupdate(g);\n }", "@Override\r\n\tprotected void draw(PGraphics pg) {\r\n\t\tif(font == null) {\r\n\t\t\tfont = rootContainer.getPApplet().createFont(\"Arial\", ((int)this.height * 0.8F));\r\n\t\t}\r\n\t\tpg.stroke(0);\r\n\t\tpg.strokeWeight(3);\r\n\t\tpg.noFill();\r\n\t\tif(activated == false) {\r\n\t\t}else {\r\n\t\t\tpg.line(x, y, x+height, y+height);\r\n\t\t\tpg.line(x+height, y, x, y+height);\r\n\t\t}\r\n\t\tpg.rect(x, y, height, height);\r\n\t\tpg.textAlign(PApplet.LEFT, PApplet.CENTER);\r\n\t\tpg.textFont(font);\r\n\t\tpg.fill(this.textColor.red, textColor.green, textColor.blue, textColor.alpha);\r\n\t\tpg.text(this.text, x+height+(height/2), y-3, width-height, height);\r\n\t}", "public void paint(Graphics g)\r\n {\r\n // place content of current note in the text area\r\n text.setText(snp.getNote());\r\n }", "public void render(Graphics g) {\n\t}", "@Override\n\tpublic Graphics getGraphics() {\n\t\treturn null;\n\t}", "public Graphic getGraphic(){\r\n\t\treturn this.graphic;\r\n\t}", "protected abstract void render(Graphics g);", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public GraphicsNode getGraphicsNode() {\n/* 87 */ return this.node;\n/* */ }", "@Override\n\tpublic void draw(Graphics g, JPanel panel) {\n\t\t\n\t}", "public void paint (Graphics g){\n \r\n }", "public void paint(Graphics g) {\n super.paint(g);\n\n }" ]
[ "0.608085", "0.6044968", "0.59459364", "0.5934204", "0.5930969", "0.58749956", "0.58290565", "0.580177", "0.578292", "0.57730746", "0.5766495", "0.5754581", "0.57305694", "0.57305694", "0.5729031", "0.5721121", "0.571961", "0.57030946", "0.5698589", "0.5691786", "0.5688943", "0.5654217", "0.5643141", "0.5637745", "0.56305915", "0.5629824", "0.562829", "0.5623572", "0.5619867", "0.5600617", "0.559847", "0.5577959", "0.55764484", "0.55758035", "0.5574881", "0.5574881", "0.55725116", "0.55718386", "0.55718386", "0.5568881", "0.5565663", "0.55546236", "0.55480117", "0.55474573", "0.55455315", "0.55271596", "0.55271596", "0.55271596", "0.55271596", "0.55258024", "0.55258024", "0.5522377", "0.5512691", "0.5503242", "0.5499092", "0.54958886", "0.54917526", "0.5490558", "0.5484661", "0.54745847", "0.5470991", "0.54637265", "0.54508805", "0.5449806", "0.54495054", "0.54454994", "0.5445219", "0.5433695", "0.5424557", "0.54240835", "0.54181486", "0.5417656", "0.5417571", "0.5414914", "0.5399953", "0.5397956", "0.53915405", "0.5388938", "0.53823364", "0.5369508", "0.53694934", "0.535842", "0.53521013", "0.5348498", "0.5344392", "0.5344392", "0.5341581", "0.5334226", "0.5333755", "0.533246", "0.5332448", "0.5322731", "0.5322547", "0.5319714", "0.5318601", "0.53180623", "0.5316047", "0.5311791", "0.53077143", "0.52919257", "0.5288904" ]
0.0
-1
Returns the signal width.
public int imWidth() { return image.getWidth(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SVGLength getWidth() {\n return width;\n }", "public double getBandWidth() {\n\t\treturn bw * _mySampleRate;\n\t}", "public double getWidth() {\n\t\t\treturn width.get();\n\t\t}", "public double getWidth()\r\n {\r\n return width;\r\n }", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\r\n\t\treturn width;\r\n\t}", "public double getWidth() {\n\t\tdouble width = Math.round(sideLength + (2 * sideLength * \n\t\t\t\tMath.sin(Math.PI / 4)));\n\t\treturn width;\n\t}", "final public double getWidth()\n\t{\n\t\treturn width;\n\t}", "public double getWidth();", "public double getWidth();", "public double getWidth() {\r\n return width;\r\n }", "public double getWidth()\n {\n return width;\n }", "public double getWidth () {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\r\n\r\n\t\treturn w;\r\n\r\n\t}", "public Integer getWidth() {\n\t\t\treturn width;\n\t\t}", "private double getWidth() {\n\t\treturn width;\n\t}", "public byte getWidth();", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public float getWidth() {\r\n\t\treturn width;\r\n\t}", "@Override\n\tpublic int getWidth() {\n\t\treturn POWER_STATION_WIDTH;\n\t}", "public float getWidth() {\n\t\treturn width;\n\t}", "public float getWidth();", "public double getWidth() {\n\treturn width;\n }", "public float getWidth() {\n return width;\n }", "public Integer getWidth()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.width, null);\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }", "public Number getWidth() {\n\t\treturn getAttribute(WIDTH_TAG);\n\t}", "public int getWidth() {\n return width_;\n }", "double getWidth();", "double getWidth();", "public short getWidth() {\n\n\t\treturn getShort(ADACDictionary.X_DIMENSIONS);\n\t}", "public double[] getWidth() { return this.width; }", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth() {\n return (int) Math.round(width);\n }", "public int getWidth()\n\t{\n\t\treturn this._width;\n\t}", "public int getWidth() \n\t{\n\t\treturn width;\n\t}", "public Integer getWidth() {\n return this.width;\n }", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "Length getWidth();", "public int getWidth() {\r\n\t\t\r\n\t\treturn width;\r\n\t}", "public float getWidth(){\n\t\treturn this.arm.width();\n\t}", "public int getWidth() {\n return type.getWidth();\n }", "public int getWidthNumOfBytes() {\n return widthNumOfBytes;\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public int getWidth(){\n\t\treturn width;\n\t}", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\n\t\treturn this.f1[0].length;\n\t}", "public float getWidth() {\n return this.width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public final int getWidth(){\n return width_;\n }", "public int getWidth() {\n\t\t\treturn width;\n\t\t}", "public int getWidth() {\r\n return width;\r\n }", "public double width() { return _width; }", "public String getWidth() {\n return width;\n }", "public int getWidth()\r\n {\r\n\tif (hue != null && saturation != null && intensity != null)\r\n\t return hue[0].length;\r\n\telse\r\n\t return -1;\r\n }", "public double getWidth()\r\n {\r\n return this.widthCapacity;\r\n }", "int getTickWidth();", "public final int getWidth() {\r\n return width;\r\n }", "public int getWidth()\n {\n return this.width;\n }", "public int getWidth()\n {\n\treturn width;\n }", "public int getWidth() {\n\t\treturn this.width;\n\t}", "public int getWidth() {\n\t\treturn this.width;\n\t}", "public int getWidth()\n {\n return width;\n }" ]
[ "0.72678244", "0.72067946", "0.7104305", "0.70893806", "0.70602703", "0.70602703", "0.70602703", "0.705492", "0.70259553", "0.7016144", "0.70130754", "0.70130754", "0.7007495", "0.7005328", "0.69977075", "0.6976062", "0.6976062", "0.6976062", "0.69513476", "0.6936312", "0.69241405", "0.6917237", "0.6912372", "0.68988705", "0.6896949", "0.6895471", "0.68935716", "0.68877524", "0.6850423", "0.6832848", "0.6820516", "0.6820516", "0.68036765", "0.6800199", "0.67991436", "0.67991436", "0.6798772", "0.6766166", "0.6759724", "0.6759724", "0.6756723", "0.67498314", "0.6749328", "0.67480415", "0.6737034", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6736446", "0.6732844", "0.67320454", "0.6731957", "0.67288274", "0.67242336", "0.6723426", "0.67199206", "0.67189324", "0.67082286", "0.6705489", "0.6705489", "0.6698102", "0.66942585", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.66797286", "0.6675206", "0.6675206", "0.6675206", "0.6674407", "0.66741556", "0.6668889", "0.66589534", "0.66480654", "0.6644781", "0.664349", "0.6626672", "0.6625152", "0.66249114", "0.6624358", "0.6622354", "0.6622354", "0.66194725" ]
0.0
-1
Return the signal height.
public int imHeight() { return image.getHeight(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SVGLength getHeight() {\n return height;\n }", "public double getHeight() {\n\t\tdouble height = Math.round(sideLength + (2 * sideLength * \n\t\t\t\tMath.sin(Math.PI / 4)));\n\t\treturn height;\n\t}", "public double getHeight() {\n return this.height * 0.393701;\n }", "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public double getHeight();", "public double getHeight();", "public double getHeight()\r\n {\r\n return height;\r\n }", "public double getHeight() {\r\n\t\treturn height;\r\n\t}", "public double getHeight()\r\n {\r\n return height;\r\n }", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn getHeight(this);\n\t}", "public double getHeight() {\r\n return height;\r\n }", "public double getHeight(){\n return ((Math.sqrt(3.0))/2.0)*(super.getLength());\n }", "public double getHeight () {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public float getHeight();", "public double getHeight() {\r\n\r\n\t\treturn h;\r\n\r\n\t}", "private double getHeight() {\n\t\treturn height;\n\t}", "double getHeight();", "final public double getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn (int) (Math.log(size) / Math.log(2));\n\t}", "public double getHeight() {\n\t\treturn my-ny;\n\t}", "public int getHeight() {\n\t\treturn this.f1.length;\n\t}", "public Number getHeight() {\n\t\treturn getAttribute(HEIGHT_TAG);\n\t}", "public double getHeight() {\n\treturn height;\n }", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public float getHeight() {\r\n\t\treturn height;\r\n\t}", "public float getHeight() {\n\t\treturn height;\n\t}", "public float getHeight() {\n return height;\n }", "public int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\t\r\n\t\treturn height;\r\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public float getHeight() {\n return this.height;\n }", "public int getHeight() \n\t{\n\t\treturn height;\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n return (int) Math.round(height);\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight()\n {\n return this.height;\n }", "public int getHeight() {\r\n\t\treturn this.height;\r\n\t}", "public int getHeight()\n {\n return height;\n }", "public final int getHeight() {\r\n return height;\r\n }", "public int getHeight() {\n\t\treturn this.height;\n\t}", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public double getHeight() {\n return getElement().getHeight();\n }", "public int getHeight() {\n\t\t\treturn 1;\n\t\t}", "public int getHeight() {\n return this.height;\n }", "public int getHeight()\n {\n \treturn height;\n }", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "long getHeight();", "public int getHeight() {\n return height_;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight()\n {\n return height;\n }", "public int getHeight()\n\t{\n\t\treturn this._height;\n\t}", "public int getHeight() {\n return height_;\n }", "public int getHeight() {\r\n return Height;\r\n }", "public int getHeight() {\n return (int) (this.height * ViewHandlerImpl.getScaleModifier());\n }", "public int getHeight() {\n\t\t\treturn height;\n\t\t}", "public int getHeight() {\n return huffTree.getHeight(huffTree.root, 0); \n }", "public Integer getHeight() {\n return this.height;\n }", "public int getHeight()\r\n {\r\n\tif (hue != null && saturation != null && intensity != null)\r\n\t return hue.length;\r\n\telse\r\n\t return -1;\r\n }", "public int getHeight(){\n return this.height;\n }", "public final int getHeight(){\n return height_;\n }" ]
[ "0.76170754", "0.75999933", "0.7559537", "0.75204676", "0.74751854", "0.74751854", "0.7452665", "0.74282455", "0.74280673", "0.7425682", "0.7425682", "0.7425682", "0.7425682", "0.7425682", "0.7425682", "0.7425527", "0.74189025", "0.7418176", "0.7415727", "0.7394836", "0.7394836", "0.7369948", "0.73694694", "0.73627627", "0.7342974", "0.73344696", "0.73204243", "0.7291413", "0.7285088", "0.7277633", "0.72618204", "0.72320336", "0.7231557", "0.72245634", "0.72214776", "0.7215959", "0.71923643", "0.7190858", "0.7190858", "0.7185337", "0.7184619", "0.71760464", "0.71760464", "0.717301", "0.717301", "0.717301", "0.717301", "0.717301", "0.717301", "0.717301", "0.717301", "0.717301", "0.717301", "0.717301", "0.7172913", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.71661216", "0.7164996", "0.71598464", "0.7157951", "0.7155204", "0.7152026", "0.7151163", "0.71427095", "0.71427095", "0.71427095", "0.7139645", "0.7134302", "0.71241724", "0.71169406", "0.7113994", "0.7113994", "0.7113994", "0.7113994", "0.7113994", "0.7113994", "0.7111531", "0.7101806", "0.7095767", "0.7095767", "0.7095767", "0.7094359", "0.7089419", "0.70871204", "0.70826", "0.70787305", "0.70746005", "0.7053621", "0.70467705", "0.70353556", "0.702682", "0.7026802" ]
0.0
-1
Takes a jigl signal as input, converts it to a java signal, and returns the java signal.
public java.awt.Image getJavaSignal(jigl.signal.Signal sig) throws BadSignalException, RuntimeException { // int w = 0; // int h = 0; java.awt.Image jsig = null; if (sig instanceof DiscreteSignal) { int max = Integer.MIN_VALUE; int min = Integer.MAX_VALUE; DiscreteSignal nsig = SignalConverter.toDiscrete(sig); for (int x = 0; x < nsig.length(); x++) { if ((short) nsig.get(x) > max) max = (short) nsig.get(x); if ((short) nsig.get(x) < min) min = (short) nsig.get(x); } short[][] new_data = new short[max][nsig.length()]; GrayImage gimage = new GrayImage(nsig.length(), max); for (int x = 0; x < nsig.length(); x++) // FIXME: put braces on this for for (int y = 0; y < max; y++) { if ((max - y) < nsig.get(x)) new_data[y][x] = 0; else new_data[y][x] = 255; gimage.set(x, y, new_data[y][x]); } // w = gimage.X(); // h = gimage.Y(); jsig = createImage(gimage.getJavaImage()); return jsig; } else { float max = Float.MIN_VALUE; float min = Float.MAX_VALUE; RealSignal nsig = SignalConverter.toReal((Signal) sig); for (int x = 0; x < nsig.length(); x++) { if (nsig.get(x) > max) max = nsig.get(x); if (nsig.get(x) < min) min = nsig.get(x); } float[][] new_data = new float[(int) max][nsig.length()]; RealGrayImage gimage = new RealGrayImage(nsig.length(), (int) max); for (int x = 0; x < nsig.length(); x++) { for (int y = 0; y < max; y++) { // try{ if ((max - y) < nsig.get(x)) new_data[y][x] = 0; else new_data[y][x] = 255; gimage.set(x, y, (int) new_data[y][x]); // }catch (Exception e) // {System.out.println(x+" uh oh "+y);} } } // w = gimage.X(); // h = gimage.Y(); jsig = createImage(gimage.getJavaImage()); return jsig; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public jigl.signal.Signal getSignal() {\n\t\treturn jsignal;\n\t}", "Signal getSignal();", "public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}", "public java.awt.Image getJavaSignal() {\n\t\treturn image;\n\t}", "java.lang.String getSignal();", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\n}", "public double getSignal() {return _signal;}", "public void setSignal(jigl.signal.Signal sig) throws BadSignalException {\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public static final SourceModel.Expr inputMachineTypeFromJObject(SourceModel.Expr jMachineType) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.inputMachineTypeFromJObject), jMachineType});\n\t\t}", "public void setSignal(double signal) {_signal = signal;}", "@Override\n public int getSignal() {\n return signal & 0xFF;\n }", "public SignalCanvas(jigl.signal.Signal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n }\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 signal_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private Javier getJavier() {\r\n\t\tif(javier == null) {\r\n\t\t String ttsProvider = \"org.javier.browser.handlers.SAPIOutputHandler\";\r\n\t\t String voiceName = \"\";\r\n\t\t String logFile = \"Javier.log\";\r\n\t\t homeAddress = \"http://localhost/javier/default.vxml\";\r\n\t\t\t\r\n\t\t try {\r\n\t\t\t Properties properties = new Properties();\r\n\t\t\t \r\n\t\t properties.load(new FileInputStream(\"JavierGUI.conf\"));\r\n\t\t ttsProvider = properties.getProperty(\"tts_class\", ttsProvider);\r\n\t\t\t voiceName = properties.getProperty(\"tts_voice\", voiceName);\r\n\t\t \thomeAddress = properties.getProperty(\"home_address\", homeAddress);\r\n\t\t \tlogFile = properties.getProperty(\"log_file\", logFile);\r\n\t\t } catch (IOException e) {\r\n\t\t \t\r\n\t\t }\r\n\t\t\t\r\n\t\t\tjavier = new Javier(this,new MSXMLHTTPNetworkHandler());\r\n\t\t\tjavier.addJavierListener(this);\r\n\t\t\tjavier.addOutputListener(this);\r\n\t\t\tjavier.addOutputListener(new SAPIOutputHandler(voiceName));\r\n\t\t\tjavier.addErrorListener(this);\r\n\t\t\t/*\r\n\t\t\tjavier.addLogListener(new ConsoleLogHandler());\r\n\t\t\t*/\t\r\n\t\t\t/*\r\n\t\t\ttry {\r\n\t\t\t\tjavier.mainLoop(homeAddress);\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\treturn javier;\r\n\t}", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getSignalBytes();", "public interface SignalInput extends DspObject {\r\n\t/**\r\n\t * Set the signal strength on this signal input. Normally 0.0f means 'no\r\n\t * signal', and normally the range is -1.0 until 1.0 for audio signals.\r\n\t * However, nothing prevents a signal to be outside of this range; and they\r\n\t * will often be. For example mixing multiple signals together will\r\n\t * typically lead to signals getting out of that -1.0 to 1.0 range. And a\r\n\t * signal doesn't need to be audio, but can be any kind of signal (for\r\n\t * example a signal that controls a frequency).<br/>\r\n\t * A signal should be treated as being in the range -1.0f to 1.0f for audio,\r\n\t * but can otherwise be completely arbitrary.\r\n\t * \r\n\t * @param signal\r\n\t * The signal\r\n\t */\r\n\tpublic void set(float signal);\r\n}", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\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 signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Object convertArgs2Java(final PyObject... args) {\n\t\tObject ret = null;\n\n\t\tif (args.length == 1) {\n\t\t\tret = args[0].__tojava__(Object.class);\n\t\t} else {\n\t\t\tfinal Object[] convertedArgs = new Object[args.length];\n\n\t\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\t\tconvertedArgs[i] = args[i].__tojava__(Object.class);\n\t\t\t}\n\n\t\t\tret = convertedArgs;\n\t\t}\n\n\t\treturn ret;\n\t}", "void mo5870a(C1111j jVar);", "public int getAudioJittcomp();", "JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);", "public static XMLEncoder encoderFromScript (String script) {\n PythonInterpreter pi = new NoErrorPython();\n if (script != null)\n pi.exec(script);\n PyObject product = pi.eval(MAGIC_FUNCTION);\n if (product instanceof PyFunction) {\n return new Func((PyFunction) product);\n }\n else {\n Object obj = product.__tojava__(XMLEncoder.class);\n if (obj instanceof XMLEncoder)\n return (XMLEncoder) obj;\n }\n throw new IllegalArgumentException(\n \"JPython script did not yield a function or an XMLEncoder\");\n }", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "void signal();", "public double[] processSignal(double[] input){\r\n if(input.length == 784){\r\n neuralNetwork.setInput(input);\r\n neuralNetwork.calculate();\r\n double[] output = neuralNetwork.getOutput();\r\n String s = \"\";\r\n for(double d : output){\r\n s += String.valueOf(d) + \",\";\r\n }\r\n return output;\r\n } else {\r\n return null;\r\n }\r\n }", "static native int jniToBuf(Buf out, long patch);", "public SignalCanvas(RealSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public static final SourceModel.Expr outputMachineTypeToJObject(SourceModel.Expr machineType) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.outputMachineTypeToJObject), machineType});\n\t\t}", "void jugar(Jugada jugada);", "Future<T> then(Signal<T> result);", "public interface ConverterMessageToOFJava<F extends ExperimenterMessageOfChoice, T extends DataContainer,\n D extends ConvertorData> {\n\n /**\n * Converts a message to MD-SAL model.\n *\n * @param experimenterMessageCase where is vendor's augmentation\n * @param data which contains the Xid and datapathId\n * @return message converted to OFJava-API\n * @throws ConversionException if given argument is none of valid types\n */\n T convert(F experimenterMessageCase, D data) throws ConversionException;\n\n /**\n * Returns the corresponding experimenter id (vendor id).\n * @return experimenter id\n */\n ExperimenterId getExperimenterId();\n\n /**\n * Returns the corresponding experimenter message type.\n * @return experimenter message type.\n */\n Uint32 getType();\n}", "static public JSObject asJSObject(JSEnvironment env, Object a) {\r\n\t\t// js types\r\n\t\tif (a instanceof JSObject)\r\n\t\t\treturn (JSObject) a;\r\n\t\tif (a == null)\r\n\t\t\treturn null;\r\n\t\tif (a instanceof String)\r\n\t\t\treturn new JSString(env, (String) a);\r\n\t\tif (a instanceof Double)\r\n\t\t\treturn new JSNumber(env, (Double) a);\r\n\t\tif (a instanceof Boolean)\r\n\t\t\treturn new JSBoolean(env, (Boolean) a);\r\n\t\tthrow new ClassCastException(\"Could not convert \\\"\" + a + \"\\\" to JSObject.\");\r\n\t}", "public static final SourceModel.Expr inputMachineType(SourceModel.Expr jMachineType) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.inputMachineType), jMachineType});\n\t\t}", "static void perform_jp(String passed){\n\t\tint type = type_of_jp(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tjump_when_sign_not(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public Integer getJint() {\n return jint;\n }", "public void setSignal(java.awt.Image sig) {\n\t\timage = sig;\n\t\tjsignal = null;\n\t}", "public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}", "public SignalCanvas(ComplexSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "public static native void Conjugate(long lpjFbxDualQuaternion);", "public SignalCanvas(DiscreteSignal sig) throws BadSignalException {\n\t\tsuper();\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "JPackage _package();", "@SuppressWarnings(\"all\")\n static Object aiJValue(final Object input, final Class<?> type) {\n return aiValue(input, type, Value::aiJType, (sourceType, targetType) -> aiExecute(sourceType, targetType, input,\n (source) -> {\n /*\n * If String, check whether it's date\n */\n if (String.class != type && Ut.isDate(source.toString())) {\n /*\n * String to\n */\n return V.vInstant().to(source, sourceType);\n } else {\n return input.toString();\n }\n }));\n }", "public double getSignal(double[] params, DW_Scheme rawScheme, int i) {\r\n\r\n\t\tStejskalTannerScheme scheme;\r\n\r\n\t\ttry {\r\n\t\t\tscheme = (StejskalTannerScheme) rawScheme;\r\n\t\t} catch (ClassCastException cce) {\r\n\t\t\tthrow new LoggedException(\r\n\t\t\t\t\t\"scheme object passed to cylinder compartment is not a StejskalTanner sequence\");\r\n\t\t}\r\n\r\n\t\treturn getSignal(params, scheme, i);\r\n\t}", "public abstract JType unboxify();", "void mo18324a(C7260j jVar);", "public void prepareJavaRepresentation() {\n if (!this.javaIsValid) {\n synchronized (this) {\n if (!this.javaIsValid) {\n int sign2 = this.bigInt.sign();\n int[] littleEndianIntsMagnitude = sign2 != 0 ? this.bigInt.littleEndianIntsMagnitude() : new int[]{0};\n setJavaRepresentation(sign2, littleEndianIntsMagnitude.length, littleEndianIntsMagnitude);\n }\n }\n }\n }", "public void setJint(Integer jint) {\n this.jint = jint;\n }", "static double convert(double in) {\n return (in * 0.254);\n }", "public interface Value {\n Word asWord();\n\n int toSInt();\n\n BigInteger toBInt();\n\n short toHInt();\n\n byte toByte();\n\n double toDFlo();\n\n float toSFlo();\n\n Object toArray();\n\n Record toRecord();\n\n Clos toClos();\n\n MultiRecord toMulti();\n\n boolean toBool();\n\n char toChar();\n\n Object toPtr();\n\n Env toEnv();\n\n <T> T toJavaObj();\n\n public class U {\n static public Record toRecord(Value value) {\n if (value == null)\n return null;\n else\n return value.toRecord();\n }\n\n public static Value fromBool(boolean b) {\n return new Bool(b);\n }\n\n public static Value fromSInt(int x) {\n return new SInt(x);\n }\n\n public static Value fromArray(Object x) {\n return new Array(x);\n }\n\n public static Value fromBInt(BigInteger x) {\n return new BInt(x);\n }\n\n public static Value fromPtr(Object o) {\n return new Ptr(o);\n }\n\n public static Value fromSFlo(float o) {\n return new SFlo(o);\n }\n\n public static Value fromDFlo(double o) {\n return new DFlo(o);\n }\n\n public static Value fromChar(char o) {\n return new Char(o);\n }\n\n public static Value fromByte(byte o) {\n return new Byte(o);\n }\n\n public static Value fromHInt(short o) {\n return new HInt(o);\n }\n\n\tpublic static <T> Value fromJavaObj(T obj) {\n\t return new JavaObj<T>(obj);\n\t}\n }\n}", "public static native void DualConjugate(long lpjFbxDualQuaternion);", "boolean isSignal();", "public native static void convertMp3(String input, String mp3);", "double computeSignal(RadioInfo srcInfo, Location srcLoc, Location dst);", "public native String passingDataToJni(float[] audio_data, int array_length);", "public String encodeJava()\n {\n return '\"' + val + '\"';\n }", "@ReflectiveMethod(name = \"j\", types = {})\n public float j(){\n return (float) NMSWrapper.getInstance().exec(nmsObject);\n }", "static int type_of_jp(String passed){\n\t\treturn 1;\n\t}", "public float getSignalValue(int index);", "public void set(float signal);", "public GenPolynomial<C> numericExpr2JAS(final IExpr exprPoly) throws JASConversionException {\n\t\ttry {\n\t\t\treturn numericExpr2Poly(exprPoly);\n\t\t} catch (Exception ae) {\n\t\t\t// ae.printStackTrace();\n\t\t\tthrow new JASConversionException();\n\t\t}\n\t}", "public void onInputSignalChange(String input, boolean hasSignal) {\n\n\t\t}", "public Object javaToSqlArg(FieldType fieldType, Object javaObject) {\n \t\t\tbyte byteVal = (Byte) javaObject;\n \t\t\treturn (short) byteVal;\n \t\t}", "public native String stringFromJNI();", "public void setJcmdsig(Integer jcmdsig) {\n this.jcmdsig = jcmdsig;\n }", "static void perform_jpo(String passed){\n\t\tint type = type_of_jpo(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tjump_when_parity_not(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public native void answer();", "public native void nativeAdaptedOutputFormat(int i, int i2, int i3);", "public native static void jnikillMira();", "public Stimulus toTCUMLStimulus();", "protected String event2JavaScript(Event event) throws IOException {\n\n\t\t// Convert the event to a comma-separated string.\n\t\tString jsArgs = \"\";\n\t\tfor (Iterator iter = event.getFieldNames(); iter.hasNext();) {\n\t\t\tString name = (String) iter.next();\n\t\t\tString value = event.getField(name);\n\t\t\tString nextArgument = (jsArgs.equals(\"\") ? \"\" : \",\") + \"'\" + name + \"'\" + \", \\\"\" + value + \"\\\"\";\n\t\t\tjsArgs += nextArgument;\n\t\t}\n\n\t\t// Construct and return the function call */\n\t\treturn \"<script language=\\\"JavaScript\\\">parent.push(\" + jsArgs + \");</script>\";\n\t}", "public Object convertToScala (Object a, org.apache.spark.sql.catalyst.types.DataType dataType) ;", "void mo708a(long j) throws RemoteException;", "public Object convert(Object from, Class to) {\n \t\tif (from instanceof Function) {\n \t\t\tif (to == Callable.class)\n \t\t\t\treturn new RhinoCallable(engine, (Function) from);\n \t\t} else if (from instanceof Scriptable || from instanceof String) { // Let through string as well, for ArgumentReader\n \t\t\tif (Map.class.isAssignableFrom(to)) {\n \t\t\t\treturn toMap((Scriptable) from);\n \t\t\t} else {\n \t\t\t\t/* try constructing from this prototype first\n \t\t\t\ttry {\n \t\t\t\t\tScriptable scope = engine.getScope();\n \t\t\t\t\tExtendedJavaClass cls = ExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\treturn cls.construct(Context.getCurrentContext(), scope, new Object[] { from });\n \t\t\t\t} catch(Throwable e) {\n \t\t\t\t\tint i = 0;\n \t\t\t\t}\n \t\t\t\t*/\n \t\t\t\tArgumentReader reader = null;\n \t\t\t\tif (ArgumentReader.canConvert(to) && (reader = getArgumentReader(from)) != null) {\n \t\t\t\t return ArgumentReader.convert(reader, unwrap(from), to);\n \t\t\t\t} else if (from instanceof NativeObject && getZeroArgumentConstructor(to) != null) {\n \t\t\t\t\t// Try constructing an object of class type, through\n \t\t\t\t\t// the JS ExtendedJavaClass constructor that takes \n \t\t\t\t\t// a last optional argument: A NativeObject of which\n \t\t\t\t\t// the fields define the fields to be set in the native type.\n \t\t\t\t\tScriptable scope = ((RhinoEngine) this.engine).getScope();\n \t\t\t\t\tExtendedJavaClass cls =\n \t\t\t\t\t\t\tExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\tif (cls != null) {\n \t\t\t\t\t\tObject obj = cls.construct(Context.getCurrentContext(),\n \t\t\t\t\t\t\t\tscope, new Object[] { from });\n \t\t\t\t\t\tif (obj instanceof Wrapper)\n \t\t\t\t\t\t\tobj = ((Wrapper) obj).unwrap();\n \t\t\t\t\t\treturn obj;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (from == Undefined.instance) {\n \t\t\t// Convert undefined ot false if destination is boolean\n \t\t\tif (to == Boolean.TYPE)\n \t\t\t\treturn Boolean.FALSE;\n \t\t} else if (from instanceof Boolean) {\n \t\t\t// Convert false to null / undefined for non primitive destination classes.\n\t\t\tif (!((Boolean) from).booleanValue() && !to.isPrimitive())\n \t\t\t\treturn Undefined.instance;\n \t\t}\n \t\treturn null;\n \t}", "public Object toJava(final Object object) {\n if ((object == null) || (_convertTo == null)) {\n return object;\n }\n return _convertTo.convert(object);\n }", "public void sendSignal (String signal, String message ){\r\n if (btSocket != null)\r\n {\r\n try{\r\n btSocket.getOutputStream().write(signal.getBytes());\r\n msg(message,0);\r\n } catch (IOException e) {\r\n msg(\"Error\", 0);\r\n }\r\n }\r\n\r\n }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "Target convert(Source source);", "void mo723b(long j) throws RemoteException;" ]
[ "0.5840298", "0.5707748", "0.54359674", "0.54202026", "0.53775877", "0.5237163", "0.51701444", "0.51438034", "0.5085942", "0.5060863", "0.49871716", "0.49814418", "0.49784333", "0.48777115", "0.48399922", "0.48121732", "0.48044103", "0.4802801", "0.4746517", "0.4745024", "0.47365084", "0.4707903", "0.47025606", "0.46818107", "0.46715802", "0.46383014", "0.46226433", "0.4590803", "0.45878455", "0.45860672", "0.45595092", "0.45577592", "0.45467007", "0.45233777", "0.45019504", "0.44907674", "0.44860375", "0.4485163", "0.44847593", "0.4463129", "0.4456938", "0.44562078", "0.44199118", "0.43993714", "0.43936354", "0.43930942", "0.4385243", "0.43773425", "0.43619347", "0.43251735", "0.43208566", "0.432027", "0.431646", "0.42946225", "0.42913035", "0.42823657", "0.42696196", "0.42695212", "0.4265037", "0.4262855", "0.42574102", "0.42519903", "0.422942", "0.42274052", "0.4214069", "0.42031974", "0.41981032", "0.41942772", "0.41903114", "0.41697556", "0.41695985", "0.41677547", "0.41644108", "0.41476834", "0.4142038", "0.41418117", "0.41381416", "0.41309905", "0.41252214", "0.41224366", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4121116", "0.4116667", "0.4115352" ]
0.6444465
0
Repaints the SignalCanvas (including the selection box)
public void update(Graphics g) { java.awt.Image i = image; g.drawImage(i, 0, 0, this); // Graphics gr = this.getGraphics(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void repaint(Object canvas) {\r\n {\r\n }\r\n\t}", "public void requestRepaint() {\n }", "private void repaint() {\n\t\tclear();\n\t\tfor (PR1Model.Shape c : m.drawDataProperty()) {\n\t\t\tif(!c.getText().equals(defaultshape))\n\t\t\t\tdrawShape(c, false);\n\t\t}\n\t\tif (getSelection() != null) {\n\t\t\tdrawShape(getSelection(), true);\n\t\t}\n\t}", "private void updateCanvas()\r\n\t{\r\n\t\tboardCanvas.repaint();\r\n\t\tdiceCanvas.repaint();\r\n\t}", "public void repaint() {}", "public void repaint() {\n\n\t}", "@Override\r\n public void repaint() {\r\n }", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "public void repaint() {\n\t\n}", "public void repaint() {\n frame.repaint();\n frame.requestFocus();\n }", "@Override\n\tpublic void repaint() {\n\t\tsuper.repaint();\n\t}", "@Override\n\tpublic void redraw() {\n\t\t\n\t}", "public void graphRepaint() {\r\n \t\tgraph.repaint();\r\n \t}", "protected void repaint()\n {\n // Update the contents if an update is needed.\n // Will only actually repaint if the contents are dirty.\n view.getEditor().getInteractionFigure().repaint();\n }", "public void repaint();", "public void draw() {\n\t\tsuper.repaint();\n\t}", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "public void refresh() {\n\t\tdrawingPanel.repaint();\n\t}", "public void requestRedraw() {\n\n this.getParent().repaint();\n\n }", "public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawBackGround();\r\n\t\tdrawGraph();\r\n\t}", "protected void reDraw(){\n\t\tcontentPane.revalidate();\n\t\trepaint();\n\t}", "private void reloadCanvas() {\n reloadCanvas(1f);\n }", "public void paintImmediately() {\n apparatusPanel2.paintDirtyRectanglesImmediately();\n }", "public void updateSelection() {\n\t\t\n\t}", "public void draw(){\n super.repaint();\n }", "private void forceRedraw(){\n postInvalidate();\n }", "@Override\n public void updateView() {\n if (!model.isDrawStarted() && !previewCurve.isDisabled()) {\n previewCurve.setVisible(false);\n previewCurve.setDisable(true);\n }\n\n // determine whether the select widgets is displayed\n DrawModes mode = model.getDrawMode();\n switch (mode) {\n case SELECT:\n case DRAW:\n case POINT:\n BezierCurve selectedCurve = model.getSelectedCurve();\n if (selectedCurve != null) {\n displayWidgets = true;\n } else {\n displayWidgets = false;\n }\n break;\n case ERASE:\n displayWidgets = false;\n break;\n\n }\n // reset children\n this.getChildren().clear();\n this.getChildren().addAll(model.getCurves());\n if (mode == DrawModes.DRAW) {\n this.getChildren().add(previewCurve);\n if (previewCurve.isVisible()) {\n this.getChildren().addAll(previewCurve.getDisplayedWidgets());\n }\n }\n if (displayWidgets) {\n addPointsToChildren(model.getSelectedCurve(), Direction.BOTH);\n }\n updateSize();\n }", "public void repaint()\n\t{\n\t\tif (game.getPlayerID() != game.getCurrentIdx())\n\t\t{\n\t\t\tthis.disable();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.enable();\n\t\t}\n\n\t\tthis.resetSelected();\n\t\tbigTwoPanel.repaint();\n\t}", "public void render() {\n this.canvas.repaint();\n }", "public void requestRepaintRequests() {\n }", "public void refresh() {\n\t\tthis.repaint();\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n progress_stack = progress_stack_bkup;\r\n\r\n rec_points = rec_points_bkup;\r\n rec_colors = rec_colors_bkup;\r\n\r\n squ_points = squ_points_bkup;\r\n squ_colors = squ_colors_bkup;\r\n\r\n ell_points = ell_points_bkup;\r\n ell_colors = ell_colors_bkup;\r\n\r\n cir_points = cir_points_bkup;\r\n cir_colors = cir_colors_bkup;\r\n\r\n str_points = str_points_bkup;\r\n str_colors = str_colors_bkup;\r\n\r\n poly_points = poly_points_bkup;\r\n poly_colors = poly_colors_bkup;\r\n\r\n handdraw_points = handdraw_points_bkup;\r\n handdraw_colors = handdraw_colors_bkup;\r\n\r\n\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n //repaint circle\r\n if(cir_colors.size()>0){\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n //repaint square\r\n if(squ_colors.size()>0){\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n //repaint ellipse\r\n if(ell_colors.size()>0){\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n //repaint straight line\r\n if(str_colors.size()>0){\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n\r\n //repaint polygons\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n }\r\n\r\n //repaint freehand lines\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }", "public void redraw()\r\n\t{\r\n\t\tif (needsCompleteRedraw)\r\n\t\t{\r\n\t\t\tcompleteRedraw();\r\n\t\t\tneedsCompleteRedraw = false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tpartialRedraw();\r\n\t\t}\r\n\t}", "public void requestRepaint() {\n\t\tJWLC.nativeHandler().wlc_output_schedule_render(this.to());\n\t}", "public void run() {\n myCanvas.repaint();\n }", "public void repaintGraph() {\r\n this.repaint();\r\n ((GraphBuilder) getFrameParent()).getMiniMap().repaint();\r\n }", "public void repaint() {\n setBackground(Color.white);\n super.repaint();\n setVisible(true);\n\n }", "public void updateSelection()\n {\n \trectForSelection.setRect(rettangoloX,rettangoloY,larghezza,altezza);\n \trectSelTopLeft.setRect(rettangoloX-3,rettangoloY-3,6,6);\n \trectSelBottomLeft.setRect(rettangoloX-3,rettangoloY+altezza-3,6,6);\n \trectSelTopRight.setRect(rettangoloX+larghezza-3,rettangoloY-3,6,6);\n \trectSelBottomRight.setRect(rettangoloX+larghezza-3,rettangoloY+altezza-3,6,6);\n }", "protected void repaint()\r\n {\r\n if (null != comboBox && null != comboBox.getParent())\r\n {\r\n comboBox.getParent().repaint(comboBox.getX() - 5, comboBox.getY() - 5, comboBox.getWidth() + 10,\r\n comboBox.getHeight() + 10);\r\n }\r\n }", "protected abstract void paintSelection(Graphics2D g);", "public void beginSelecting() {\r\n selecting = true;\r\n minX = 0;\r\n maxX = 0;\r\n }", "public void drawSelector(int x) {\n int currentTime = millis() / 100;\n noStroke();\n if (currentTime % 13 == 0) {\n fill(200, 200, 100, 30);\n }\n else if (currentTime % 13 == 1) {\n fill(200, 200, 100, 40);\n }\n else if (currentTime % 13 == 2) {\n fill(200, 200, 100, 50);\n }\n else if (currentTime % 13 == 3) {\n fill(200, 200, 100, 60);\n }\n else if (currentTime % 13 == 4) {\n fill(200, 200, 100, 70);\n }\n else if (currentTime % 13 == 5) {\n fill(200, 200, 100, 80);\n }\n else if (currentTime % 13 == 6) {\n fill(200, 200, 100, 90);\n }\n else if (currentTime % 13 == 7) {\n fill(200, 200, 100, 100);\n }\n else if (currentTime % 13 == 8) {\n fill(200, 200, 100, 110);\n }\n else if (currentTime % 13 == 9) {\n fill(200, 200, 100, 120);\n }\n else if (currentTime % 13 == 10) {\n fill(200, 200, 100, 130);\n }\n else if (currentTime % 13 == 11) {\n fill(200, 200, 100, 140);\n }\n else if (currentTime % 13 == 12) {\n fill(200, 200, 100, 150);\n }\n else {\n fill(255, 200, 100);\n }\n switch(x){\n case 1:\n beginShape();\n vertex(80, 330);\n vertex(50, 360);\n vertex(80, 350);\n vertex(110, 360);\n endShape();\n break;\n case 2:\n beginShape();\n vertex(370, 330);\n vertex(340, 360);\n vertex(370, 350);\n vertex(400, 360);\n endShape();\n break;\n case 3:\n beginShape();\n vertex(80, 600);\n vertex(50, 630);\n vertex(80, 620);\n vertex(110, 630);\n endShape();\n break;\n case 4:\n beginShape();\n vertex(370, 600);\n vertex(340, 630);\n vertex(370, 620);\n vertex(400, 630);\n endShape();\n break;\n }\n\n}", "public void refreshAll() {\n\t\tdrawingPanel.repaint();\n\t}", "public abstract void forceRepaint();", "private void updateImgCanvas() {\n\t\timgCanvas.updateCanvasImage(source.source);\n\t\tthis.revalidate();\n\t\tthis.repaint();\n\t}", "public void actionPerformed(ActionEvent ae) {\r\nrepaint();\r\n}", "public void updateDrawing() {\n\n\t\tdrawingContainer.setDrawing(controller.getDrawing());\n\t\tscrollpane.setPreferredSize(new Dimension(drawingContainer\n\t\t\t\t.getPreferredSize().width + 100, drawingContainer\n\t\t\t\t.getPreferredSize().height + 100));\n\t\tpack();\n\t\trepaint();\n\t}", "@Override\n\tpublic void updateCodeCanvas() {\n\n\t}", "public void completeRedraw()\r\n\t{\r\n\t\tg = (Graphics2D) s.getDrawGraphics();\r\n\t}", "public void DrawGraphActive() {\n if (CurrentEQ == null || CurrentEQ.isEmpty()) {\n return;\n }\n StringParser parser = new StringParser();\n Equation eq = parser.ParseString(CurrentEQ);\n\n int size = (int) ((Math.max(MinX, MaxX) - Math.min(MinX, MaxX)) / Step);\n double[] points = new double[size * 2 + 2];\n int index = 0;\n for (double i = Math.min(MinX, MaxX); i <= Math.max(MinX, MaxX); i += Step) {\n points[index] = i;\n index++;\n points[index] = eq.peekAt(\"x\", i);\n index++;\n }\n LineGraph root = new LineGraph(points);\n root.raw = CurrentEQ;\n root.setIncrements(Increments);\n root.setLineColour(LineColor);\n root.SetDrawArea(DrawArea);\n root.setShowNumbers(DrawScale);\n root.setBackColor(BackColor);\n root.setCurveThickness(CurveThickness);\n Canvas.removeAll();\n Canvas.repaint();\n int h = Frame.getHeight();\n int w = Frame.getWidth();\n GraphPanel p;\n if (ForceRange) {\n p = (GraphPanel) root.drawToJPanel((int) (w * Zoom), (int) (h * Zoom),\n Math.min(MinX, MaxX),\n Math.min(MinY, MaxY),\n Math.max(MinX, MaxX),\n Math.max(MinY, MaxY));\n p.addMouseMotionListener(new MouseMovementListener(p, root, eq));\n Canvas.add(p);\n } else {\n p = (GraphPanel) root.drawToJPanel((int) (w * Zoom), (int) (h * Zoom));\n p.addMouseMotionListener(new MouseMovementListener(p, root, eq));\n Canvas.add(p);\n // Canvas.setBackground(Color.red);\n }\n\n Frame.validate();\n CenterScrollPane();\n lineGraphs.set(RootGraph, root);\n p.LineGraphs = lineGraphs;\n }", "@Override\n\tpublic void update(Observable o, Object arg) {\n\t\tthis.repaint(); // Schedule a call to paintComponent\n\t}", "public void partialRedraw()\r\n\t{\r\n\t\tg.clearRect(0,0,NumerateGame.WINDOW_X,NumerateGame.WINDOW_Y);\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) \n\t{\n\t\tbrush.draw();\n\t}", "public void repaint (Graphics g){\r\n g.drawLine(10,10,150,150); // Draw a line from (10,10) to (150,150)\r\n \r\n g.setColor(Color.darkGray);\r\n g.fillRect( 0 , 0 , \r\n 4000 , 4000 ); \r\n \r\n g.setColor(Color.BLACK);\r\n \r\n BufferedImage image;\r\n \r\n for(int h = 0; h < 16; h++){\r\n for(int w =0; w< 16; w++){\r\n //g.drawImage(image.getSubimage(w *16, h*16, 16, 16), 0+(32*w),0 +(32*h), 32,32,this);\r\n g.drawRect(w *32, h*32, 32, 32);\r\n \r\n if(coord.xSelected >=0){\r\n g.setColor(Color.WHITE);\r\n g.drawRect(coord.xSelected *32, coord.ySelected *32, 32, 32);\r\n g.setColor(Color.BLACK);\r\n }\r\n }\r\n }\r\n \r\n \r\n }", "public void stateChanged(ChangeEvent e){\n\r\n repaint(); // at the moment we're being pretty crude with this, redrawing all the shapes\r\n\r\n\r\n\r\n if (fDeriverDocument!=null) // if this drawing has a journal, set it for saving\r\n fDeriverDocument.setDirty(true);\r\n\r\n\r\n\r\n }", "public void megarepaintImmediately() {\n paintDirtyRectanglesImmediately();\n }", "@Override\n\tprotected void repaintView(ViewGraphics g) {\n\t}", "public void doRepaint() {\n window.getApplication().doRepaint();\n }", "public void actionPerformed(ActionEvent e) {\n \r\n \r\n repaint();\r\n }", "public void updateConicalView();", "public void repaint( long tm ) {\n }", "@Override\n public void updateEvent(MsgEvent e) {\n// System.out.println(\"PagePane: \" + e.toString());\n if (e.code == MsgEvent.WIDGET_REPAINT) {\n Widget w = findWidget(e.message);\n if (w != null) {\n repaint();\n }\n } else if (e.code == MsgEvent.OBJECT_SELECTED_TREEVIEW && \n e.parent.equals(getKey())) {\n selectNone();\n Widget w = findWidget(e.message);\n if (w != null) {\n selectWidget(w);\n repaint();\n }\n } else if (e.code == MsgEvent.OBJECT_UNSELECT_TREEVIEW) {\n/*\n // Can't call selectNone() or we will go into a loop.\n for (Widget w : widgets) {\n unSelectWidget(w);\n }\n*/\n selectNone();\n repaint();\n } else if (e.code == MsgEvent.CANVAS_MODEL_CHANGE) {\n canvasWidth = (int)(Builder.CANVAS_WIDTH * zoomFactor);\n canvasHeight = (int)(Builder.CANVAS_HEIGHT * zoomFactor);\n CommonUtil.getInstance().setWinOffsets(new Dimension(canvasWidth, canvasHeight), \n generalModel.getWidth(),\n generalModel.getHeight());\n repaint();\n }\n }", "@Override\n public void redraw() {\n firePropertyChange(AVKey.LAYER, null, this);\n }", "void updateDrawing() {\n filling = modelRoot.getCDraw().getFilling(this);\n dirtyBufF = true;\n tooltip = modelRoot.getCDraw().getTooltip(this);\n dirtyBufT = true;\n title = modelRoot.getCDraw().getTitle(this);\n dirtyBufTitle = true;\n colorTitle = modelRoot.getCDraw().getTitleColor(this);\n dirtyBufCT = true;\n }", "@Override\n public synchronized void paint(Graphics g) {\n if (!shouldPaint()) {\n return;\n }\n\n if (g instanceof Graphics2D) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHints(argoRenderingHints);\n\t double scale = getScale();\n g2.scale(scale, scale);\n }\n getLayerManager().paint(g);\n //getLayerManager().getActiveLayer().paint(g);\n if (_canSelectElements) {\n _selectionManager.paint(g);\n _modeManager.paint(g);\n }\n }", "protected void repaint(RMShape aShape) { if(_parent!=null) _parent.repaint(aShape); }", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "@Override\n public void handle(ActionEvent event) {\n canvasState.changeLineColor(bordercolor.getValue());\n redrawCanvas();\n }", "@Override\n\tpublic void update(IObservable observable, Object args) {\n\t\tthis.repaint();\n\t}", "@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}", "public void update(Canvas canvas) {\n GraphicsContext graphics = canvas.getGraphicsContext2D();\n graphics.setFill(this.color);\n graphics.fillRect(getX(), getY(), getWidth(), getHeight());\n }", "public void repaint() { if(_parent!=null) _parent.repaint(this); }", "public void updateVisuals ()\n\t{\n\t\tbrainPanel.repaint();\n\t}", "public void update(Graphics g){\n paint (g);\r\n \r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e)\n\t{\n\t\trepaint();\n\t}", "public void selectionChanged(DrawingView view) {\n setupAttributes();\n }", "public void repaint() {\n if ( clock != null && clock.isPaused() ) {\n super.repaint();\n }\n }", "@Override\n public void update(Graphics g) {\n paint(g);\n }", "void updateView () {\n updateScore();\n board.clearTemp();\n drawGhostToBoard();\n drawCurrentToTemp();\n view.setBlocks(board.getCombined());\n view.repaint();\n }", "public void setSelDataPoint(DataPoint aDP)\n{\n if(SnapUtils.equals(aDP, _selPoint)) return;\n firePropChange(SelDataPoint_Prop, _selPoint, _selPoint = aDP);\n repaint();\n}", "public void repaintView(){\n \n loadCalendarLabels();\n if (!checkBoxesHaveBeenClicked)\n {\n populateMonthWithEvents();\n }\n else\n {\n ActionEvent actionEvent = new ActionEvent();\n handleCheckBoxAction(actionEvent);\n }\n //populateMonthWithEvents();\n }", "public void repaint(Rectangle r) {}", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g; \n\t\tg2.setColor(Color.lightGray);\n\t\tg2.fill(model.bg);\n\t\tg2.setColor(Color.darkGray);\n\t\tg2.fillPolygon(model.terrain);\n\t\tg2.setColor(Color.gray);\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tg2.draw(model.circles.get(i));\n\t\t}\n\t\tif (model.curCircleSel != -1) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.circles.get(model.curCircleSel));\n\t\t}\n\t\tg2.setColor(Color.RED);\n\t\tg2.fill(model.pad);\n\t\tif (curPadSel) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.pad);\n\t\t}\n\t}", "public void refresh()\n {\n this.invalidate();\n this.validate();\n this.repaint();\n }", "void reDraw();", "@Override\r\n public void actionPerformed(ActionEvent e) {\n g.setColor(Color.WHITE);\r\n g.fillRect(0,0,1200,800);\r\n canvas.repaint();\r\n\r\n popped_points.clear();\r\n\r\n if(progress_stack.size() > 0){\r\n last_state = progress_stack.get(progress_stack.size()-1);\r\n System.out.println(last_state+\" is the last shape in progress stack\");\r\n\r\n\r\n if(last_state.equals(\"rec\")){\r\n //recall other point_stack\r\n if(cir_colors.size()>0){\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n if(squ_colors.size()>0){\r\n //square repaint\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n if(ell_colors.size()>0){\r\n //ellipse repaint\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n if(str_colors.size()>0){\r\n //straight line repaint\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n\r\n\r\n }\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n regular_shape_undo_process(\"rec\", rec_points, rec_colors);\r\n\r\n /* //recall rec points\r\n //1. store the last rectangle data\r\n //2. pop the last rectangle\r\n\r\n //for loop\r\n for (int i = 0; i < rec_colors.size(); i++) {\r\n System.out.println(rec_colors.size());\r\n int begin_index = i * 4;\r\n x1 = rec_points.get(begin_index);\r\n y1 = rec_points.get(begin_index + 1);\r\n x2 = rec_points.get(begin_index + 2);\r\n y2 = rec_points.get(begin_index + 3);\r\n int[] start_points = start_point(x1, y1, x2, y2);\r\n //last one\r\n if(i == (rec_colors.size()-1)){\r\n //store points and shape\r\n\r\n popped_points.add(x1);\r\n popped_points.add(y1);\r\n popped_points.add(x2);\r\n popped_points.add(y2);\r\n\r\n popped_shape = \"rec\";\r\n popped_color = rec_colors.get(rec_colors.size()-1);\r\n System.out.println(popped_points+ \" is popped rectangle\");\r\n\r\n //popped the last rectangle\r\n System.out.println(progress_stack+\" is the previous stack\");\r\n progress_stack.remove(progress_stack.size()-1);\r\n System.out.println(progress_stack+\" is the current stack\");\r\n\r\n //pop last 4 points from rec_points\r\n\r\n if(rec_colors.size() == 1){\r\n //last element in shape stack\r\n rec_points.clear();\r\n }\r\n else{\r\n //pop last 4 points from cir_points\r\n rec_points.remove(rec_points.size()-1);\r\n rec_points.remove(rec_points.size()-2);\r\n rec_points.remove(rec_points.size()-3);\r\n rec_points.remove(rec_points.size()-4);\r\n System.out.println(rec_points+ \" is the current rec_points\");\r\n }\r\n\r\n\r\n //pop the last color\r\n rec_colors.remove(rec_colors.size()-1);\r\n\r\n\r\n\r\n }else{\r\n g.setColor(rec_colors.get(i));\r\n g.drawRect(start_points[0], start_points[1], Math.abs(x2-x1), Math.abs(y2-y1));\r\n\r\n canvas.repaint();\r\n }\r\n\r\n }*/\r\n\r\n// if(rec_points.size() < 5){\r\n// //it is the first shape\r\n// //do nothing don't paint anything on canvas\r\n// //but store the\r\n// }else{\r\n// for (int i = 0; i < rec_colors.size()-1; i++) {\r\n// System.out.println(rec_colors.size());\r\n// int begin_index = i * 4;\r\n// x1 = rec_points.get(begin_index);\r\n// y1 = rec_points.get(begin_index + 1);\r\n// x2 = rec_points.get(begin_index + 2);\r\n// y2 = rec_points.get(begin_index + 3);\r\n//\r\n// int[] start_points = start_point(x1, y1, x2, y2);\r\n//\r\n// g.setColor(rec_colors.get(i));\r\n// g.drawRect(start_points[0], start_points[1], Math.abs(x2-x1), Math.abs(y2-y1));\r\n//\r\n// canvas.repaint();\r\n// }\r\n// }\r\n\r\n\r\n }\r\n\r\n if(last_state.equals(\"cir\")){\r\n //recall other point_stack\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n if(squ_colors.size()>0){\r\n //square repaint\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n if(ell_colors.size()>0){\r\n //ellipse repaint\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n if(str_colors.size()>0){\r\n //straight line repaint\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n }\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n regular_shape_undo_process(\"cir\", cir_points, cir_colors);\r\n\r\n /* //recall circle points\r\n //1. store the last circle data\r\n //2. pop the last circle\r\n\r\n //for loop\r\n for (int i = 0; i < cir_colors.size(); i++) {\r\n System.out.println(cir_colors.size());\r\n int begin_index = i * 4;\r\n x1 = cir_points.get(begin_index);\r\n y1 = cir_points.get(begin_index + 1);\r\n x2 = cir_points.get(begin_index + 2);\r\n y2 = cir_points.get(begin_index + 3);\r\n int[] start_points = start_point(x1, y1, x2, y2);\r\n //last one\r\n if(i == (cir_colors.size()-1)){\r\n //store points and shape\r\n popped_points.add(x1);\r\n popped_points.add(y1);\r\n popped_points.add(x2);\r\n popped_points.add(y2);\r\n\r\n popped_color = cir_colors.get(cir_colors.size()-1);\r\n\r\n popped_shape = \"cir\";\r\n System.out.println(popped_points+ \" is popped circle\");\r\n\r\n //popped the last circle\r\n System.out.println(progress_stack+\" is the previous stack\");\r\n progress_stack.remove(progress_stack.size()-1);\r\n System.out.println(progress_stack+\" is the current stack\");\r\n\r\n if(cir_colors.size() == 1){\r\n //last element in shape stack\r\n cir_points.clear();\r\n }\r\n else{\r\n //pop last 4 points from cir_points\r\n System.out.println(cir_points.size()+ \" is the previous circle points\");\r\n cir_points.remove(cir_points.size()-1);\r\n cir_points.remove(cir_points.size()-2);\r\n cir_points.remove(cir_points.size()-3);\r\n cir_points.remove(cir_points.size()-4);\r\n System.out.println(cir_points+ \" is the current cir_points\");\r\n }\r\n\r\n\r\n //pop the last color\r\n cir_colors.remove(cir_colors.size()-1);\r\n System.out.println(cir_colors+\" is current color stack\");\r\n\r\n\r\n }else{\r\n g.setColor(cir_colors.get(i));\r\n g.drawOval(start_points[0], start_points[1], Math.abs(x2-x1), Math.abs(x2-x1));\r\n\r\n canvas.repaint();\r\n }\r\n\r\n }*/\r\n\r\n /* //recall cir points\r\n if(cir_points.size() < 5){\r\n //it is the first shape\r\n //do nothing don't paint anything on canvas\r\n }else{\r\n for (int i = 0; i < cir_colors.size()-1; i++) {\r\n// System.out.println(cir_colors.size());\r\n int begin_index = i * 4;\r\n x1 = cir_points.get(begin_index);\r\n y1 = cir_points.get(begin_index + 1);\r\n x2 = cir_points.get(begin_index + 2);\r\n y2 = cir_points.get(begin_index + 3);\r\n\r\n int[] start_points = start_point(x1, y1, x2, y2);\r\n\r\n g.setColor(cir_colors.get(i));\r\n g.drawOval(start_points[0], start_points[1], Math.abs(x2-x1), Math.abs(x2-x1));\r\n\r\n canvas.repaint();\r\n }\r\n }*/\r\n\r\n\r\n }\r\n\r\n if(last_state.equals(\"squ\")){\r\n //recall other point_stack\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n if(cir_colors.size()>0){\r\n //square repaint\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n if(ell_colors.size()>0){\r\n //ellipse repaint\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n if(str_colors.size()>0){\r\n //straight line repaint\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n }\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n }\r\n\r\n regular_shape_undo_process(\"squ\", squ_points, squ_colors);\r\n /*//recall squ points\r\n if(squ_points.size() < 5){\r\n //it is the first shape\r\n //do nothing don't paint anything on canvas\r\n }else{\r\n for (int i = 0; i < squ_colors.size()-1; i++) {\r\n// System.out.println(cir_colors.size());\r\n int begin_index = i * 4;\r\n x1 = squ_points.get(begin_index);\r\n y1 = squ_points.get(begin_index + 1);\r\n x2 = squ_points.get(begin_index + 2);\r\n y2 = squ_points.get(begin_index + 3);\r\n\r\n int[] start_points = start_point(x1, y1, x2, y2);\r\n\r\n g.setColor(squ_colors.get(i));\r\n g.drawRect(start_points[0], start_points[1], Math.abs(x2-x1), Math.abs(x2-x1));\r\n\r\n canvas.repaint();\r\n }\r\n }*/\r\n\r\n\r\n }\r\n\r\n if(last_state.equals(\"ell\")){\r\n //recall other point_stack\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n if(cir_colors.size()>0){\r\n //square repaint\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n if(squ_colors.size()>0){\r\n //ellipse repaint\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n if(str_colors.size()>0){\r\n //straight line repaint\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n }\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n regular_shape_undo_process(\"ell\", ell_points, ell_colors);\r\n\r\n /*//recall ellipse points\r\n if(ell_points.size() < 5){\r\n //it is the first shape\r\n //do nothing don't paint anything on canvas\r\n }else{\r\n for (int i = 0; i < ell_colors.size()-1; i++) {\r\n// System.out.println(cir_colors.size());\r\n int begin_index = i * 4;\r\n x1 = ell_points.get(begin_index);\r\n y1 = ell_points.get(begin_index + 1);\r\n x2 = ell_points.get(begin_index + 2);\r\n y2 = ell_points.get(begin_index + 3);\r\n\r\n int[] start_points = start_point(x1, y1, x2, y2);\r\n\r\n g.setColor(ell_colors.get(i));\r\n g.drawOval(start_points[0], start_points[1], Math.abs(x2-x1), Math.abs(y2-y1));\r\n\r\n canvas.repaint();\r\n }\r\n }\r\n*/\r\n\r\n }\r\n\r\n if(last_state.equals(\"str\")){\r\n //recall other point_stack\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n if(cir_colors.size()>0){\r\n //square repaint\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n if(squ_colors.size()>0){\r\n //ellipse repaint\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n if(ell_colors.size()>0){\r\n //straight line repaint\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n }\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n regular_shape_undo_process(\"str\", str_points, str_colors);\r\n\r\n /* //recall straight line points\r\n if(str_points.size() < 5){\r\n //it is the first shape\r\n //do nothing don't paint anything on canvas\r\n }else{\r\n for (int i = 0; i < str_colors.size()-1; i++) {\r\n// System.out.println(cir_colors.size());\r\n int begin_index = i * 4;\r\n x1 = str_points.get(begin_index);\r\n y1 = str_points.get(begin_index + 1);\r\n x2 = str_points.get(begin_index + 2);\r\n y2 = str_points.get(begin_index + 3);\r\n\r\n int[] start_points = start_point(x1, y1, x2, y2);\r\n\r\n g.setColor(str_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n }*/\r\n\r\n\r\n }\r\n\r\n if(last_state.equals(\"poly\")){\r\n //repaint polygons except the last one\r\n //polygon repaint don't need to consider the last polygon\r\n //not good to use polygon color cuz it can be change whithin one polygon\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n if(separate_index.size()>1){\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n \r\n for (int j = 0; j < separate_index.size(); j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n\r\n\r\n //for the last one\r\n if(j == (separate_index.size()-1)){\r\n // store all points, color, shape\r\n int end_index = poly_points.size();\r\n popped_color = poly_colors.get(poly_colors.size()-1);\r\n popped_shape = \"poly\";\r\n\r\n popped_points.clear();\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n popped_points.add(poly_points.get(k));\r\n }\r\n\r\n System.out.println(popped_points+\" is the popped points\");\r\n\r\n //popped the last one from color, points, progress stack\r\n System.out.println(poly_points + \" is the previous poly points stack\");\r\n for (int p = 0; p < (popped_points.size()+1); p++) {\r\n poly_points.remove(poly_points.size()-1);\r\n }\r\n System.out.println(poly_points+\" is the current stack\");\r\n\r\n for (int s = 0; s < popped_points.size()/2; s++) {\r\n progress_stack.remove(progress_stack.size()-1);\r\n poly_colors.remove(poly_colors.size()-1);\r\n }\r\n System.out.println(progress_stack+\" is current progress_stack\");\r\n System.out.println(popped_points+\" is the popped points\");\r\n\r\n\r\n\r\n }else{\r\n //get polygon points arraylist\r\n int end_index = separate_index.get(j+1);\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n\r\n }\r\n }\r\n if(separate_index.size() == 1){\r\n // store the last color, points, shape\r\n //popped the last one from color, points, progress stack\r\n System.out.println(poly_points+\" is poly points stack\");\r\n popped_color = poly_colors.get(poly_colors.size()-1);\r\n popped_shape = \"poly\";\r\n poly_points.remove(0);\r\n popped_points.clear();\r\n for (int i = 0; i < poly_points.size(); i++) {\r\n popped_points.add(poly_points.get(i));\r\n }\r\n// int line_num = poly_points.size()-1;\r\n\r\n\r\n poly_colors.clear();\r\n\r\n for (int s = 0; s < poly_points.size()/2; s++) {\r\n progress_stack.remove(progress_stack.size()-1);\r\n }\r\n System.out.println(progress_stack+\" after polygon pop\");\r\n poly_points.clear();\r\n System.out.println(popped_points+\" is the popped points\");\r\n\r\n\r\n\r\n }\r\n\r\n //repaint other shapes\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n if(cir_colors.size()>0){\r\n //circle repaint\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n if(squ_colors.size()>0){\r\n //square repaint\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n if(ell_colors.size()>0){\r\n //ellipse repaint\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n if(str_colors.size()>0){\r\n //straight line repaint\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index_hand = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index_hand.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index_hand.get(j)+1;\r\n int end_index = separate_index_hand.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if(last_state.equals(\"handdraw\")){\r\n //repaint shapes except the last one\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n if(handdraw_colors.size() == 1){\r\n // store color points shape\r\n int begin_index = 0;\r\n int end_index = separate_index.get(0);\r\n\r\n popped_color = handdraw_colors.get(0);\r\n popped_shape = \"handdraw\";\r\n\r\n popped_points.clear();\r\n for (int p = begin_index; p < end_index; p++) {\r\n popped_points.add(handdraw_points.get(p));\r\n }\r\n\r\n //pop those data\r\n handdraw_colors.clear();\r\n progress_stack.remove(progress_stack.size()-1);\r\n handdraw_points.clear();\r\n\r\n }\r\n if(handdraw_colors.size() > 1){\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }\r\n if(i == handdraw_colors.size()-1){\r\n // the last freehand line\r\n //store shape color points\r\n int begin_index = separate_index.get(separate_index.size()-2)+1;\r\n int end_index = separate_index.get(separate_index.size()-1);\r\n\r\n popped_color = handdraw_colors.get(handdraw_colors.size()-1);\r\n popped_shape = \"handdraw\";\r\n\r\n popped_points.clear();\r\n for (int j = begin_index; j < end_index; j++) {\r\n popped_points.add(handdraw_points.get(j));\r\n }\r\n\r\n System.out.println(popped_points+\" popped freehand points\");\r\n\r\n //pop those data\r\n handdraw_colors.remove(handdraw_colors.size()-1);\r\n progress_stack.remove(progress_stack.size()-1);\r\n for (int p = 0; p < (popped_points.size()+1); p++) {\r\n handdraw_points.remove(handdraw_points.size()-1);\r\n }\r\n System.out.println(handdraw_points+\" after freehand pop\");\r\n\r\n\r\n }\r\n\r\n else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-2; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n }\r\n\r\n\r\n\r\n //repaint other shapes\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n if(cir_colors.size()>0){\r\n //circle repaint\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n if(squ_colors.size()>0){\r\n //square repaint\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n if(ell_colors.size()>0){\r\n //ellipse repaint\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n if(str_colors.size()>0){\r\n //straight line repaint\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n separate_index = get_separate_index(poly_points);\r\n points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }", "@Override\r\n\tpublic void update(Observable arg0, Object arg1) {\n\t\trepaint();\r\n\t}", "void graphSelectionChanged(Mode mode);", "@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "@Override\n public void handle(ActionEvent event) {\n canvasState.changeFillColor(fillercolor.getValue());\n redrawCanvas();\n }", "public void repaint(ColorMixerModel.ColorItem c){\n cmUI.repaint(c.getBound());\n }", "private void drawGraph() {\n // you can show warning messages now\n imrGuiBean.showWarningMessages(true);\n addGraphPanel();\n setButtonsEnable(true);\n }", "public void update(Graphics param1Graphics) {\n/* 252 */ paint(param1Graphics);\n/* */ }", "public SignalCanvas() {\n\t\tsuper();\n\t}", "public void update() {\n\t\tremoveAll();\n\t\tdrawGraph();\n\t\tplotEntries();\n\t}", "void repaintCanvas() {\n objCanvas.repaint();\n\n objCanvas.setImage(_img);\n ArrayList<ObjLabel> objLabels = objCanvas.getObjLabels();\n\n status(\"Parsed: \" + objLabels.size() + \" objects for \" + getFilename());\n objLabels.forEach((objLabel) -> {\n addObjLabel(objLabel);\n\n });\n }", "public void updatePainter(Painter painter);", "@Override\n public void update() {\n if (changedState) {\n selectedPosY = selection * hItemBox + yPos + hItemBox;\n selectedPosX = xPos; \n changedState = false;\n }\n }", "@Override\n public void modelChanged(double currentAngle, double[][] mat43) {\n Runnable runnable = new Runnable() {\n public void run() {\n updateModelEntList(combinedRotatingMatrix);\n Rectangle rect = getBounds();\n rect.x = 0;\n rect.y = 0;\n// System.out.println(\"MainMonitorCSysView.updateCSysEntList: x \" + rect.x + \" y \" + rect.y + \" w \" + rect.width + \" h\" + rect.height);\n// MainMonitorCSysView.this.paintImmediately(rect);\n repaint();\n }\n };\n if (!SwingUtilities.isEventDispatchThread()) {\n Thread.dumpStack();\n }\n\n// System.out.println(\"isEventDispatchThread \"+SwingUtilities.isEventDispatchThread());\n if (SwingUtilities.isEventDispatchThread()) {\n runnable.run();\n } else {\n SwingUtilities.invokeLater(runnable);\n }\n\n// updateModelEntList(combinedRotatingMatrix);\n// if (backBuffer == null) {\n// buildImage = true;\n// }\n }" ]
[ "0.68908113", "0.6839978", "0.681272", "0.6766282", "0.6724262", "0.67147416", "0.6602551", "0.6600405", "0.6600405", "0.6596314", "0.6524767", "0.64863616", "0.6466504", "0.64601666", "0.64580745", "0.64294666", "0.6412252", "0.6387619", "0.638531", "0.6349384", "0.6322872", "0.6315597", "0.62966794", "0.62607616", "0.6240853", "0.62177426", "0.620901", "0.6208239", "0.620745", "0.6203905", "0.61975384", "0.6189883", "0.61804813", "0.61652774", "0.61610115", "0.6159023", "0.6152706", "0.61344504", "0.61329097", "0.6121267", "0.605422", "0.6049431", "0.6038356", "0.6035025", "0.60182786", "0.6010767", "0.5977698", "0.5959766", "0.5955625", "0.5954255", "0.5941504", "0.59349513", "0.5916798", "0.5906673", "0.5897856", "0.58974296", "0.5897011", "0.58965385", "0.58959275", "0.5880004", "0.58781856", "0.5873873", "0.58646643", "0.5860943", "0.5860566", "0.58581287", "0.5854647", "0.58333445", "0.5830101", "0.58176094", "0.5813702", "0.581114", "0.57978433", "0.57960415", "0.5790469", "0.5779643", "0.5771652", "0.5769318", "0.57680094", "0.5762275", "0.5759859", "0.57171184", "0.57158214", "0.5711157", "0.5700205", "0.5696403", "0.5690838", "0.56900936", "0.56752", "0.56705993", "0.56702405", "0.56702197", "0.5664902", "0.5663312", "0.56569695", "0.5656633", "0.5653227", "0.5653161", "0.5652322", "0.56503403", "0.56491995" ]
0.0
-1
Overridden for smoother repainting
public void paint(Graphics g) { update(g); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void repaint() {}", "@Override\r\n public void repaint() {\r\n }", "public void repaint() {\n\n\t}", "public void repaint() {\n\t\n}", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "@Override\n\tpublic void repaint() {\n\t\tsuper.repaint();\n\t}", "public void requestRepaint() {\n }", "@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}", "public void repaint();", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "public void repaint( long tm ) {\n }", "public abstract void forceRepaint();", "@Override\n\tpublic void redraw() {\n\t\t\n\t}", "@Override\r\n public void repaint(Object canvas) {\r\n {\r\n }\r\n\t}", "@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}", "public void repaint(long tm, int x, int y, int width, int height) {}", "@Override\n\tprotected void repaintView(ViewGraphics g) {\n\t}", "@Override\n public void update(Graphics g) {\n paint(g);\n }", "public void requestRepaintRequests() {\n }", "public void repaint() {\n setBackground(Color.white);\n super.repaint();\n setVisible(true);\n\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public void update(Graphics g, JComponent c)\n/* */ {\n/* 304 */ super.update(g, c);\n/* */ }", "@Override\r\n public void repaint(final long tm, final int x, final int y, final int width, final int height) {\r\n }", "public void update(Graphics g){\n paint (g);\r\n \r\n }", "public void repaint()\n\t{\n\t\tif (game.getPlayerID() != game.getCurrentIdx())\n\t\t{\n\t\t\tthis.disable();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.enable();\n\t\t}\n\n\t\tthis.resetSelected();\n\t\tbigTwoPanel.repaint();\n\t}", "public void update(Graphics param1Graphics) {\n/* 252 */ paint(param1Graphics);\n/* */ }", "public void refresh() {\n\t\tthis.repaint();\n\t}", "@Override\n public void actionPerformed( ActionEvent actionEvent )\n {\n repaint(); // repaint animator\n }", "private void forceRedraw(){\n postInvalidate();\n }", "public void repaintGraph() {\r\n this.repaint();\r\n ((GraphBuilder) getFrameParent()).getMiniMap().repaint();\r\n }", "protected void reDraw(){\n\t\tcontentPane.revalidate();\n\t\trepaint();\n\t}", "public void run() {\n\t\t\t\t\t\t\t\t heavyResize();\n\t\t\t\t\t\t\t\t invokeRedraw();\n\t\t\t\t\t\t\t\t }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n progress_stack = progress_stack_bkup;\r\n\r\n rec_points = rec_points_bkup;\r\n rec_colors = rec_colors_bkup;\r\n\r\n squ_points = squ_points_bkup;\r\n squ_colors = squ_colors_bkup;\r\n\r\n ell_points = ell_points_bkup;\r\n ell_colors = ell_colors_bkup;\r\n\r\n cir_points = cir_points_bkup;\r\n cir_colors = cir_colors_bkup;\r\n\r\n str_points = str_points_bkup;\r\n str_colors = str_colors_bkup;\r\n\r\n poly_points = poly_points_bkup;\r\n poly_colors = poly_colors_bkup;\r\n\r\n handdraw_points = handdraw_points_bkup;\r\n handdraw_colors = handdraw_colors_bkup;\r\n\r\n\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n //repaint circle\r\n if(cir_colors.size()>0){\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n //repaint square\r\n if(squ_colors.size()>0){\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n //repaint ellipse\r\n if(ell_colors.size()>0){\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n //repaint straight line\r\n if(str_colors.size()>0){\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n\r\n //repaint polygons\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n }\r\n\r\n //repaint freehand lines\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }", "public void requestRepaint() {\n\t\tJWLC.nativeHandler().wlc_output_schedule_render(this.to());\n\t}", "@Override\n\tpublic void update(Observable o, Object arg) {\n\t\tthis.repaint(); // Schedule a call to paintComponent\n\t}", "public void repaint(Rectangle r) {}", "protected void repaint()\n {\n // Update the contents if an update is needed.\n // Will only actually repaint if the contents are dirty.\n view.getEditor().getInteractionFigure().repaint();\n }", "private void dragPaint() {\n\n\t\t//buffer die image ooit\n\t\tinvalidate();\n\t\trepaint();\n\t}", "@Override\n public void repaint() {\n this.jLabel2.setText(Float.toString(this.c.getVd()));\n this.jLabel4.setText(df.format(this.c.getUu()));\n this.jLabel6.setText(this.c.getSmax());\n this.jLabel8.setText(Float.toString(this.c.getAs()));\n this.jLabel10.setText(df.format(this.c.getVc()));\n this.jLabel11.setText(this.c.getSecc());\n this.jLabel12.setText(this.c.getE());\n this.jLabel13.setText(df.format(this.c.getEval()));\n }", "@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }", "@Override\n public void paint(Graphics g) {\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) \r\n\t{\n\t\tsuper.paintComponent(g);\r\n\t\t\r\n\t\t// passes Graphics g into flappy\r\n\t\tflappy.flappybox.repaint(g); /// passes Graphics g into flappy\r\n\t}", "public void requestRedraw() {\n\n this.getParent().repaint();\n\n }", "@Override\r\n public void repaint(final Rectangle r) {\r\n }", "public void draw() {\n\t\tsuper.repaint();\n\t}", "public void actionPerformed(ActionEvent e) {\n \r\n \r\n repaint();\r\n }", "public void draw(){\n super.repaint();\n }", "@Override\n\tpublic void paint(Graphics2D g2d, float interpolation) \n\t{\n\t\tthis.paint(g2d);\n\t}", "public void repaint() {\n if ( clock != null && clock.isPaused() ) {\n super.repaint();\n }\n }", "protected void repaint() {\n if (_tile!=null)\n _tile.repaint();\n }", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "public void redraw()\r\n\t{\r\n\t\tif (needsCompleteRedraw)\r\n\t\t{\r\n\t\t\tcompleteRedraw();\r\n\t\t\tneedsCompleteRedraw = false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tpartialRedraw();\r\n\t\t}\r\n\t}", "public void megarepaintImmediately() {\n paintDirtyRectanglesImmediately();\n }", "public void update(Graphics g){\n paint(g);\n }", "public void graphRepaint() {\r\n \t\tgraph.repaint();\r\n \t}", "public void repaint (Graphics g){\r\n g.drawLine(10,10,150,150); // Draw a line from (10,10) to (150,150)\r\n \r\n g.setColor(Color.darkGray);\r\n g.fillRect( 0 , 0 , \r\n 4000 , 4000 ); \r\n \r\n g.setColor(Color.BLACK);\r\n \r\n BufferedImage image;\r\n \r\n for(int h = 0; h < 16; h++){\r\n for(int w =0; w< 16; w++){\r\n //g.drawImage(image.getSubimage(w *16, h*16, 16, 16), 0+(32*w),0 +(32*h), 32,32,this);\r\n g.drawRect(w *32, h*32, 32, 32);\r\n \r\n if(coord.xSelected >=0){\r\n g.setColor(Color.WHITE);\r\n g.drawRect(coord.xSelected *32, coord.ySelected *32, 32, 32);\r\n g.setColor(Color.BLACK);\r\n }\r\n }\r\n }\r\n \r\n \r\n }", "public void refresh() {\n\t\tdrawingPanel.repaint();\n\t}", "public void run()\r\n {\r\n try\r\n {\r\n while(j.isEnabled())\r\n {\r\n while((x+100) < j.getWidth()){\r\n rev = false;\r\n x += 20;\r\n repaint();\r\n Thread.sleep(time);\r\n }\r\n \r\n while((x-100)> j.getWidth()-j.getWidth()){\r\n rev = true;\r\n x -= 20;\r\n repaint();\r\n Thread.sleep(time);\r\n }\r\n }\r\n }\r\n catch(InterruptedException e)\r\n {\r\n return;\r\n }\r\n }", "public void paintImmediately() {\n apparatusPanel2.paintDirtyRectanglesImmediately();\n }", "public void actionPerformed(ActionEvent ae) {\r\nrepaint();\r\n}", "public void partialRedraw()\r\n\t{\r\n\t\tg.clearRect(0,0,NumerateGame.WINDOW_X,NumerateGame.WINDOW_Y);\r\n\t}", "public void update(Graphics g) {\n // Note: Since the paint method is going to draw an\n // image that covers the complete area of the component we\n // do not fill the component with its background color\n // here. This avoids flickering.\n paint(g);\n }", "public void repaint(Graphic graphic, Rectangle2D objectiveArea, Rectangle displayArea) {\n }", "public final void windowRepaintOp() {\n super.defaultWindowRepaintOp();\n }", "public void run() {\n\t\t\t heavyResize();\n\t\t\t invokeRedraw();\n\t\t }", "private void repaint() {\n\t\tclear();\n\t\tfor (PR1Model.Shape c : m.drawDataProperty()) {\n\t\t\tif(!c.getText().equals(defaultshape))\n\t\t\t\tdrawShape(c, false);\n\t\t}\n\t\tif (getSelection() != null) {\n\t\t\tdrawShape(getSelection(), true);\n\t\t}\n\t}", "@Override\n public void onPaint(Graphics2D g) {\n\n }", "@Override\n public synchronized void paint(Graphics g) {\n if (!shouldPaint()) {\n return;\n }\n\n if (g instanceof Graphics2D) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHints(argoRenderingHints);\n\t double scale = getScale();\n g2.scale(scale, scale);\n }\n getLayerManager().paint(g);\n //getLayerManager().getActiveLayer().paint(g);\n if (_canSelectElements) {\n _selectionManager.paint(g);\n _modeManager.paint(g);\n }\n }", "void reDraw();", "protected void paintComponent(Graphics g)\n\t{\n\t}", "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "public void doRepaint() {\n window.getApplication().doRepaint();\n }", "public void paint() {\n paintStrategy.paintImmediately();\n }", "public void repaint(boolean repaint_navigator) {\n \t\t//TODO: this could be further optimized to repaint the bounding box of the last modified segments, i.e. the previous and next set of interpolated points of any given backbone point. This would be trivial if each segment of the Bezier curve was an object.\n \t\tRectangle box = getBoundingBox(null);\n \t\tcalculateBoundingBox(true);\n \t\tbox.add(getBoundingBox(null));\n \t\tDisplay.repaint(layer_set, this, box, 5, repaint_navigator);\n \t}", "public void repaint() { if(_parent!=null) _parent.repaint(this); }", "protected void repaint(RMShape aShape) { if(_parent!=null) _parent.repaint(aShape); }", "public void paint(Graphics g) {\n\tupdate(g);\n }", "private void treinRepaint()\r\n {\r\n if(treinaantal != 0){\r\n for(int i =0; i < treinaantal; i++){\r\n int[] id = {treinlijst[i].getId()};\r\n int[] arg = {treinlijst[i].getPositie()};\r\n main.updateGui(\"trein\", id, arg);\r\n }\r\n }\r\n }", "public void update(Graphics g) {\n paint(g);\n }", "public void update(Graphics g) {\n paint(g);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e)\n\t{\n\t\trepaint();\n\t}", "protected void paintComponent(Graphics g)\n/* */ {\n/* 126 */ if ((this.painter != null) || (isNimbus()))\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 131 */ if (isOpaque())\n/* */ {\n/* 133 */ paintComponentWithPainter((Graphics2D)g);\n/* */ }\n/* */ else {\n/* 136 */ paintPainter(g);\n/* 137 */ super.paintComponent(g);\n/* */ }\n/* */ }\n/* */ else {\n/* 141 */ super.paintComponent(g);\n/* */ }\n/* */ }", "public void completeRedraw()\r\n\t{\r\n\t\tg = (Graphics2D) s.getDrawGraphics();\r\n\t}", "public void update() {\n\t\tfirstMove = false;\n\t\tif (color == 1) xrange = -1;\n\t\tif (color == 0) xrange = 1;\n\t}", "public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawBackGround();\r\n\t\tdrawGraph();\r\n\t}", "public void update(Graphics g) {\r\n paint(g);\r\n }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n System.out.println(\"Repaint\");\r\n repaint();\r\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void update(Rectangle2D r) {\r\n\t\t\t\r\n\t\t\tmakeDirty(r, false);\r\n\t\t\tif (_clipping != null) \r\n\t\t\t\trepaint(_clipping.getTransform().createTransformedShape(r).getBounds());\r\n\t\t}", "@Override\n public void update(int mouseX, int mouseY, boolean click) {\n super.update(mouseX, mouseY, click);\n _innerSize._x = _size._x * _progress;\n }", "public void affiche() {\n\t\tcontroller.image.repaint();\n\t}", "@Override\n public boolean shouldPaint() {\n return false;\n }", "public void paintComponent(Graphics g);", "protected void paintComponent(Graphics g) {\n \t\n \tif(refreshRate != 0)//if FPS is set to 0, this will simulate a 'frozen' state\n \tt.setDelay(1000 / refreshRate);//creates desired FPS\n \t//if-else statement used for incrementing and resetting repaintCount, and used for calculating the FPS which is displaye dby fpsPanel.java\n \tif (repaintCount++ > 0) {\n long curTime = System.currentTimeMillis();\n long elapseTime = curTime - startTime;\n rate = ((double)(repaintCount - 1)) / (elapseTime / 1000.0);\n } else {\n startTime = System.currentTimeMillis();\n }\n super.paintComponent(g);\n g.setColor(backColor);//backcolor controls the color of the background\n g.fillRect(0, 0, getWidth(), getHeight());\n g.setColor(objectColor);//objectColor controls the color of the shape\n if(oval)\n \tg.drawArc(x, y, width, height, 0, 360);\n if (rect)\n \tg.drawRect(x, y, width, height);\n if (rectround){\n RoundRectangle2D roundedRectangle = new RoundRectangle2D.Float(x, y, width, height,5,5);\n ((Graphics2D) g).draw(roundedRectangle); \n }\n g.setColor(textColor);//textColor controls the color of the text\n g.setFont(f);\n if (small)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x-15,y+13);//positioned properly for all small sizes\n if(medium)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+1,y+16);//coordinates position properaly for all medium sizes\n if(large)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+50,y+25);//coordinates position properly for all large sizes\n \t\n }", "@Override\r\n\tpublic void update(Observable o, Object arg) {\r\n\t\t// Not exactly how MVC works, but similar.\r\n\t\tthis.repaint(); // Schedule a call to paintComponent\r\n\t}", "public void showNet()\n/* */ {\n/* 482 */ update(getGraphics());\n/* */ }", "public void refresh() {\n\t\tdisp.refresh();\n\t\tdisp.repaint();\n\t}", "public void paint(Graphics g) {\n super.paint(g);\n update(g);\n }", "@Override\r\n public void actionPerformed(ActionEvent ae)\r\n {\r\n renderer.setTimeScaler(renderer.getTimeScaler() + 0.1f);\r\n }" ]
[ "0.790082", "0.7897195", "0.78200597", "0.7687296", "0.76516", "0.76516", "0.7531074", "0.7462827", "0.74002635", "0.7382811", "0.73441994", "0.7326387", "0.72372144", "0.7165742", "0.71601546", "0.70532733", "0.7047155", "0.7026", "0.69667655", "0.6892684", "0.6850381", "0.6818527", "0.6804573", "0.67689985", "0.6767419", "0.6721325", "0.67018485", "0.6681627", "0.6680706", "0.6679324", "0.66296405", "0.66293526", "0.6623005", "0.66129136", "0.6606915", "0.65793204", "0.65777814", "0.6561917", "0.6557155", "0.6556268", "0.6547128", "0.6540292", "0.6526335", "0.65181005", "0.65133697", "0.6508753", "0.65071344", "0.6498662", "0.6493914", "0.64927363", "0.648643", "0.64678055", "0.6455565", "0.64497936", "0.6435285", "0.64297754", "0.6418896", "0.6408126", "0.64073396", "0.64034396", "0.64007056", "0.6390501", "0.63886356", "0.63521993", "0.6347673", "0.6337973", "0.63261306", "0.6325268", "0.6294338", "0.62899584", "0.62875485", "0.6285774", "0.6284126", "0.6277357", "0.62767696", "0.62765455", "0.6273486", "0.62578857", "0.6249159", "0.6245509", "0.6245509", "0.62352836", "0.62351924", "0.6232309", "0.62310183", "0.6219478", "0.6198098", "0.61885214", "0.6184071", "0.61829865", "0.61658216", "0.6159468", "0.6150245", "0.6149874", "0.61428165", "0.61369395", "0.6120646", "0.6118022", "0.61115694", "0.6098747", "0.6096027" ]
0.0
-1
A function for measuring the distance between two points. Should have the property that the closer two points are(lower distance) the more similary they should be(high similarity).
public double distance(DataInstance d1, DataInstance d2, List<Attribute> attributeList);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}", "double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }", "static double distance(double x1, double y1, double x2, double y2)\n {\n double x_dist = x2 - x1;\n double y_dist = y2 - y1;\n double dist = Math.sqrt(Math.pow(x_dist, 2) + Math.pow(y_dist, 2));\n return dist;\n }", "static double distance(Point a, Point b) {\n\t\tint xDiff = a.x - b.x;\n\t\tint yDiff = a.y - b.y;\n\t\treturn Math.sqrt((xDiff * xDiff) + (yDiff * yDiff));\n\t}", "double distance(Point p1,Point p2){\n\t\tdouble dx = p1.x - p2.x;\n\t\tdouble dy = p1.y - p2.y;\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}", "private double distance(Point a, Point b) {\n\t\tDouble xdist = new Double( a.x - b.x );\n\t\tDouble ydist = new Double( a.y - b.y );\n\t\treturn Math.sqrt( Math.pow(xdist, 2.0) + Math.pow(ydist, 2.0) );\n\t}", "public final double calcDistance( Point a, Point b )\r\n {\r\n return( Math.sqrt( (Math.pow(a.y - b.y, 2)) +\r\n (Math.pow(a.x - b.x, 2)) ) );\r\n }", "public static double calculateDistance(Point point1, Point point2){\n\n if (point1.getX() > point2.getX() || point1.getY() > point2.getY()){\n Point tmp = point1;\n point1 = point2;\n point2 = tmp;\n }\n\n double distance = Math.abs(Math.sqrt((point2.x - point1.x) * (point2.x - point1.x) + (point2.y - point1.y) * (point2.y - point1.y)));\n\n return distance;\n //return Math.ceil(distance * scale) / scale;\n }", "public static double distanceBetween(Pair<Double, Double> p1, Pair<Double, Double> p2) {\n float[] result = new float[1];\n android.location.Location.distanceBetween(p1.first, p1.second, p2.first, p2.second, result);\n return result[0];\n }", "static double distance(Point p1, Point p2) {\n\t\treturn Math.sqrt((p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y));\n\t}", "private double calculateDistance(Circle point1, Circle point2) {\r\n double x = point1.getCenterX() - point2.getCenterX();\r\n double y = point1.getCenterY() - point2.getCenterY();\r\n\r\n return Math.sqrt(x*x + y*y);\r\n }", "protected double getDistance(Point p1, Point p2) {\n\t\treturn Math.sqrt((p1.getX()-p2.getX())*(p1.getX()-p2.getX()) + (p1.getY()-p2.getY())*(p1.getY()-p2.getY())); \n\t}", "private static double distance(double x, double y, double x1, double x2,\n\t\t\tdouble y1, double y2) {\n\t\tPoint p = new Point(x, y);\n\t\tPoint p1 = new Point(x1, y1);\n\t\tPoint p2 = new Point(x2, y2);\n\t\treturn p.distance(p1, p2);\n\t}", "private double getDistance(float x, float y, float x1, float y1) {\n double distanceX = Math.abs(x - x1);\n double distanceY = Math.abs(y - y1);\n return Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n }", "private double d(Point a, Point b){\n\t\treturn Math.sqrt(Math.pow(b.getX()-a.getX(),2) + Math.pow(a.getY() - b.getY(), 2));\r\n\t}", "public double distance(double x1, double y1, double x2, double y2)\n {\n return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow(y2 - y1, 2));\n }", "public double distance(double x, double y);", "public int distance(Coord coord1, Coord coord2);", "public static double getDistance(GPSCoordinates point1, GPSCoordinates point2) {\r\n\t\t\r\n\t\treturn EARTH_RADIUS * 2 * Math.atan2( Math.sqrt( getHaversinePart(point1, point2)), Math.sqrt( getHaversinePart(point1, point2) ) );\r\n\t}", "private double distance(Point A, Point B) {\n\t\tdouble dX = A.x - B.x;\n\t\tdouble dY = A.y - B.y;\n\t\treturn Math.sqrt(dX * dX + dY * dY);\n\t}", "double getDistance(Point p);", "public static double getDistance(int x1, int y1, int x2, int y2)\n {\n double dx = x2 - x1;\n double dy = y2 - y1;\n\n // return Math.hypot(x2 - x1, y2 - y1); // Extremely slow\n // return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); // 20 times faster than hypot\n return Math.sqrt(dx * dx + dy * dy); // 10 times faster then previous line\n }", "private double distance(Position pos1, Position pos2)\r\n {\r\n assert pos1 != null;\r\n assert pos2 != null;\r\n\r\n int x = Math.abs(pos1.column() - pos2.column());\r\n int y = Math.abs(pos1.line() - pos2.line());\r\n\r\n return Math.sqrt(x * x + y * y);\r\n }", "private double dist(double [] v1, double [] v2){\n \t\tdouble sum=0;\n \t\tfor (int i=0; i<nDimensions; i++){\n \t\t\tdouble d = v1[i]-v2[i];\n \t\t\tsum += d*d;\n \t\t}\n \t\treturn Math.sqrt(sum);\n \t}", "public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }", "public double distance(InputDatum datum, InputDatum datum2) throws MetricException;", "private double DistancePoint(Point a, Point b) {\n\t\tdouble ab = Math.sqrt( \n\t\t\t\tMath.pow( (b.getX() - a.getX()) , 2) +\n\t\t\t\tMath.pow( (b.getY() - a.getY()) , 2)\n\t\t);\n\t\treturn ab;\n\t}", "public double distanceBetween2Points(double x1,double y1,double x2, double y2){\n\t\treturn Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));\n\t}", "private double calculateDistance(Example first, Example second) {\n\t\tdouble distance = 0;\n\t\tfor (Attribute attribute : first.getAttributes()) {\n\t\t\tdouble diff = first.getValue(attribute) - second.getValue(attribute);\n\t\t\tdistance += diff * diff;\n\t\t}\n\t\treturn Math.sqrt(distance);\n\t}", "public double distance(Point a, Point b) {\n\t\tdouble dx = a.x - b.x;\n\t\tdouble dy = a.y - b.y;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}", "public static float getDistance(float x1, float y1, float x2, float y2)\r\n\t{\r\n\t\treturn (float) Math.sqrt(getSquareDistance(x1, y1, x2, y2));\r\n\t}", "public static double distance(double x1, double y1, double x2, double y2) {\n\t\tdouble r1 = x2 - x1;\n\t\tdouble r2 = y2 - y1;\n\t\treturn Math.sqrt(r1 * r1 + r2 * r2);\n\t}", "private double calculateDistance(int sourceX, int sourceY, int targetX, int targetY){\n int xLength = targetX - sourceX;\n int yLength = targetY - sourceY;\n return Math.sqrt((xLength*xLength)+(yLength*yLength)); \n }", "double getDistance();", "public abstract double distanceFrom(double x, double y);", "public abstract double getDistance(T o1, T o2) throws Exception;", "private int distance(Point p1, Point p2) {\n return (int) Math.sqrt(Math.pow(p1.getCenterX() - p2.getCenterX(), 2) + Math.pow(p1.getCenterY() - p2.getCenterY(), 2));\n }", "public static double distance(double lat1, double lon1, double lat2, double lon2) {\n\n\n float[] dist = new float[1];\n Location.distanceBetween(lat1, lon1, lat2, lon2, dist);\n //Log.d(\"*******dist\", \":\" + dist[0]);\n return (dist[0]);\n //\n // double theta = lon1 - lon2;\n // double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2))\n // + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2))\n // * Math.cos(deg2rad(theta));\n // dist = Math.acos(dist);\n // dist = rad2deg(dist);\n // dist = dist * 60; // 60 nautical miles per degree of seperation\n // dist = dist * 1852; // 1852 meters per nautical mile\n // return (dist);\n //\n }", "public static float getDistanceBetween(PVector p1, PVector p2) {\n // Note: Raw values between point 1 and point 2 not valid, as they are are origin-based.\n PVector sub = PVector.sub(p1, p2);\n PVector xaxis = new PVector(1, 0);\n float dist = PVector.dist(sub, xaxis);\n return dist;\n }", "public abstract double calculateDistance(double[] x1, double[] x2);", "private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }", "public static double computeDistance(GeoPoint point1, GeoPoint point2) {\n return Math.sqrt(Math.pow(point1.getLatitudeE6()\n - point2.getLatitudeE6(), 2d)\n + Math.pow(point1.getLongitudeE6() - point2.getLongitudeE6(),\n 2d));\n }", "public static String distance(String x1, String x2){\n\n }", "public static double distance(\n\t\t\tdouble x1, double y1, double x2, double y2) {\n\t\treturn Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n\t}", "private double findDistance(int[] pos1, int[] pos2) {\n return sqrt((pos1[0]-pos2[0])*(pos1[0]-pos2[0])+\n (pos1[1]-pos2[1])*(pos1[1]-pos2[1]));\n }", "public double distance(V a, V b);", "public int calculateDistance(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2){\n double x1 = l1.data.getxCo();\n double y1 = l1.data.getyCo();\n double x2 = l2.data.getxCo();\n double y2 = l2.data.getyCo();\n double dist = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return (int) dist;\n }", "private double distance(double lat1, double lon1, double lat2, double lon2) {\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n dist = dist * 1.609344;\r\n return (dist); // return distance in kilometers\r\n }", "public static double distanceCalculator(Point a, Point b) {\n double distSquared = (Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2) + Math.pow(a.z - b.z, 2));\n return Math.sqrt(distSquared);\n }", "public double getDistance(final DataPoint point1, final DataPoint point2) {\n return NTree.getDistance(point1, point2);\n }", "public double distance(Point other) {\n\n // Define delta-X and delta-Y.\n double deltaX = this.x - other.x;\n double deltaY = this.y - other.y;\n\n // Calculate distance and return.\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n }", "public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }", "public static float distance(PointF p1, PointF p2){\n return (float) Math.sqrt(Math.pow((p2.x - p1.x), 2) + Math.pow(p2.y - p1.y,2));\n }", "public static double distance(Prototype one, Prototype two)\r\n {\r\n return d(one, two);\r\n }", "private static double get_distance ( String one, String two){\n String temp[] = one.split(\" \");\n double lat1 = Double.parseDouble(temp[0]);\n double long1 = Double.parseDouble(temp[1]);\n\n String temp2[] = two.split(\" \");\n double lat2 = Double.parseDouble(temp2[0]);\n double long2 = Double.parseDouble(temp2[1]);\n\n// Get distance between two lats and two lans\n double latDistance = Math.toRadians(lat1 - lat2);\n double lngDistance = Math.toRadians(long1 - long2);\n\n// Step 1\n double a = (Math.sin ( latDistance / 2 ) * Math.sin (latDistance / 2)) +\n (Math.cos ( Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) )\n * ( Math.sin (lngDistance /2 ) * Math.sin(lngDistance / 2) );\n// Step 2\n double c = ( 2 * (Math.atan2( Math.sqrt(a), Math.sqrt(1-a))));\n// Step 3\n double d = ( EARTH_RADIUS * c );\n return d;\n }", "private static int dist(int x1, int y1, int x2, int y2) {\n\t\treturn (int) Math.sqrt(Math.abs(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1))));\n\t}", "public static final double distance(final float x1, final float x2, final float y1, final float y2) {\r\n return Math.sqrt( ( (x2 - x1) * (x2 - x1)) + ( (y2 - y1) * (y2 - y1)));\r\n }", "private double dist(Integer unit1, Integer unit2, StateView newstate) {\n\t\t//Creating two arrays of size 2 to store the position of the 2 units\n\t\tint[] pos1 = new int[2];\n\t\tint[] pos2 = new int[2];\n\t\t//Extracting the positional data\n\t\tpos1[0] = newstate.getUnit(unit1).getXPosition();\n\t\tpos1[1] = newstate.getUnit(unit1).getYPosition();\n\t\tpos2[0] = newstate.getUnit(unit2).getXPosition();\n\t\tpos2[1] = newstate.getUnit(unit2).getYPosition();\n\t\t//Calculating the distance\n\t\tdouble dx = Math.abs(pos1[0] - pos2[0]);\n\t\tdouble dy = Math.abs(pos1[1] - pos2[1]);\n\t\tdouble distance = Math.sqrt(Math.pow(dx, 2.0) + Math.pow(dy, 2.0));\n\t\treturn distance;\n\t}", "public float getDistance();", "@Override\n\tpublic float getDistance(float[] fv1, float[] fv2) {\n\t\tif(settings.getMetric() == 1){\n\t\t\treturn getL1Distance(fv1, fv2);\n\t\t} else { //metric == 2\n\t\t\treturn getL2Distance(fv1, fv2);\n\t\t}\n\t\t\n\t\t\n\t}", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "private static double calculaDistancia(double[] param1, double[] param2){\n\t\tdouble res1= Math.pow((param1[0]-param2[0]), 2);\n\t\tdouble res2= Math.pow((param1[1]-param2[1]), 2);\n\t\tdouble res3= Math.pow((param1[2]-param2[2]), 2);\n\t\tdouble res4= res1 + res2 + res3;\n\t\tdouble res5= res4/3;\n\t\tdouble res6= Math.sqrt(res5);\n\t\treturn res6;\n\t}", "public static double distance(Position p1, Position p2){\n\t\t\n\t\tdouble lat1 = p1.getLat(); \n\t\tdouble lon1 = p1.getLon();\n\t\tdouble lat2 = p2.getLat(); \n\t\tdouble lon2 = p2.getLon();\n\t\t\n\t\tdouble r = 6371; // km\n\t\tdouble dLat = Math.toRadians(lat2-lat1);\n\t\tdouble dLon = Math.toRadians(lon2-lon1);\n\t\tdouble nlat1 = Math.toRadians(lat1);\n\t\tdouble nlat2 = Math.toRadians(lat2);\n\n\t\tdouble a = Math.sin(dLat/2) * Math.sin(dLat/2) + \n\t\t Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(nlat1) * Math.cos(nlat2); \n\t\tdouble c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n\t\tdouble d = r * c;\n\t\treturn d;\n\t\t\n\t}", "public double getDistance(double x, double y) {\n double xdist = 0;\n if (x < x1 && x < x2) xdist = Math.min(x1, x2) - x;\n else if (x > x1 && x > x2) xdist = x - Math.max(x1, x2);\n double ydist = 0;\n if (y < y1 && y < y2) ydist = Math.min(y1, y2) - y;\n else if (y > y1 && y > y2) ydist = y - Math.max(y1, y2);\n return Math.sqrt(xdist * xdist + ydist * ydist);\n }", "public static double GetDistance(double lat1, double lon1, double lat2, double lon2) {\n double radLat1 = rad(lat1);\n double radLat2 = rad(lat2);\n double a = radLat1 - radLat2;\n double b = rad(lon1) - rad(lon2);\n double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;//km\n// Log.e(\"s\", \"s=\" + s);\n return s;\n }", "private double distance(double lat1, double lat2, double lon1, double lon2)\n {\n lon1 = Math.toRadians(lon1);\n lon2 = Math.toRadians(lon2);\n lat1 = Math.toRadians(lat1);\n lat2 = Math.toRadians(lat2);\n\n // Haversine formula\n double dlon = lon2 - lon1;\n double dlat = lat2 - lat1;\n double a = Math.pow(Math.sin(dlat / 2), 2)\n + Math.cos(lat1) * Math.cos(lat2)\n * Math.pow(Math.sin(dlon / 2),2);\n\n double c = 2 * Math.asin(Math.sqrt(a));\n\n // Radius of earth in kilometers. Use 3956\n // for miles\n double r = 6371;\n\n // calculate the result\n return(c * r);\n }", "public double distance(double[] vector1, double[] vector2) throws MetricException;", "double distance (double px, double py);", "public double computeDistance(cluster c1, cluster c2) {\n\t\tdouble closest = 4000;\n\t\tfor (point p1 : c1.getPoints()) {\n\t\t\tfor (point p2 : c2.getPoints()) {\n\t\t\t\tdouble dist = Math.sqrt(Math.pow( (p1.x() - p2.x()) , 2) + Math.pow( (p1.y() - p2.y()) , 2));\n\t\t\t\tif (dist < closest) {\n\t\t\t\t\tclosest = dist;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn closest;\n\t}", "private static double EuclideanDistance(Point p1, Point p2) {\n\t\tdouble dx = p2.X - p1.X;\n\t\tdouble dy = p2.Y - p1.Y;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}", "public double calculateDistance(double latitude1, double longitude1, double latitude2, double longitude2)\n {\n latitude1 = Math.toRadians(latitude1);\n longitude1 = Math.toRadians(longitude1);\n latitude2 = Math.toRadians(latitude2);\n longitude2 = Math.toRadians(longitude2);\n\n double dlon = longitude2 - longitude1;\n double dlat = latitude2 - latitude1;\n\n double a = Math.pow((Math.sin(dlat/2)),2) + Math.cos(latitude1) * Math.cos(latitude2) * Math.pow(Math.sin(dlon/2),2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n //System.out.println(\"a: \" + a + \";c: \" + c + \";result: \" + (r*c));\n return r * c;\n }", "public double distanceTo(Point other) {\r\n\t\tdouble distX, distY, totalDist;\r\n\t\tdistX=(other.pX - pX) * (other.pX - pX);\r\n\t\tdistY=(other.pY - pY) * (other.pY - pY);\r\n\t\ttotalDist=Math.sqrt(distX + distY);\r\n\t\t\r\n\t\treturn totalDist;\r\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\r\n\t\t\r\n\t}", "public double GetDistanceBetweenTwoGPSPoints(double lat1,\n double lat2, double lon1,\n double lon2, gpsUnits unit) {\n\n double lat1Radians = Math.toRadians(lat1);\n double lat2Radians = Math.toRadians(lat2);\n double deltaLatInRadians = Math.toRadians(lat2 - lat1);\n double deltaLonInRadians = Math.toRadians(lon2 - lon1);\n\n double a;\n a = Math.sin(deltaLatInRadians / 2) * Math.sin(deltaLatInRadians / 2) +\n Math.cos(lat1Radians) * Math.cos(lat2Radians) *\n Math.sin(deltaLonInRadians / 2) * Math.sin(deltaLonInRadians / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n double distance = 0;\n\n switch (unit) {\n case KILOMETERS:\n distance = c * R_IN_KILOMETERS;\n break;\n case NAUTICAL_MILES:\n distance = c * R_IN_NAUTICAL_MILES;\n break;\n case MILES:\n distance = c * R_IN_MILES;\n break;\n }\n\n return distance;\n }", "public double distance(Point other) {\n double newX = this.x - other.getX();\n double newY = this.y - other.getY();\n return Math.sqrt((newX * newX) + (newY * newY));\n }", "private static double getDistance(Point r_p1, Point r_p2, Point s_p1, Point s_p2, long time){\n\t\t// get the factors\n\t\tdouble a = getA(r_p1, r_p2, s_p1, s_p2);\n\t\tdouble b = getB(r_p1, r_p2, s_p1, s_p2);\n\t\tdouble c = getC(r_p1, r_p2, s_p1, s_p2);\n\t\t\n\t\tdouble dist = Math.sqrt(a*Math.pow(time, 2) + b*time + c);\n\t\t\n\t\treturn dist;\n\t}", "public static double getDist(int id1, int id2) {\n\t\tArrayList<Double> gA1 = geneAttributes.get(id1);\n\t\tArrayList<Double> gA2 = geneAttributes.get(id2);\n\t\tdouble dist = 0;\n\t\tfor(int i=0;i<gA1.size();i++) {\n\t\t\tdist += ( (gA1.get(i) - gA2.get(i)) * (gA1.get(i) - gA2.get(i)) );\n\t\t}\n\t\tdist = Math.sqrt(dist);\n\t\treturn dist;\n\t}", "double dist(pair p1){\n\t\tdouble dx=(p1.x-centre.x);\n\t\tdouble dy=(p1.y-centre.y);\n\t\tcount++;\n\t\treturn java.lang.Math.sqrt((dx*dx)+(dy*dy));\n\t}", "public static double d(Prototype one, Prototype two)\r\n {\r\n return Math.sqrt(squaredEuclideanDistance(one, two));\r\n }", "public static float calculateDistance(Vec2 vecA, Vec2 vecB) {\n\t\treturn (float) Math.sqrt(\n\t\t\t\tMath.pow(vecA.x - vecB.x, 2)\n\t\t\t\t+\n\t\t\t\tMath.pow(vecA.y - vecB.y, 2)\n\t\t\t\t);\n\t}", "public double distanceTo(Point other) {\n\t\tdouble distX, distY, totalDist;\n\t\tdistX=(other.pX - pX) * (other.pX - pX);\n\t\tdistY=(other.pY - pY) * (other.pY - pY);\n\t\ttotalDist=Math.sqrt(distX + distY);\n\t\t\n\t\treturn totalDist;\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\n\t\t\n\t}", "public static double distancia(Entidade e1,Entidade e2){\r\n\t\tdouble dx = e1.getPosicaoX() - e2.getPosicaoX();\r\n\t\tdouble dy = e1.getPosicaoY() - e2.getPosicaoY();\r\n\t\tdouble d = Math.sqrt(dx*dx + dy*dy);\r\n\t\treturn d;\r\n\t}", "public static final double distance(final double x1, final double x2, final double y1, final double y2) {\r\n return Math.sqrt( ( (x2 - x1) * (x2 - x1)) + ( (y2 - y1) * (y2 - y1)));\r\n }", "public double distance(Point other) {\r\n double dx = this.x - other.getX();\r\n double dy = this.y - other.getY();\r\n return Math.sqrt((dx * dx) + (dy * dy));\r\n }", "private double dist(Point a,Point b)//to find distance between the new entry to predict and the male or female cluster mean positions.\n { double d;\n d=Math.sqrt( Math.pow((a.ht-b.ht),2) + Math.pow((a.wt-b.wt),2));\n return d;\n }", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "public double calculateDistance(MapLocation a, MapLocation b) {\r\n\t\treturn Math.sqrt((double) ( Math.pow((b.x - a.x),2) + Math.pow((b.y - a.y),2) ));\r\n\t}", "private double distance(double lat1, double lon1, double lat2, double lon2) {\r\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1))\r\n * Math.sin(deg2rad(lat2))\r\n + Math.cos(deg2rad(lat1))\r\n * Math.cos(deg2rad(lat2))\r\n * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n return (dist);\r\n }", "static private double dist(double[] a, double[] b) {\n\t\treturn new gov.pnnl.jac.geom.distance.Euclidean().distanceBetween(a, b);\n }", "private Double euclidean(LatitudeLongitude point1, LatitudeLongitude point2) {\n return Double.valueOf(Math.sqrt(Math.pow(point1.getLatitude() - point2.getLatitude(), 2)\n + Math.pow(point1.getLongitude() - point2.getLongitude(), 2)));\n }", "public static EquationExpression dist(final EquationPoint a,\n\t\t\tfinal EquationPoint b) {\n\t\treturn sqrt(dist2(a, b));\n\t}", "private double getWeight(LatLng point1, LatLng point2) {\n\t\tdouble distance = (point1.latitude - point2.latitude) * (point1.latitude - point2.latitude )\n\t\t\t\t+ (point1.longitude - point2.longitude) * (point1.longitude - point2.longitude);\n\t\tSystem.out.print(String.valueOf(distance));\n\t\treturn distance;\n\t}", "public static EquationExpression dist2(final EquationPoint a, final EquationPoint b) {\n EquationExpression x = diff(a.getXExpression(), b.getXExpression());\n EquationExpression y = diff(a.getYExpression(), b.getYExpression());\n return sum(times(x,x), times(y,y));\n }", "public double distanceBetween(Node a, Node b){\n // used to be its own function, now is implemented in the Node class\n return a.getDist(b);\n }", "public static EquationExpression dist2(final EquationPoint a,\n\t\t\tfinal EquationPoint b) {\n\t\tEquationExpression x = diff(a.getXExpression(), b.getXExpression());\n\t\tEquationExpression y = diff(a.getYExpression(), b.getYExpression());\n\t\treturn sum(times(x, x), times(y, y));\n\t}", "public static EquationExpression dist(final EquationPoint a, final EquationPoint b) {\n return sqrt(dist2(a,b));\n }", "@Override\n public double distance(NumberVector o1, NumberVector o2) {\n double dt = Math.abs(o1.doubleValue(0) - o2.doubleValue(0));\n // distance value of earth coordinates in meter\n double dc = getDistance(o1.doubleValue(1), o1.doubleValue(2), o2.doubleValue(1), o2.doubleValue(2));\n return dt + dc;\n }", "public int getDistance(String s1, String s2) {\r\n\t\tint score = getSimlarityScore(s1, s2);\r\n\t\tint retVal = INT_MAX;\r\n\t\tif (score != 0) {\r\n\t\t\t//int length = s1.length() + s2.length() - score;\r\n\t\t\tint length = s1.length();\r\n\t\t\tretVal = (int)((1 - (double)score/length) * 100);\r\n\t\t}\r\n\t\t\r\n\t\tif (retVal > alignmentThreshold) {\r\n\t\t\tretVal = INT_MAX;\r\n\t\t}\r\n\t\treturn retVal;\r\n\t}", "public double calcDistance(GpsCoordinate other)\n\t{\n\t\tdouble lat1 = degToRadian(this.latitude);\n\t\tdouble lng1 = degToRadian(this.longitude);\n\t\tdouble lat2 = degToRadian(other.latitude);\n\t\tdouble lng2 = degToRadian(other.longitude);\n\t\t\n\t\t/*\n\t\t * use haversine Formula to calc the distance\n\t\t * @see: http://en.wikipedia.org/wiki/Haversine_formula\n\t\t */\n\t\tdouble inRootFormula = Math.sqrt(\n\t\t\t\tMath.sin((lat1 - lat2)/2)*Math.sin((lat1 - lat2)/2)+\n\t\t\t\tMath.cos(lat1)*Math.cos(lat2)*Math.sin((lng1-lng2)/2)*Math.sin((lng1-lng2)/2));\n\t\t\n\t\treturn 2* EARTH_RADIUS * Math.asin(inRootFormula);\n\n\t\n\t}", "public static float distance(Vec2 start, Vec2 end) {\r\n\t\treturn (float) Math.sqrt((end.x - start.x) * (end.x - start.x) + (end.y - start.y)\r\n\t\t\t\t* (end.y - start.y));\r\n\t}", "public interface DistanceMeasure {\n\n /**\n * Euclidean distance algorithms to calculate the minium distance. This\n * algorithms operate on two double array.\n *\n * @param a coordinates of the either point.\n * @param b coordinates of the other point.\n * @return distance of the two given coordinates.\n * @see MultidimensionalPoint\n */\n default double euclideanDistance(double[] a, double[] b) {\n checkLengthOfArrays(a, b);\n double sum = 0.0;\n for (int i = 0; i < a.length; i++) {\n final double d = a[i] - b[i];\n sum += d * d;\n }\n return Math.sqrt(sum);\n }\n\n /**\n * Euclidean distance algorithms to calculate the minium distance by the\n * absolute methods which used to calculate the difference of two\n * coordinate. This algorithms operate on two double array.\n *\n * @param a coordinates of the either point.\n * @param b coordinates of the other point.\n * @return distance of the two given coordinates.\n * @see MultidimensionalPoint\n */\n default double euclideanDistanceAbs(double[] a, double[] b) {\n checkLengthOfArrays(a, b);\n double sum = 0.0;\n for (int i = 0; i < a.length; i++) {\n final double d = Math.abs(a[i] - b[i]);\n sum += d * d;\n }\n return Math.sqrt(sum);\n }\n\n /**\n * Check the two given double array has the same length.\n *\n * @param a given array of coordinates.\n * @param b given array of coordinates.\n * @throws IllegalArgumentException\n */\n default void checkLengthOfArrays(double[] a, double[] b) throws IllegalArgumentException {\n if (a.length != b.length) {\n throw new IllegalArgumentException(\"Dimensions are not the same.\");\n }\n }\n}", "public double calculateDistance(LatLng other) {\n return Math.sqrt( (this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y) );\n }" ]
[ "0.8161882", "0.7662657", "0.76057786", "0.7579894", "0.75556356", "0.7545719", "0.7517162", "0.7495556", "0.74934715", "0.74779147", "0.7475038", "0.7461489", "0.7391188", "0.7379745", "0.7315681", "0.7314565", "0.7308651", "0.7262984", "0.72589946", "0.7223328", "0.7215695", "0.7212324", "0.7191929", "0.7189383", "0.71865803", "0.71852714", "0.71836877", "0.7181946", "0.7168218", "0.71663004", "0.71480197", "0.7145584", "0.7128633", "0.711893", "0.7117553", "0.7083458", "0.70733976", "0.7064779", "0.70639825", "0.70615065", "0.7061196", "0.7015882", "0.7006856", "0.70063925", "0.69900525", "0.6989317", "0.69796", "0.6961569", "0.6954577", "0.6943204", "0.69389725", "0.6933061", "0.69260955", "0.69217694", "0.6917149", "0.6916171", "0.6903984", "0.6894944", "0.68937093", "0.6892047", "0.6886439", "0.6883963", "0.68791324", "0.68710095", "0.687086", "0.6856645", "0.6847059", "0.6833641", "0.6829676", "0.6820441", "0.67981523", "0.6796218", "0.6788908", "0.6783757", "0.67759407", "0.67730117", "0.67719626", "0.6763302", "0.6759855", "0.67498976", "0.67480063", "0.6747656", "0.67445904", "0.6743853", "0.6736533", "0.6735308", "0.6717809", "0.67144936", "0.67081475", "0.6703844", "0.6681135", "0.6680605", "0.6680326", "0.6662341", "0.6660134", "0.6656301", "0.6652919", "0.6652838", "0.6649435", "0.664506", "0.6642237" ]
0.0
-1
helper method uses the main thread to display a toast we use this because if this class is used by a Service as opposed to an Activity, we can't access the UI thread in the normal way using RunOnUIThread
static void displayToast(Handler handler, final Context con, final String text, final int toast_length){ handler.post(new Runnable(){ public void run(){ Toast.makeText(con, text, toast_length).show(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); // toast for whatever reason\n }", "private void showToast(final String message) {\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(main.getApplicationContext(), message, Toast.LENGTH_LONG).show();\n }\n });\n }", "@Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"I'm a toast!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void run() {\n if (mToast == null) {\n mToast = Toast.makeText(getApplicationContext(), text,\n Toast.LENGTH_SHORT);\n } else {\n mToast.setText(text);\n }\n mToast.show();\n }", "@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }", "private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}", "@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "@Override\r\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\tactivityContext,\r\n\t\t\t\t\t\t\t\tR.string.unable_to_fetch_the_details,\r\n\t\t\t\t\t\t\t\t2000);\r\n\r\n\t\t\t\t\t\t }", "private static void checkToast() {\n\t\tif (mToast == null) {\n\t\t\tmToast = Toast.makeText(GlobalApp.getApp(), null,\n\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t}\n\t}", "private void displayToast() {\n if(getActivity() != null && toast != null) {\n Toast.makeText(getActivity(), toast, Toast.LENGTH_LONG).show();\n toast = null;\n }\n }", "public void tongOnUI(final String msg) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "public void ToastPopper(String t){\n Context context = getApplicationContext();\n CharSequence text = t;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void run() {\n Toast.makeText(rootView.getContext(), mensaje,\n Toast.LENGTH_LONG).show();\n }", "private void showToast(final String message, final int toastLength) {\n post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), message, toastLength).show();\n }\n });\n }", "private void showErrorToast() {\n }", "@Override protected void onPreExecute() {\r\n // A toast provides simple feedback about an operation as popup. \r\n // It takes the application Context, the text message, and the duration for the toast as arguments\r\n //android.widget.Toast.makeText(mContext, \"Going for the network call..\", android.widget.Toast.LENGTH_LONG).show();\r\n }", "protected void toast() {\n }", "protected void toastshow() {\n \n\t\tToast toast=new Toast(getApplicationContext());\n\t\tImageView imageView=new ImageView(getApplicationContext());\n\t\timageView.setImageResource(R.drawable.icon);\n\t\ttoast.setView(imageView);\n\t\ttoast.show();\t\n\t}", "private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartThread();\n\t\t\t Toast.makeText(getContext(), \"Êղسɹ¦\", 1).show();\n\t\t\t}", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "@Override\n\tpublic void run() {\n\t\t((Activity)context).runOnUiThread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tString string = context.getString(R.string.message_timer, MainActivity.TIMER_TASK_PERIOD / 1000);\n\t\t\t\tToast.makeText(context, string, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}", "public void showToast(final String message){\n\t runOnUiThread(new Runnable() {\n\t public void run()\n\t {\n\t Toast.makeText(VisitMultiplayerGame.this, message, Toast.LENGTH_SHORT).show();\n\t }\n\t });\n\t}", "public void showToast(final String message)\n {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(context, message, Toast.LENGTH_SHORT).show();\n }\n });\n }", "void showToast(String message);", "void showToast(String message);", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void run() {\n setToast(\"연결에 성공하였습니다.\");\n }", "private void showToast(final String message) {\n Log.e(App.TAG, message);\n\n Handler h = new Handler(Looper.getMainLooper());\n h.post(new Runnable() {\n public void run() {\n Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onError(Status status) {\n createToast(\"Error occurred, please wait\");\n }", "public static void showToast(@NonNull final View view, final int duration) {\n if (isMainThread())\n showToastIMT(view, duration);\n else\n runInHandlerThread(new Runnable() {\n public void run() {\n showToastIMT(view, duration);\n }\n });\n }", "public void showAlert(){\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "static void makeToast(Context ctx, String s){\n Toast.makeText(ctx, s, Toast.LENGTH_SHORT).show();\n }", "private void showLongToast(final String msg) {\n this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }\n });\n }", "public void ToastMessage() {\n\n // create toast message object\n final Toast toast = Toast.makeText(Product_Details_Page_Type_4.this,\n \"Product added to cart\",Toast.LENGTH_LONG);\n // show method call to show Toast message\n toast.show();\n\n // create handler to set duration for toast message\n Handler handler = new Handler() {\n\n @Override\n public void close() {\n // set duration for toast message\n toast.setDuration(100);\n // cancel toast message\n toast.cancel();\n }\n @Override\n public void flush() {}\n\n @Override\n public void publish(LogRecord record) {}\n };\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "public static void displayToast(Context context, String msg) {\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n\n }", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "protected void showToast(CharSequence text) {\r\n\t Context context = getApplicationContext();\r\n\t int duration = Toast.LENGTH_SHORT;\r\n\t \r\n\t Toast toast = Toast.makeText(context, text, duration);\r\n\t toast.show();\r\n\t}", "private static void showToast(String stringToDisplay, Context context) {\n Toast.makeText(context, stringToDisplay, Toast.LENGTH_SHORT).show();\n }", "public void showToastMessage(String str) {\n Toast.makeText(self, str, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to show the toast\n int duration = Toast.LENGTH_SHORT;\n\n // Get the context\n Context context = getApplicationContext();\n\n // Create the toast\n Toast toast = Toast.makeText(context, toastText, duration);\n\n // Show the toast\n toast.show();\n }", "public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }", "protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}", "private void showToast(final int resid) {\n\t\tm_toastHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(InstrumentService.this, resid, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "public void onEventMainThread(MessageEvent event){\n Toast.makeText(this, event.message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}", "private void displayToast(String message) {\n\n //get the LayoutInflater and inflate the custom_toast layout\n LayoutInflater view = getLayoutInflater();\n View layout = view.inflate(R.layout.toast, null);\n\n //get the TextView from the custom_toast layout\n TextView text = layout.findViewById(R.id.txtMessage);\n text.setText(message);\n\n //create the toast object, set display duration,\n //set the view as layout that's inflated above and then call show()\n Toast toast = new Toast(getApplicationContext());\n toast.setDuration(Toast.LENGTH_LONG);\n toast.setView(layout);\n toast.show();\n }", "protected void showToast(String string)\r\n\t{\n\t\tToast.makeText(MainActivity.this, string, Toast.LENGTH_SHORT).show();\r\n\t}", "public static void toastIt(Context context, Toast toast, CharSequence msg) {\n if(toast !=null){\n toast.cancel();\n }\n\n //Make and display new toast\n toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n public void runOnUiThread(Runnable r) {\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "public void displayToastMessage(String msg) {\n\t\tToast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n\t\ttoast.setGravity(Gravity.CENTER, 0, 0);\n\t\ttoast.show();\n\t}", "@Override\n public void call(Object... args) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n //edit.setText(\"Success!!!!!\");\n Toast.makeText(getApplicationContext(),\"Success send Test \",Toast.LENGTH_LONG).show();\n }\n });\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(mThread==null){\n\t\t\t\t\tmThread=new Thread(runnable);\n\t\t\t\t\tmThread.start();\n\t\t\t\t}else{\n\t\t\t\t\tToast.makeText(getApplication(), getApplication().getString(R.string.thread_started), Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}", "private void showToast(String message) {\n\t\tToast toast = Toast.makeText(getApplicationContext(), message,\n\t\t\t\tToast.LENGTH_SHORT);\n\n\t\ttoast.setGravity(Gravity.CENTER | Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\ttoast.show();\n\t}", "private void displayToast(String message) {\n Toast.makeText(OptionActivity.this, message, Toast.LENGTH_SHORT).show();\n }", "public static void showToast(Context context, String text) {\n //Toast.makeText(context, text, Toast.LENGTH_SHORT).show();\n showToastAtCenter(context, text);\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "public static void showToast(final Activity activity, final String message) {\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n android.widget.Toast.makeText(activity, message, android.widget.Toast.LENGTH_LONG).show();\n }\n });\n }", "private void toast(String string){\n Toast.makeText(this, string, Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void runOnUiThread( final Runnable action ) {\n\t\tif ( mContext != null ) ( (Activity) mContext ).runOnUiThread( action );\n\t}", "@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }", "public static void toastText(Context context, String s)\n\t{\n\t\tif(Utils.ConstantVars.canToastDebugText) \n\t\t\tToast.makeText(context, s, 2 * Toast.LENGTH_LONG).show();\n\t}", "private void makeToast(String msg)\n {\n FinanceApp.serviceFactory.getUtil().makeAToast(this, msg);\n }", "@Override\n public void run() {\n Constant.showToast(getActivity().getResources().getString(R.string.internet), getActivity());\n }", "@Override\n public void run() {\n Constant.showToast(getActivity().getResources().getString(R.string.internet), getActivity());\n }", "public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }", "public static void showToast(Context context, String message, int duration) {\n\n if (message.contains(\"任务\") && !getTopActivity(context).contains(\"HomeActivity\")) {\n return;\n }\n\n if (sIsAllowShow) {\n Toast toast = new Toast(context);\n View view = LayoutInflater.from(context).inflate(R.layout.toast_universal, null);\n TextView messageText = view.findViewById(R.id.toast_universal_message_text);\n messageText.setText(message);\n toast.setDuration(duration);\n toast.setView(view);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n }\n }", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "public void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message,\n Toast.LENGTH_SHORT).show();\n }", "protected void toastshow1() {\n \n\t\tToast toast=Toast.makeText(this, \"image and text\", Toast.LENGTH_LONG);\n\t\t\n\t\tLinearLayout linearLayout=new LinearLayout(this);\n\t\tlinearLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tImageView imageView=new ImageView(this);\n\t\timageView.setImageResource(R.drawable.icon);\n\t\tButton button=new Button(this);\n\t\tbutton.setText(\"progress over\");\n\t\tView toastView=toast.getView();\n\t\tlinearLayout.addView(imageView);\n\t\tlinearLayout.addView(button);\n\t\tlinearLayout.addView(toastView);\n\t\t\n\t\ttoast.setView(linearLayout);\n\t\ttoast.show();\n\t\t\n\t}", "private void toastMessage(String message) {\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n\n }", "public void showToast(View view) {\n // Initialize an object named 'toast' using the 'Toast' class\n Toast toast = Toast.makeText(this, R.string.toast_message, Toast.LENGTH_SHORT);\n\n // Use the method 'show()' under the 'Toast' class to show a message\n toast.show();\n }", "public void ting(String msg) {\r\n\t\tToast.makeText(this, msg, Toast.LENGTH_SHORT).show();\r\n\t}" ]
[ "0.7703167", "0.711321", "0.70748967", "0.6994946", "0.6828141", "0.6824016", "0.6822189", "0.67576534", "0.6693088", "0.6669214", "0.66351193", "0.66296947", "0.66044414", "0.6599782", "0.6571704", "0.65674704", "0.6564199", "0.65632594", "0.6562842", "0.6558089", "0.6542328", "0.65262705", "0.6493171", "0.6479358", "0.6479358", "0.6479358", "0.6478368", "0.6458904", "0.6458142", "0.6440725", "0.64356714", "0.64356714", "0.6426031", "0.6410932", "0.64080054", "0.6390247", "0.63769025", "0.6373313", "0.63717574", "0.63714904", "0.636959", "0.63679", "0.63679", "0.63679", "0.63679", "0.63679", "0.63679", "0.63679", "0.63679", "0.63679", "0.6346945", "0.6346308", "0.6346308", "0.6330289", "0.6324797", "0.63230735", "0.6300729", "0.6300707", "0.6295063", "0.62829876", "0.62769186", "0.62619424", "0.6250257", "0.6242322", "0.6237092", "0.6237092", "0.62162983", "0.6205971", "0.6205617", "0.6203324", "0.6201811", "0.61887777", "0.6188488", "0.6187146", "0.6180074", "0.6169121", "0.61681694", "0.61676", "0.61661613", "0.6160596", "0.61549205", "0.6150991", "0.61477023", "0.6144887", "0.6139488", "0.6131818", "0.61293197", "0.61230826", "0.611634", "0.611634", "0.6109941", "0.6106377", "0.61037207", "0.61037207", "0.61037207", "0.6087887", "0.60873616", "0.6085972", "0.60851395", "0.6067431" ]
0.65359896
21
shows alert dialog box if user tries to log in again while BackgroundVideoRecorder is already running
static void showAlert(final Context con, final String title, final String msg){ AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(con); // set title alertDialogBuilder.setTitle(title); alertDialogBuilder.setMessage(msg).setCancelable(true) .setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub // Do something dialog.dismiss(); } }); AlertDialog alertDialog = alertDialogBuilder.create(); alertDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onVideoRecordingStarted() {\n this.mUI.unlockCaptureView();\n }", "public void onConnectSpamDone() {\n loggingIn = false;\n }", "public void run() {\n onLoginSuccess(email,password);\n // onLoginFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onSignupFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onLoginSuccess();\n // onLoginFailed();\n progressDialog.dismiss();\n }", "public void unauthorized() {\n super.unauthorized();\n LoginFragment.this.getTracker().send(new HitBuilders.EventBuilder().setCategory(\"sign_in\").setAction(\"incorrect\").setLabel(\"incorrect\").build());\n Answers.getInstance().logLogin(new LoginEvent().putSuccess(false));\n new AlertDialog.Builder(LoginFragment.this.getActivity()).setMessage(R.string.incorrect_email_or_password).setPositiveButton(17039370, (DialogInterface.OnClickListener) null).show();\n }", "private void onTabStateInitializedForReauth() {\n mIncognitoReauthPending = mTabModelSelector.getModel(/*incognito=*/true).getCount() > 0\n && mIsIncognitoReauthPendingOnRestoreSupplier.get();\n showDialogIfRequired();\n }", "@Override\n public void onRegistrationAccomplished() {\n Prefs.setSignedIn(true);\n // Proceed to Main\n proceedToMainActivityAndFinish();\n }", "void signInComplete();", "@Override\n protected void onStop() {\n if(!device.haveNetwork()){\n //show error message\n Toasty.error(getApplicationContext(),device.NetworkError(), Toast.LENGTH_SHORT,true).show();\n }\n else{\n //get current user\n FirebaseUser cUser = cAuth.getCurrentUser();\n\n //if user != null\n if(cUser != null)\n {\n //show success message to console log\n Log.d(TAG, \"getCurrentUser: success\");\n }\n else\n {\n //show error message to console log\n Log.d(TAG, \"getCurrentUser: failed\");\n\n //show error message to user\n Toasty.error(getApplicationContext(), \"Session is expired. Please relogin.\", Toast.LENGTH_SHORT,true).show();\n\n //intent user to login page (relogin)\n Intent i = new Intent(CreateEventActivity.this, LoginActivity.class);\n\n //clear the background task\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(i);\n }\n }\n super.onStop();\n }", "private void handleFaceAuthFailed() {\n Assert.isMainThread();\n setFaceRunningState(0);\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricAuthFailed(BiometricSourceType.FACE);\n }\n }\n }", "private void checkLogin() {\n SharedPref sp = new SharedPref(this);\n if (!sp.readLoginStatus()) {\n Intent i = new Intent(this, LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(i);\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // Either way, check log in again\n checkAccessAndLoggIn();\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "private void countDownToLogin() {\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (isOnline()) {\n if (sharedPreferences.getBoolean(Constant.AUTO_LOGIN, false)) {\n String userEmail = sharedPreferences.getString(Constant.USER_EMAIL, \"\");\n String userPw = sharedPreferences.getString(Constant.USER_PW, \"\");\n if (!userEmail.equals(\"\") && !userPw.equals(\"\")) {\n new LoginPresenter(SplashActivity.this).login(userEmail, userPw);\n } else {\n onLoginFail(null);\n }\n } else {\n onLoginFail(null);\n }\n } else {\n// startActivity(new Intent(context, DisconnectActivity.class));\n// finish();\n //Go to DisconnectActivity\n }\n\n }\n }, SPLASH_TIME);\n }", "@Override\n public void run() {\n\n\n if(sessionManager.isLoggedIn()){\n\n // This method will be executed once the timer is over\n // Start your app main activity\n mDilatingDotsProgressBar.hideNow();\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n\n }else{\n\n // This method will be executed once the timer is over\n // Start your app main activity\n mDilatingDotsProgressBar.hideNow();\n Intent i = new Intent(SplashActivity.this, LoginActivity1.class);\n startActivity(i);\n }\n\n\n\n\n }", "public void loggedInSuccessful() {\n\t\tIntent intent = new Intent(this, MainActivity.class);\n\t\tstartActivity(intent);\n\t\tthis.finish();\n\t}", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging In.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\n public void run() {\n PreferenceManager.getDefaultSharedPreferences(AuthenticatorExample.this)\n .edit().putBoolean(\"is_authenticated\", true).commit();\n // Notify the service that authentication is complete\n notifyAuthenticated();\n // Close the Activity\n finish();\n }", "public void run() {\n if (userAutentification(email, password)) {\n onLoginSuccess(name, email);\n } else {\n onLoginFailed();\n // onLoginFailed();\n }\n mConnectionProgressDialog.dismiss();\n }", "@Override\n public void onCancel(AuthCancellation cancellation) {\n System.out.println(\"Cancel \" + cancellation);\n // Reset the UI to a ready-to-login state\n }", "public void sessionTimeout() {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(DeviceTrackerApplication.getContext());\n alertDialogBuilder.setTitle(getString(R.string.app_name));\n alertDialogBuilder\n .setMessage(R.string.session_expired)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_msg, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n logout();\n }\n });\n alertDialog = alertDialogBuilder.create();\n alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);\n startSessionTimer(0);\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }", "@Override\n public void onPreAuthentication() {\n // Clear any messages\n this.clearMessages();\n // Show a progress indicator\n if (this.mAuthenticationTaskFragment != null\n && this.mAuthenticationTaskFragment.isTaskRunning()) {\n this.mProgressDialog.show();\n }\n }", "private void startListeningForFingerprint() {\n int i = this.mFingerprintRunningState;\n if (i == 2) {\n setFingerprintRunningState(3);\n } else if (i != 3) {\n int currentUser = getCurrentUser();\n if (isUnlockWithFingerprintPossible(currentUser)) {\n CancellationSignal cancellationSignal = this.mFingerprintCancelSignal;\n if (cancellationSignal != null) {\n cancellationSignal.cancel();\n }\n this.mFingerprintCancelSignal = new CancellationSignal();\n Slog.v(\"KeyguardUpdateMonitor\", \"startListeningForFingerprint()\");\n this.mFpm.authenticate(null, this.mFingerprintCancelSignal, 0, this.mFingerprintAuthenticationCallback, null, currentUser);\n setFingerprintRunningState(1);\n }\n }\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "@Override\r\n\t\t\t\t\tpublic void onLoginedNotify() {\n\t\t\t\t\t\tTypeSDKLogger.d( \"onLoginedNotify\");\r\n\t\t\t\t\t\thaimaLogout();\r\n\t\t\t\t\t\thaimaLogin();\r\n\t\t\t\t\t}", "void authenticate() {\n if (lifecycle != null) {\n lifecycle.addObserver(this);\n } else {\n activity.getApplication().registerActivityLifecycleCallbacks(this);\n }\n biometricPrompt = new BiometricPrompt(activity, uiThreadExecutor, this);\n biometricPrompt.authenticate(promptInfo);\n }", "private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }", "public void run() {\n if (userAutentification(email, password)) {\n onLoginSuccess(name, email);\n } else {\n onLoginFailed();\n // onLoginFailed();\n }\n mConnectionProgressDialog.dismiss();\n }", "protected void afterLoginSucess()\r\n\t{\n\t\tfbHelper.postStatusUpdate(\"Hi Testing\");\r\n\t}", "@Override\n public void showAuthScreen() {\n }", "@Override\n public void onSignInFailed() {\n BYPASS_LOGIN = true;\n }", "private void invalidateVSacSession(){\n\t \tMatContext.get().getVsacapiServiceAsync().inValidateVsacUser(new AsyncCallback<Void>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Void result) {\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t}", "@Override\n\t\tpublic void onCancelLogin() {\n\n\t\t}", "@Override\n\t\tpublic void onCancelLogin() {\n\n\t\t}", "@Override\n public void onResume() {\n super.onResume();\n Session session = Session.getActiveSession();\n if (session != null && (session.isOpened() || session.isClosed())) {\n onSessionStateChange(session, session.getState(), null);\n }\n uiHelper.onResume();\n }", "void loginDone();", "public void onOK() {\n\t\t\t\t\t\t\tlogout();\n\t\t\t\t\t\t}", "private void handleFaceAuthenticated(int i, boolean z) {\n Trace.beginSection(\"KeyGuardUpdateMonitor#handlerFaceAuthenticated\");\n try {\n if (this.mGoingToSleep) {\n Log.d(\"KeyguardUpdateMonitor\", \"Aborted successful auth because device is going to sleep.\");\n return;\n }\n try {\n int i2 = ActivityManager.getService().getCurrentUser().id;\n if (i2 != i) {\n Log.d(\"KeyguardUpdateMonitor\", \"Face authenticated for wrong user: \" + i);\n setFaceRunningState(0);\n } else if (isFaceDisabled(i2)) {\n Log.d(\"KeyguardUpdateMonitor\", \"Face authentication disabled by DPM for userId: \" + i2);\n setFaceRunningState(0);\n } else {\n if (DEBUG_FACE) {\n Log.d(\"KeyguardUpdateMonitor\", \"Face auth succeeded for user \" + i2);\n }\n onFaceAuthenticated(i2, z);\n setFaceRunningState(0);\n Trace.endSection();\n }\n } catch (RemoteException e) {\n Log.e(\"KeyguardUpdateMonitor\", \"Failed to get current user id: \", e);\n setFaceRunningState(0);\n }\n } finally {\n setFaceRunningState(0);\n }\n }", "@Override\n\tpublic void loginGPGS() {\n\t\ttry {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgameHelper.beginUserInitiatedSignIn();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (final Exception ex) {\n\t\t}\n\n\t}", "public void run() {\n if(signedUp == 1) {\n onSignupSuccess();\n } else{\n onSignupFailed();\n }\n //\n progressDialog.dismiss();\n }", "@Override\n public void onClick(View arg0)\n {\n if (enc.isRunning())\n {\n enc.rLogin(); // async\n }\n }", "public void run() {\n Toast.makeText(getBaseContext(), \"You Have been logged Out \", Toast.LENGTH_SHORT);\n progressDialog.dismiss();\n Intent intent = new Intent(ForgotPassword.this, Login.class);\n startActivity(intent);\n\n\n }", "public void run()\n {\n\n Intent in = new Intent(activity, loginfailed.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n\n\n }", "@Override\n public void onCanceled() {\n\n logOutNow();\n\n }", "public void onLoginFailed() {\n Toast.makeText(getBaseContext(), \"Login failed\", Toast.LENGTH_LONG).show();\n bLogin.setEnabled(true);\n }", "void onRetryAuthentication();", "private void onSessionStateChange(Session session, SessionState state,\n Exception exception) {\n if (isResumed) {\n FragmentManager manager = getSupportFragmentManager();\n // Get the number of entries in the back stack\n int backStackSize = manager.getBackStackEntryCount();\n // Clear the back stack\n for (int i = 0; i < backStackSize; i++) {\n manager.popBackStack();\n }\n if (session == null) {\n String appId = getString(R.string.app_id);\n Session session2 = new Session.Builder(getBaseContext())\n .setApplicationId(appId).build();\n Session.setActiveSession(session2);\n } else {\n if (state.equals(SessionState.OPENED)/*state.isOpened()*/) {\n // If the session state is open: show the authenticated fragment\n showFragment(SELECTION, false);\n //AppUtil.startService(getApplicationContext());\n Log.i(LOG_TAG, \"onsessionstatechange: Logged in\");\n\n //mAlarm.setAlarm(getApplicationContext());\n\n\n\n System.out.println(\"SELECTION\");\n } else if (state.isClosed()) {\n // If the session state is closed: show the login fragment\n showFragment(SPLASH, false);\n AppUtil.stopService(getApplicationContext());\n Log.i(LOG_TAG, \"onsessionstatechange: Logged out\");\n\n /*SharedPreferences mPrefs = getSharedPreferences(Constants.SHAREDPREFS.APP_PREFS, Context.MODE_PRIVATE);\n if (mPrefs.getBoolean(Constants.SHAREDPREFS.COMMERCIAL_COOLDOWN, false)){\n SharedPreferences.Editor mEditor = mPrefs.edit();\n mEditor.putBoolean(Constants.SHAREDPREFS.COMMERCIAL_COOLDOWN, false);\n mEditor.commit();\n }*/\n\n //mAlarm.cancelAlarm(getApplicationContext());\n }\n }\n }\n }", "@FXML\n private void handleOKPressed() {\n\n if (Authenticator.validatePassword(accountId.getText(), password.getText())) {\n application.accountLogging(accountId.getText());\n confirmLogin = true;\n dialogStage.close();\n } else {\n errorMessage.setVisible(true);\n }\n }", "public void run() {\n progressDialog.dismiss();\n insertUser();\n //userLogin();\n // onLoginSuccess();\n // onLoginFailed();\n\n }", "private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "private void userSignIn() {\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if (GoogleSignIn.hasPermissions(account, new Scope(SCOPES))) {\n updateUI(account);\n mAccount = account.getAccount();\n Intent intent = new Intent(this, HomeActivity.class);\n intent.putExtra(ACCOUNT, mAccount);\n startActivity(intent);\n System.out.println(\"Exit Intent !!!!!!!!!!!!!!!!\");\n\n findViewById(R.id.disconnect_button).setVisibility(View.VISIBLE);\n\n } else {\n updateUI(null);\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onSyncErr() {\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}", "protected void recurringAlert() {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(DeviceTrackerApplication.getContext());\n alertDialogBuilder.setTitle(getString(R.string.app_name));\n alertDialogBuilder\n .setMessage(R.string.user_not_logged_in)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_msg, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (!Utils.isAppInForeground(LoggedInCheckService.this)) {\n Intent intent = new Intent(LoggedInCheckService.this, SplashActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n }\n });\n alertDialog = alertDialogBuilder.create();\n alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);\n\n if (timer2 != null) {\n timer2.cancel();\n }\n\n timer2 = new Timer();\n long alertInterval = getSharedPreferences(Utility.SETTINGS_SHARED_PREFERENCE, Context.MODE_PRIVATE).getInt(Utility.ALERT_INTERVAL, 2) * 60 * 1000;\n timer2.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n Handler handler = new Handler(Looper.getMainLooper()) {\n @Override\n public void handleMessage(Message msg) {\n alertDialog.show();\n }\n };\n Message message = handler.obtainMessage();\n message.sendToTarget();\n }\n }, alertInterval , alertInterval);\n\n }", "private void checkForSavedLogin() {\n\t\taccessToken = getAccessToken();\n\t\tif (accessToken==null) return;\t//if there are no credentials stored then return to usual activity\n\n\t\t// initialize Twitter4J\n\t\ttwitter.setOAuthAccessToken(accessToken);\n\t}", "@Override\n public void run() {\n waitDialog.dismiss();\n\n //show an error dialog\n\n\n }", "@Override\n public void onSignInSucceeded() {\n\n if (ACCESS_ACHIEVEMENT) {\n\n //if we just came from achievements button and are now signed in, display ui\n displayAchievementUI();\n\n //flag back false\n ACCESS_ACHIEVEMENT = false;\n }\n\n //don't bypass auto login\n BYPASS_LOGIN = false;\n }", "private void startAuth() {\n if (ConnectionUtils.getSessionInstance().isLoggedIn()) {\n ConnectionUtils.getSessionInstance().logOut();\n } else {\n ConnectionUtils.getSessionInstance().authenticate(this);\n }\n updateUiForLoginState();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t\tif (MyUtils.doInfilter(this)) {\n\n\t\t\tif (!MyUtils.isBackground(this)) {\n\t\t\t\tMyUtils.startProtal(this);\n\t\t\t\tRemoteUtil.getInstance().callLogin();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tToast.makeText(activity, \"登录成功\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "protected void handleLoginSucceeded(){\n super.handleLoginSucceeded();\n\n // Apply any ivar changes which might have occurred when we were waiting\n // for login.\n synchronized(this){\n\n // Workaround: the server won't send us the full seek list if we set seekinfo\n // on the login line.\n if (ivarStates.get(Ivar.SEEKINFO.getIndex())){\n sendCommand(\"$$iset seekinfo 1\");\n filterLine(\"seekinfo set.\");\n }\n\n\n for (int i = 0; i < requestedIvarStates.size(); i++){\n boolean state = requestedIvarStates.get(i);\n Ivar ivar = Ivar.getByIndex(i);\n if (state != ivarStates.get(i)){\n sendCommand(\"$$iset \"+ivar.getName()+\" \"+(state ? \"1\" : \"0\"));\n filterLine(ivar.getName()+\" \"+(state ? \"\" : \"un\")+\"set.\");\n }\n }\n\n sendCommand(\"$set style \"+style);\n filterLine(\"Style \"+style+\" set.\");\n\n sendCommand(\"$set interface \"+interfaceVar);\n\n sendCommand(\"$set ptime 0\");\n filterLine(\"Your prompt will now not show the time.\");\n }\n }", "@Override\r\n public void run() {\n if (DEBUG_MODE) {\r\n session.setToken(\"TEST123\");\r\n Platform.runLater(closeLoginWindow());\r\n return;\r\n }\r\n\r\n Optional<String> token = login.getSessionToken(session.getUserName(), session.getPassword());\r\n\r\n // if token wasn't retrieved & not in debug mode, display error dialog\r\n if (token.isPresent()) {\r\n session.setToken(token.get());\r\n Platform.runLater(closeLoginWindow());\r\n return;\r\n }\r\n \r\n Platform.runLater(displayError());\r\n\r\n }", "void stopAuthentication() {\n if (biometricPrompt != null) {\n biometricPrompt.cancelAuthentication();\n biometricPrompt = null;\n }\n }", "@Override\r\n\t\t\t\t\tpublic void onLoginCancel() {\n\t\t\t\t\t\tTypeSDKLogger.d( \"onLoginCancel\");\r\n\t\t\t\t\t}", "@FXML\n private void handleLoginAttempt() {\n\n if (isInputValid()) {\n String uname = userField.getText();\n if (Model.doesUsernameExist(uname)) {\n User user = Model.verifyLogin(uname, pwField.getText());\n\n if (user == null) {\n // uname exists but incorrect login\n user = UserInfoTable.getUserFromUserName(uname);\n _loginAuthenticated = false;\n user.setLockoutNum(user.getLockoutNum() + 1);\n Model.editUser(user);\n\n // increment incorrect login attempts, check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n } else {\n // uname exists and correct login\n // check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n user.setLockoutNum(0);\n Model.editUser(user);\n Model.setUser(user);\n _loginAuthenticated = true;\n app.showMainPage();\n return;\n }\n }\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Please Correct Invalid Fields \");\n alert.setHeaderText(\"Incorrect password and/or username\");\n\n alert.showAndWait();\n }\n }", "public void onClick(DialogInterface dialog,int id) {\n sharedPrefManager.saveSPBoolean(SharedPrefManager.SP_SUDAH_LOGIN, false);\n finish();\n }", "private void onRemoteUserLeft() {\n removeRemoteVideo();\n }", "private void checkAccountLoggedIn()\r\n\t{\n\t\tSharedPreferences pref = this.getSharedPreferences(\"accountdata\", 0);\r\n\t\tSystem.out.println(\"Checking if an account is logged in\");\r\n\t\tif (pref.getBoolean(\"accountLoggedIn\", false))\r\n\t\t{\r\n\t\t\tloginButton.setEnabled(false);\r\n\t\t\tregisterButton.setEnabled(false);\r\n\r\n\t\t\t// Make a crouton notifying the user\r\n\t\t\tCrouton crouton = Crouton.makeText(this, this.getResources()\r\n\t\t\t\t\t.getString(R.string.activity_login_account_loggedin),\r\n\t\t\t\t\tStyle.INFO);\r\n\t\t\tConfiguration.Builder configBuild = new Configuration.Builder();\r\n\t\t\tconfigBuild.setDuration(Configuration.DURATION_INFINITE);\r\n\t\t\tcrouton.setConfiguration(configBuild.build());\r\n\t\t\tcrouton.setOnClickListener(new OnClickListener()\r\n\t\t\t{\r\n\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\tSystem.out.println(\"Crouton clicked\");\r\n\t\t\t\t\t((LoginActivity) v.getContext()).onBackPressed();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tcrouton.show();\r\n\t\t}\r\n\t}", "private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }", "public void run() {\n Toast.makeText(getBaseContext(), \"You Have been logged Out \", Toast.LENGTH_SHORT);\n progressDialog.dismiss();\n\n Intent intent = new Intent(MapsA.this, Login.class);\n startActivity(intent);\n\n\n }", "private void onSessionStateChange(Session session, SessionState state,\n Exception exception) {\n if (session != currentSession) {\n return;\n }\n\n if (state.isOpened()) {\n // Log in just happened.\n Toast.makeText(getApplicationContext(), \"session opened\",\n Toast.LENGTH_SHORT).show();\n } else if (state.isClosed()) {\n // Log out just happened. Update the UI.\n Toast.makeText(getApplicationContext(), \"session closed\",\n Toast.LENGTH_SHORT).show();\n }\n }", "void reinstate() {\n\t\tisSuspended = false;\n\t\tSystem.out.println(\"Reinstate account successfully.\");\n\t}", "private void showAuthenticationScreen() {\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n mKeyguardManager = (KeyguardManager) getActivity().getSystemService(Context.KEYGUARD_SERVICE);\n\n if (mKeyguardManager.isKeyguardSecure()) {\n Intent authIntent = mKeyguardManager.createConfirmDeviceCredentialIntent(null, null);\n startActivityForResult(authIntent, REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS);\n }\n }\n }", "@Override\n public void onActivityPaused(Activity activity) {\n if (call.argument(\"stickyAuth\")) {\n pause();\n } else {\n stop(false);\n }\n }", "private void checkToLogin() {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivityForResult(intent, ConstantValue.LOG_IN_CODE);\n }", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled login.\");\n }", "private void autoLogon() {\n\n // Get the username from the shared preferences file\n String strMailID = null;\n SharedPreferences appPreferences = getSharedPreferences(RegistrationScreenActivity.PREFERENCES_FILENAME, MODE_PRIVATE);\n if( appPreferences.contains(RegistrationScreenActivity.KEY_MAIL_ID) ) {\n strMailID = appPreferences.getString(RegistrationScreenActivity.KEY_MAIL_ID, null);\n }\n\n // If the username is not stored in the file, then request\n // the user to explicitly login by providing the credentials\n if(strMailID != null) {\n\n // Fetch the data from the database\n DatabaseHandler dbHandler = new DatabaseHandler(getApplicationContext());\n AccountInformation accountInfo = dbHandler.getAccountInfo(strMailID);\n if(accountInfo != null) {\n\n // If the account exists, then check auto logon is set to true\n if( !accountInfo.getIfSignedOut() && accountInfo.getIfAlwaysSignIn() ) {\n\n strUserMailID = accountInfo.getEmail();\n strUserName = accountInfo.getName();\n\n // Do auto login by auto displaying the home screen\n Intent intent = new Intent(this, HomeScreenActivity.class);\n intent.putExtra(RegistrationScreenActivity.KEY_MAIL_ID, strUserMailID);\n intent.putExtra(RegistrationScreenActivity.KEY_NAME, strUserName);\n startActivity(intent);\n\n } else {\n\n // Request user to enter the credentials\n Toast.makeText(getApplicationContext(), \"Session signed out previously. \\n \" +\n \"Please enter credentials to login\", Toast.LENGTH_LONG).show();\n }\n } else {\n // Display error if the account does not exists\n Toast.makeText(getApplicationContext(), \"No such user exists. \\n \" +\n \"Please register to login\", Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tLog.d(\"tigertiger\", \"AppStart onCreate\");\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_app_start_old);\r\n\r\n\t\tWriteLogToDevice.initConfiguration();// configure the app log default\r\n\t\t\t\t\t\t\t\t\t\t\t\t// set\r\n\t\tenableSDKLog();\r\n\r\n\t\tGlobalApp.getInstance().setAppContext(getApplicationContext());\r\n\t\tLog.d(\"tigertiger\", \"getApplicationContext =\" + getApplicationContext());\r\n\t\tGlobalApp.getInstance().setCurrentApp(AppStartToMainActivity.this);\r\n\t\t// JIRA ICOM-1890 Begin:Delete by zhangyanhu C01012 2015-08-27\r\n\t\t// ExitApp.getInstance().addActivity(this);\r\n\t\t// JIRA ICOM-1890 End:Delete by zhangyanhu C01012 2015-08-27\t\t\t\t\r\n\t\t\r\n\t\tprogressDialog = new ProgressDialog(AppStartToMainActivity.this);\r\n\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\r\n\t\tprogressDialog.setMessage(AppStartToMainActivity.this.getString(R.string.dialog_connecting_to_cam));\r\n\t\tprogressDialog.setCancelable(false);\r\n\t\tprogressDialog.show();\t\t\r\n\t\tif (SDKSession.prepareSession() == false) {\r\n\t\t\tredirectToExit(CONNECT_FAIL);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t//if (cameraProperties.checkCustomerID(0xD613, 0x0100) == false) {\r\n\t/*\tif (checkCustomerID(0xD613,0x3200) == false) {\r\n\t\t\tredirectToExit(CHECK_CUSID_FAIL);\r\n\t\t\treturn;\r\n\t\t}\r\n\t*/\r\n//\t\tUserMacPermition.initUserMacPermition();\r\n//\t\tif (UserMacPermition.isAllowedMac(getLocalMacAddress()) == false) {\r\n//\t\t\tredirectToExit(CHECK_MAC_FAIL);\r\n//\t\t\treturn;\r\n//\t\t}\r\n\t\r\n\t\t//redirectToExit(CONNECT_FAIL);\r\n\t\tUIDisplayResource.createInstance();\r\n\t\tUIDisplayResource.getinstance().initUIDisplayResource();\r\n\t\tcameraProperties = new CameraProperties();\r\n\t\tif (cameraProperties.hasFuction(0x5011)) {\r\n\t\t\tlong time = System.currentTimeMillis();\r\n\t\t\tDate date = new Date(time);\r\n\t\t\tSimpleDateFormat myFmt = new SimpleDateFormat(\"yyyyMMdd HHmmss\");\r\n\t\t\tString temp = myFmt.format(date);\r\n\t\t\ttemp = temp.replaceAll(\" \", \"T\");\r\n\t\t\ttemp = temp + \".0\";\r\n\t\t\tcameraProperties.setCameraDate(temp);\r\n\t\t}\r\n\r\n\t\ttimer.schedule(task, 1000, 1000);\r\n\r\n\t\t// TimeLapseInterval.getInstance().initTimeLapseInterval();\r\n\t\tLog.d(\"AppStartAppStart\", \"end oncreate\");\r\n\t}", "@Override\n public void loginBtnClk(View view) {\n isRegisteredOnGCM(1);\n }", "@Override\n public void run() {\n if (session.isLoggedIn()) {\n Intent i = new Intent(Splash.this, MainActivity.class);\n startActivity(i);\n finish();\n }\n else if(!session.isLoggedIn()){\n Intent i = new Intent(Splash.this, RepRegistration.class);\n startActivity(i);\n finish();\n }\n }", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n SharedPreferences preferences = getSharedPreferences(\"logInfo\",\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);\n switch (msg.what) {\n case LOGIN_OK:\n application.isLogin = true;\n editor.putBoolean(\"isLogin\", true);\n editor.commit();\n break;\n case LOGOUT_OK:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n break;\n case PASSWORD_ERROR:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n startActivity(intent);\n Toast.makeText(getApplicationContext(), getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n break;\n case NETWORK_ERROR:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n startActivity(intent);\n Toast.makeText(getApplicationContext(), getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n break;\n case LOGIN_FAILED:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n startActivity(intent);\n Toast.makeText(getApplicationContext(), getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n break;\n }\n showNotification();\n }", "private void GoToLogin() {\n\t\tstartActivity(new Intent(this, LoginActivity.class));\r\n\t\tapp.user.sessionID = \"\";\r\n\t\tMassVigUtil.setPreferenceStringData(this, \"SESSIONID\", \"\");\r\n\t}", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled login.\");\n updateRefreshTokenUI(true);\n }", "@Override\n\n public void success(DigitsSession session, String phoneNumber) {\n SharedPreferences mPreferences = getApplicationContext().getSharedPreferences(\"MyPref\", 0);\n SharedPreferences.Editor editor = mPreferences.edit();\n phoneNumber=phoneNumber.substring(3);\n editor.putString(\"loginid\", phoneNumber);\n editor.putInt(\"daylimit\",0);\n editor.putInt(\"monthlimit\",0);\n editor.commit();\n signin(phoneNumber);\n Intent i = new Intent(login.this,userDetails.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NO_HISTORY);\n\n startActivity(i);\n Toast.makeText(getApplicationContext(), \"Authentication successful for \"\n + phoneNumber, Toast.LENGTH_LONG).show();\n }", "public void onResume() {\n\t\tSession session = Session.getActiveSession();\n\t\tif (session != null && (session.isOpened() || session.isClosed())) {\n\t\t\tonSessionStateChange(session, session.getState(), null);\n\t\t}\n\t\tuiHelper.onResume();\n\t}", "@Override\n public void validateCredentials(ObjLogin objLogin, Context mContext) {\n if (loginView != null) {\n loginView.showProgress();\n loginInteractor.login(objLogin, this, mContext);\n }\n }", "public void startVideoRecording() {\n this.mActivity.getCameraAppUI().switchShutterSlidingAbility(false);\n if (this.mCameraState == 1) {\n setCameraState(2);\n Tag tag = TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"startVideoRecording: \");\n stringBuilder.append(Thread.currentThread());\n Log.i(tag, stringBuilder.toString());\n ToastUtil.showToast(this.mActivity, this.mActivity.getString(R.string.video_recording_start_toast), 0);\n this.mAppController.onVideoRecordingStarted();\n if (this.mModeSelectionLockToken == null) {\n this.mModeSelectionLockToken = this.mAppController.lockModuleSelection();\n }\n this.mUI.showVideoRecordingHints(false);\n this.mUI.cancelAnimations();\n this.mUI.setSwipingEnabled(false);\n this.mUI.showFocusUI(false);\n this.mAppController.getCameraAppUI().hideRotateButton();\n this.mAppController.getButtonManager().hideEffectsContainerWrapper();\n final long updateStorageSpaceTime = System.currentTimeMillis();\n this.mActivity.updateStorageSpaceAndHint(new OnStorageUpdateDoneListener() {\n public void onStorageUpdateDone(long bytes) {\n Tag access$100 = VideoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"updateStorageSpaceAndHint cost time :\");\n stringBuilder.append(System.currentTimeMillis() - updateStorageSpaceTime);\n stringBuilder.append(\"ms.\");\n Log.d(access$100, stringBuilder.toString());\n if (VideoModule.this.mCameraState != 2) {\n VideoModule.this.pendingRecordFailed();\n return;\n }\n if (bytes <= Storage.LOW_STORAGE_THRESHOLD_BYTES) {\n Log.w(VideoModule.TAG, \"Storage issue, ignore the start request\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mCameraDevice == null) {\n Log.v(VideoModule.TAG, \"in storage callback after camera closed\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mPaused) {\n Log.v(VideoModule.TAG, \"in storage callback after module paused\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mMediaRecorderRecording) {\n Log.v(VideoModule.TAG, \"in storage callback after recording started\");\n } else if (VideoModule.this.isSupported(VideoModule.this.mProfile.videoFrameWidth, VideoModule.this.mProfile.videoFrameHeight)) {\n VideoModule.this.mCurrentVideoUri = null;\n VideoModule.this.mCameraDevice.enableShutterSound(false);\n if (VideoModule.this.mNeedGLRender && VideoModule.this.isSupportEffects()) {\n VideoModule.this.playVideoSound();\n VideoModule.this.initGlRecorder();\n VideoModule.this.pauseAudioPlayback();\n VideoModule.this.mActivity.getCameraAppUI().startVideoRecorder();\n } else {\n VideoModule.this.initializeRecorder();\n if (VideoModule.this.mMediaRecorder == null) {\n Log.e(VideoModule.TAG, \"Fail to initialize media recorder\");\n VideoModule.this.pendingRecordFailed();\n return;\n }\n VideoModule.this.pauseAudioPlayback();\n try {\n long mediarecorderStart = System.currentTimeMillis();\n VideoModule.this.mMediaRecorder.start();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"mMediaRecorder.start() cost time : \");\n stringBuilder2.append(System.currentTimeMillis() - mediarecorderStart);\n Log.d(access$100, stringBuilder2.toString());\n VideoModule.this.playVideoSound();\n VideoModule.this.mCameraDevice.refreshSettings();\n VideoModule.this.mCameraSettings = VideoModule.this.mCameraDevice.getSettings();\n VideoModule.this.setFocusParameters();\n } catch (RuntimeException e) {\n Log.e(VideoModule.TAG, \"Could not start media recorder. \", e);\n VideoModule.this.releaseMediaRecorder();\n VideoModule.this.mCameraDevice.lock();\n VideoModule.this.releaseAudioFocus();\n if (VideoModule.this.mModeSelectionLockToken != null) {\n VideoModule.this.mAppController.unlockModuleSelection(VideoModule.this.mModeSelectionLockToken);\n }\n VideoModule.this.setCameraState(1);\n if (VideoModule.this.shouldHoldRecorderForSecond()) {\n VideoModule.this.mAppController.setShutterEnabled(true);\n }\n VideoModule.this.mAppController.getCameraAppUI().showModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(true);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.onVideoRecordingStop();\n }\n ToastUtil.showToast(VideoModule.this.mActivity.getApplicationContext(), (int) R.string.video_record_start_failed, 0);\n return;\n }\n }\n VideoModule.this.mAppController.getCameraAppUI().setSwipeEnabled(false);\n VideoModule.this.setCameraState(3);\n VideoModule.this.tryLockFocus();\n VideoModule.this.mMediaRecorderRecording = true;\n VideoModule.this.mActivity.lockOrientation();\n VideoModule.this.mRecordingStartTime = SystemClock.uptimeMillis() + 600;\n VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().setAngle(VideoModule.this.mOrientation);\n VideoModule.this.mAppController.getCameraAppUI().hideModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(false);\n }\n if (VideoModule.this.isVideoShutterAnimationEnssential()) {\n VideoModule.this.mAppController.getCameraAppUI().animateBottomBarToVideoStop(R.drawable.ic_stop);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoCaptureButton(true);\n }\n if (VideoModule.this.mAppController.getCameraAppUI().getCurrentModeIndex() == VideoModule.this.mActivity.getResources().getInteger(R.integer.camera_mode_video)) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoPauseButton(false);\n }\n VideoModule.this.mUI.showRecordingUI(true);\n if (VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().getVisibility() == 0) {\n VideoModule.this.mUI.hideCapButton();\n }\n VideoModule.this.showBoomKeyTip();\n VideoModule.this.updateRecordingTime();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"startVideoRecording cost time 1 : \");\n stringBuilder3.append(System.currentTimeMillis() - VideoModule.this.mShutterButtonClickTime);\n Log.d(access$100, stringBuilder3.toString());\n if (VideoModule.this.isSendMsgEnableShutterButton()) {\n VideoModule.this.mHandler.sendEmptyMessageDelayed(6, VideoModule.MIN_VIDEO_RECODER_DURATION);\n }\n VideoModule.this.mActivity.enableKeepScreenOn(true);\n VideoModule.this.mActivity.startInnerStorageChecking(new OnInnerStorageLowListener() {\n public void onInnerStorageLow(long bytes) {\n VideoModule.this.mActivity.stopInnerStorageChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_storage_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n VideoModule.this.mActivity.startBatteryInfoChecking(new OnBatteryLowListener() {\n public void onBatteryLow(int level) {\n VideoModule.this.mActivity.stopBatteryInfoChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_battery_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n } else {\n Log.e(VideoModule.TAG, \"Unsupported parameters\");\n VideoModule.this.pendingRecordFailed();\n }\n }\n });\n }\n }", "public void showAlert(){\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t Session.getActiveSession().addCallback(statusCallback);\n\t}", "private void takeUserToLoginScreenOnUnAuth() {\n Intent intent = new Intent(BaseActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }", "public void handleRecButtonOnPressed() {\n ((AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE)).setStreamMute(AudioManager.STREAM_SYSTEM, true);\n ((AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE)).setStreamMute(AudioManager.STREAM_MUSIC, true);\n ((AudioManager) AppDelegate.getAppContext().getSystemService(Context.AUDIO_SERVICE)).setStreamMute(AudioManager.STREAM_RING, true);\n AudioManager audioMgr = ((AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE));\n\n cameraView.setVisibility(View.VISIBLE);\n mapView.getView().setVisibility(View.GONE);\n //updateMessage();\n if (timerCounter != null) {\n timerCounter.cancel();\n timerCounter = null;\n }\n\n if (isCameraRecording) {\n\n isCameraRecording = false;\n mStartRecordingButton.setChecked(false);\n mTextViewInfoAboutVideoStreaming.setVisibility(View.GONE);\n disableAuthorityAlertedText();\n\n cameraView.stopRecording();\n\n // Control view group\n cameraView.setVisibility(View.VISIBLE);\n mapView.getView().setVisibility(View.GONE);\n\n toolBarTitle.setText(dateFormat.format(new Date(userPreferences.recordTime() * 1000)));\n handler.removeCallbacksAndMessages(null);\n handler.removeCallbacks(counterMessage);\n counterMessage = null;\n\n //VIDEO FINISHING ALERT\n CommonAlertDialog dialog = new CommonAlertDialog(getActivity(), mAlertDialogButtonClickListerer); // Setting dialogview\n dialog.show();\n\n } else {\n\n userPreferences.setEventId(UUID.randomUUID().toString());\n isCameraRecording = true;\n\n mStartRecordingButton.setChecked(true);\n mTextViewInfoAboutVideoStreaming.setVisibility(View.VISIBLE);\n cameraView.setVisibility(View.VISIBLE);\n\n if (cacheFolder == null) {\n cacheFolder = new FwiCacheFolder(AppDelegate.getAppContext(), String.format(\"%s/%s\", userPreferences.currentProfileId(), userPreferences.eventId()));\n cameraView.setDelegate(this);\n cameraView.setCacheFolder(cacheFolder);\n }\n\n this.startRecording();\n\n }\n if (userPreferences.enableTorch()) {\n isenableTourch = true;\n cameraView.torchOn();\n }\n\n }", "@Override\n public void onClick(View v) {\n final Dialog login = new Dialog(MainActivity.this);\n // Set GUI of login screen\n login.setContentView(R.layout.login_dialog);\n login.setTitle(\"Login to your Snap account\");\n\n // Init button of login GUI\n Button btnLogin = (Button) login.findViewById(R.id.btnLogin);\n Button btnCancel = (Button) login.findViewById(R.id.btnCancel);\n final EditText txtUsername = (EditText)login.findViewById(R.id.txtUsername);\n final EditText txtPassword = (EditText)login.findViewById(R.id.txtPassword);\n txtPassword.setTypeface(Typeface.SANS_SERIF);\n txtUsername.setTypeface(Typeface.SANS_SERIF);\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n //String strSavedMem1 = sharedPreferences.getString(\"username\",\"d\");\n txtUsername.setText( sharedPreferences.getString(\"username\",\"@walk.com\") );\n txtPassword.setText( sharedPreferences.getString(\"password\",\"password\"));\n\n\n\n // Attached listener for login GUI button\n btnLogin.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(txtUsername.getText().toString().trim().length() > 0 && txtPassword.getText().toString().trim().length() > 0)\n {\n // Validate Your login credential here than display message\n checkCredentials(txtUsername.getText().toString().trim(),txtPassword.getText().toString().trim());\n login.dismiss();\n }\n else\n {\n Toast.makeText(getApplicationContext(),\n \"Please enter Username and Password\", Toast.LENGTH_LONG).show();\n }\n }\n });\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n login.dismiss();\n }\n });\n\n // Make dialog box visible.\n login.show();\n\n }", "@Override\n public void onStop() {\n super.onStop();\n if (mAuthListener != null) {\n mAuth.removeAuthStateListener(mAuthListener);\n }\n hideProgressDialog();\n }" ]
[ "0.590358", "0.5834575", "0.57921624", "0.5781068", "0.57716084", "0.5745311", "0.57313454", "0.5718383", "0.5686224", "0.5684335", "0.56688637", "0.56509095", "0.5642931", "0.56266356", "0.5620162", "0.5619801", "0.56107515", "0.55890703", "0.5582558", "0.55816936", "0.55714804", "0.55691826", "0.5563581", "0.5563581", "0.5563581", "0.5563581", "0.5563581", "0.5563581", "0.5563581", "0.556321", "0.55528605", "0.5529292", "0.55152386", "0.5481133", "0.54744834", "0.54713154", "0.54684347", "0.546777", "0.5452964", "0.54497886", "0.54408884", "0.54408884", "0.5438967", "0.54380417", "0.54378206", "0.5432984", "0.5429323", "0.5422726", "0.5420622", "0.5408525", "0.5401815", "0.5398864", "0.5395461", "0.5391627", "0.5368098", "0.5365374", "0.53639305", "0.53609926", "0.53596944", "0.53558975", "0.5338467", "0.533416", "0.5331346", "0.53284675", "0.5327173", "0.5320305", "0.5319582", "0.53170115", "0.5316287", "0.5310004", "0.530723", "0.5306286", "0.52980375", "0.52953756", "0.52939606", "0.52798396", "0.5271086", "0.52663565", "0.52504", "0.5249951", "0.5248513", "0.524682", "0.52453727", "0.5245306", "0.5238406", "0.52302706", "0.5222741", "0.5211902", "0.52096856", "0.51979125", "0.51973", "0.51936907", "0.5192606", "0.5187552", "0.5185985", "0.5185582", "0.51840687", "0.5164722", "0.5157905", "0.51531065", "0.51486087" ]
0.0
-1
TODO Autogenerated method stub Do something
@Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); }
{ "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\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void getExras() {\n\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 grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo4359a() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo6081a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo9848a() {\n }", "public void mo3376r() {\n }", "private stendhal() {\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public void designBasement() {\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\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "public void mo21793R() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n protected void getExras() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo12930a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo1531a() {\n }", "public void mo115190b() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo21791P() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "public void mo21779D() {\n }", "public void mo21825b() {\n }", "public void method_4270() {}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n\tpublic void one() {\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}", "public void mo97908d() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\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\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}" ]
[ "0.6900981", "0.67433226", "0.65702623", "0.6540594", "0.65208787", "0.6479393", "0.64583063", "0.64583063", "0.6413181", "0.6403888", "0.6366576", "0.63625085", "0.6344666", "0.63431835", "0.6335929", "0.630386", "0.62894225", "0.62588394", "0.6248151", "0.6248151", "0.6248151", "0.6248151", "0.6248151", "0.6248151", "0.6248151", "0.6246272", "0.62436074", "0.6229421", "0.6207975", "0.6203263", "0.6185717", "0.6172927", "0.6172927", "0.61223274", "0.60997355", "0.6091994", "0.60886526", "0.6081544", "0.60717034", "0.6060674", "0.60567325", "0.6053441", "0.6046193", "0.60430473", "0.60430473", "0.60415745", "0.60381263", "0.60289925", "0.6028914", "0.60272175", "0.60063696", "0.59973", "0.59934056", "0.5987423", "0.59791833", "0.5976188", "0.5972576", "0.59707755", "0.5969513", "0.59666824", "0.59666055", "0.59527725", "0.59500724", "0.59446454", "0.59431803", "0.59359616", "0.59278744", "0.59132695", "0.5905068", "0.5902938", "0.59026647", "0.5886241", "0.588063", "0.58640677", "0.5862007", "0.5857795", "0.58565354", "0.58565354", "0.5850552", "0.5845118", "0.5844629", "0.58423334", "0.58423334", "0.58423334", "0.5839989", "0.5839758", "0.58371466", "0.5836162", "0.5836162", "0.5836162", "0.5836162", "0.5836162", "0.5832301", "0.5829601", "0.5829601", "0.5829601", "0.5827895", "0.5827895", "0.5827895", "0.5827895", "0.5827895" ]
0.0
-1
creates Map of UUID's that we will monitor. Used to send to the beaconManager class
static Map<String, Boolean> getUUIDMap(){ Map<String, Boolean> m = new HashMap<String, Boolean>(); m.put(Config.DYNAMIC_PROXIMITY_UUID, false); m.put(Config.STATIC_PROXIMITY_UUID, false); return m; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<UUID, TimeRange> getUUIDToTimeRange() {\n return new HashMap<>(uuidToTimeRange);\n }", "protected abstract Map<String, Serializable> getEventKeyAndIdMap();", "static Map<String, Handlers> getIntentMap()\n\t{\n\t\tMap<String, Handlers> h_map = new HashMap<>();\n\t\t\n\t\t\n\t\th_map.put (ADDRESS_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (ADDRESS_ASSOCIATE , Handlers.LINK_CREATE);\n\t\th_map.put (ADDRESS_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (EVENT_ADD , Handlers.NODE_CREATE_AND_LINK);\n\t\th_map.put (EVENT_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (GROUP_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_MEMBER_ADD , Handlers.LINK_CREATE);\n\t\th_map.put (GROUP_MEMBER_DELETE, Handlers.LINK_DELETE);\n\t\th_map.put (PERSON_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (PERSON_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (SUBSCRIPTION_ADD , Handlers.NODE_CREATE_AND_MULTILINK);\n\t\th_map.put (SUBSCRIPTION_DELETE, Handlers.NODE_DELETE);\n\t\th_map.put (USER_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (USER_REGISTER , Handlers.REGISTER_USER);\n\n\t\treturn h_map;\n\t}", "@SuppressWarnings(\"unused\")\n private static <T extends AbstractApiIdentifiableDTO> Map<Long, T> generateIdMap(List<T> idList) {\n Map<Long, T> results = new HashMap<>(idList.size());\n\n for (T idSingle : idList) {\n results.put(idSingle.getId(), idSingle);\n }\n\n return results;\n }", "public Map getReceivers();", "public abstract java.util.Map<java.lang.String, java.lang.Integer> idiosyncraticEventIncidenceCountMap();", "public Map<Integer, Integer> getRegisterDataMap(){\n return registerFile.getRegisterMap();\n }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "private Map<String, Drone> getDroneMap(){\n\t\treturn this.drones;\n\t}", "protected abstract Map<Map<String, Serializable>, String> getWaitersMap();", "public void sinkCounterMap(){\n for(int i=1; i<(sinkCounter+1); i++){\n sinkCounterMap.put(i,1); //sink is included in basin count;\n \n }\n }", "protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}", "private void addToMaps(String name, UUID uuid) {\n\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.DAY_OF_MONTH, 3);\n\n // Create the entry and populate the local maps\n CachedUUIDEntry entry = new CachedUUIDEntry(name, uuid, calendar);\n nameToUuidMap.put(name.toLowerCase(), entry);\n uuidToNameMap.put(uuid, entry);\n }", "UUID getMonarchId();", "private static void initializeMap() {\n addressTypeToSerializerMap = new HashMap<>();\n addressTypeToSerializerMap.put(NoAddressAfi.VALUE, NoAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4Afi.VALUE, Ipv4Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4BinaryAfi.VALUE, Ipv4BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixAfi.VALUE, Ipv4PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixBinaryAfi.VALUE, Ipv4PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6Afi.VALUE, Ipv6Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6BinaryAfi.VALUE, Ipv6BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixAfi.VALUE, Ipv6PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixBinaryAfi.VALUE, Ipv6PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(MacAfi.VALUE, MacSerializer.getInstance());\n addressTypeToSerializerMap.put(DistinguishedNameAfi.VALUE, DistinguishedNameSerializer.getInstance());\n addressTypeToSerializerMap.put(Lcaf.VALUE, LcafSerializer.getInstance());\n addressTypeToSerializerMap.put(AfiListLcaf.VALUE, AfiListSerializer.getInstance());\n addressTypeToSerializerMap.put(InstanceIdLcaf.VALUE, InstanceIdSerializer.getInstance());\n addressTypeToSerializerMap.put(ApplicationDataLcaf.VALUE, ApplicationDataSerializer.getInstance());\n addressTypeToSerializerMap.put(ExplicitLocatorPathLcaf.VALUE, ExplicitLocatorPathSerializer.getInstance());\n addressTypeToSerializerMap.put(SourceDestKeyLcaf.VALUE, SourceDestKeySerializer.getInstance());\n addressTypeToSerializerMap.put(KeyValueAddressLcaf.VALUE, KeyValueAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(ServicePathLcaf.VALUE, ServicePathSerializer.getInstance());\n }", "public Map<String, String[]> getAllIdentifiantsUniques() {\n\t\tMap<String, String[]> allIdentifiantsUniques = new HashMap<>();\n\t\ttry {\n\t\t\tallIdentifiantsUniques = utilisateurDAO.selectAllIdentifiantsUniques();\n\t\t} catch (DALException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allIdentifiantsUniques;\n\t}", "public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }", "protected Map createAttachmentsMap() {\n return new HashMap();\n }", "void populatePidToHolderMap() {\n\t\tSet<Integer> visited = new HashSet<Integer>();\n\t\tQueue<Integer> visitQueue = new LinkedList<Integer>();\n\t\tvisitQueue.add(pid);\n\t\tvisited.add(pid);\n\t\twhile(!visitQueue.isEmpty()) {\n\t\t\tint nodePid = visitQueue.poll();\n\t\t\tList<Integer> neighborList = neighborMap.get(nodePid);\n\t\t\tfor (int neighborPid : neighborList) {\n\t\t\t\tif (!visited.contains(neighborPid)) {\n\t\t\t\t\tpidToHolderMap.put(neighborPid, nodePid);\n\t\t\t\t\tvisitQueue.add(neighborPid);\n\t\t\t\t\tvisited.add(neighborPid);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "private Map<Integer, MessageEncoder> initialiseMap() {\n Map<Integer, MessageEncoder> composerMap = new HashMap<>();\n composerMap.put(AC35MessageType.BOAT_ACTION.getCode(), new BoatActionEncoder());\n composerMap.put(AC35MessageType.REQUEST.getCode(), new RequestEncoder());\n composerMap.put(AC35MessageType.COLOUR.getCode(), new ColourEncoder());\n\n return Collections.unmodifiableMap(composerMap);\n }", "private static void mapDbAsstIDs()\r\n {\r\n if (dbIdMap == null) {\r\n dbIdMap = new HashMap<String, Integer>();\r\n dbIdMap.put(\"repair\", 1);\r\n dbIdMap.put(\"fuel\", 2);\r\n dbIdMap.put(\"tuition\", 3);\r\n dbIdMap.put(\"clothing\", 4);\r\n dbIdMap.put(\"registration\", 5);\r\n dbIdMap.put(\"utilities\", 21);\r\n }\r\n }", "private static <T extends AbstractApiIdentifiableDTO> Map<Long, List<T>> generateIdMapList(List<T> idList) {\n Map<Long, List<T>> results = new HashMap<>();\n\n for (T idSingle : idList) {\n Long sourceId = idSingle.getId();\n if (results.containsKey(sourceId)) {\n results.get(sourceId).add(idSingle);\n } else {\n // ID didn't exist so add a new list\n List<T> list = new ArrayList<>(1);\n list.add(idSingle);\n results.put(sourceId, list);\n }\n }\n\n return results;\n }", "@Override\n\tpublic void onBeaconServiceConnect() {\n\t\tbeaconManager.setRangeNotifier(new RangeNotifier() {\n\t\t\t@Override\n\t\t\tpublic void didRangeBeaconsInRegion(Collection<Beacon> beacons,\n\t\t\t\t\tRegion region) {\n\t\t\t\tif (beacons.size() > 0) {\n\t\t\t\t\tLog.i(TAG_SEARCHING_ACTIVITY_LOG, \"Found \" + beacons.size()\n\t\t\t\t\t\t\t+ \"beacons\");\n\t\t\t\t\tfor (Iterator<Beacon> bIterator = beacons.iterator(); bIterator\n\t\t\t\t\t\t\t.hasNext();) {\n\t\t\t\t\t\tfinal Beacon beacon = bIterator.next();\n\t\t\t\t\t\tif (isGimbalTag(beacon)) {\n\t\t\t\t\t\t\tString major = beacon.getId2().toString();\n\t\t\t\t\t\t\tif(Double.parseDouble(major) == 100){\n\t\t\t\t\t\t\t\t// generate the HashMap key, which is the\n\t\t\t\t\t\t\t\t// combination of tag's UUID, Major and Minor; But\n\t\t\t\t\t\t\t\t// you can always choose your own key\n\t\t\t\t\t\t\t\tfinal String key = new StringBuilder()\n\t\t\t\t\t\t\t\t\t\t.append(beacon.getId1())\n\t\t\t\t\t\t\t\t\t\t.append(beacon.getId2())\n\t\t\t\t\t\t\t\t\t\t.append(beacon.getId3()).toString();\n\t\t\t\t\t\t\t\tdiscoveredBeaconMap.put(key, beacon);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tupdateDiscoveredList();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttry {\n\t\t\tbeaconManager.startRangingBeaconsInRegion(new Region(\n\t\t\t\t\t\"myRangingUniqueId\", null, null, null));\n\t\t} catch (RemoteException e) {\n\t\t}\n\t}", "public Map<String, Object> getPrimaryKey() {\n Map<String, Object> ret = new LinkedHashMap<String, Object>(6);\n ret.put(\"atrfAudUid\", getAtrfAudUid());\n return ret;\n }", "private Map<String, ParticipantProperties> convertRoomIdentifiersToMapForRemove(\n Iterable<CommunicationIdentifier> identifiers) {\n Map<String, ParticipantProperties> participantMap = new HashMap<>();\n\n if (identifiers != null) {\n for (CommunicationIdentifier identifier : identifiers) {\n participantMap.put(identifier.getRawId(), null);\n }\n }\n\n return participantMap;\n }", "public Map<String, C0148k> call() throws Exception {\n HashMap hashMap = new HashMap();\n long elapsedRealtime = SystemClock.elapsedRealtime();\n hashMap.putAll(m471c());\n hashMap.putAll(m472d());\n StringBuilder sb = new StringBuilder();\n sb.append(\"finish scanning in \");\n sb.append(SystemClock.elapsedRealtime() - elapsedRealtime);\n C0135c.m449h().mo273b(\"Fabric\", sb.toString());\n return hashMap;\n }", "private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }", "private AeRegistration() {\n\t\tnotifications = new HashMap<String, List<JSONObject>>();\n\t\tsubscriptions = new HashMap<String,String>();\n\t\tsubscribedToResourcesSet = new HashMap<String,String>();\n\t\tsubscriptionsPerSessions = new HashMap<String, Set<String>>();\n\t}", "public static synchronized void initiazeDeviceMap(List<Device> devices) {\n devices.forEach((device) -> {\n deviceStatusMap.put(device, \"free\");\n });\n logUtility.logDebug(\"Devices map-\");\n deviceStatusMap.forEach((device, status) -> logUtility.logDebug(device.getDeviceName() + \" - \" + status));\n }", "public void generateRandomMap() {\n\n\t}", "public Map<String, String> getAllIdentifiants(){\n\t\tMap<String, String> allIdentifiants = new HashMap<String, String>();\n\t\ttry {\n\t\t\tallIdentifiants = utilisateurDAO.selectAllIdentifiants();\n\t\t} catch (DALException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allIdentifiants;\n\t}", "private synchronized static Map getListeners() {\n\t\tif (registeredListeners == null) {\n\t\t\tregisteredListeners = Collections.synchronizedMap(new HashMap());\n\t\t}\n\t\treturn registeredListeners;\n\t}", "private UUIDManager(){}", "public Map<String, Long> getUserIdLetterMap() throws UserManagementException;", "public Map<String, Object> toMap(){\n Map<String, Object> newEvent = new HashMap<>();\n newEvent.put(\"uid\", getUid());\n newEvent.put(\"name\", getName());\n newEvent.put(\"host\", getHost());\n newEvent.put(\"hostContribution\", isHostContribution());\n newEvent.put(\"startTime\", getEpochTime());\n newEvent.put(\"location\", getLocation());\n newEvent.put(\"description\", getDescription());\n newEvent.put(\"coverImageUrl\", getCoverImageUrl());\n newEvent.put(\"amountNeeded\", getAmountNeeded());\n return newEvent;\n }", "public java.util.Map<java.lang.String, java.lang.String> getPeersMap() {\n return internalGetPeers().getMap();\n }", "public Map<String, Set<String>> getBufferedDeviceNamesByType();", "public static void createDeviceMap() {\n\t\ttry {\n\t\t\tSmapStreamList sat = new SmapStreamList();\n\t\t\tMap<String, SmapDevice> saMap = sat.convertToSADevices();\n\t\t\tFileWriter fw = new FileWriter(device_map_file);\t\t\t\n\t\t\tString json = sat.gson.toJson(saMap);\n\t\t\tfw.write(json);\n\t\t\tfw.close();\n\t\t\trenderText(json);\n\t\t} catch (Exception e) {\n\t\t\trenderText(e);\n\t\t}\n\t}", "private HashMap<String, ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData) {\n logger.trace(\"BEGIN HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\n for (TSDBData obj : tsdbData) {\n ArrayList<String> columns = obj.getColumns();\n ArrayList<ArrayList<Object>> points = obj.getPoints();\n int clientidIndex = -1;\n int instanceidIndex = -1;\n for (int i = 0; i < columns.size(); i++) {\n if (columns.get(i).equals(\"clientId\"))\n clientidIndex = i;\n else if (columns.get(i).equals(\"instanceId\"))\n instanceidIndex = i;\n }\n for (int i = 0; i < points.size(); i++) {\n String clientId = points.get(i).get(clientidIndex).toString();\n String InstanceId = points.get(i).get(instanceidIndex).toString();\n if (!(map.containsKey(clientId))) {\n map.put(clientId, new ArrayList<String>());\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n } else {\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n\n }\n }\n }\n logger.trace(\"END HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n return map;\n }", "@Override\n public int hashCode() {\n return _instanceId.hashCode();\n }", "java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status>\n getSystemMap();", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public java.util.Map<java.lang.String, java.lang.String> getPeersMap() {\n return internalGetPeers().getMap();\n }", "public Map<String, Counter> getMap(){\n\t\treturn map;\n\t}", "private static String m72668a(Map<String, String> map) {\n String str = \"msgId\";\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(System.currentTimeMillis());\n sb.append(\"__xxx__\");\n sb.append(AppLog.getServerDeviceId());\n map.put(str, sb.toString());\n return f58217a.mo58025a(f58218b, map);\n } catch (Exception unused) {\n return \"\";\n }\n }", "private List<ParcelUuid> adv_get_16bit_service_uuids(byte[] raw_record){\n byte[] uuid_raw_bytes = adv_report_parse(BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE, raw_record);\n if(uuid_raw_bytes == null){\n return null;\n }\n\n long uuid_16bit = ((((uuid_raw_bytes[1]<<8)&0xFF00) + (uuid_raw_bytes[0]&0x00FF))&0xFFFF);\n long high = fbk.climblogger.ConfigVals.BLE_BASE_UUID.getMostSignificantBits() + (uuid_16bit<<32) ;\n long low = fbk.climblogger.ConfigVals.BLE_BASE_UUID.getLeastSignificantBits();\n List<ParcelUuid> UUIDS = new ArrayList<ParcelUuid>();\n UUIDS.add(new ParcelUuid(new UUID(high, low)));\n return UUIDS;\n }", "protected Map createPropertiesMap() {\n return new HashMap();\n }", "UUID getCreatedUUID()\n {\n return conglomerateUUID;\n }", "public Map getDurableTopicSubscriberMap()\n {\n return Collections.unmodifiableMap(topicDurableSubscriberMap);\n }", "Map getGenAttributes();", "public Map<String, Object> getPrimaryKey() {\n Map<String, Object> ret = new LinkedHashMap<String, Object>(6);\n ret.put(\"regItemUid\", getRegItemUid());\n return ret;\n }", "private static Map<String, Integer> assignVertexIds(DAG dag) {\n Map<String, Integer> vertexIdMap = new LinkedHashMap<>();\n final int[] vertexId = {0};\n dag.forEach(v -> vertexIdMap.put(v.getName(), vertexId[0]++));\n return vertexIdMap;\n }", "public HashMap<String, String> getStatsNamesAndIds() {\n\t\tNodeList nl = getStats();\n\t\tHashMap<String, String> id_name = new LinkedHashMap<String, String>();\n\t\tint len = nl.getLength();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString id = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"id\");\n\t\t\tString name = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"name\");\n\t\t\tif (id != null && name != null) {\n\t\t\t\tid_name.put(id, name);\n\t\t\t}\n\t\t}\n\t\treturn id_name;\n\t}", "public Map<UUID, String> getDroneNames() {\n return this.droneNames;\n }", "public static ConcurrentMap<String, WebSocketServer> getWebSocketMap() {\n\t\treturn webSocketMap;\n\t}", "public static LocationId getLocationIds()\n {\n LocationId locnIds = new LocationId();\n IoTGateway.getGlobalStates().forEach(\n (locn,sv)->{\n locnIds.addId(locn);\n }\n );\n return locnIds;\n }", "private static java.util.HashMap<Integer, Command> getMappings() {\n if (mappings == null) {\n synchronized (Command.class) {\n if (mappings == null) {\n mappings = new java.util.HashMap<Integer, Command>();\n }\n }\n }\n return mappings;\n }", "private void fillMonitorsMetricsMap() {\n\t\tmonitorsMetricsMap=new HashMap<>();\n\t\tmonitorsMetricsMap.put(\"RR<sub>TOT</sub>\", new String[] {rosetta.MDC_RESP_RATE.VALUE, \"MDC_DIM_RESP_PER_MIN\"});\n\t\tmonitorsMetricsMap.put(\"EtCO<sub>2</sub>\", new String[] {rosetta.MDC_AWAY_CO2_ET.VALUE, rosetta.MDC_DIM_MMHG.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PEAK</sub>\", new String[] {rosetta.MDC_PRESS_AWAY_INSP_PEAK.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PLAT</sub>\", new String[] {rosetta.MDC_PRESS_RESP_PLAT.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"PEEP\", new String[] {\"ICE_PEEP\", rosetta.MDC_DIM_CM_H2O.VALUE});\t//TODO: Confirm there is no MDC_ for PEEP\n\t\tmonitorsMetricsMap.put(\"FiO<sub>2</sub>%\", new String[] {\"ICE_FIO2\", rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\tmonitorsMetricsMap.put(\"Leak %\", new String[] {rosetta.MDC_VENT_VOL_LEAK.VALUE, rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\t\n\t\t//Leak %\n\t}", "Map<UUID, Double> getOwners();", "public Map<String, Object> getIds() {\n return ids;\n }", "private String[] getInstrumentIds(){\n logger.info(\"Getting Instruments from cache\");\n return instruments.keySet().toArray(new String[instruments.size()]);\n }", "public void readIDs() {\n try {\n FileInputStream fileIn = new FileInputStream(\"temp/ids.ser\");\n ObjectInputStream in = new ObjectInputStream(fileIn);\n ids = (HashMap<String, Member>) in.readObject();\n in.close();\n fileIn.close();\n } catch (IOException e) {\n ids = new HashMap<>();\n } catch (ClassNotFoundException c) {\n System.out.println(\"Class HashMap not found\");\n c.printStackTrace();\n return;\n }\n\n }", "public Multimap<String, OOCSIDevice> devicesByLocation() {\n\t\tpurgeStaleClients();\n\n\t\tMultimap<String, OOCSIDevice> locationsMappedDevices = MultimapBuilder.hashKeys().linkedListValues().build();\n\t\tclients.values().stream().forEach(\n\t\t od -> od.locations.entrySet().stream().forEach(loc -> locationsMappedDevices.put(loc.getKey(), od)));\n\t\treturn locationsMappedDevices;\n\t}", "private static Map getMapPotionIds() {\n/* 350 */ if (mapPotionIds == null) {\n/* */ \n/* 352 */ mapPotionIds = new LinkedHashMap<>();\n/* 353 */ mapPotionIds.put(\"water\", new int[1]);\n/* 354 */ mapPotionIds.put(\"awkward\", new int[] { 16 });\n/* 355 */ mapPotionIds.put(\"thick\", new int[] { 32 });\n/* 356 */ mapPotionIds.put(\"potent\", new int[] { 48 });\n/* 357 */ mapPotionIds.put(\"regeneration\", getPotionIds(1));\n/* 358 */ mapPotionIds.put(\"moveSpeed\", getPotionIds(2));\n/* 359 */ mapPotionIds.put(\"fireResistance\", getPotionIds(3));\n/* 360 */ mapPotionIds.put(\"poison\", getPotionIds(4));\n/* 361 */ mapPotionIds.put(\"heal\", getPotionIds(5));\n/* 362 */ mapPotionIds.put(\"nightVision\", getPotionIds(6));\n/* 363 */ mapPotionIds.put(\"clear\", getPotionIds(7));\n/* 364 */ mapPotionIds.put(\"bungling\", getPotionIds(23));\n/* 365 */ mapPotionIds.put(\"charming\", getPotionIds(39));\n/* 366 */ mapPotionIds.put(\"rank\", getPotionIds(55));\n/* 367 */ mapPotionIds.put(\"weakness\", getPotionIds(8));\n/* 368 */ mapPotionIds.put(\"damageBoost\", getPotionIds(9));\n/* 369 */ mapPotionIds.put(\"moveSlowdown\", getPotionIds(10));\n/* 370 */ mapPotionIds.put(\"diffuse\", getPotionIds(11));\n/* 371 */ mapPotionIds.put(\"smooth\", getPotionIds(27));\n/* 372 */ mapPotionIds.put(\"refined\", getPotionIds(43));\n/* 373 */ mapPotionIds.put(\"acrid\", getPotionIds(59));\n/* 374 */ mapPotionIds.put(\"harm\", getPotionIds(12));\n/* 375 */ mapPotionIds.put(\"waterBreathing\", getPotionIds(13));\n/* 376 */ mapPotionIds.put(\"invisibility\", getPotionIds(14));\n/* 377 */ mapPotionIds.put(\"thin\", getPotionIds(15));\n/* 378 */ mapPotionIds.put(\"debonair\", getPotionIds(31));\n/* 379 */ mapPotionIds.put(\"sparkling\", getPotionIds(47));\n/* 380 */ mapPotionIds.put(\"stinky\", getPotionIds(63));\n/* */ } \n/* */ \n/* 383 */ return mapPotionIds;\n/* */ }", "public Map<ComponentId, CHILD> getComponentMap() {\n return Collections.unmodifiableMap(producerById);\n }", "public static Map<String, Client> getClientMap() {\r\n return clientMap;\r\n }", "public static Map<String, IpAddress> convert(List<IpAddress> ipAddressList) {\n Map<String, IpAddress> ipAddressMap = new HashMap<String, IpAddress>();\n\n for (IpAddress ipAddress : ipAddressList) {\n ipAddressMap.put(ipAddress.getUuid(), ipAddress);\n }\n\n return ipAddressMap;\n }", "private void prepareData() {\n devices.clear();\n\n Set<String> s = Blue.getInstance().devices.keySet();\n Iterator<String> it = s.iterator();\n String address;\n while (it.hasNext()) {\n address = it.next();\n devices.add(new Device(address, Blue.getInstance().devices.get(address)));\n }\n }", "static Map<Integer, Event> getEvents() {\n\t\treturn events;\n\t}", "public abstract Map<IBinder, ClientTransactionItem> getActivitiesToBeDestroyed();", "public Map<String, SmartHomeHub> getCachedInterfaces();", "public IdMap() {\n\t\tthis.add(new TextItems());\n\t\tthis.add(new DateTimeEntity());\n\t\tthis.add(EntityCreator.createJson(false));\n\t\tthis.add(EntityCreator.createJson(true));\n\t\tthis.add(new ObjectMapEntry());\n\t\tthis.add(EntityCreator.createXML());\n\t}", "@Override\n public void onBeaconServiceConnect() {\n beaconManager.addRangeNotifier(new RangeNotifier() {\n @Override\n public void didRangeBeaconsInRegion(Collection<Beacon> beacons,Region region) {\n Log.i(\"beacon\",\"Beacon Size:\"+beacons.size());\n Log.i(\"beaconManager\",\"beaconRanging\");\n if (beacons.size() > 0) {\n Iterator<Beacon> beaconIterator = beacons.iterator();\n while (beaconIterator.hasNext()) {\n Beacon beacon = beaconIterator.next();\n logBeaconData(LBD.Find_Loc(beacon,2));\n }\n }\n }\n\n });\n try {\n beaconManager.startRangingBeaconsInRegion(new Region(\"myRangingUniqueId\",\n null, null, null));\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n\n }", "default Map<String, Set<String>> getActiveDataCenterMap() {\n Map<String, Set<String>> result = new HashMap<>();\n Set<String> val = new HashSet<>();\n val.add(getLocalNodeName());\n result.put(\"local\", val);\n return result;\n }", "@Override\n public final java.util.Map<String, Object> getAttributesCalled(java.util.Map<String, Object> properties, RemoteServiceInfo source) {\n java.util.Map<String, Object> attributes = new java.util.HashMap<String, Object>();\n attributes.put(\"id\", _id);\n return attributes;\n }", "public Map<ParticipantId, ParticipantConfig> getParticipantMap() {\n return _participantMap;\n }", "public interface IDs {\n\n static final String SERIES_STANDARD_ID = \"c7fb8441-d5db-4113-8af0-e4ba0c3f51fd\";\n static final String EPISODE_STANDARD_ID = \"a99a8588-93df-4811-8403-fe22c70fa00a\";\n static final String FILE_STANDARD_ID = \"c5919cbf-fbf3-4250-96e6-3fefae51ffc5\";\n static final String RECORDING_STANDARD_ID = \"4a40811d-c067-467f-8ff6-89f37eddb933\";\n static final String ZAP2IT_STANDARD_ID = \"545c4b00-5409-4d92-9cda-59a44f0ec7a9\";\n}", "java.lang.String getUUID();", "public Map<String, Object> getPrimaryKey() {\n Map<String, Object> ret = new LinkedHashMap<String, Object>(6);\n ret.put(\"btrAudUid\", getBtrAudUid());\n return ret;\n }", "public TreeMap<String, User> getClientUsersMap() {\n TreeMap<String, User> clients = new TreeMap<>();\n usersConnected.values().stream().forEach((user) -> {\n clients.put(user.getName(), user.toClientUser());\n });\n return clients;\n }", "protected void fillZoneNodeMap() {\r\n\t\tfor(SupplyZone s : supplyZoneLines){\r\n\t\t\tString zoneName = s.getZoneName();\r\n\t\t\tzoneNodeMap.put(zoneName, new ZoneNode(zoneName));\r\n\t\t}\r\n\t}", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "public Map<String, String> mo9339b() {\n HashMap hashMap = new HashMap();\n hashMap.put(\"sdk_version\", AppLovinSdk.VERSION);\n hashMap.put(\"build\", String.valueOf(131));\n if (!((Boolean) this.f2745b.mo10202a(C1096c.f2507eM)).booleanValue()) {\n hashMap.put(AppLovinWebViewActivity.INTENT_EXTRA_KEY_SDK_KEY, this.f2745b.mo10246t());\n }\n C1200b c = this.f2745b.mo10189O().mo10261c();\n hashMap.put(InMobiNetworkValues.PACKAGE_NAME, C1277l.m3044d(c.f2980c));\n hashMap.put(TapjoyConstants.TJC_APP_VERSION_NAME, C1277l.m3044d(c.f2979b));\n hashMap.put(TapjoyConstants.TJC_PLATFORM, \"android\");\n hashMap.put(\"os\", C1277l.m3044d(VERSION.RELEASE));\n return hashMap;\n }", "public static Map<String, Byte> genNameToTypeMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<String, Byte> ret = new HashMap<String, Byte>();\n for(int i=0;i<types.length;i++){\n ret.put(names[i], types[i]);\n }\n return ret;\n }", "private static Map<String,List<Integer>> getProvisionIdMapStream(Map<String,List<Integer>> nameMapIdMap,Map<String,Integer> mapIdProbIdMap){\n return null;\n }", "@Override\r\n\tpublic Map<Fuel, List<IAutomatedVehicle>> autoVehiclesMap() {\r\n\r\n\t\tMap<Fuel, List<IAutomatedVehicle>> autoVehicleMap = new HashMap<>();\r\n\t\tautoVehicleMap.put(Fuel.GAS, getVehiclesOfFuelType(Fuel.GAS));\r\n\t\tautoVehicleMap.put(Fuel.GASOLINE, getVehiclesOfFuelType(Fuel.GASOLINE));\r\n\t\tautoVehicleMap.put(Fuel.DIESEL, getVehiclesOfFuelType(Fuel.DIESEL));\r\n\t\tautoVehicleMap.put(Fuel.ELECTRIC, getVehiclesOfFuelType(Fuel.ELECTRIC));\r\n\r\n\t\treturn autoVehicleMap;\r\n\t}", "private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }", "UUID getUniqueId();", "void markBeacons(List<Integer> beaconIDs);", "@Override\n public int hashCode() {\n if (!(uuid instanceof String)) {\n uuid = UUID.randomUUID().toString();\n }\n\n return uuid.hashCode();\n }", "UUID getUUID();", "@Override\n\tpublic java.util.Map<java.util.Locale, java.lang.String> getManualIdMap() {\n\t\treturn _scienceApp.getManualIdMap();\n\t}", "Map<String, String> getEndpointMap();", "private Map<String, MemberRegistration> getRemoteMemberMap(List<MemberRegistration> remoteMembersList)\n {\n Map<String, MemberRegistration> remoteMemberMap = new HashMap<>();\n\n if ((remoteMembersList != null) && (! remoteMembersList.isEmpty()))\n {\n for (MemberRegistration remoteMember : remoteMembersList)\n {\n if ((remoteMember != null) && (remoteMember.getMetadataCollectionId() != null))\n {\n remoteMemberMap.put(remoteMember.getMetadataCollectionId(), remoteMember);\n }\n }\n }\n\n return remoteMemberMap;\n }", "private IntLongMap getEdgeIdToOsmWayIdMap() {\n if (edgeIdToOsmWayIdMap == null)\n edgeIdToOsmWayIdMap = new GHIntLongHashMap(osmWayIdSet.size(), 0.5f);\n\n return edgeIdToOsmWayIdMap;\n }", "public synchronized Map<UUID, Set<GridNode>> getFirstArrivalMap() {\n return firstArrivalMap;\n }", "UUID getDeviceId();", "Map getIDPEXDataMap();", "private static Map<String, Set<String>> getReagentToPotionsTestCaseMap()\n\t{\n\t\t// Set up the potions manual for this particular test case.\n\t\tList<PotionInfo> potionsManual = getPotionsManual();\n\n\t\t// Build a reagent -> potions map from this potions manual.\n\t\tMap<String, Set<String>> map = PotionMaster.reagentToPotionsMap(potionsManual);\n\n\t\t// Check that the resulting map has exactly the right contents.\n\t\tif (!checkReagentToPotionsMapContents(map))\n\t\t{\n\t\t\tSystem.out.println(\"Incorrect map. Aborting test case.\");\n\t\t\tPotionInfo.printMap(map);\n\n\t\t\t// Kill the program.\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\treturn map;\n\t}" ]
[ "0.62543315", "0.5838957", "0.57187235", "0.5671702", "0.5651134", "0.5644933", "0.5623488", "0.5586189", "0.55683845", "0.5466256", "0.5433152", "0.5386846", "0.53817225", "0.5371471", "0.5370864", "0.5348115", "0.5342811", "0.5340341", "0.53379476", "0.53145385", "0.52879107", "0.5262153", "0.52421534", "0.5229692", "0.52276814", "0.5223004", "0.5219547", "0.5219443", "0.5217587", "0.52174735", "0.5200323", "0.51840836", "0.517677", "0.5170238", "0.5165019", "0.51590806", "0.5156758", "0.51549625", "0.51537067", "0.5146604", "0.514501", "0.512513", "0.5114896", "0.5112387", "0.51100206", "0.5095561", "0.50760645", "0.5068144", "0.50670063", "0.5059992", "0.50556815", "0.5055333", "0.5046006", "0.5034394", "0.50272477", "0.502252", "0.5018514", "0.5017589", "0.5013925", "0.5007386", "0.50067145", "0.500556", "0.5002659", "0.4991649", "0.4982169", "0.49754083", "0.49667728", "0.49640226", "0.49603024", "0.4958047", "0.4957233", "0.49498177", "0.49358764", "0.4932718", "0.49277306", "0.49215698", "0.49075028", "0.49050272", "0.490196", "0.4900779", "0.4898716", "0.4897775", "0.48949692", "0.4891665", "0.48879352", "0.4884112", "0.48797852", "0.487695", "0.48755997", "0.48700488", "0.48677132", "0.4863922", "0.4863593", "0.4854725", "0.48538136", "0.48490387", "0.4848825", "0.484169", "0.48411608", "0.48317006" ]
0.7413609
0
Created by JHJ on 16/5/6.
public interface DailyFightGroupOrderReportService { /** * 返回导出的数据 * @param startTime * @param endTime * @return */ List<List<Object>> listFightGroupOrderReport(Date startTime,Date endTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void m50366E() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\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}", "public void mo4359a() {\n }", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\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\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "@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\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public void mo12628c() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n void init() {\n }", "public void method_4270() {}", "public void mo6081a() {\n }", "public void skystonePos4() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void init() {\n\n\n\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public abstract void mo70713b();", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "public void skystonePos6() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\n\t}", "static void feladat4() {\n\t}" ]
[ "0.59396666", "0.584825", "0.584423", "0.5815841", "0.5756201", "0.5744074", "0.5744074", "0.57268506", "0.57099104", "0.5682032", "0.5681654", "0.56688213", "0.56316525", "0.56312114", "0.56285024", "0.5626441", "0.56192595", "0.5616951", "0.56153584", "0.5605903", "0.5602743", "0.5593102", "0.5591586", "0.55863726", "0.55863726", "0.55863726", "0.55863726", "0.55863726", "0.5579387", "0.5563678", "0.55241174", "0.5517108", "0.54991907", "0.5498126", "0.549334", "0.5492707", "0.5489914", "0.5485203", "0.5478378", "0.5460932", "0.5424692", "0.5424692", "0.5424692", "0.5424692", "0.5424692", "0.5424692", "0.5424692", "0.54228586", "0.5414549", "0.54112273", "0.54112273", "0.5410922", "0.5410922", "0.5410922", "0.540906", "0.540906", "0.540906", "0.5406102", "0.53955996", "0.5387115", "0.5387115", "0.5387115", "0.538421", "0.53811723", "0.537974", "0.537974", "0.53793114", "0.53793114", "0.5374561", "0.5373093", "0.5364537", "0.5362852", "0.53627855", "0.53609574", "0.5356953", "0.5355464", "0.5348692", "0.5347435", "0.5339568", "0.53373784", "0.5336995", "0.5336241", "0.533074", "0.5323686", "0.53196555", "0.53194004", "0.5315861", "0.53153026", "0.531273", "0.53100866", "0.5309059", "0.53065634", "0.5304491", "0.5302688", "0.5290526", "0.52897155", "0.528754", "0.52874315", "0.5286834", "0.52860254", "0.52851254" ]
0.0
-1
Creates new form result
public Main() { initComponents(); makeDirLookup(); ta.setEditable(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "FORM createFORM();", "@RequestMapping(value = \"/new\", method = RequestMethod.POST)\n public Object newAuctionx(@ModelAttribute @Valid AuctionForm form, BindingResult result) throws SQLException {\n if(result.hasErrors()) {\n StringBuilder message = new StringBuilder();\n for(FieldError error: result.getFieldErrors()) {\n message.append(error.getField()).append(\" - \").append(error.getRejectedValue()).append(\"\\n\");\n }\n ModelAndView modelAndView = (ModelAndView)newAuction();\n modelAndView.addObject(\"message\", message);\n modelAndView.addObject(\"form\", form);\n return modelAndView;\n }\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n UserAuthentication userAuth = UserAuthentication.select(UserAuthentication.class, \"SELECT * FROM user_authentication WHERE username=#1#\", username);\n AuctionWrapper wrapper = new AuctionWrapper();\n wrapper.setDemandResourceId(form.getDemandedResourceId());\n wrapper.setDemandAmount(form.getDemandedAmount());\n wrapper.setOfferResourceId(form.getOfferedResourceId());\n wrapper.setOfferAmount(form.getOfferedAmount());\n wrapper.setSellerId(userAuth.getPlayerId());\n auctionRestTemplate.post(auctionURL + \"/new\", wrapper, String.class);\n return new RedirectView(\"/player/trading\");\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\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}\n\t}", "public InformationResultPanel(GenericResult result) {\n this();\n fieldsNotToDisplay.add(\"id\");\n fieldsNotToDisplay.add(\"the_geom\");\n this.tblResult.removeAll();\n DefaultTableModel tableModel = new DefaultTableModel();\n List<Integer> indexListToShow = new ArrayList<Integer>();\n\n //Add columns\n for (Integer fieldInd = 0; fieldInd < result.getFieldNames().size(); fieldInd++) {\n String fieldName = result.getFieldNames().get(fieldInd);\n if (fieldsNotToDisplay.contains(fieldName)) {\n continue;\n }\n tableModel.addColumn(fieldName);\n indexListToShow.add(fieldInd);\n }\n\n //Add values\n for (Object row : result.getValues()) {\n StringArray rowAsArray = (StringArray) row;\n String[] rowToAdd = new String[indexListToShow.size()];\n for (Integer fieldIndIndex = 0; \n fieldIndIndex < indexListToShow.size(); fieldIndIndex++) {\n rowToAdd[fieldIndIndex] = \n rowAsArray.getItem().get(indexListToShow.get(fieldIndIndex));\n }\n tableModel.addRow(rowToAdd);\n }\n this.tblResult.setModel(tableModel);\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "public Result inicioGenerarLibro(){\n ContabilidadDTO dto = new ContabilidadDTO();\n dto.tipoLibro = new Parametro(\"\",\"LVEN\",\"\");\n //dto.tipoLibro.id.codigo =\"LVEN\";\n dto.anio = new Parametro(\"\",\"2018\",\"\");\n //dto.anio.id.codigo =\"2018\";\n dto.mes = new Parametro(\"\",\"3\",\"\");\n //dto.mes.id.codigo =\"3\"; //Simpre debe ser el mes anterior al actual\n\n Form<ContabilidadDTO> contabilidadDTOForm = formFactory.form(ContabilidadDTO.class).fill(dto);\n\n/*\n EbeanServer db = DBConnectionUtil.getDBServerFacturador();\n List<BandejaFactura> lista = db.find(BandejaFactura.class).findList();; //BandejaFactura.find.all();//obtenerTodos();\n for (BandejaFactura x:lista) {\n System.out.println(x);\n }\n*/\n/*\n EbeanServer db = DBConnectionUtil.getDBServerSGV();\n List<ControlVenta> lista = db.find(ControlVenta.class)\n .where().ilike(\"CVNT_NUM_DOCUMENTO\", \"F002-00000213\")\n .findList();\n for (ControlVenta x:lista) {\n System.out.println(\"*********** \"+x);\n }\n*/\n/*\n EbeanServer db = DBConnectionUtil.getDBServerSGV();\n List<ControlVenta> lista = db.find(ControlVenta.class).findList();; //BandejaFactura.find.all();//obtenerTodos();\n for (ControlVenta x:lista) {\n System.out.println(x);\n }\n*/\n\n return ok(generadorLibrosContables.render(contabilidadDTOForm));\n }", "@Override\n\tpublic void createItem(Object result) {\n\t\t\n\t\tunloadform();\n\t\tif (result != null) {\n\t\t\tIOTransactionLogic tr = (IOTransactionLogic) result;\n\t\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\t\tint month = Calendar.getInstance().get(Calendar.MONTH);\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(tr.getDate());\n\t\t\tint trYear = cal.get(Calendar.YEAR);\n\t\t\tint trMonth = cal.get(Calendar.MONTH);\n\t\t\t\n\t\t\tif ((year == trYear) && (month == trMonth)\n\t\t\t\t\t&& tr.getBankAccountID() == bal.getId()) {\n\t\t\t\ttransactionDisplayer trDisplayer = new transactionDisplayer(tr);\n\t\t\t\tsetDataLineChart();\n\t\t\t\tsetDataPieChart();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\r\n\tpublic void QueryResultReceived(List<QueryResult> result) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateResult(result);\r\n\t}", "void newResult(Result result);", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "@PostMapping(produces = \"application/json\", consumes = \"application/json\")\n public ResponseEntity<Exam> create(@RequestBody @Valid CreateInput input, BindingResult result) {\n if (result.hasErrors()) {\n throw new BadRequestException(\"Input values are invalid.\", result.getAllErrors());\n }\n Exam exam = examsService.create(conversionService.convert(input, Exam.class));\n return ResponseEntity.accepted().body(exam);\n }", "@PostMapping(value = \"/competitionAdminRequest/new\")\n\tpublic String processCreationForm(@Valid final CompAdminRequest compAdminRequest, final BindingResult result) throws DataAccessException {\n\n\t\t//Obtenemos el username del usuario actual conectado\n\t\tAuthentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tString currentPrincipalName = authentication.getName();\n\n\t\tAuthenticated thisUser = this.authenticatedService.findAuthenticatedByUsername(currentPrincipalName);\n\n\t\t//Si hay errores seguimos en la vista de creación\n\t\tif (result.hasErrors()) {\n\t\t\treturn CompAdminRequestController.VIEWS_COMP_ADMIN_REQUEST_CREATE_OR_UPDATE_FORM;\n\t\t} else {\n\t\t\tcompAdminRequest.setUser(thisUser.getUser());\n\t\t\tcompAdminRequest.setStatus(RequestStatus.ON_HOLD);\n\n\t\t\tthis.compAdminRequestService.saveCompAdminRequest(compAdminRequest);\n\n\t\t\t//Si todo sale bien vamos a la vista de mi club\n\t\t\treturn \"redirect:/myCompetitionAdminRequest\";\n\t\t}\n\t}", "public sub_Form(HashMap<String, ReturnedValue> entry, int index){\n this.form_ID = entry.get(\"formID\").to_string();\n this.repID = entry.get(\"repID\").to_string();\n this.plantRegistry = entry.get(\"plantRegistry\").to_string();\n this.domesticOrImported = entry.get(\"domesticOrImported\").to_string();\n this.serialNumber = entry.get(\"serialNumber\").to_string();\n this.beverageType = entry.get(\"beverageType\").to_string();\n this.brandName = entry.get(\"brandName\").to_string();\n this.fancifulName = entry.get(\"fancifulName\").to_string();\n this.vintage = entry.get(\"vintage\").to_string();\n this.grapeVarietals = entry.get(\"grapeVarietals\").to_string();\n this.pHValue = entry.get(\"pHValue\").to_string();\n this.wineAppellation = entry.get(\"wineAppellation\").to_string();\n this.alcoholContent = entry.get(\"alcoholContent\").to_string();\n this.phoneNumber = entry.get(\"phoneNumber\").to_string();\n this.email = entry.get(\"email\").to_string();\n this.index = index;\n }", "@Override\r\n\t\t\tpublic void onSuccess(User result) {\n if (formData.getCreator() == null) {\r\n \tformData.setCreator(result);\r\n \t} else {\r\n \t\tformData.setChangedBy(result);\r\n \t}\r\n // submit the data\r\n formService.saveFormData(formData, new EmitAsyncCallback<FormData>() {\r\n @Override\r\n\t\t\t\t\tpublic void onSuccess(FormData result) {\r\n \tProgressIndicator.hideProgressBar();\r\n Window.alert(appMessages.dataSavedSucessfully(\"\"+result.getFormDataId()));\r\n RefreshablePublisher.get().publish(\r\n \t\tnew RefreshableEvent(RefreshableEvent.Type.CAPTURE, result));\r\n view.close(false);\r\n }\r\n });\r\n }", "private Vehicle createVehicle(/*ResultSet rs*/) {\n // creates a vehicle using the specific form data\n //Form would get every field\n //This is dummy data\n Vehicle vehicle = new Vehicle();\n// try {\n int id = 1;\n String marca = \"marca\";\n String modelo = \"modelo\";\n double cilindrada = 2.0;\n int cavalos = 120;\n double preco = 1000.0;\n int quilometros = 200000;\n java.sql.Date date = new Date(1996-10-21);\n String combustivel = \"combustivel\";\n// //ADICIONAR\n vehicle.setId(id);\n vehicle.setMarca(marca);\n vehicle.setModelo(modelo);\n vehicle.setCilindrada(cilindrada);\n vehicle.setCavalos(cavalos);\n vehicle.setPreco(preco);\n vehicle.setDate(date);\n vehicle.setQuilometros(quilometros);\n vehicle.setCombustivel(Combustiveis.valueOf(combustivel));\n\n// } catch (SQLException e) {\n// e.printStackTrace();\n// }\n return vehicle;\n }", "public void receiveResultcreate(\n com.exacttarget.wsdl.partnerapi.CreateResponseDocument result\n ) {\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}", "@RequestMapping(method = RequestMethod.POST, path = \"/create\")\n @Secured({\"ROLE_DOCTOR\"})\n @ResponseStatus(HttpStatus.OK)\n public Result createResult(\n @RequestBody Result result,\n Principal principal\n ) {\n log.info(\"Creating result for user [{}] with user [{}]\", result.getUser().getEmail(), principal.getName());\n return resultService.create(result, principal);\n }", "public CreateTable(Object result) {\r\n this.result = result;\r\n columnNames = new String[1];\r\n columnNames[0] = \"Result\";\r\n tableData = new Object[1][1];\r\n tableData[0][0] = this.result;\r\n }", "public String create() {\n\n if (log.isDebugEnabled()) {\n log.debug(\"create()\");\n }\n FacesContext context = FacesContext.getCurrentInstance();\n StringBuffer sb = registration(context);\n sb.append(\"?action=Create\");\n forward(context, sb.toString());\n return (null);\n\n }", "@Override\n\tpublic it.ethica.esf.model.ESFResult createESFResult(long esfResultId) {\n\t\treturn _esfResultLocalService.createESFResult(esfResultId);\n\t}", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "public static Result getFilledForm() {\r\n\t\tStatus result;\r\n\t\ttry {\r\n\t\t\tString formName = ChangeOrderForm.NAME;\r\n\t\t\tString username = CMSSession.getEmployeeName();\r\n\t\t\tFile pdf = File.createTempFile(\"Change_Order_Form_Filled\", \".pdf\");\r\n\t\t\tCMSGuidedFormFill.fillForm(formName, username, pdf);\r\n\r\n\t\t\tresult = ok(pdf, true);\r\n\r\n\t\t\tFileDeletionHandler.deleteFile(pdf);\r\n\t\t} catch (IOException e) {\r\n\t\t\tLogger.error(\"Couldn't create new temp file.\");\r\n\t\t\tLogger.error(e.getMessage(), e);\r\n\t\t\tresult = internalServerError();\r\n\t\t}\r\n\t\treturn result;\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 }", "@Override\n\t\t\t\tpublic void onFinished(JavaScriptObject result) {\n\t\t\t\t\tcontinueWithForm(events);\n\t\t\t\t}", "private void continueWithForm(final Events<Result> events) {\n\n\t\tif (registrar.getGroupFormInitialException() != null) {\n\t\t\tresult.setException(registrar.getGroupFormInitialException());\n\t\t\tevents.onFinished(getResult());\n\t\t\treturn;\n\t\t}\n\n\t\tform.setFormItems(registrar.getGroupFormInitial());\n\n\t\tif (!form.containsSubmitButton() && !form.containsOnlyTextItems()) {\n\t\t\tPerunException ex = PerunException.createNew(\"0\", \"FormWrongFormedException\", \"Group registration form is wrongly formed.\");\n\t\t\tresult.setException(ex);\n\t\t\tevents.onError(ex);\n\t\t\treturn;\n\t\t}\n\n\t\tform.setApp(Application.createNew(registrar.getVo(), registrar.getGroup(), Application.ApplicationType.INITIAL,\n\t\t\t\tgetFedInfo(localPP, Window.Location.getParameter(\"targetnew\")), localPP.getActor(), localPP.getExtSource(), localPP.getExtSourceType(), localPP.getExtSourceLoa(), localPP.getUser()));\n\n\t\tform.setOnSubmitEvent(getOnSubmitEvent(events));\n\n\t\tform.performAutoSubmit();\n\n\t}", "public ActionForward execute(ActionMapping mapping,\n ActionForm form,\n HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n MessageResources messages = getResources(request);\n\n // save errors\n ActionMessages errors = new ActionMessages();\n\n //START check for login (security)\n if (!SecurityService.getInstance().checkForLogin(request.getSession(false))) {\n return (mapping.findForward(\"welcome\"));\n }\n //END check for login (security)\n List results = new ArrayList();\n\n String number = request.getParameter(\"number\");\n if(number == null){\n number = request.getParameter(\"id\");\n }\n CapaId capaId = QMSService.getInstance().getSingleCapaId(number);\n Capa capa = QMSService.getInstance().getSingleCapa(number);\n\n DateFormat df = new SimpleDateFormat(\"MM-dd-yyyy\");\n\n// Date date = ...; // wherever you get this\n//DateFormat df = new SimpleDateFormat(\"dd MMMM yyyy\");\n//String text = df.format(date);\n////System.out.println(text);\n \n DynaValidatorForm uvg = (DynaValidatorForm) form;\n\n\n try {\n uvg.set(\"number\", StandardCode.getInstance().noNull(capa.getNumber()));\n } catch (Exception e) {\n uvg.set(\"number\", \"\");\n }\n try {\n uvg.set(\"cdate\", capa.getCdate());\n } catch (Exception e) {\n uvg.set(\"cdate\", \"\");\n }\n try {\n uvg.set(\"employee\", StandardCode.getInstance().noNull(capa.getEmployee()));\n } catch (Exception e) {\n uvg.set(\"employee\", \"\");\n }\n try {\n uvg.set(\"location\", StandardCode.getInstance().noNull(capa.getLocation()));\n } catch (Exception e) {\n uvg.set(\"location\", \"\");\n }\n try {\n uvg.set(\"description\", StandardCode.getInstance().noNull(capa.getDescription()));\n } catch (Exception e) {\n uvg.set(\"description\", \"\");\n }\n try {\n uvg.set(\"reportedby\", StandardCode.getInstance().noNull(capa.getReportedby()));\n// request.setAttribute(\"reportedby\", StandardCode.getInstance().noNull(capa.getReportedby()));\n } catch (Exception e) {\n uvg.set(\"reportedby\", \"\");\n// request.setAttribute(\"reportedby\",\"\");\n }\n try {\n uvg.set(\"reportedbydesc\", StandardCode.getInstance().noNull(capa.getReportedbydesc()));\n } catch (Exception e) {\n uvg.set(\"reportedbydesc\", \"\");\n }\n try {\n if(null != capa.getIsLocked()){\n uvg.set(\"admin_locked\", \"\"+capa.getIsLocked());\n request.setAttribute(\"isLocked\", capa.getIsLocked());\n }else{\n uvg.set(\"admin_locked\", \"false\");\n request.setAttribute(\"isLocked\", Boolean.FALSE);\n }\n } catch (Exception e) {\n uvg.set(\"admin_locked\", \"false\");\n request.setAttribute(\"isLocked\", Boolean.FALSE);\n }\n \n try {\n if (capa.getAdmin_lock_date() == null) {\n uvg.set(\"admin_lock_date\", \"\");\n } else {\n uvg.set(\"admin_lock_date\", \"\" + df.format(capa.getAdmin_lock_date()));\n }\n } catch (Exception e) {\n uvg.set(\"admin_lock_date\", \"\");\n }\n \n try {\n if(capa.getIsLocked()){\n User user = UserService.getInstance().getSingleUser(capa.getLockedby());\n \n request.setAttribute(\"lockedBy\",\"The Capa \"+capa.getNumber()+\" is locked by \" +user.getFirstName() +\" \"+user.getLastName() +\" on \"+\n df.format(capa.getAdmin_lock_date())+\". You cannot edit it once locked.<br>\"\n + \"<img src=\\\"/logo/images/\"+user.getSignature()+\"\\\" width=\\\"148\\\" height=\\\"35\\\" alt=\\\"Sign\\\"/>\");}\n } catch (Exception e) {\n e.printStackTrace();\n request.setAttribute(\"lockedBy\", \"The Capa is locked.You cannot edit it once locked.\");\n }\n \n try {\n uvg.set(\"fromc\", StandardCode.getInstance().noNull(capa.getFromc()));\n } catch (Exception e) {\n uvg.set(\"fromc\", \"\");\n }\n\n try {\n uvg.set(\"issueId\", StandardCode.getInstance().noNull(capa.getIssueId()));\n } catch (Exception e) {\n uvg.set(\"issueId\", \"\");\n }\n try {\n uvg.set(\"source\", StandardCode.getInstance().noNull(capa.getSource()));\n request.setAttribute(\"source\", StandardCode.getInstance().noNull(capa.getSource()));\n } catch (Exception e) {\n uvg.set(\"source\", \"\");\n request.setAttribute(\"source\", \"\");\n }\n try {\n uvg.set(\"status\", StandardCode.getInstance().noNull(capa.getStatus()));\n \n } catch (Exception e) {\n uvg.set(\"status\", \"\");\n \n }\n try {\n uvg.set(\"ncr\", StandardCode.getInstance().noNull(capa.getNcr()));\n } catch (Exception e) {\n uvg.set(\"ncr\", \"\");\n }\n try {\n uvg.set(\"rca\", StandardCode.getInstance().noNull(capaId.getRca()));\n } catch (Exception e) {\n uvg.set(\"rca\", \"\");\n }\n try {\n uvg.set(\"imact\", StandardCode.getInstance().noNull(capaId.getImact()));\n } catch (Exception e) {\n uvg.set(\"imact\", \"\");\n }\n try {\n if (capaId.getImact_t_date() == null) {\n uvg.set(\"imact_t_date\", \"\");\n } else {\n uvg.set(\"imact_t_date\", \"\" + df.format(capaId.getImact_t_date()));\n }\n } catch (Exception e) {\n uvg.set(\"imact_t_date\", \"\");\n }\n try {\n if (capaId.getImact_a_date() == null) {\n uvg.set(\"imact_a_date\", \"\");\n } else {\n uvg.set(\"imact_a_date\", \"\" + df.format(capaId.getImact_a_date()));\n }\n } catch (Exception e) {\n uvg.set(\"imact_a_date\", \"\");\n }\n try {\n if (capaId.getRca_t_date() == null) {\n uvg.set(\"rca_t_date\", \"\");\n } else {\n uvg.set(\"rca_t_date\", \"\" + df.format(capaId.getRca_t_date()));\n }\n } catch (Exception e) {\n uvg.set(\"rca_t_date\", \"\");\n }\n try {\n if (capaId.getRca_a_date() == null) {\n uvg.set(\"rca_a_date\", \"\");\n } else {\n uvg.set(\"rca_a_date\", \"\" + df.format(capaId.getRca_a_date()));\n }\n } catch (Exception e) {\n uvg.set(\"rca_a_date\", \"\");\n }\n try {\n uvg.set(\"nc\", StandardCode.getInstance().noNull(capaId.getNc()));\n } catch (Exception e) {\n uvg.set(\"nc\", \"\");\n }\n try {\n uvg.set(\"ncyesno\", capaId.getNcyesno());\n } catch (Exception e) {\n uvg.set(\"ncyesno\", \"\");\n }\n try {\n uvg.set(\"actionplan\", StandardCode.getInstance().noNull(capaId.getActionplan()));\n } catch (Exception e) {\n uvg.set(\"actionplan\", \"\");\n }\n try {\n uvg.set(\"actionplan_approve\", StandardCode.getInstance().noNull(capaId.getActionplan_approve()));\n } catch (Exception e) {\n uvg.set(\"actionplan_approve\", \"\");\n }\n try {\n uvg.set(\"actionimp\", StandardCode.getInstance().noNull(capaId.getActionimp()));\n } catch (Exception e) {\n uvg.set(\"actionimp\", \"\");\n }\n\n try {\n if (capaId.getActionimp_t_date() == null) {\n uvg.set(\"actionimp_t_date\", \"\");\n } else {\n uvg.set(\"actionimp_t_date\", \"\" + df.format(capaId.getActionimp_t_date()));\n }\n } catch (Exception e) {\n uvg.set(\"actionimp_t_date\", \"\");\n }\n\n try {\n if (capaId.getActionimp_a_date() == null) {\n uvg.set(\"actionimp_a_date\", \"\");\n } else {\n uvg.set(\"actionimp_a_date\", \"\" + df.format(capaId.getActionimp_a_date()));\n }\n } catch (Exception e) {\n uvg.set(\"actionimp_a_date\", \"\");\n }\n\n try {\n uvg.set(\"effectiveplan\", StandardCode.getInstance().noNull(capaId.getEffectiveplan()));\n } catch (Exception e) {\n uvg.set(\"effectiveplan\", \"\");\n }\n\n try {\n uvg.set(\"verify\", StandardCode.getInstance().noNull(capaId.getVerify()));\n } catch (Exception e) {\n uvg.set(\"verify\", \"\");\n }\n\n try {\n if (capaId.getVerify_t_date() == null) {\n uvg.set(\"verify_t_date\", \"\");\n } else {\n uvg.set(\"verify_t_date\", \"\" + df.format(capaId.getVerify_t_date()));\n }\n } catch (Exception e) {\n uvg.set(\"verify_t_date\", \"\");\n }\n\n try {\n if (capaId.getVerify_a_date() == null) {\n uvg.set(\"verify_a_date\", \"\");\n } else {\n uvg.set(\"verify_a_date\", \"\" + df.format(capaId.getVerify_a_date()));\n }\n } catch (Exception e) {\n uvg.set(\"verify_a_date\", \"\");\n }\n\n try {\n uvg.set(\"verify_approve\", StandardCode.getInstance().noNull(capaId.getVerify_approve()));\n } catch (Exception e) {\n uvg.set(\"verify_approve\", \"\");\n }\n\n try {\n uvg.set(\"comments\", StandardCode.getInstance().noNull(capaId.getComments()));\n } catch (Exception e) {\n uvg.set(\"comments\", \"\");\n }\n\n try {\n if (capaId.getAdmin_rec_date() == null) {\n uvg.set(\"admin_rec_date\", \"\");\n } else {\n uvg.set(\"admin_rec_date\", \"\" + df.format(capaId.getAdmin_rec_date()));\n }\n } catch (Exception e) {\n uvg.set(\"admin_rec_date\", \"\");\n }\n\n try {\n if (capaId.getAdmin_own_date() == null) {\n uvg.set(\"admin_own_date\", \"\");\n } else {\n uvg.set(\"admin_own_date\", \"\" + df.format(capaId.getAdmin_own_date()));\n }\n } catch (Exception e) {\n uvg.set(\"admin_own_date\", \"\");\n }\n\n try {\n uvg.set(\"admin_rec_person\", StandardCode.getInstance().noNull(capaId.getAdmin_rec_person()));\n } catch (Exception e) {\n uvg.set(\"admin_rec_person\", \"\");\n }\n\n try {\n uvg.set(\"admin_own_person\", StandardCode.getInstance().noNull(capaId.getAdmin_own_person()));\n } catch (Exception e) {\n uvg.set(\"admin_own_person\", \"\");\n }\n try {\n uvg.set(\"admin_disposition\", StandardCode.getInstance().noNull(capaId.getAdmin_disposition()));\n } catch (Exception e) {\n uvg.set(\"admin_disposition\", \"\");\n }\n try {\n uvg.set(\"owner\", StandardCode.getInstance().noNull(capaId.getOwner()));\n } catch (Exception e) {\n uvg.set(\"owner\", \"\");\n }\n try {\n uvg.set(\"owner2\", StandardCode.getInstance().noNull(capaId.getOwner2()));\n } catch (Exception e) {\n uvg.set(\"owner2\", \"\");\n }\n try {\n uvg.set(\"owner3\", StandardCode.getInstance().noNull(capaId.getOwner3()));\n } catch (Exception e) {\n uvg.set(\"owner3\", \"\");\n }\n\n try {\n uvg.set(\"capaid_description\", StandardCode.getInstance().noNull(capaId.getCapaid_description()));\n } catch (Exception e) {\n uvg.set(\"capaid_description\", \"\");\n }\n\n try {\n if (capaId.getAdmin_disp_date() == null) {\n uvg.set(\"admin_disp_date\", \"\");\n } else {\n uvg.set(\"admin_disp_date\", \"\" + df.format(capaId.getAdmin_disp_date()));\n }\n } catch (Exception e) {\n uvg.set(\"admin_disp_date\", \"\");\n }\n try {\n uvg.set(\"ncminormajor\", StandardCode.getInstance().noNull(capaId.getNcminormajor()));\n } catch (Exception e) {\n uvg.set(\"ncminormajor\", \"\");\n }\n try {\n uvg.set(\"actionplan_approve2\", StandardCode.getInstance().noNull(capaId.getActionplan_approve2()));\n } catch (Exception e) {\n uvg.set(\"actionplan_approve2\", \"\");\n }\n try {\n uvg.set(\"actionimp_status\", StandardCode.getInstance().noNull(capaId.getActionimp_status()));\n } catch (Exception e) {\n uvg.set(\"actionimp_status\", \"\");\n }\n try {\n uvg.set(\"verify_approve2\", StandardCode.getInstance().noNull(capaId.getVerify_approve2()));\n } catch (Exception e) {\n uvg.set(\"verify_approve2\", \"\");\n }\n try {\n uvg.set(\"admin_disp_person\", StandardCode.getInstance().noNull(capaId.getAdmin_disp_person()));\n } catch (Exception e) {\n uvg.set(\"admin_disp_person\", \"\");\n }\n\n request.setAttribute(\"formValue\", uvg);\n request.setAttribute(\"number\", number);\n \n\n return (mapping.findForward(\"Success\"));\n\n\n\n\n }", "public void setResult(String name) {\r\n DatabaseField returnField = (DatabaseField)getParameters().get(0);\r\n returnField.setName(name);\r\n }", "protected RespostaFormularioPreenchido() {\n // for ORM\n }", "protected void onSubmit() {\n\n Building b = new Building(c.BuildingTypeId, c.StyleId, c.CityId,\n c.Architectural_element_Id, c.Agesid, c.Latitude, c.Longtitude,\n c.buildingname, c.Address);\n BuildingCollection bc = new BuildingCollection();\n bc.AddBuilding(b);\n this.setResponsePage(new BuildingListWithPropertiesPage());\n\n }", "int insert( FormSubmit formResponse, Plugin plugin );", "public static Result newProduct() {\n Form<models.Product> productForm = form(models.Product.class).bindFromRequest();\n if(productForm.hasErrors()) {\n return badRequest(\"Tag name cannot be 'tag'.\");\n }\n models.Product product = productForm.get();\n product.save();\n return ok(product.toString());\n }", "public String createQuiz() {\n quiz = quizEJB.createQuiz(quiz);\n quizList = quizEJB.listQuiz();\n FacesContext.getCurrentInstance().addMessage(\"successForm:successInput\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Success\", \"New record added successfully\"));\n return \"quiz-list.xhtml\";\n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "void store( FormSubmit formResponse, Plugin plugin );", "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 void buildAndShowListForm() {\n GeyserAdvancement categoryAdvancement = storedAdvancements.get(currentAdvancementCategoryId);\n String language = session.locale();\n\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .title(MessageTranslator.convertMessage(categoryAdvancement.getDisplayData().getTitle(), language))\n .content(MessageTranslator.convertMessage(categoryAdvancement.getDisplayData().getDescription(), language));\n\n List<GeyserAdvancement> visibleAdvancements = new ArrayList<>();\n if (currentAdvancementCategoryId != null) {\n for (GeyserAdvancement advancement : storedAdvancements.values()) {\n boolean earned = isEarned(advancement);\n if (earned || !advancement.getDisplayData().isHidden()) {\n if (advancement.getParentId() != null && currentAdvancementCategoryId.equals(advancement.getRootId(this))) {\n String color = earned ? advancement.getDisplayColor() : \"\";\n builder.button(color + MessageTranslator.convertMessage(advancement.getDisplayData().getTitle()) + '\\n');\n\n visibleAdvancements.add(advancement);\n }\n }\n }\n }\n\n builder.button(GeyserLocale.getPlayerLocaleString(\"gui.back\", language));\n\n builder.closedResultHandler(() -> {\n // Indicate that we have closed the current advancement tab\n session.sendDownstreamPacket(new ServerboundSeenAdvancementsPacket());\n\n }).validResultHandler((response) -> {\n if (response.getClickedButtonId() < visibleAdvancements.size()) {\n GeyserAdvancement advancement = visibleAdvancements.get(response.clickedButtonId());\n buildAndShowInfoForm(advancement);\n } else {\n buildAndShowMenuForm();\n // Indicate that we have closed the current advancement tab\n session.sendDownstreamPacket(new ServerboundSeenAdvancementsPacket());\n }\n });\n\n session.sendForm(builder);\n }", "@RequestMapping(value = \"/enrollment.html\", method = RequestMethod.POST, \n produces = { \"text/html\" })\n public String handleFormSubmission(\n @ModelAttribute(\"fixture\") @Valid FixtureModel fixture,\n BindingResult result) throws Exception {\n\n fixture.setInstalledBy(\"\");\n if (!result.hasErrors()) {\n fixtureService.createFixture(fixture);\n }\n return \"fixtures/enrollment\";\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "@GetMapping(\"/addPharmacist\")\n public String pharmacistForm(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"addPharmacist\";\n }", "private void populateForm() {\n Part selectedPart = (Part) PassableData.getPartData();\n partPrice.setText(String.valueOf(selectedPart.getPrice()));\n partName.setText(selectedPart.getName());\n inventoryCount.setText(String.valueOf(selectedPart.getStock()));\n partId.setText(String.valueOf(selectedPart.getId()));\n maximumInventory.setText(String.valueOf(selectedPart.getMax()));\n minimumInventory.setText(String.valueOf(selectedPart.getMin()));\n\n if (PassableData.isOutsourced()) {\n Outsourced part = (Outsourced) selectedPart;\n variableTextField.setText(part.getCompanyName());\n outsourced.setSelected(true);\n\n } else if (!PassableData.isOutsourced()) {\n InHouse part = (InHouse) selectedPart;\n variableTextField.setText(String.valueOf(part.getMachineId()));\n inHouse.setSelected(true);\n }\n\n\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "@RequestMapping(\"/processForm\")\n\tpublic String processForm( @Valid @ModelAttribute(\"register\") Register theRegister, BindingResult theBindingResult) {\n\t\tSystem.out.println(\"Register new: \" + theRegister.getFirstName() \n\t\t\t\t\t\t+ \" \" + theRegister.getLastName());\n\t\t\n\t\tif(theBindingResult.hasErrors()) {\n\t\t\t\n\t\t\treturn \"register-form\";\n\t\t}else {\n\t\t\treturn \"register-confirmation\";\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public resultview() {\n initComponents();\n }", "protected TestResult createResult() {\n return new TestResult();\n }", "@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}", "public static void RcForm() throws ClassNotFoundException, SQLException {\r\n Statement s = DBConnect.connection.createStatement();\r\n String chkDte = \"SELECT Date_Created As dateCreated FROM existing_forms WHERE Date_Created IS NOT NULL AND Form_Name = '\"+ StFrmNm + \"'\";\r\n s.execute(chkDte);\r\n try (ResultSet rs1 = s.getResultSet()) {\r\n if (rs1.next()) {\r\n dteCreate = rs1.getString(\"dateCreated\");\r\n }\r\n }\r\n if (dteCreate == null) {\r\n String insertTable = \"INSERT INTO existing_forms\"\r\n + \"(Store, Form_Name, Date_Created, Last_Updated, Status) \"\r\n + \"VALUES(\"\r\n + \"'\" + GtStore.store.toLowerCase() + \"'\" + \",\"\r\n + \"'\" + StFrmNm + \"'\" + \",\"\r\n + \"'\" + GtDates.tdate + \"'\" + \",\"\r\n + \"'\" + GtDates.tdate + \"'\" + \",\"\r\n + \"'\" + \"In-Process\" + \"'\"\r\n + \")\";\r\n s.execute(insertTable); \r\n \r\n //String crtTable = \"SELECT * INTO \" + StFrmNm + \" FROM ias WHERE 1=2\";\r\n String crtTable = \"CREATE TABLE \" + StFrmNm + \" SELECT * FROM ebas\";\r\n s.execute(crtTable); \r\n }\r\n \r\n insLns();\r\n // lastUpdate();\r\n }", "@Override\r\n\tpublic ActionForward to_objectNew(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}", "public void construct(){\n\t\tbuilder.buildPart1();\n\t\tbuilder.buildPart2();\n\t\tbuilder.retrieveResult();\n\t}", "@RequestMapping(\"showForm\")\n\tpublic String showForm( Model theModel) {\n\t\t\n\t\t//create a student\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t//add student to the model\n\t\ttheModel.addAttribute(\"student\", theStudent);\n\t\t\n\t\treturn \"student-form\";\n\t}", "public Integer create(Caseresultparameters newInstance) throws ServiceException;", "public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) {\r\n\t\tCommunitycreationForm communitycreationForm = (CommunitycreationForm) form;// TODO Auto-generated method stub\r\n\t\t\r\n\t\tEntpMaster entpMaster = new EntpMaster();\r\n\t\tRootMaster rootMaster = new RootMaster();\r\n\t\tString strStatus=\"failure\";\r\n\t\t//System.out.println(\" in action Communitycreation>>>>>!!\");\r\n\t\t\r\n\t\tDataSource ds = getDataSource(request,\"entp\");\r\n\t\t\r\n\t\tString strResult = \"\";\r\n\t\t\r\n\t\t strResult=entpMaster.companyVerify(ds,communitycreationForm.getCommunityName());\r\n\t\t //System.out.println(\"strResult in action Communitycreation>>>>>!!\"+strResult);\r\n\t\t \r\n\t\tif(!strResult.equals(\"success\"))\r\n\t\t{\r\n\t\t\tif(strResult.equals(\"sname\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.duplicate\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t\treturn mapping.findForward(\"failure\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tstrStatus=\"success\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//System.out.println(\"strStatus in action Communitycreation>>>>>\"+strStatus);\r\n\t\t\r\n\t\tif(strStatus.equalsIgnoreCase(\"success\")){\r\n\t\t\t\r\n\t\t\r\n\t\tVector <String> companyVec = new Vector<String>();\r\n\t\tVector <String> userVec = new Vector<String>();\r\n\t\t\r\n\t\tString creationDate =\"\";\r\n\t\tString creationTime =\"\";\r\n\t\tjava.util.Date dt = new java.util.Date();\r\n\t\tSimpleDateFormat sform = new SimpleDateFormat(\"yyyy-MM-dd, HH:mm:ss,a\");\r\n\t\tString completeRemDate = sform.format(dt);\r\n\t\tStringTokenizer sttotal = new StringTokenizer(completeRemDate, \",\");\r\n\t creationDate = sttotal.nextToken();\r\n\t creationTime = sttotal.nextToken();\r\n\t \r\n\t\t\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName()); //Company short name\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName());\t//Company name\r\n\t\tcompanyVec.add(\"Logix Park\");\r\n\t\tcompanyVec.add(\"Logix Park\");\r\n\t\tcompanyVec.add(\"5115\");\r\n\t\tcompanyVec.add(\"94\");\r\n\t\tcompanyVec.add(\"94\");\r\n\t\tcompanyVec.add(\"201301\");\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName()+\"@mobilemantra.com\");\r\n\t\tcompanyVec.add(\"+91~0568~258047\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"10\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\tcompanyVec.add(\"0000-00-00\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\tcompanyVec.add(\"Consumer\");\r\n\t\tcompanyVec.add(\"NotRequired\");\r\n\t\tcompanyVec.add(\"2\");\r\n\t\tcompanyVec.add(communitycreationForm.getRdbgroup()); // RIGHTS ID\r\n\t\tcompanyVec.add(creationDate);\r\n\t\tcompanyVec.add(creationTime);\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\t//System.out.println(\"communitycreationForm.getRdbgroup() in action Communitycreation>>>^^^^^^^>>\"+communitycreationForm.getRdbgroup());\r\n\t\tstrResult=rootMaster.insertCompanyDetail(ds,companyVec);\r\n\t\t\r\n\t\t/*\r\n\t\tVector companyDetailVec=rootMaster.getCompanyDetail(ds,communitycreationForm.getCommunityName());\r\n\t\t\r\n\t\t\tif(strResult.equalsIgnoreCase(\"success\"))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tuserVec.add(companyDetailVec.elementAt(0).toString());\r\n\t\t\t\tuserVec.add(\"1\");\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName()+\"@mobilemantra.com\");\r\n\t\t\t\tuserVec.add(\"+911202517690\");\r\n\t\t\t\tuserVec.add(\"+911202517690\");\r\n\t\t\t\tuserVec.add(\"Logix Park\");\r\n\t\t\t\tuserVec.add(\"India\");\r\n\t\t\t\tuserVec.add(\"UP\");\r\n\t\t\t\tuserVec.add(\"NOIDA\");\r\n\t\t\t\tuserVec.add(\"201301\");\r\n\t\t\t\tuserVec.add(\"nophoto.jpg\");\r\n\t\t\t\tuserVec.add(\"IN\");\r\n\t\t\t\tuserVec.add(creationDate);\r\n\t\t\t\tuserVec.add(creationTime);\r\n\t\t\t\tuserVec.add(\"0000-00-00\");\r\n\t\t\t\tuserVec.add(\"00:00:00\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"20\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"Male\");\r\n\t\t\t\t//System.out.println(\"userVec in action Communitycreation>>>>>\"+userVec);\r\n\t\t\t\tstrResult=rootMaster.insertUserInfo(ds,userVec);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn mapping.findForward(strResult);\r\n\t}", "public static void ChkForm() throws ClassNotFoundException, SQLException {\r\n try (Statement s = DBConnect.connection.createStatement()) {\r\n String selTable3 = \"SELECT Store As str, Form_Name As frm, Date_Created As dte, Status As st FROM existing_forms WHERE Status = 'In-Process' AND Form_Name LIKE 'ebas_\" + GtStore.store + \"_0%' OR 'ebas_\" + GtStore.store + \"_1%'\";\r\n s.execute(selTable3);\r\n try (ResultSet rs3 = s.getResultSet()) {\r\n if (rs3.next()) {\r\n //rs3.next();\r\n EBAS.Date_Label.setText(\"Date Started: \" + rs3.getString(\"dte\"));\r\n nwFrm = \"no\";\r\n StFrmNm = rs3.getString(\"frm\");\r\n StFrmSt = rs3.getString(\"st\");\r\n gtDB();\r\n } else {\r\n nwFrm = \"yes\";\r\n }\r\n }\r\n }\r\n }", "private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}", "private void saveForm() {\n\n if (reportWithCurrentDateExists()) {\n // Can't save this case\n return;\n }\n\n boolean isNewReport = (mRowId == null);\n\n // Get field values from the form elements\n\n // Date\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = df.format(mCalendar.getTime());\n\n // Value\n Double value;\n try {\n value = Double.valueOf(mValueText.getText().toString());\n } catch (NumberFormatException e) {\n value = 0.0;\n }\n\n // Create/update report\n boolean isSaved;\n if (isNewReport) {\n mRowId = mDbHelper.getReportPeer().createReport(mTaskId, date, value);\n isSaved = (mRowId != 0);\n } else {\n isSaved = mDbHelper.getReportPeer().updateReport(mRowId, date, value);\n }\n\n // Show toast notification\n if (isSaved) {\n int toastMessageId = isNewReport ?\n R.string.message_report_created :\n R.string.message_report_updated;\n Toast toast = Toast.makeText(getApplicationContext(), toastMessageId, Toast.LENGTH_SHORT);\n toast.show();\n }\n }", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "@Override\n\tprotected BaseSearchForm devuelveFormBusqueda() throws Exception {\n\t\tMantenimientoCRAMatrizDiasSearchForm form = new MantenimientoCRAMatrizDiasSearchForm();\n\t\treturn form;\n\t}", "public static List<ResultsForm> getResults(String tabName) {\n\n List<ResultsForm>resultsFormList = null;\n ResultsForm resultsForm = null;\n String query = SQLConstants.GET_RESULTS.replaceAll(\"#\",tabName.toLowerCase().replaceAll(\"\\\\W\", \"\"));\n \n System.out.println(\"[INFO] Generated Query:\"+query);\n\n try {\n resultsFormList = new ArrayList<ResultsForm>();\n Connection con = JdbcConnection.getConnection();\n PreparedStatement pstmt = con.prepareStatement(query);\n\n ResultSet rs = pstmt.executeQuery();\n\n while (rs.next()) {\n resultsForm = new ResultsForm();\n resultsForm.setId(rs.getLong(\"id\"));\n resultsForm.setLeftTeamId(rs.getLong(\"leftTeamid\"));\n resultsForm.setRightTeamId(rs.getLong(\"rightTeamid\"));\n resultsForm.setLeftTeamName(getTeam(con, rs.getLong(\"leftTeamid\")).getName());\n resultsForm.setRightTeamName(getTeam(con, rs.getLong(\"rightTeamid\")).getName());\n resultsForm.setWinningTeamId(rs.getLong(\"winningteamid\"));\n resultsForm.setWinningTeamName(getTeam(con, rs.getLong(\"winningteamid\")).getName());\n resultsForm.setWonBy(rs.getString(\"wonedby\"));\n \n resultsFormList.add(resultsForm);\n \n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return resultsFormList;\n\n }", "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 }", "@RequestMapping(value = \"/artisan/societe/valider-horaires\", method = RequestMethod.POST)\n\tpublic String sauvegarderHoraires(HttpServletRequest request,\n\t\t\t@Valid @ModelAttribute(\"horairesForm\") HorairesForm form, BindingResult result, Model model) {\n\t\t\n\t\tif (result.hasErrors()) {\n\t\t\tif (result.getFieldError().getField().toString().equals(\"email\")) {\n\t\t\t\tmodel.addAttribute(\"msg\", \"Errreur : le format de l'adresse email n'est pas correct !\");\n\t\t\t} else {\n\t\t\t\tmodel.addAttribute(\"msg\", \"Errreur : au moins un des champs n'a pas été correctement rempli !\");\n\t\t\t}\n\t\t\tmodel.addAttribute(\"errors\", result);\n\n\t\t\tmodel.addAttribute(\"horairesForm\", form);\n\t\t\treturn (\"redirect:artisan/modifier-horaires\");\n\t\t}\n\t\tSociete s = societeDao.findById((long) request.getSession().getAttribute(\"societeId\"));\n\n\t\tHoraire h = horaireDao.findById(form.getHoraireId());\n\t\tSystem.out.println(\"form.getAmOpenHeure() = \" + form.getAmOpenHeure());\n\n\t\tif (form.getAmOpenHeure().equals(\"Fermé\")) {\n\t\t\tSystem.out.println(\"C'est bien fermé\");\n\t\t\th.setAmOpen(\"Fermé\");\n\t\t\th.setAmClose(\"Fermé\");\n\t\t\t\n\t\t} else {\n\t\t\th.setAmOpen(form.getAmOpenHeure() + \":\" + form.getAmOpenMinutes());\n\t\t\th.setAmClose(form.getAmCloseHeure() + \":\" + form.getAmCloseMinutes());\n\t\t}\n\n\t\tif (form.getPmOpenHeure().equals(\"Fermé\")) {\n\t\t\th.setPmOpen(\"Fermé\");\n\t\t\th.setPmClose(\"Fermé\");\n\t\t\ts.setPmCloseToDay(true);\n\t\t} else {\n\t\t\th.setPmOpen(form.getPmOpenHeure() + \":\" + form.getPmOpenMinutes());\n\t\t\th.setPmClose(form.getPmCloseHeure() + \":\" + form.getPmCloseMinutes());\n\t\t\ts.setPmCloseToDay(false);\n\t\t\t\n\t\t}\n\t\ttry {\n\t\t\tsocieteDao.update(s);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\thoraireDao.update(h);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Pour l'envoi de mails à tous le sutilisateurs ayant accepté la nexsletter\n\t\t// on récupère la liste de newsletters de la société\n\t\t\n\t\t\n\t\tList<Newsletter> news = new ArrayList<Newsletter>();\n\t\tList<String> emails = new ArrayList<>();\n\n\t\tnews = newsletterDao.findBySociete_id(s.getId());\n\t\tfor (Newsletter n : news) {\n\t\t\tUtilisateur utilisateur = utilisateurDao.findById(n.getUtilisateur_id());\n\t\t\tif (utilisateur != null)\n\t\t\t\temails.add(utilisateur.getEmail());\n\t\t}\n\t\t// on envoie les mails\n\t\tString msgMail = \"La société \" + s.getNom() + \" a modifié ses horaires pour le \" +\n\t\th.getJour() + \". Désormais les horaires seront : \";\n\t\tif(h.getAmOpen().equals(\"Fermé\") && h.getPmOpen().equals(\"Fermé\")) {\n\t\t\tmsgMail += \" << Fermé toute la journée >>\";\n\t\t}\n\t\telse if (!h.getAmOpen().equals(\"Fermé\") && h.getPmOpen().equals(\"Fermé\")) {\n\t\t\tmsgMail += \" << Ouvert le matin de \" + h.getAmOpen() + \" à \" + h.getAmClose() + \" mais fermé l'après-midi >>\";\n\t\t}\n\t\telse if(h.getAmOpen().equals(\"Fermé\") && !h.getPmOpen().equals(\"Fermé\")) {\n\t\t\tmsgMail += \" << Fermé le matin mais ouvert l'après-midi de \" + h.getPmOpen() + \" à \" + h.getPmClose() + \">>\";\n\t\t}\n\t\telse {\n\t\t\tmsgMail += \" << le matin de \" + h.getAmOpen() + \" à \" + h.getAmClose();\n\t\t\tmsgMail += \" et l'après-midi de \" + h.getPmOpen() + \" à \" + h.getPmClose() + \" >> \";\n\t\t}\n\t\t\n\t\tUtilisateur u = new Utilisateur();\n\n\t\tif(request.getSession().getAttribute(\"user_id\")!= null) {\n\t\t\tu = utilisateurDao.findById((long) request.getSession().getAttribute(\"user_id\"));\n\t\t}\n\t\telse {\n\t\t\treturn \"login\";\n\t\t}\n\t\tString sujet = s.getNom() + \" vient de modifier ses horaires pour \" + h.getJour() + \" !!!\";\n\t\tString msgEnvoiMail = \"\";\n\t\tfor (String email : emails) {\n\t\t\ttry {\n\t\t\t\tEmailTools.sendEmailToClient(u.getEmail(), sujet, msgMail, email);\n\t\t\t\tmsgEnvoiMail = \"Un email a été envoyé à tous vos clients ayant accepté la newsletter\";\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Erreur = \" + e.getMessage());\n\t\t\t\tmsgEnvoiMail = \"L'envoi de mail a échoué, veuillez contacter l'administrateur du site\";\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tmodel.addAttribute(\"msgEnvoiMail\", msgEnvoiMail);\n\t\t}\n\t\t// Fin Envoi mails\n\n\t\tif (request.getSession().getAttribute(\"user_id\") != null) {\n\t\t\treturn \"redirect:/artisan/societe/mes-horaires?id=\" + request.getSession().getAttribute(\"societeId\");\n\t\t}\n\t\treturn \"login\";\n\t}", "@Override\n public ExtensionResult getForms(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n FormBuilder formBuilder = new FormBuilder(appProperties.getFormIdTest());\n\n ButtonTemplate button = new ButtonTemplate();\n button.setTitle(\"Test Form\");\n button.setSubTitle(\"Subtitle is here\");\n button.setPictureLink(appProperties.getAtmUrl());\n button.setPicturePath(appProperties.getAtmUrl());\n List<EasyMap> actions = new ArrayList<>();\n EasyMap bookAction = new EasyMap();\n bookAction.setName(\"Label here\");\n bookAction.setValue(formBuilder.build());\n actions.add(bookAction);\n button.setButtonValues(actions);\n ButtonBuilder buttonBuilder = new ButtonBuilder(button);\n\n output.put(OUTPUT, buttonBuilder.build());\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n extensionResult.setValue(output);\n return extensionResult;\n }", "protected DefaultMutableTreeNode createResultTree(Cluster result_cluster, GeneralInfo info) {\r\n DefaultMutableTreeNode root = new DefaultMutableTreeNode(\"GLOBANC\");\r\n addResultNodes(root, result_cluster, info);\r\n return root;\r\n }", "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }", "@RequestMapping(value = \"/add-user\", method = RequestMethod.POST)\n\tpublic String processCreationForm(@Valid User user, BindingResult result) {\n\t\tif (result.hasErrors()) {\n\t\t\treturn \"userForm\";\n\t\t} else {\n\t\t\tBCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();\n\t\t\tString encodedPassword = passwordEncoder.encode(user.getPassword().trim());\n\t\t\tuser.setPassword(encodedPassword);\n\t\t\tthis.libraryService.save(user);\n\t\t}\n\t\treturn \"redirect:/list-users\";\n\t}", "public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}", "private void creatingNewQuestion() {\r\n AbstractStatement<?> s;\r\n ListQuestions lq = new ListQuestions(ThemesController.getThemeSelected());\r\n switch ((String) typeQuestion.getValue()) {\r\n case \"TrueFalse\":\r\n // just to be sure the answer corresponds to the json file\r\n Boolean answer = CorrectAnswer.getText().equalsIgnoreCase(\"true\");\r\n s = new TrueFalse<>(Text.getText(), answer);\r\n break;\r\n\r\n case \"MCQ\":\r\n s = new MCQ<>(Text.getText(), TextAnswer1.getText(), TextAnswer2.getText(), TextAnswer3.getText(), CorrectAnswer.getText());\r\n break;\r\n\r\n default:\r\n s = new ShortAnswer<>(Text.getText(), CorrectAnswer.getText());\r\n break;\r\n }\r\n lq.addQuestion(new Question(s, ThemesController.getThemeSelected(), Difficulty.fromInteger((Integer) difficulty.getValue()) ));\r\n lq.writeJson(ThemesController.getThemeSelected());\r\n }", "public SubmitPage(final PageParameters parameters) {\n\n Form form = new Form(\"form\");\n orgLabel = new TextField<String>(\"orgLabel\", new Model<String>(\"\"));\n message = new TextArea<String>(\"message\", new Model<String>(\"\"));\n form.add(orgLabel);\n form.add(message);\n form.add(new Button(\"button\")\n {\n @Override\n public void onSubmit()\n {\n String orgLabelString = orgLabel.getModelObject();\n String messageString = message.getModelObject();\n \n SessionFactory factory = OrganizationManager.getSessionFactory();\n Session session = factory.openSession();\n Transaction tx = session.beginTransaction();\n Query query = session.createQuery(\"from Organization where orgLabel = ?\");\n query.setParameter(0, orgLabelString);\n List<Organization> organizations = query.list();\n Organization organization;\n if (organizations.size() == 0)\n {\n organization = new Organization();\n organization.setParentOrganization((Organization)session.get(Organization.class, 1));\n organization.setOrgLabel(orgLabelString);\n session.save(organization);\n }\n else\n {\n organization = organizations.get(0);\n }\n SubmitterProfile submitterProfile = organization.getPrimaryProfile();\n if (submitterProfile == null)\n {\n submitterProfile = new SubmitterProfile();\n submitterProfile.setProfileLabel(\"HL7\");\n submitterProfile.setProfileStatus(SubmitterProfile.PROFILE_STATUS_TEST);\n submitterProfile.setOrganization(organization);\n submitterProfile.setDataFormat(SubmitterProfile.DATA_FORMAT_HL7V2);\n submitterProfile.setTransferPriority(SubmitterProfile.TRANSFER_PRIORITY_NORMAL);\n session.save(submitterProfile);\n organization.setPrimaryProfile(submitterProfile);\n }\n tx.commit();\n StringWriter stringWriter = new StringWriter();\n PrintWriter out = new PrintWriter(stringWriter);\n try \n {\n // TODO IncomingServlet.processStream(false, out, session, submitterProfile, messageString);\n }\n catch (Exception e)\n {\n e.printStackTrace(out);\n }\n out.close();\n results = stringWriter.toString();\n }\n });\n add(new Label(\"results\"));\n add(form);\n }", "@RequestMapping(method = RequestMethod.GET)\n \tpublic String createForm(Model model, ForgotLoginForm form) {\n \t\tmodel.addAttribute(\"form\", form);\n \t\treturn \"forgotlogin/index\";\n \t}", "private void showResultFeedback(String operationType, String operationResult, String newVslaCode) {\n if (operationType.equalsIgnoreCase(\"create\") && operationResult.equalsIgnoreCase(\"1\")) {\n\n flashMessage(\"Added new VSLA.\");\n txtOperationType.setText(String.format(\"New Group created with the following VSLA Code %s\",\n newVslaCode));\n updateVslaInformation(); // update the database to sent\n // Then clear the data holder\n DataHolder.getInstance().clearDataHolder();\n\n } else if (operationType.equalsIgnoreCase(\"edit\") && operationResult.equalsIgnoreCase(\"1\")) {\n txtOperationType.setText(\"Group Information Edited\");\n flashMessage(\"Successfully Edited Details.\");\n updateVslaInformation(); // update the database to sent\n // Then clear the data holder\n DataHolder.getInstance().clearDataHolder();\n\n } else if (operationResult.equalsIgnoreCase(\"-1\")) {\n\n flashMessage(\"An Error Occured\");\n txtOperationType.setText(\"Error Occured\");\n }\n\n }", "@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }", "private List<Result> addAllResults(List<Result> result) {\n\n MongoCollection<Document> collection = mongoDatabase.getCollection(\"result\");\n List<Result> allResults = new LinkedList<>();\n for (Result res : result) {\n Document newResult = new Document();\n newResult.put(\"student1\", res.getStudent1());\n newResult.put(\"student2\", res.getStudent2());\n newResult.put(\"percentage\", res.getPercentage());\n newResult.put(\"snippets\", res.getSnippets());\n newResult.put(\"type\", res.getType().toString());\n collection.insertOne(newResult);\n\n\n ObjectId resultId = newResult.getObjectId(\"_id\");\n res.setObjectId(resultId);\n newResult.put(\"hexId\", resultId.toHexString());\n res.setHexId(resultId.toHexString());\n Bson updateOperationDocument = new Document(\"$set\", newResult);\n collection.updateOne(eq(\"_id\", new ObjectId(resultId.toHexString())), updateOperationDocument);\n\n allResults.add(res);\n }\n return allResults;\n }", "@GetMapping(path = \"/realizar\")\n public ModelAndView getForm(){\n\n return new ModelAndView(ViewConstant.MANTCOMPRASMINO).addObject(\"compraMinorista\", new CompraMinorista());\n }", "@Override\n public void formPopulated(FormEvent fe) {\n formObject = FormContext.getCurrentInstance().getFormReference();\n\n formObject.setNGValue(\"purchasestatus\", \"\");\n formObject.setNGValue(\"purchaseremarks\", \"\");\n formObject.setNGValue(\"previousstatus\", \"\");\n formObject.setNGValue(\"returnpo\", \"\");\n\n String previousactivity = formObject.getNGValue(\"previousactivity\");\n if (previousactivity.equalsIgnoreCase(\"Initiator\")\n || previousactivity.equalsIgnoreCase(\"StoreMaker\")\n || previousactivity.equalsIgnoreCase(\"StoreChecker\")\n || previousactivity.equalsIgnoreCase(\"AccountsMaker\")\n || previousactivity.equalsIgnoreCase(\"AccountsChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Exception Cleared\", \"Exception Cleared\");\n }\n\n if (previousactivity.equalsIgnoreCase(\"QualityMaker\")\n || previousactivity.equalsIgnoreCase(\"QualityChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Replacement or Exchange\", \"Replacement or Exchange\");\n formObject.addComboItem(\"purchasestatus\", \"Purchase Return\", \"Purchase Return\");\n }\n\n formObject.clear(\"proctype\");\n Query = \"select HeadName from supplypoheadmaster order by HeadName asc\";\n System.out.println(\"Query is \" + Query);\n result = formObject.getDataFromDataSource(Query);\n for (int i = 0; i < result.size(); i++) {\n formObject.addComboItem(\"proctype\", result.get(i).get(0), result.get(i).get(0));\n }\n }", "private void readForm() {\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "@RequestMapping(value = \"/save\", method = RequestMethod.POST)\n\tpublic String submitCreateOfficeForm(\n\t\t\t@ModelAttribute(MODEL_ATTIRUTE_TypeLocalFondPage) TypeLocalFondPage typeLocalFondPage,\n\t\t\tBindingResult bindingResult, RedirectAttributes attributes,\n\t\t\tModel model) {\n\t\tLOGGER.debug(\"Create Office form was submitted with information: \"\n\t\t\t\t+ typeLocalFondPage);\n\n\t\tSystem.out.println(bindingResult.toString());\n\t\tSystem.out.println(typeLocalFondPage);\n\t\tSystem.out.println(typeLocalFondPage.getNotaireFk());\n\t\tif (bindingResult.hasErrors()) {\n\t\t\tif (notaireService.findAll() != null) {\n\t\t\t\tmodel.addAttribute(MODEL_ATTIRUTE_LIST_Notaire,\n\t\t\t\t\t\tnotaireService.findAll());\n\t\t\t}\n\t\t\treturn TypeLocalFondPage_ADD_FORM_VIEW;\n\t\t}\n\n\t\t// addFeedbackMessage(attributes,\n\t\t// FEEDBACK_MESSAGE_KEY_TypeFamilleCourrierLocal_CREATED,\n\t\t// typeLocalFondPage.getNom());\n\t\ttypeLocalFondPageService.create(typeLocalFondPage);\n\n\t\treturn createRedirectViewPath(TypeLocalFondPage_LIST);\n\t}", "protected GuiTestObject nextsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"nextsubmit\"));\n\t}", "@PostMapping(\"/receta\")\n\t@ResponseStatus(HttpStatus.CREATED) // Retorna 201\n\tpublic ResponseEntity<?> create(@Valid @RequestBody Receta receta,BindingResult result){\n\t\tthis.response = new HashMap<>();\n\t\tReceta recetaNuevo = null;\n\t\t//En el caso de que tenga errores a la hora de postear, mandara un listado con dichos errores\n\t\tif(result.hasErrors()) {\n\t\t\tList<String>errors=result.getFieldErrors()\n\t\t\t\t\t.stream().map(error -> {return \"El campo '\"+error.getField()+\"' \"+error.getDefaultMessage();})\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\tthis.response.put(\"errors\",errors);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\trecetaNuevo=this.recetaService.save(receta);\n\t\t}catch(DataAccessException dataEx) {\n\t\t\tthis.response.put(\"mensaje\",\"Error al insertar la receta en la base de datos\");\n\t\t\tthis.response.put(\"error\", dataEx.getMessage().concat(\" \").concat(dataEx.getMostSpecificCause().getMessage()));\n\t\t\treturn new ResponseEntity<Map<String,Object>>(this.response,HttpStatus.INTERNAL_SERVER_ERROR); // Retorna 500\n\t\t}\n\t\t\n\t\tthis.response.put(\"mensaje\",\"La receta ha sido insertado en la base de datos\");\n\t\tthis.response.put(\"coche\",recetaNuevo);\n\t\treturn new ResponseEntity<Map<String,Object>>(this.response,HttpStatus.CREATED);\n\t}", "public StudentResult() {\n initComponents();\n \n \n }", "@RequestMapping(value = \"register_client\", method = RequestMethod.POST)\n public String submitRegisterClient(@ModelAttribute(\"formDto\") OauthClientDetailsDto formDto, BindingResult result) {\n clientDetailsDtoValidator.validate(formDto, result);\n if (result.hasErrors()) {\n return \"clientdetails/register_client\";\n }\n oauthService.registerClientDetails(formDto);\n return \"redirect:client_details\";\n }", "public static Result next() {\r\n\t\t// get current node\r\n\t\tMap<String, String> requestData = Form.form().bindFromRequest().data();\r\n\t\tString idCurrentNode = requestData.get(RequestParams.CURRENT_NODE);\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tString employeeName = CMSSession.getEmployeeName();\r\n\r\n\t\tDecision nextDecision = CMSGuidedFormFill.makeDecision(formName,\r\n\t\t\t\temployeeName, idCurrentNode, requestData);\r\n\r\n\t\treturn ok(backdrop.render(nextDecision));\r\n\t}", "public void submitAndShowResult(final View view) {\n final Intent intent = new Intent(this, SurveyResultPage.class);\n\n // add input to firebase base one the type\n if (surveyInput.getVisibility() == View.INVISIBLE) {\n final int itemPosition = mAdapter.getItemPosition();\n List<String> keyList = mAdapter.getmChoiceIds();\n\n if (mAdapter.itemPosition == -1) {\n Toast.makeText(this, \"Please make choice\", Toast.LENGTH_SHORT).show();\n } else {\n // count vote and update to database\n mChoiceReference.child(keyList.get(itemPosition)).runTransaction(new Transaction.Handler() {\n @Override\n public Transaction.Result doTransaction(MutableData mutableData) {\n Choice choice = mutableData.getValue(Choice.class);\n if (choice == null) {\n return Transaction.success(mutableData);\n }\n choice.count += 1;\n mutableData.setValue(choice);\n return Transaction.success(mutableData);\n }\n\n @Override\n public void onComplete(DatabaseError databaseError, boolean committed,\n DataSnapshot currentData) {\n }\n });\n intent.putExtra(VotingPage.EXTRA_POST_KEY, mPostKey);\n startActivity(intent);\n finish();\n }\n\n } else {\n String getSurveyInput = surveyInput.getEditText().getText().toString();\n if (getSurveyInput.isEmpty()){\n Toast.makeText(this, \"Please input text\", Toast.LENGTH_SHORT).show();\n } else {\n SurveyInput mSurveyInput = new SurveyInput(getSurveyInput);\n mSurveyQuestionReference.child(\"surveyInputMap\").push().setValue(mSurveyInput);\n intent.putExtra(VotingPage.EXTRA_POST_KEY, mPostKey);\n startActivity(intent);\n finish();\n }\n }\n\n }", "@RequestMapping(value = \"/create_report\", method = RequestMethod.POST)\n public @ResponseBody\n ModelAndView createreport(@Valid @ModelAttribute(value = \"reportdetails\") reports reportdetails, BindingResult result, HttpSession session) throws Exception {\n\n if (result.hasErrors()) {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n mav.addObject(\"btnValue\", \"Create\");\n return mav;\n }\n \n reportmanager.createReport(reportdetails);\n\n ModelAndView mav = new ModelAndView(\"/sysAdmin/reports/details\");\n mav.addObject(\"success\", \"reportCreated\");\n return mav;\n }", "FormSubmit load( int nIdFormResponse, Plugin plugin );", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "@Token(save = true, validate = false)\n @Execute\n public HtmlResponse createpage(final SuggestBadWordEditForm form) {\n form.initialize();\n form.crudMode = CrudMode.CREATE;\n return asHtml(path_AdminSuggestbadword_EditJsp);\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tRootMaster rootMaster = new RootMaster();\r\n\t\tString strStatus=\"failure\";\r\n\t\tDataSource dataSource = getDataSource(request,\"entp\");\r\n\t\tFirstCreationForm firstCreationForm = (FirstCreationForm) form;// TODO Auto-generated method stub\r\n\t\tString phoneNo = firstCreationForm.getTxtCPPrefix()+\"~\"+firstCreationForm.getTxtCAreacode()+\"~\"+firstCreationForm.getTxtCPhone();\r\n\t\tString strResult=rootMaster.companyVerify(dataSource,firstCreationForm.getCompanySName(),firstCreationForm.getCompanyEMail(),phoneNo);\r\n\t\tif(!strResult.equals(\"success\"))\r\n\t\t{\r\n\t\t\tif(strResult.equals(\"sname\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.duplicate\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strResult.equals(\"mailid\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.mailId\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strResult.equals(\"phone\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.phone\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t//end company phone no check\r\n\t\t\r\n\t\tFirstCreationVo firstCreationVo=firstCreationForm.getFirstCreationVO();\r\n\t\tHttpSession session= request.getSession();\r\n\t\tsession.setAttribute(\"companyData\", firstCreationVo);\r\n\t\tstrStatus=\"success\";\r\n\t\t}\r\n\t\treturn mapping.findForward(strStatus);\r\n\t}", "public TelaResultado() {\n initComponents();\n jTextFieldResultadoAlcance.setBackground(Color.WHITE);\n jTextFieldResultadoContribuicao.setBackground(Color.WHITE);\n jTextFieldResultadoEfeitoPepita.setBackground(Color.WHITE);\n jTextFieldResultadoFitness.setBackground(Color.WHITE);\n\n jTableResultados.getTableHeader().setReorderingAllowed(false);\n jTableResultadosSessao.getTableHeader().setReorderingAllowed(false);\n cellRenderer.setHorizontalAlignment(SwingConstants.CENTER);\n jTableResultados.getColumnModel().getColumn(0).setPreferredWidth(80);\n jTableResultados.getColumnModel().getColumn(1).setPreferredWidth(80);\n jTableResultados.getColumnModel().getColumn(2).setPreferredWidth(80);\n jTableResultados.getColumnModel().getColumn(3).setPreferredWidth(160);\n jTableResultados.getColumnModel().getColumn(0).setCellRenderer(cellRenderer);\n jTableResultados.getColumnModel().getColumn(1).setCellRenderer(cellRenderer);\n jTableResultados.getColumnModel().getColumn(2).setCellRenderer(cellRenderer);\n jTableResultados.getColumnModel().getColumn(3).setCellRenderer(cellRenderer);\n }", "@ResponseBody\n @RequestMapping(value = \"/enrollment.json\", method = RequestMethod.POST, \n produces = { \"application/json\" })\n public Map<String, Object> handleFormSubmission(HttpServletRequest request,\n HttpServletResponse response, \n @Valid @ModelAttribute(\"fixture\") FixtureModel fixture,\n BindingResult bindingResult) throws Exception {\n\n Map<String, Object> responseData = new HashMap<String, Object>();\n if (bindingResult.hasErrors()) {\n responseData.put(\"success\", false);\n responseData.put(\"errors\", getMappedErrors(bindingResult));\n }\n else {\n fixture.setInstalledBy(\"\"); //TODO Replace this with real data\n FixtureModel dto = fixtureService.createFixture(fixture);\n responseData.put(\"success\", true);\n responseData.put(\"fixture\", dto);\n }\n\n return responseData;\n }", "@GetMapping(\"/list/showFormForAdd\")\n\tpublic String showFormForAdd(Model theModel) {\n\t\tPerson thePerson = new Person();\n\t\ttheModel.addAttribute(\"person\", thePerson);\n\n\t\treturn \"person-form\";\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n response.setContentType(\"text/html;charset=UTF-8\");\n request.setCharacterEncoding(\"utf-8\");\n int id = Integer.parseInt(request.getParameter(\"id\"));\n String name = request.getParameter(\"name\");\n String hepa = request.getParameter(\"hepa\");\n String panc = request.getParameter(\"panc\");\n String rein = request.getParameter(\"rein\");\n String blad = request.getParameter(\"blad\");\n String other = request.getParameter(\"other\");\n String f = request.getParameter(\"f\");\n\n Date date = Date.valueOf(request.getParameter(\"date\"));\n int doc_id = Integer.parseInt(request.getParameter(\"doc_id\"));\n\n Result r = new Result();\n\n r.setPname(name);\n r.setHepa(hepa);\n r.setPanc(panc);\n r.setRein(rein);\n r.setBlad(blad);\n r.setOther(other);\n r.setF_rs(f);\n\n r.setDate(date);\n r.setDoctor_id(doc_id);\n\n ResultDAO rdao = new ResultDAO();\n rdao.update(r, id);\n\n response.sendRedirect(\"success.jsp\");\n }", "@GetMapping(\"/add\")\n\tpublic String showFormForAdd(Model model) {\n\t\tMemo memo = new Memo();\n\t\t\n\t\t// load categories for select options\n\t\tMap<String, String> mapCategories = generateMapCategories();\n\t\t\n\t\t// add to the model\n\t\tmodel.addAttribute(\"memo\", memo);\n\t\tmodel.addAttribute(\"categories\", mapCategories);\n\t\t\n\t\treturn \"add\";\n\t}", "private SCTeamCreateResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public ModelAndView getSuccessView(FORM form) throws Exception\r\n {\r\n return null;\r\n }", "public void setResult() {\n }", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\n\tpublic String saveEntity(@Valid ENTITY tipoConsumo, BindingResult result, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\ttry{\n\t\n\t\t\tif (result.hasErrors()) {\n\t\t\t\treturn viewBaseLocation + \"/form\";\n\t\t\t}\n\t\n\t\t\tabm.guardar(tipoConsumo);\n\t\n\t\t\tif(idEstadia != null){\n\t\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t\t}\n\t\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten se realiz&oacute correctamente.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten no pudo realizarse.\");\n\t\t}\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn \"redirect:list\";\n\t}", "public static boolean createForm(CompanyList companyList, String companyIdToBeGenerated){\t\r\n\t\t\r\n\t\tboolean isComplete = true;\r\n\t\t// generate report for each company\r\n\t\tfor(Company company : companyList){\t\t\r\n\t\t\tif(company.getEmployeeList().size() == 0){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString companyId = company.getCompanyId();\t\t\t\r\n\t\t\tif(!companyIdToBeGenerated.equalsIgnoreCase(companyId) & !companyIdToBeGenerated.equalsIgnoreCase(ReportCons.ALL_COMPANY)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Creating thirteenth month pay report for company with ID \"+company.getCompanyId()+\".\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t// making employee bean\t\t\t\r\n\t\t\tEmployeeBean employeeBean = new EmployeeBean();\t\r\n\t\t\temployeeBean.addAll(company.getEmployeeList());\r\n\t\t\t\r\n\t\t\t// creating new form\r\n\t\t\tString year = ReportUtil.getFormattedDate(companyList.getRunDate(), \"yyyy\");\r\n\t\t\tThirteenthMonthPayForm form = new ThirteenthMonthPayForm(employeeBean);\t\r\n\t\t\tform.setYear(year);\r\n\t\t\t\r\n\t\t\t//setting directory path\r\n\t\t\tString directoryName = ReportUtil.getOutputDirectory(year, company.getCompanyId(),\"Thirteenth Month Pay\", \"pdf\",\"annual\");\t\t\t\r\n\t\t\t\r\n\t\t\tFile file = new File(directoryName);\r\n\t\t\t\r\n\t\t\t// creating the form \t\r\n\t\t\ttry {\t\t\t\t\t\t\t\r\n\t\t\t\tform.createFormStream(new FileOutputStream(file));\t\r\n\t\t\t} catch (JRException | IOException e) {\t\t\r\n\t\t\t\tisComplete = false;\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \t\t\t\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn isComplete;\t\t\r\n\t}", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}" ]
[ "0.7062249", "0.66080445", "0.6360564", "0.6012686", "0.58830255", "0.58358514", "0.57911235", "0.57883996", "0.57724637", "0.568328", "0.5680012", "0.5667168", "0.5652385", "0.562008", "0.55996865", "0.5592002", "0.5568738", "0.54828495", "0.5463475", "0.54354674", "0.5427239", "0.54236233", "0.5408163", "0.53512055", "0.5349262", "0.5330341", "0.5322971", "0.5321628", "0.5315187", "0.53109705", "0.53066665", "0.53046346", "0.5284835", "0.5268528", "0.52613324", "0.52586526", "0.52533334", "0.52407557", "0.52392685", "0.5229705", "0.52290016", "0.5214191", "0.52027726", "0.5195255", "0.5190092", "0.5188579", "0.5166121", "0.5161864", "0.5159292", "0.51531035", "0.5148038", "0.5139613", "0.51362026", "0.5135332", "0.51323646", "0.5131907", "0.5130135", "0.51248926", "0.5123887", "0.5118432", "0.5108794", "0.51022524", "0.50928324", "0.5089123", "0.5087047", "0.50753945", "0.5071192", "0.5066456", "0.5064174", "0.5061672", "0.50543714", "0.5053952", "0.5046817", "0.5046597", "0.50401", "0.50395036", "0.5037351", "0.5033057", "0.5030162", "0.5026732", "0.5026472", "0.5026079", "0.50233436", "0.50206345", "0.50202334", "0.5018469", "0.5012681", "0.5010702", "0.5008833", "0.50083375", "0.5003456", "0.50017095", "0.49982285", "0.4996306", "0.49956802", "0.49954036", "0.49943423", "0.49905932", "0.4990561", "0.49896696", "0.4989635" ]
0.0
-1
by default don't resolve
public Participant getResolvedPerformer() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void doResolve() {\n\r\n\t}", "void resolve();", "public abstract void resolve();", "@Override\n public abstract boolean needsResolving();", "public abstract String resolve();", "public void aboutToResolve(Scope scope) {\n\t// default implementation: do nothing\n}", "@Override\r\n\tpublic String resolve(AusfuehrungsContext<String> pruefContext) {\n\t\treturn null;\r\n\t}", "T resolve();", "@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}", "default Object resolve(String name) {\n return resolve(name, Object.class);\n }", "public YadisResolver()\n {\n \n }", "public Object resolve(String var) throws ErrorException { \n\t\treturn null;\n\t}", "boolean hasResolve();", "@Override\n public void resolve(DeserializationContext ctxt) throws JsonMappingException {\n ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);\n }", "@Override\n public String resolve(String path)\n {\n\n // strip classname\n path = path.substring(path.lastIndexOf(\"/\") + 1);\n\n return path;\n }", "private LookupUtil(){}", "synchronized String resolve(BundleImpl bundle, Iterator pkgs) {\n String res;\n if (Debug.packages) {\n Debug.println(\"resolve: \" + bundle);\n }\n // If we entry with tempResolved set, it means that we already have\n // resolved bundles. Check that it is true!\n if (tempResolved != null) {\n if (!tempResolved.contains(bundle)) {\n framework.listeners.frameworkError(bundle,\n new Exception(\"resolve: InternalError1!\"));\n }\n return null;\n }\n\n tempResolved = new HashSet();\n BundleImpl sb = checkBundleSingleton(bundle);\n if (sb != null) {\n tempResolved = null;\n return \"Singleton bundle failed to resolve because \" + sb + \" is already resolved\";\n }\n\n tempProvider = new HashMap();\n tempRequired = new HashMap();\n tempBlackList = new HashSet();\n tempResolved.add(bundle);\n String br = checkRequireBundle(bundle);\n if (br == null) {\n List failed = resolvePackages(pkgs);\n if (failed.size() == 0) {\n registerNewProviders(bundle);\n res = null;\n } else {\n StringBuffer r = new StringBuffer(\"missing package(s) or can not resolve all of the them: \");\n Iterator mi = failed.iterator();\n r.append(((ImportPkg)mi.next()).pkgString());\n while (mi.hasNext()) {\n r.append(\", \");\n r.append(((ImportPkg)mi.next()).pkgString());\n }\n res = r.toString();\n }\n } else {\n res = \"Failed to resolve required bundle or host: \" + br;\n } \n tempResolved = null;\n tempProvider = null;\n tempRequired = null;\n tempBlackList = null;\n if (Debug.packages) {\n Debug.println(\"resolve: Done for \" + bundle);\n }\n return res;\n }", "@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}", "void resolveRefs(SymbolTable symbolTable)\n {\n \tEnumeration e = defs.elements();\n\twhile (e.hasMoreElements())\n\t{\n\t Definition d=(Definition) e.nextElement();\n d.resolveRefs(symbolTable); \n\t}\n }", "Symbol resolve(String name);", "default <T> List<T> resolve(String[] names, Class<T> type) {\n List<T> resolved = new ArrayList<>();\n for (String name : names) {\n resolved.add(resolve(name, type));\n }\n return resolved;\n }", "public ResolveByExtension() {\n this.parsers = new HashMap<>();\n }", "boolean isResolvable(String name);", "public void resolve()\n{\n getFragment().resolveFragment();\n}", "@Override\n\tpublic Object resolveContextualObject(String key) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic InputSource resolveEntity(String arg0, String arg1, String arg2,\r\n\t\t\tString arg3) throws SAXException, IOException {\n\t\tInputSource is = null;\r\n\t\tString path = map.get(arg3);\r\n\t\t// System.out.println(\"\\tresolve \" + arg3 + \" as \" + path);\r\n\t\tif (path != null) {\r\n\t\t\tis = new InputSource(baseDirectory + path + arg3);\r\n\t\t}\r\n\t\treturn is;\r\n\t}", "public void resolve (INPUT input)\n {\n this.resultProduced = false;\n execute(input);\n }", "<T> T resolve(String name, Class<T> type);", "default <T> List<T> resolve(Class<T> type, String... names) {\n if (names.length > 0) {\n return resolve(names, type);\n }\n\n return new ArrayList<>(resolveAll(type).values());\n }", "@Bean\n @ConditionalOnMissingBean(value = DubboParamResolveService.class, search = SearchStrategy.ALL)\n public DubboParamResolveService defaultDubboParamResolveService() {\n return new DefaultDubboParamResolveService();\n }", "public interface Resolvable {\n\n /**\n * Returns the status of resolution. If completely resolved returns enum\n * value \"RESOLVED\", if not returns \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" is returned.\n *\n * @return status of resolution\n */\n ResolvableStatus getResolvableStatus();\n\n /**\n * Set the status of type/uses resolution. If completely resolved set enum\n * value \"RESOLVED\", if not set it to \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" should be set.\n *\n * @param resolvableStatus status of resolution\n */\n void setResolvableStatus(ResolvableStatus resolvableStatus);\n\n /**\n * Resolves the linking.\n *\n * @throws DataModelException data model exception\n */\n void resolve()\n throws DataModelException;\n}", "FunDef resolve(\n Exp[] args,\n Validator validator,\n List<Conversion> conversions);", "protected Locale resolveLocale()\n\t{\n\t\tLocale locale = getArchLocale();\n\t\tif (locale == null) {\n\t\t\tlocale = getFallbackLocale();\n\t\t}\n\t\tif (locale == null) {\n\t\t\t//Fallback to Spring locale\n\t\t\tlocale = LocaleContextHolder.getLocale();\n\t\t}\n\t\treturn locale;\n\t}", "private Resolve(Builder builder) {\n super(builder);\n }", "private boolean resolvable(Identifier id, String field) throws UnrecoverableException, RetryableException {\n try {\n resolve(id,field);\n return true;\n } catch (NotFound e) {\n return false;\n }\n }", "private boolean checkResolve(BundleImpl b) {\n ArrayList okImports = new ArrayList();\n if (framework.perm.missingMandatoryPackagePermissions(b.bpkgs, okImports) == null &&\n checkBundleSingleton(b) == null) {\n HashSet oldTempResolved = (HashSet)tempResolved.clone();\n HashMap oldTempProvider = (HashMap)tempProvider.clone();\n HashMap oldTempRequired = (HashMap)tempRequired.clone();\n HashSet oldTempBlackList = (HashSet)tempBlackList.clone();\n tempResolved.add(b);\n if (checkRequireBundle(b) == null) {\n List r = resolvePackages(okImports.iterator());\n if (r.size() == 0) {\n return true;\n }\n }\n tempResolved = oldTempResolved;\n tempProvider = oldTempProvider;\n tempRequired = oldTempRequired;\n tempBlackList = oldTempBlackList;\n }\n return false;\n }", "@Test\n public void get() {\n ResolveAndGet();\n }", "public void resolveInternalDependencies()\n {\n List<Dependency> dependencies = getUnresolvedDependencies();\n\n for (Dependency dependency : dependencies)\n {\n List<Target> allTargets = getTargets();\n\n for (Target target : allTargets)\n {\n String dependencyName = dependency.getName();\n String targetName = target.getName();\n\n System.out.println(\"Antfile.resolveInternalDependencies dependencyName, targetName = \" + dependencyName + \" \" + targetName);\n\n if (dependencyName == null)\n {\n System.out.println(\"Antfile.resolveInternalDependencies dependency = \" + dependency);\n }\n else if (dependencyName.equals(targetName))\n {\n dependency.setResolved(true);\n\n break;\n }\n }\n }\n }", "boolean isResolveByProxy();", "protected Object readResolve() {\n return Holder.INSTANCE;\n }", "public static interface Resolver {\n\t\t\n\t\t/**\n\t\t * Registers an injection manager with a resolver.\n\t\t * \n\t\t * The resolver can asynchronously update the relation to modify the\n\t\t * binding.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic void addInjection(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to lazily resolve an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to calculate its initial binding\n\t\t * when it is first accessed.\n\t\t * \n\t\t * The resolver must call back the manager to modify the resolved target.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic boolean resolve(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to remove an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to signify that the\n\t\t * component wants to force the resolution of the relation the next\n\t\t * access\n\t\t * \n\t\t */\n\t\tpublic boolean unresolve(RelationInjectionManager injection);\n\t\t\n\t}", "protected AbstractNamedValueArgumentResolver() {\n\t\tthis.conversionService = null;\n\t}", "@Override\n public void resolve(MapChoice mapChoice, Query query, Result result, Resolution resolution) {\n assertEquals(\"myMethod\",mapChoice.getMethod());\n super.resolve(mapChoice,query,result,resolution);\n }", "@Override\n\tpublic Symbol resolveThisScopeOnly(String name) {\n\t\treturn null;\n\t}", "@Override\n public SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name) {\n try {\n return foundTypes.get(name, () -> {\n SymbolReference<ResolvedReferenceTypeDeclaration> result = tryToSolveTypeUncached(name);\n if (result.isSolved()) {\n return SymbolReference.solved(result.getCorrespondingDeclaration());\n }\n return result;\n });\n } catch (ExecutionException e) {\n throw new RuntimeException(e);\n }\n }", "protected interface Resolver {\n\n /**\n * Adjusts a module graph if necessary.\n *\n * @param classLoader The class loader to adjust.\n * @param target The targeted class for which a proxy is created.\n */\n void accept(@MaybeNull ClassLoader classLoader, Class<?> target);\n\n /**\n * An action to create a resolver.\n */\n enum CreationAction implements PrivilegedAction<Resolver> {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n @SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Exception should not be rethrown but trigger a fallback.\")\n public Resolver run() {\n try {\n Class<?> module = Class.forName(\"java.lang.Module\", false, null);\n return new ForModuleSystem(Class.class.getMethod(\"getModule\"),\n module.getMethod(\"isExported\", String.class),\n module.getMethod(\"addExports\", String.class, module),\n ClassLoader.class.getMethod(\"getUnnamedModule\"));\n } catch (Exception ignored) {\n return NoOp.INSTANCE;\n }\n }\n }\n\n /**\n * A non-operational resolver for VMs that do not support the module system.\n */\n enum NoOp implements Resolver {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n public void accept(@MaybeNull ClassLoader classLoader, Class<?> target) {\n /* do nothing */\n }\n }\n\n /**\n * A resolver for VMs that do support the module system.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForModuleSystem implements Resolver {\n\n /**\n * The {@code java.lang.Class#getModule} method.\n */\n private final Method getModule;\n\n /**\n * The {@code java.lang.Module#isExported} method.\n */\n private final Method isExported;\n\n /**\n * The {@code java.lang.Module#addExports} method.\n */\n private final Method addExports;\n\n /**\n * The {@code java.lang.ClassLoader#getUnnamedModule} method.\n */\n private final Method getUnnamedModule;\n\n /**\n * Creates a new resolver for a VM that supports the module system.\n *\n * @param getModule The {@code java.lang.Class#getModule} method.\n * @param isExported The {@code java.lang.Module#isExported} method.\n * @param addExports The {@code java.lang.Module#addExports} method.\n * @param getUnnamedModule The {@code java.lang.ClassLoader#getUnnamedModule} method.\n */\n protected ForModuleSystem(Method getModule,\n Method isExported,\n Method addExports,\n Method getUnnamedModule) {\n this.getModule = getModule;\n this.isExported = isExported;\n this.addExports = addExports;\n this.getUnnamedModule = getUnnamedModule;\n }\n\n /**\n * {@inheritDoc}\n */\n @SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Exception should always be wrapped for clarity.\")\n public void accept(@MaybeNull ClassLoader classLoader, Class<?> target) {\n Package location = target.getPackage();\n if (location != null) {\n try {\n Object module = getModule.invoke(target);\n if (!(Boolean) isExported.invoke(module, location.getName())) {\n addExports.invoke(module, location.getName(), getUnnamedModule.invoke(classLoader));\n }\n } catch (Exception exception) {\n throw new IllegalStateException(\"Failed to adjust module graph for dispatcher\", exception);\n }\n }\n }\n }\n }", "@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}", "protected void forceLazyInitialization() {\n getExchangeConverter();\n getInjector();\n getLanguageResolver();\n getTypeConverter();\n }", "@Override\n public void resolveUrls(KeycloakUriBuilder authUrlBuilder) {\n }", "public Source resolve(String href, String base) throws TransformerException {\n\t\treturn null;\n\t}", "private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }", "public static String resolvePlaceholders(String text)\n/* */ {\n/* 67 */ if (text == null) {\n/* 68 */ return text;\n/* */ }\n/* 70 */ return parseStringValue(null, text, text, new HashSet());\n/* */ }", "public interface UnknownNameReferenceResolver<R, I extends IndexAddressable.NamedIndexAddressable<N>, N extends NamedSemanticRegion<T>, T extends Enum<T>> {\n\n <X> X resolve(Extraction extraction, UnknownNameReference<T> ref, ResolutionConsumer<R, I, N, T, X> c) throws IOException;\n\n default <X> Map<UnknownNameReference<T>, X> resolveAll(Extraction extraction,\n SemanticRegions<UnknownNameReference<T>> refs,\n ResolutionConsumer<R, I, N, T, X> c) throws IOException {\n Map<UnknownNameReference<T>, X> result = new HashMap<>();\n for (SemanticRegion<UnknownNameReference<T>> unk : refs) {\n X item = resolve(extraction, unk.key(), c);\n if (item != null) {\n result.put(unk.key(), item);\n }\n }\n return result;\n }\n\n Class<T> type();\n}", "public void initializeResolveListener() {\n mResolveListener = new NsdManager.ResolveListener() {\n\n @Override\n public void onResolveFailed(NsdServiceInfo serviceInfo, int errorCode) {\n Log.e(TAG, \"Resolve failed\" + errorCode);\n }\n\n @Override\n public void onServiceResolved(NsdServiceInfo serviceInfo) {\n Log.e(TAG, \"Resolve Succeeded. \" + serviceInfo);\n\n if (serviceInfo.getServiceName().equals(mServiceName)) {\n Log.d(TAG, \"Same IP.\");\n return;\n }\n mService = serviceInfo;\n receivedServices = serviceInfo.toString();\n\n }\n };\n }", "private Object readResolve() {\n return getApplication(name);\n }", "@Override\n public Source resolve(String href, String base) throws TransformerException\n {\n\tif (!href.isEmpty() && URI.create(href).isAbsolute())\n\t{\n\t if (log.isDebugEnabled()) log.debug(\"Resolving URI: {} against base URI: {}\", href, base);\n\t URI uri = URI.create(base).resolve(href);\n return resolve(uri);\n\t}\n\telse\n\t{\n\t if (log.isDebugEnabled()) log.debug(\"Stylesheet self-referencing its doc - let the processor handle resolving\");\n\t return null;\n\t}\n }", "public Object resolve(String key)\n {\n return this.services.resolve(key);\n }", "void resolveTypes(SymbolTable symbolTable) {\n defs.resolveTypes(symbolTable); // resolve all the definitions\n // DO NOT resolve anything else! (ie don't call super.resolveTypes() )\n // this is just a placeholder for a group of symbols with the same name\n }", "public VirtualFile resolve(String relative)\n\t{\n\t\treturn null;\n\t}", "@Test public void singletonResolutionInFunctions() {\n fail( \"Not yet implemented\" );\n }", "public ResolvedHost()\n {\n \n }", "@Override\n\tpublic void suggestExchange() {\n\t\t\n\t}", "public static interface Resolver\n {\n Constant resolve(Constant constOrig);\n }", "@Override\n protected Class<?> loadClass(String name, boolean resolve)\n throws ClassNotFoundException {\n Class<?> loadedClass = findLoadedClass(name);\n if (loadedClass == null) {\n try {\n if (_classLoader != null) {\n loadedClass = _classLoader.loadClass(name);\n }\n } catch (ClassNotFoundException ex) {\n // class not found in system class loader... silently skipping\n }\n\n try {\n // find the class from given jar urls as in first constructor parameter.\n if (loadedClass == null) {\n loadedClass = findClass(name);\n }\n } catch (ClassNotFoundException e) {\n // class is not found in the given urls.\n // Let's try it in parent classloader.\n // If class is still not found, then this method will throw class not found ex.\n loadedClass = super.loadClass(name, resolve);\n }\n }\n\n if (resolve) { // marked to resolve\n resolveClass(loadedClass);\n }\n return loadedClass;\n }", "protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;", "ResolvableHelper(final String id) {\n this.id = id;\n }", "private Object readResolve() {\n\t\t\treturn CASE_INSENSITIVE_ORDER;\n\t\t}", "public abstract void resolve(Event e);", "private QualifiedName resolveResolvingFunction(ParseTreeNode resolvingFunctionNameNode) { \r\n return resolveMethodName(resolvingFunctionNameNode, compiler, currentModuleTypeInfo);\r\n }", "private void resolve(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor astRequestor, int apiLevel, Map compilerOptions, WorkingCopyOwner owner, int flags) {\n astRequestor.compilationUnitResolver = this;\n this.bindingTables = new DefaultBindingResolver.BindingTables();\n CompilationUnitDeclaration unit = null;\n try {\n int length = compilationUnits.length;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits = new org.eclipse.jdt.internal.compiler.env.ICompilationUnit[length];\n System.arraycopy(compilationUnits, 0, sourceUnits, 0, length);\n beginToCompile(sourceUnits, bindingKeys);\n // process all units (some more could be injected in the loop by the lookup environment)\n for (int i = 0; i < this.totalUnits; i++) {\n if (resolvedRequestedSourcesAndKeys(i)) {\n // cleanup remaining units\n for (; i < this.totalUnits; i++) {\n this.unitsToProcess[i].cleanUp();\n this.unitsToProcess[i] = null;\n }\n break;\n }\n unit = this.unitsToProcess[i];\n try {\n // this.process(...) is optimized to not process already known units\n super.process(unit, i);\n // requested AST\n char[] fileName = unit.compilationResult.getFileName();\n ICompilationUnit source = (ICompilationUnit) this.requestedSources.get(fileName);\n if (source != null) {\n // convert AST\n CompilationResult compilationResult = unit.compilationResult;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;\n char[] contents = sourceUnit.getContents();\n AST ast = AST.newAST(apiLevel);\n ast.setFlag(flags | AST.RESOLVED_BINDINGS);\n ast.setDefaultNodeFlag(ASTNode.ORIGINAL);\n ASTConverter converter = new ASTConverter(/*need to resolve bindings*/\n compilerOptions, true, this.monitor);\n BindingResolver resolver = new DefaultBindingResolver(unit.scope, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, this.fromJavaProject);\n ast.setBindingResolver(resolver);\n converter.setAST(ast);\n CompilationUnit compilationUnit = converter.convert(unit, contents);\n compilationUnit.setTypeRoot(source);\n compilationUnit.setLineEndTable(compilationResult.getLineSeparatorPositions());\n ast.setDefaultNodeFlag(0);\n ast.setOriginalModificationCount(ast.modificationCount());\n // pass it to requestor\n astRequestor.acceptAST(source, compilationUnit);\n worked(1);\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedSources.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n // requested binding\n Object key = this.requestedKeys.get(fileName);\n if (key != null) {\n if (key instanceof BindingKeyResolver) {\n reportBinding(key, astRequestor, owner, unit);\n worked(1);\n } else if (key instanceof ArrayList) {\n Iterator iterator = ((ArrayList) key).iterator();\n while (iterator.hasNext()) {\n reportBinding(iterator.next(), astRequestor, owner, unit);\n worked(1);\n }\n }\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedKeys.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n } finally {\n // cleanup compilation unit result\n unit.cleanUp();\n }\n // release reference to processed unit declaration\n this.unitsToProcess[i] = null;\n this.requestor.acceptResult(unit.compilationResult.tagAsAccepted());\n }\n // remaining binding keys\n DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, true);\n Object[] keys = this.requestedKeys.valueTable;\n for (int j = 0, keysLength = keys.length; j < keysLength; j++) {\n BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j];\n if (keyResolver == null)\n continue;\n Binding compilerBinding = keyResolver.getCompilerBinding();\n IBinding binding = compilerBinding == null ? null : resolver.getBinding(compilerBinding);\n // pass it to requestor\n astRequestor.acceptBinding(((BindingKeyResolver) this.requestedKeys.valueTable[j]).getKey(), binding);\n worked(1);\n }\n } catch (OperationCanceledException e) {\n throw e;\n } catch (AbortCompilation e) {\n this.handleInternalException(e, unit);\n } catch (Error e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } catch (RuntimeException e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } finally {\n // disconnect ourselves from ast requestor\n astRequestor.compilationUnitResolver = null;\n }\n }", "protected IBinding[] resolveBindings(String contents, ICompilationUnit cu) throws JavaModelException {\n return resolveBindings(contents, cu, /*report errors*/\n true);\n }", "Set<Application> resolve();", "<T> Map<String, T> resolveAll(Class<T> type);", "Place resolveLocation( Place place );", "String resolve(String placeholder, AddressTemplate template);", "public org.omg.CORBA.Object resolve(String name)\n {\n NameComponent nc = new NameComponent(name, \"Object\");\n NameComponent path[] = {nc};\n org.omg.CORBA.Object objRef = null;\n try\n {\n objRef = namingContext.resolve(path);\n }\n catch (Exception e)\n {\n fatalError(\"Cound not get object with name \\\"\" + name +\n \"\\\" from NameService\", e);\n }\n return objRef;\n }", "public void testNonPermanentVariableResolvedOkNoBinding() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f :- g(X), h(Y))], (?- f), [[]]]\");\n }", "@Test\n public void testDefaults()\n {\n NearScheme scheme = new NearScheme();\n\n scheme.setBackScheme(new LocalScheme());\n\n assertNotNull(scheme.getServiceBuilder());\n assertEquals(\"auto\", scheme.getInvalidationStrategy(new NullParameterResolver()));\n }", "<T> T resolve(Class<T> type);", "public boolean resolve(RelationInjectionManager injection);", "@Test\n public void testExpandWithResolverNotProvided() {\n try {\n VariableExpansion.expand(\"no-expansion-needed\", null);\n fail(\"Should have failed to expand,resolver not given\");\n } catch (NullPointerException npe) {\n // Expected\n }\n }", "private interface CatalogResolver extends URIResolver, EntityResolver {\n @Override\n InputSource resolveEntity(String publicId, String systemId);\n }", "protected void setupLocal() {}", "@Override\n\tpublic Symbol resolve(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// otherwise look in the enclosing scope, if there is one\n\t\tScope sc = enclosingScope;\n\t\twhile (sc != null) {\n\t\t\tSymbol sym = enclosingScope.resolve(name);\n\t\t\tif (sym != null) {\n\t\t\t\treturn sym;\n\t\t\t}\n\t\t\tsc = sc.getEnclosingScope();\n\t\t}\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "void prepend(ReferenceResolver resolvers);", "public void resolve() throws Exception\r\n\t\t{\r\n\t\tname = CollectionTools.getRawValue(name, this, true);\r\n\t\tdistributionAlgorithm = CollectionTools.getRawValue(distributionAlgorithm, this, true);\r\n\t\t\r\n\t\tfor(RouteGroupMember rgm : members)\r\n\t\t\t{\r\n\t\t\trgm.resolve();\r\n\t\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * We set the item parameters\r\n\t\t */\r\n\t\tmyRouteGroup.setName(name);\r\n\t\tmyRouteGroup.setDistributionAlgorithm(distributionAlgorithm);\r\n\t\tmyRouteGroup.setMembers(members);\r\n\t\t/*********/\r\n\t\t}", "public void testLocalVarDefResolve() throws Exception {\n BashVarDef varDef = assertIsValidVarDef();\n Assert.assertTrue(BashPsiUtils.findNextVarDefFunctionDefScope(varDef) != null);\n Assert.assertNull(varDef.getReference().resolve());\n }", "@Override\r\n\tpublic InputSource resolveEntity(String publicId, String systemId)\r\n\t\t\tthrows SAXException, IOException {\n\t\treturn null;\r\n\t}", "public void testResolvePreTransfer() throws Exception {\n System.out.println(\"resolvePreTransfer\");\n \n instance.resolvePreTransfer();\n \n }", "protected Object readResolve() {\r\n\t\treturn getInstance();\r\n\t}", "protected Object readResolve() {\r\n\t\treturn getInstance();\r\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkResolution() {\n\t\tboolean flag = oTest.checkResolution();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public interface DNSResolver {\n /**\n * Resolve the given {@param host} into one or more {@link InetAddress}. The resolved InetAddress-es should be\n * added into the {@param result} list\n *\n * @return true to continue resolving with remaining resolvers, or false to continue resolving\n */\n boolean resolve(String host, List<InetAddress> result);\n}", "@Override\n\tpublic void serviceResolved(ServiceEvent arg0) {\n\n\t}", "private void resolveExports(Contribution contribution, ModelResolver resolver, ProcessorContext context)\n throws ContributionResolveException {\n for (Export export : contribution.getExports()) {\n if (export instanceof DefaultExport) {\n // Initialize the default export's resolver\n export.setModelResolver(resolver);\n } else {\n extensionProcessor.resolve(export, resolver, context);\n } // end if\n } // end for\n\n }", "private Object readResolve() {\n\t\tSystem.out.println(\"------\");\n\t\treturn this;\n\t}", "public void resolve()\n {\n /* The complaint is marked as resolved */\n resolved = true;\n \n /* The deadline no longer exists */\n deadline = null;\n }", "private Identifier resolve(Identifier id, String field) throws NotFound, UnrecoverableException, RetryableException {\n \n logger.debug(task.taskLabel() + \" entering resolve...\");\n try {\n ObjectLocationList oll = ((CNRead)nodeCommunications.getCnRead()).resolve(session, id);\n if (logger.isDebugEnabled()) \n logger.debug(task.taskLabel() + String.format(\" %s %s exists on the CN.\", field, id.getValue()));\n return oll.getIdentifier();\n\n } catch (NotFound ex) {\n // assume if identifierReservationService has thrown NotFound exception SystemMetadata does not exist\n if (logger.isDebugEnabled()) \n logger.debug(task.taskLabel() + String.format(\" %s %s does not exist on the CN.\", field, id.getValue()));\n throw ex;\n \n } catch (ServiceFailure e) {\n V2TransferObjectTask.extractRetryableException(e);\n throw new UnrecoverableException(\"Unexpected Exception from CN /resolve !\" + e.getDescription(), e);\n\n } catch ( NotImplemented | InvalidToken | NotAuthorized e) {\n throw new UnrecoverableException(\"Unexpected Exception from CN /resolve ! \" + e.getDescription(), e);\n }\n }", "@Override\n public Source resolve(String href, String base)\n throws TransformerException {\n\n if (isReference()) {\n return getRef().resolve(href, base);\n }\n\n dieOnCircularReference();\n\n SAXSource source = null;\n\n String uri = removeFragment(href);\n\n log(\"resolve: '\" + uri + \"' with base: '\" + base + \"'\", Project.MSG_DEBUG);\n\n source = (SAXSource) getCatalogResolver().resolve(uri, base);\n\n if (source == null) {\n log(\"No matching catalog entry found, parser will use: '\"\n + href + \"'\", Project.MSG_DEBUG);\n //\n // Cannot return a null source, because we have to call\n // setEntityResolver (see setEntityResolver javadoc comment)\n //\n source = new SAXSource();\n URL baseURL;\n try {\n if (base == null) {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } else {\n baseURL = new URL(base);\n }\n URL url = uri.isEmpty() ? baseURL : new URL(baseURL, uri);\n source.setInputSource(new InputSource(url.toString()));\n } catch (MalformedURLException ex) {\n // At this point we are probably in failure mode, but\n // try to use the bare URI as a last gasp\n source.setInputSource(new InputSource(uri));\n }\n }\n\n setEntityResolver(source);\n return source;\n }", "public String resolve(byte ip[]) throws UnknownHostException\n {\n // CACHE DNS requests!\n synchronized(this.ipadress2host)\n {\n String ipstr=ip2string(ip); \n \n StringList hostList= this.ipadress2host.get(ipstr); \n if (hostList!=null)\n if (hostList.size()>0)\n return hostList.get(0); \n \n String hostname=null;//dns.getHostByAddr(ip);\n \n if (hostname==null)\n return null; // throw ? \n this.ipadress2host.put(ipstr,new StringList(hostname)); \n return hostname;\n }\n }", "@Override\r\n\tpublic int resolveActions() {\n\t\treturn 0;\r\n\t}" ]
[ "0.7512587", "0.7472704", "0.7409367", "0.7193143", "0.69706106", "0.65462303", "0.6390637", "0.62278944", "0.5959088", "0.59532493", "0.59225833", "0.5873377", "0.5858102", "0.5752156", "0.57277477", "0.5641914", "0.5626848", "0.5625155", "0.55905807", "0.5575204", "0.5555108", "0.55286866", "0.5509856", "0.5501761", "0.5486139", "0.5479835", "0.54742014", "0.5461805", "0.54509294", "0.5450846", "0.54306465", "0.539099", "0.5387064", "0.53819513", "0.5381487", "0.5374878", "0.53637993", "0.5362795", "0.5346309", "0.533337", "0.53286093", "0.53255945", "0.5323468", "0.53204566", "0.53189373", "0.5312494", "0.5308615", "0.53067535", "0.5294103", "0.5287156", "0.52868986", "0.5281814", "0.52689976", "0.5266722", "0.5262024", "0.52544427", "0.52531385", "0.52307576", "0.52164155", "0.5213696", "0.5211327", "0.520539", "0.52010983", "0.52000576", "0.5197712", "0.5196557", "0.5188933", "0.5176456", "0.5174693", "0.51689136", "0.51682925", "0.5161303", "0.5157268", "0.51558274", "0.5154722", "0.51529515", "0.51529366", "0.51398975", "0.513769", "0.51357895", "0.5128026", "0.5124071", "0.5115932", "0.51060027", "0.5102542", "0.50982565", "0.50896466", "0.50870603", "0.5084118", "0.508197", "0.508197", "0.5080115", "0.50790185", "0.50739175", "0.507119", "0.5060057", "0.50519997", "0.50482583", "0.50480247", "0.5040552", "0.5027805" ]
0.0
-1
conditional performers never supports departments
public boolean definesDepartmentScope() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void reviewDeptPolicies() {\n if(metWithHr && metDeptStaff) {\n reviewedDeptPolicies = true;\n } else {\n System.out.println(\"Sorry, you cannot review \"\n + \" department policies until you have first met with HR \"\n + \"and then with department staff.\");\n }\n }", "private void meetDepartmentStaff() {\n if(metWithHr) {\n metDeptStaff = true;\n } else {\n System.out.println(\"Sorry, you cannot meet with \"\n + \"department staff until you have met with HR.\");\n }\n }", "private boolean shouldStopBeingCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount >= this.combatEngineerTriggerPercentageCancel;\r\n\t}", "public boolean isDepartmentScoped()\n {\n return false;\n }", "public String checkDepartment(String departmentName);", "public boolean isSetDepartment() {\n return this.department != null;\n }", "private String setDepartment() {\r\n\t\tSystem.out.println(\"New worker: \" + firstName + \".Department Codes\\n1 for Sales\\n2 for Development\\n3 for Accounting\\n0 for none\\nEnter department code:\");\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint depChoice=in.nextInt();\r\n\t\tif(depChoice == 1) {\r\n\t\t\treturn \"sales\";\r\n\t\t}\r\n\t\telse if(depChoice == 2) {\r\n\t\t\treturn \"dev\";\r\n\t\t}\r\n\t\telse if (depChoice == 3) {\r\n\t\t\treturn \"acct\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic boolean addDept(Dept dept) {\n\t\t\t\treturn false;\n\t\t\t}", "protected abstract boolean isSatisfiedBy(Design design, AUndertaking t);", "public void setDepartment(String dept) {\r\n\t\tdepartment = dept;\r\n\t}", "public void setDepartment(String department) {\n this.department = department;\n }", "public abstract boolean isUsable();", "public boolean emprunter() {\n // TODO: implement\n return false;\n }", "public void setDepartment(String department) {\r\n\t\tthis.department=department;\r\n\t}", "public void setDepartment(String department) {\r\n\t\tthis.department = department;\r\n\t}", "private boolean shouldBecomeCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount <= this.combatEngineerTriggerPercentageEnroll;\r\n\t}", "boolean hasIsPerformOf();", "private boolean useCurrentThread(List<String> dependedKeyList) {\n if (dependedKeyList.size() <= 0) {\n return false;\n }\n for (String deptKey : dependedKeyList) {\n if (dag.getFollowingKey(deptKey).size() > 1) {\n return false;\n }\n }\n return true;\n }", "public void setDept(String dept) {\n this.dept = dept;\n }", "protected abstract boolean checkUnSupportedFeatures(TrafficSelector selector, TrafficTreatment treatment);", "private boolean askForSuperviser(Person p) throws Exception {\n\n\t\treturn p.isResearcher() && (p.getInstitutionalRoleId() > 1);\n\t}", "@Override\n public List<Department> getAllDepartments() {\n return null;\n }", "private boolean canPrintContratEngagement(ContratDTO c)\r\n\t{\n\t\tif (new EditionSpeService().needEngagement(c.modeleContratId)==false)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tswitch (peMesContrats.canPrintContratEngagement)\r\n\t\t{\r\n\t\tcase TOUJOURS:\r\n\t\t\treturn true;\r\n\t\t\t\r\n\t\tcase JAMAIS:\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\tcase APRES_DATE_FIN_DES_INSCRIPTIONS:\r\n\t\t\tDate dateRef = DateUtils.getDateWithNoTime();\r\n\t\t\treturn dateRef.after(c.dateFinInscription);\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new AmapjRuntimeException();\r\n\t\t}\r\n\t}", "@Override\n\tpublic Dept getByNameOk(String name) {\n\t\treturn null;\n\t}", "private String setDepartment() {\n\t\tSystem.out.println(\"Department codes\\n1 for Sales \\n2 for Development \"\n\t\t\t\t+ \"\\n3 for Accounting \\n0 for Other\\nEnter the department code: \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tint deptChoice = sc.nextInt();\n\t\tsc.close();\n\t\tif (deptChoice == 1) return \"sales\";\n\t\telse if (deptChoice == 2) return \"development\";\n\t\telse if (deptChoice == 3) return \"accounting\";\n\t\telse return \"other\";\n\t}", "@Override\n public void setDepartments() throws DepartmentCreationException {\n\n }", "@Override\n\tpublic List<?> selectDepartment() throws Exception {\n\t\treturn deptMapperr.selectDepartment();\n\t}", "private String setDepartment() {\r\n\t\tSystem.out.print(\"Enter the Department:\\n1. For sales\\n2. For Development\\n3. For Accounting\\n0. For none\\n\");\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint choice = in.nextInt();\r\n\t\tif(choice == 1) { return \"sales\"; }\r\n\t\telse if(choice == 2) { return \"dev\"; }\r\n\t\telse if(choice == 3) { return \"acctg\"; }\r\n\t\telse { return \"\"; }\r\n\t}", "public void setDepartment(String department) {\n this.department = department == null ? null : department.trim();\n }", "public Departments getDeptTable();", "private Department selectDepartment()\n {\n Department selectedDepartment = null;\n if(listViewSelectedHospital != null){\n listViewSelectedHospital = listViewSelectedHospital.trim();\n String hospitalName = listViewSelectedHospital.split(\" \")[0];\n selectedDepartment = getDepartment(hospitalName);\n }\n return selectedDepartment;\n }", "public void setDept(String dept) {\n this.dept = dept == null ? null : dept.trim();\n }", "public void setDept_name(java.lang.String dept_name) {\r\n this.dept_name = dept_name;\r\n }", "String getDeptType();", "public String getPerformdepartmentName() {\n\t\treturn performdepartmentName;\n\t}", "@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"department\"})\n public void _2_2_1_getAllDept() throws Exception {\n this.mockMvc.perform(get(\"/api/v1.0/companies/\"+\n c_1.getId().toString()+\n \"/departments\")\n .header(AUTHORIZATION,ACCESS_TOKEN))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$._embedded.departments\",hasSize(4)));\n }", "public void setTooldept(String tooldept) {\r\n this.tooldept = tooldept;\r\n }", "private void addAllDepartments() {\n\t\tfinal BillingPeriod bp = (BillingPeriod) this.getBean().getContainer()\n\t\t\t\t.findBean(\"org.rapidbeans.clubadmin.domain.BillingPeriod\", this.getBillingPeriod().getIdString());\n\t\tfor (RapidBean bean : this.getBean().getContainer()\n\t\t\t\t.findBeansByType(\"org.rapidbeans.clubadmin.domain.Department\")) {\n\t\t\tfinal Department dep = (Department) bean;\n\t\t\tif (bp.getDepartments() == null || !bp.getDepartments().contains(dep)) {\n\t\t\t\tbp.addDepartment(dep);\n\t\t\t}\n\t\t}\n\t}", "public abstract String getBelongsToPersonOrDepartment();", "private void defaultDepartmentShouldNotBeFound(String filter) throws Exception {\n restDepartmentMockMvc.perform(get(\"/api/departments?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restDepartmentMockMvc.perform(get(\"/api/departments/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public void setDepartment(Department department) {\n this.department = department;\n }", "@When(\"user enters departure date\")\r\n\tpublic void user_enters_departure_date() {\n\t\tthrow new io.cucumber.java.PendingException();\r\n\t}", "public static boolean hasTechToProduce(UnitType unitType) {\n\n // Needs to have tech\n TechType techType = TechType.TechTypes.getTechType(unitType.getRequiredTechID());\n if (techType != null && techType != TechType.TechTypes.None && !AtlantisTech.isResearched(techType)) {\n return false;\n }\n\n return true;\n }", "public void setDepartment(String department) {\n if(department==null){\n department = \"\";\n }\n this.department = department;\n }", "public static int selectDepartment() {\r\n\t\tSystem.out.println(\"ENTER THE DEPARTMENT\");\r\n\t\tSystem.out.println(\"1.MECH\");\r\n\t\tSystem.out.println(\"2.CIVIL\");\r\n\t\tSystem.out.println(\"3.CSE\");\r\n\t\treturn 0;\r\n\t}", "private void setDegreeRequired ()\r\n {\r\n int j = 0;\r\n\r\n while (j < CAREERS.length && !CAREERS[j].equalsIgnoreCase (name))\r\n j++;\r\n\r\n if (j <= 3)\r\n degreeRequired = true;\r\n else degreeRequired = false;\r\n }", "@Test\n\tpublic void testDepartedBadScenario() { \n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\n\t\tassertEquals(0, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(0, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (0 - FREE).\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Test second bad scenario:\n\t\t\n\t\t/* Without the allocation of gates first, the docked and departed methods should not change \n\t\tanything. The returned status code should be 0 (FREE) for both gates. */ \n\t\tgateInfoDatabase.docked(0);\n\t\tgateInfoDatabase.docked(1);\t\t\n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(0, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (0 - FREE).\t\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Test third bad scenario:\n\t\t\n\t\t/* Without docking after allocation, the departed method should not change anything for either gates.\n\t\tThe mCodes are dummy values here. The returned status code should be 1 (RESERVED) \n\t\tfor both gates after the allocation is done for them. */\n\t\tgateInfoDatabase.allocate(0, 123);\n\t\tgateInfoDatabase.allocate(1, 345);\n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\t\n\t\tassertEquals(1, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(1, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (1 - RESERVED).\t\t\t\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[1]);\n\t}", "public void addemp(Dept dept);", "public void setDepartment(Department d) {\r\n department = d;\r\n }", "boolean hasCustomerNegativeCriterion();", "protected abstract boolean useReasoner();", "public boolean canDeflect() {\n\t\tif (deflectTime == true) {\n\t\t\tdeflectTime = false;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static Department getDepartment() {\n\t\treturn Departments.getDepartment(\"Computing Science\");\n\t}", "boolean hasDataPartner();", "public String GetDept()\r\n {\r\n return Department;\r\n }", "public void setDeptTable(Departments value);", "public List<String> getDepartmentNameWithAtLeastOneCaWithNoDescription();", "public boolean allDepartureFlightsNonstop() {\n\t\tMap<String,Flight> allflights = getAllDepartureFlights();\n\t\tfor (String flightNumber:allflights.keySet() ) {\n\t\t\tFlight flight = allflights.get(flightNumber);\n\t\t\tif (!flight.getStop().equalsIgnoreCase(\"nonstop\"))\n\t\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public static boolean checkDeptement(String depts,List<String> rules){\n\t\tboolean flag = false;\n\t\tfor (String str : rules) {\n//\t\t\tlogger.info(depts.indexOf(str));\n\t\t\tif(depts.indexOf(str) != -1){\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "@Override\r\n\tpublic boolean isComputer() {\n\t\treturn false;\r\n\t}", "@Test\n\tpublic void testDepartedGoodScenario() {\n\t\tgateInfoDatabase.allocate(0, 112);\n\t\tgateInfoDatabase.allocate(1, 332);\n\t\t\t\t\n\t\t/* Test if the allocations were successful. The returned status code should be 1 (RESERVED)\n\t\tfor both gates. */\n\t\tassertEquals(1, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(1, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (1 - RESERVED).\t\t\t\t\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Then, the planes are docked.\n\t\tgateInfoDatabase.docked(0);\n\t\tgateInfoDatabase.docked(1);\n\t\t\n\t\t/* Test if the aircrafts have successfully docked. \n\t\tThe returned status codes should be 2 (OCCUPIED) for both gates. */\n\t\tassertEquals(2, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(2, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (2 - OCCUPIED).\t\t\n\t\tassertEquals(2, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(2, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Finally, the planes depart. \t\t\n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\n\t\t\n\t\t/* Test that the aircrafts have successfully departed.\n\t\tThe returned status codes should be 0 (FREE) for both gates, since the planes have \n\t\talready departed and the gates have been freed. */\n\t\tassertEquals(0, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(0, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (0 - FREE).\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[1]);\n\t}", "public boolean isUnspecifiedPerturbation() {\n\t\t\n\t\tif (experiments_.size() < 0)\n\t\t\tthrow new RuntimeException(\"There are no experiments in this batch\");\n\t\t\n\t\tif (experiments_.size() > 1)\n\t\t\treturn false;\n\t\t\n\t\treturn experiments_.get(0).getDefinition().isUnspecifiedPerturbation();\n\t}", "public void validarTareasDepartamento(){\r\n\t\tif ((this.equipo != null) && !(this.equipo.isEmpty()) ){\r\n\t\t\tthis.equipo = gerente.validarTareasEquipo(this.equipo);\r\n\t\t}\r\n\t}", "public boolean containsDrugPerturbation() {\n\t\t\n\t\tif (experiments_.size() < 0)\n\t\t\tthrow new RuntimeException(\"There are no experiments in this batch\");\n\t\t\n\t\tfor (int i=0; i<experiments_.size(); i++)\n\t\t\tif (experiments_.get(i).getDefinition().isDrugPerturbation())\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "boolean isSetProbables();", "boolean splitTradingEmployed();", "public void selectNonstopForDeparture() {\n\t\tif (!nonStopButtonForDepartureTrip.isSelected()) {\n\t\t\tnonStopButtonForDepartureTrip.click();\n\t\t}\n\t}", "public boolean isVacant() {\r\n\treturn !isOccupied() || !isAvailable();\r\n }", "private Department getDepartment(String departmentName)\n {\n for(Department department:humanPlayer.getDepartments())\n {\n if(department.getName().equals(departmentName))\n {\n return department;\n }\n }\n return null;\n }", "public boolean estMort() {\n\t\treturn false;\n\t}", "public void setPerformdepartmentName(String performdepartmentName) {\n\t\tthis.performdepartmentName = performdepartmentName == null ? null\n\t\t\t\t: performdepartmentName.trim();\n\t}", "private void processDepartmentCredit(ReturnDocument rdoc) {\r\n if (rdoc.isDepartmentCreditRequired()) {\r\n this.processInternalBilling(rdoc);\r\n }\r\n }", "@Override\n\tpublic boolean identifiesOffense() {\n\t\treturn false;\n\t}", "public boolean isSelectable(){\n\t\treturn (type != MONSTER_GOAL && type != MONSTER_ENTRANCE);\n\t}", "public boolean isDecided() {\n return decided;\n }", "boolean isDegraded();", "public String getDept() {\n return dept;\n }", "public String getDept() {\n return dept;\n }", "public void selectDualExciters(){\r\n if(checkDualExciters())\r\n System.out.println(\"Dual Exciters Checked\");\r\n else\r\n System.out.println(\"Dual Exciters Unchecked\");\r\n }", "@Override\n public Department getDepartment(int departmentId) {\n return null;\n }", "public String getDepartment() {\r\n return department;\r\n }", "private void defaultDepartmentShouldNotBeFound(String filter) throws Exception {\n restDepartmentMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restDepartmentMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "private void defaultDepartmentShouldNotBeFound(String filter) throws Exception {\n restDepartmentMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restDepartmentMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "protected void processPlayerDeparted(String name) {\n Player player = tournamentService.findPlayer(name);\n if (player == null) {\n alertManagers(\"Departing player {0} is on my notify list, but I don''t have him in the tournament roster.\", name);\n return;\n }\n player.setState(PlayerState.OFFLINE);\n Game game = tournamentService.findPlayerGame(player);\n if (!game.status.isFinished()) {\n tellManagers(\"{0} departed\", name);\n }\n }", "public abstract boolean isRestricted();", "private boolean hasCertainlyNoScheduleList(DataModelNetworkElement networkElement) {\r\n\t\t\r\n\t\tEomModelType eomModelType = this.getEomModelType(networkElement.getDataModelStorageSettings());\r\n\t\tif (eomModelType==null) {\r\n\t\t\t// --- We don't know here - maybe an old style handling? ----------\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tboolean isNoScheduleList = false;\r\n\r\n\t\tswitch (eomModelType) {\r\n\t\tcase TechnicalSystem:\r\n\t\t\tisNoScheduleList = true;\r\n\t\t\tbreak;\r\n\t\tcase ScheduleList:\r\n\t\t\tisNoScheduleList = false;\r\n\t\t\tbreak;\r\n\t\tcase TechnicalSystemGroup:\r\n\t\t\t// --- An aggregation may contain ScheduleList's also ------------- \r\n\t\t\tisNoScheduleList = false;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn isNoScheduleList;\r\n\t}", "@Override\n public boolean canDFA() {\n return super.canDFA() && !(game.getOptions().booleanOption(\"no_clan_physical\") && isClan());\n }", "public void setDeptFunc(String deptFunc) {\n this.deptFunc = deptFunc == null ? null : deptFunc.trim();\n }", "public String getDepartment(){\n\t\treturn departName;\n\t}", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void isDeceased(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }", "boolean isSetLastrun();", "public String getDepartment() {\r\n\t\treturn department;\r\n\t}", "public String getDepartment() {\r\n\t\treturn department;\r\n\t}", "public String getDepartment() {\r\n\t\treturn department;\r\n\t}", "public void setdeptName(String deptName) {\n\t\t_deptName = deptName;\n\t}", "boolean isIntroduced();", "@Test\n public void testAircraftPartNoOnlyApplicableOffWing() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 787 AND rootpart.part_no_oem <> 777\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is not applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }", "public void setDeptName(String deptName) {\r\n this.deptName = deptName == null ? null : deptName.trim();\r\n }" ]
[ "0.5946511", "0.5713696", "0.5622759", "0.5609635", "0.5543094", "0.5515369", "0.5476604", "0.5398488", "0.53876656", "0.537685", "0.5354205", "0.5339311", "0.53305715", "0.5308181", "0.5292849", "0.52890956", "0.5276732", "0.5247835", "0.5236791", "0.52081984", "0.51963353", "0.5149404", "0.5148952", "0.5132209", "0.51059496", "0.5099591", "0.5097564", "0.50874436", "0.5071967", "0.5057704", "0.5048833", "0.5038591", "0.5035515", "0.50206006", "0.5004581", "0.50041145", "0.5001986", "0.49983627", "0.4991984", "0.49814674", "0.49761218", "0.49592716", "0.49461254", "0.49447346", "0.4941191", "0.4934969", "0.4934776", "0.49328226", "0.49282855", "0.4922725", "0.49159133", "0.4914672", "0.49061698", "0.49061507", "0.4905996", "0.48919696", "0.48856595", "0.48825818", "0.48769712", "0.48719317", "0.48640144", "0.48619685", "0.486113", "0.4846883", "0.48430046", "0.48367664", "0.48258263", "0.4825135", "0.48239276", "0.48235577", "0.48206496", "0.4819778", "0.48186237", "0.4817561", "0.48161256", "0.48139042", "0.48081055", "0.48081055", "0.4807056", "0.48038352", "0.47990692", "0.47972548", "0.47972548", "0.4794286", "0.47933695", "0.47930312", "0.47923654", "0.47900784", "0.47892115", "0.47867522", "0.4784912", "0.47820628", "0.47797838", "0.477964", "0.477964", "0.477964", "0.47722062", "0.4771044", "0.4762653", "0.474534" ]
0.6130181
0
conditional performers are never scoped
public boolean isDepartmentScoped() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasIsPerformOf();", "private static UnaryPredicate bepred() {\n return new UnaryPredicate() {\n public boolean execute(Object o) {\n\tif (o instanceof BulkEstimate) {\n\t return ((BulkEstimate)o).isComplete();\n }\n\treturn false;\n }\n };\n }", "@Override\n\tprotected ProducedData performs() {\n\t\treturn null;\n\t}", "private boolean shouldApply() {\n return nextRandomInt() >= unappliedJobCutoff;\n }", "private CheckedConditionRunnable decorate(CheckedConditionRunnable r) {\n return c -> {\n // make sure that this thread has no permit (from a prior or racing call to unpark) so it\n // won't spuriously wake-up below\n LockSupport.parkNanos(100);\n lock.lock();\n try {\n r.run(c);\n } finally {\n lock.unlock();\n }\n };\n }", "public void prePerform() {\n // nothing to do by default\n }", "boolean hasEstimator();", "protected void runBeforeIteration() {}", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "protected void runBeforeIterations() {}", "protected abstract boolean useReasoner();", "public boolean nextConditionMet() {\n return true;\n }", "public void initialExecutionResourcesExhausted() {\n \n \t\t// if (this.environment.getExecutingThread() != Thread.currentThread()) {\n \t\t// throw new ConcurrentModificationException(\n \t\t// \"initialExecutionResourcesExhausted must be called from the task that executes the user code\");\n \t\t// }\n \n \t\t// Construct a resource utilization snapshot\n \t\tfinal long timestamp = System.currentTimeMillis();\n \t\t// Get CPU-Usertime in percent\n \t\tThreadMXBean threadBean = ManagementFactory.getThreadMXBean();\n \t\tlong userCPU = (threadBean.getCurrentThreadUserTime() / NANO_TO_MILLISECONDS) * 100\n \t\t\t/ (timestamp - this.startTime);\n \n \t\t// collect outputChannelUtilization\n \t\tfinal Map<ChannelID, Long> channelUtilization = new HashMap<ChannelID, Long>();\n \t\tlong totalOutputAmount = 0;\n \t\tfor (int i = 0; i < this.environment.getNumberOfOutputGates(); ++i) {\n \t\t\tfinal OutputGate<? extends Record> outputGate = this.environment.getOutputGate(i);\n \t\t\tfor (int j = 0; j < outputGate.getNumberOfOutputChannels(); ++j) {\n \t\t\t\tfinal AbstractOutputChannel<? extends Record> outputChannel = outputGate.getOutputChannel(j);\n \t\t\t\tchannelUtilization.put(outputChannel.getID(),\n \t\t\t\t\tLong.valueOf(outputChannel.getAmountOfDataTransmitted()));\n \t\t\t\ttotalOutputAmount += outputChannel.getAmountOfDataTransmitted();\n \t\t\t}\n \t\t}\n \t\tlong totalInputAmount = 0;\n \t\tfor (int i = 0; i < this.environment.getNumberOfInputGates(); ++i) {\n \t\t\tfinal InputGate<? extends Record> inputGate = this.environment.getInputGate(i);\n \t\t\tfor (int j = 0; j < inputGate.getNumberOfInputChannels(); ++j) {\n \t\t\t\tfinal AbstractInputChannel<? extends Record> inputChannel = inputGate.getInputChannel(j);\n \t\t\t\tchannelUtilization.put(inputChannel.getID(),\n \t\t\t\t\tLong.valueOf(inputChannel.getAmountOfDataTransmitted()));\n \t\t\t\ttotalInputAmount += inputChannel.getAmountOfDataTransmitted();\n \n \t\t\t}\n \t\t}\n \t\tBoolean force = null;\n \n \t\tif (this.environment.getInvokable().getClass().isAnnotationPresent(Stateful.class)\n \t\t\t&& !this.environment.getInvokable().getClass().isAnnotationPresent(Stateless.class)) {\n \t\t\t// Don't checkpoint statefull tasks\n \t\t\tforce = false;\n \t\t} else {\n \t\t\t// look for a forced decision from the user\n \t\t\tForceCheckpoint forced = this.environment.getInvokable().getClass().getAnnotation(ForceCheckpoint.class);\n \t\t\tif (forced != null) {\n \t\t\t\tforce = forced.checkpoint();\n \t\t\t}\n \t\t}\n \t\tfinal ResourceUtilizationSnapshot rus = new ResourceUtilizationSnapshot(timestamp, channelUtilization, userCPU,\n \t\t\tforce, totalInputAmount, totalOutputAmount);\n \n \t\t// Notify the listener objects\n \t\tfinal Iterator<ExecutionListener> it = this.registeredListeners.iterator();\n \t\twhile (it.hasNext()) {\n \t\t\tit.next().initialExecutionResourcesExhausted(this.environment.getJobID(), this.vertexID, rus);\n \t\t}\n \n \t\t// Finally, propagate event to the job manager\n \t\tthis.taskManager.initialExecutionResourcesExhausted(this.environment.getJobID(), this.vertexID, rus);\n \t}", "public static void main(String[] agrs) {\n\t\tconditionalOperEx();\r\n\t}", "private void runBest() {\n }", "public boolean emprunter() {\n // TODO: implement\n return false;\n }", "public void intermediateProcessing() {\n //empty\n }", "@Override\n\t\tpublic boolean shouldContinueExecuting() {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isDone() {\n // boolean result = true;\n // try {\n // result = !evaluateCondition();\n // } catch (Exception e) {\n // logger.error(e.getMessage(), e);\n // }\n // setDone(true);\n // return result;\n // setDone(false);\n return false;\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n protected boolean runInEQ() {\n return true;\n }", "private ForwardingObjective preProcessVersatile(ForwardingObjective fwd) {\n if (fwd.treatment().clearedDeferred()) {\n // First we create a new treatment without the unsupported action\n TrafficTreatment.Builder noClearTreatment = DefaultTrafficTreatment.builder();\n fwd.treatment().allInstructions().forEach(noClearTreatment::add);\n // Then we create a new forwarding objective without the unsupported action\n ForwardingObjective.Builder noClearFwd = DefaultForwardingObjective.builder(fwd);\n noClearFwd.withTreatment(noClearTreatment.build());\n // According to the operation we substitute fwd with the correct objective\n switch (fwd.op()) {\n case ADD:\n fwd = noClearFwd.add(fwd.context().orElse(null));\n break;\n case REMOVE:\n fwd = noClearFwd.remove(fwd.context().orElse(null));\n break;\n default:\n log.warn(\"Unknown operation {}\", fwd.op());\n }\n }\n return fwd;\n }", "protected Object subEval(EvalContext ctx, boolean forValue) {\n T.fail(\"A DelayedExpr isn't eval-able\");\n return null; //make compiler happy\n }", "boolean isEvaluable();", "protected abstract T criterion(Result r);", "@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t\n\t\t\t}", "boolean isSkipCalculations();", "private boolean shouldStopBeingCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount >= this.combatEngineerTriggerPercentageCancel;\r\n\t}", "@Override\r\n\tpublic void internalWorked(double work) {\n\r\n\t}", "private interface CheckedConditionRunnable {\n void run(Condition c) throws Exception;\n }", "private static boolean hasCapacityForMultiEvaluation() {\n // return true;\n int threshold = 3;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return available >= threshold;\n }", "public void performAbility() { return; }", "public boolean offForEvaluation();", "@Override\r\n\tpublic boolean CheckConditions() {\n\t\treturn true;\r\n\t}", "@Override\n public boolean needsTransitiveClosureForEvaluation() {\n for(Object matcher : this.matchers){\n if(GenericMatcherMultiSourceCaller.needsTransitiveClosureForEvaluation(matcher))\n return true;\n }\n return false;\n }", "private boolean hasWaiters()\r\n/* 438: */ {\r\n/* 439:526 */ return this.waiters > 0;\r\n/* 440: */ }", "boolean shouldRescore() {\n return false;\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tno();\n\t\t\t\t}", "@Override\n\tpublic boolean evaluar(Calculable cal) {\n\t\treturn false;\n\t}", "boolean precondition(Skill castSkill, Creature performer, Creature target) {\n/* 76 */ return false;\n/* */ }", "private void checkCrossThreads() {\t\r\n\t\t\tisJumppingBetweenThreads = (currentThread != Thread.currentThread());\r\n\t\t}", "boolean hasSharedCriterion();", "public abstract String\n conditional();", "condition getConditionAllocution();", "protected abstract void preRun();", "boolean getProbables();", "private interface CheckedConditionWaiter {\n boolean run(Condition c, AtomicBoolean b) throws Exception;\n }", "public void testEvaluateAllChildrenWithoutSubController() throws Exception {\n LoopController controller = new LoopController();\n controller.setLoops(2);\n controller.addTestElement(new TestSampler(\"Sample1\"));\n IfController ifCont = new IfController(\"true==true\");\n ifCont.setEvaluateAll(true);\n controller.addTestElement(ifCont);\n \n ifCont.addTestElement(new TestSampler(\"Sample2\"));\n TestSampler sample3 = new TestSampler(\"Sample3\"); \n ifCont.addTestElement(sample3);\n TestSampler sample4 = new TestSampler(\"Sample4\");\n ifCont.addTestElement(sample4);\n \n String[] order = new String[] { \"Sample1\", \"Sample2\", \"Sample3\", \n \"Sample1\", \"Sample2\", \"Sample3\" };\n int counter = 0;\n+ controller.initialize();\n controller.setRunningVersion(true);\n ifCont.setRunningVersion(true);\n \n Sampler sampler = null;\n while ((sampler = controller.next()) != null) {\n sampler.sample(null);\n if (sampler.getName().equals(\"Sample3\")) {\n ifCont.setCondition(\"true==false\");\n }\n assertEquals(order[counter], sampler.getName());\n counter++;\n }\n assertEquals(counter, 6);\n }", "private void doStuff() {\n if (shouldContinue == false) {\n stopSelf();\n return;\n }\n\n // continue doing something\n\n // check the condition\n if (shouldContinue == false) {\n stopSelf();\n return;\n }\n\n // put those checks wherever you need\n }", "public baseRunnableCondition() {\r\n }", "boolean hasAutomatic();", "boolean isImmediate();", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "public interface Worker {\n\n\tvoid activate(String filteredClassValue);\n\n\tvoid stop();\n\n}", "default boolean pollOnExecutionFailed() {\n return false;\n }", "Reference getPerformer();", "public boolean operationWaiting(){\n\t\tif (var2Set) return true; else return false;\n\t}", "public boolean isExecuting(){\n return !pausing;\n }", "protected boolean isRateRunnerEnabled() {\r\n\t\tDescription description = getDescription();\r\n\t\treturn description.testCount() > 1 && isRepeatRunnerEnabled();\r\n\t}", "Conditional createConditional();", "@Override\r\n\tpublic void executer() {\n\t}", "private static boolean isReadyForUse(IReasoner reasoner) {\r\n boolean result = false;\r\n if (null != reasoner) {\r\n ReasonerDescriptor desc = reasoner.getDescriptor();\r\n if (null != desc) {\r\n result = desc.isReadyForUse();\r\n }\r\n }\r\n return result;\r\n }", "default boolean isSharded() {\n return false;\n }", "public boolean isPrefetch ();", "@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}", "boolean doFilter() { return false; }", "public boolean shouldContinueExecuting()\n {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "@Override\n\t\tpublic void internalWorked(double arg0) {\n\n\t\t}", "protected final boolean exec()\n/* */ {\n/* 731 */ compute();\n/* 732 */ return false;\n/* */ }", "private boolean shouldBecomeCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount <= this.combatEngineerTriggerPercentageEnroll;\r\n\t}", "public void logic(){\r\n\r\n\t}", "public abstract Boolean isImportant();", "@Override\n\tpublic boolean postIt() {\n\t\treturn false;\n\t}", "public interface IAutonomousRunner {\n <T> void runSingleAutonomousTx(\n RequestContext ctx,\n int expectedTotal, // expected total number of records (Collections.size())\n Iterable<T> iterable, // provider of loop variables\n Function<T, RequestParameters> requestProvider, // converts a loop variable to a request\n Consumer<StatisticsDTO> logEnhancer, // optional (may be null): enhances the statistics output (set info1...)\n String processId // processId of the statistics log\n );\n}", "boolean hasCondition();", "public void perform(String performer, String instrument) {\n\t}", "private boolean canRedo() {\n return !frozen && !future.isEmpty();\n }", "private void processWTBy(WasTriggeredBy dep) {\n\n\t}", "private boolean canRunTowerImmediateEffects(Player player, int floor){\n List<DevelopmentCard> developmentCards = player.getPersonalBoard().getCards(DevelopmentCardColor.BLUE);\n for(DevelopmentCard developmentCard : developmentCards)\n if (developmentCard.getPermanentEffect() instanceof EffectNoBonus){\n EffectNoBonus effectNoBonus = (EffectNoBonus) developmentCard.getPermanentEffect();\n for (Integer towerFloor : effectNoBonus.getFloors())\n if (towerFloor == floor)\n return true;\n\n }\n return false;\n }", "@Override\n public boolean applies() {\n return true;\n }", "public boolean isSleepingIgnored ( ) {\n\t\treturn extract ( handle -> handle.isSleepingIgnored ( ) );\n\t}", "private boolean scanPreconditions()\n\t\t{\n\t\t\tboolean statusChanged = false;\n\t\t\t\n\t\t\t//Conditional activity\n\t\t\tif(TravelToCustomer.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTravelToCustomer act = new TravelToCustomer(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Travel to Customer. \");\n\t\t\t}\n\t\t\t\n\t\t\tif(TakingLunch.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTakingLunch act = new TakingLunch(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Take Lunch. \");\n\t\t\t}\n\t\t\t\n\t\t\t// Do not change the status if already true\n\t\t\tif(statusChanged) scanInterruptPreconditions();\n\t\t\telse statusChanged = scanInterruptPreconditions();\n\t\t\treturn(statusChanged);\n\t\t}", "public boolean shouldContinueExecuting() {\n return ShulkerEntity.this.getAttackTarget() == null && this.peekTime > 0;\n }", "public boolean usesAniThread() {\r\n\t\treturn false;\r\n\t}", "public default boolean needsReagents()\r\n\t{\r\n\t\tfor(ItemStack stack : getReagents()) if(!stack.isEmpty()) return true;\r\n\t\treturn true;\r\n\t}", "private boolean useCurrentThread(List<String> dependedKeyList) {\n if (dependedKeyList.size() <= 0) {\n return false;\n }\n for (String deptKey : dependedKeyList) {\n if (dag.getFollowingKey(deptKey).size() > 1) {\n return false;\n }\n }\n return true;\n }", "protected void additionalProcessing() {\n\t}", "public Object getCondition();", "public boolean shouldContinueExecuting() {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "@Override\n public boolean isWithForOn() {\n return true;\n }", "protected void internalRun() {\n work();\n }", "@Override\n\tpublic void additionalWeightWork() {\n\t\t\n\t}", "private void functionalInterfacesForBoolean() {\n BooleanSupplier b1 = () -> true;\n BooleanSupplier b2 = () -> Math.random() > .5;\n }", "public interface Performer {\n void perform() throws PerformerException;\n}", "public abstract boolean isConsumed();", "private void evaluateProbabilities()\n\t{\n\t}", "public interface Evaluable<T> {\n /**\n * Evaluates target to a boolean value.\n * @param target an evaluable target\n * @return Evaluated result of the target\n */\n boolean evaluate(T target);\n}", "public boolean isDeferred();", "private boolean isExhausted() {\n return runnableTasks.isEmpty()\n && runnableActions.isEmpty() && runningTasks == 0;\n }", "protected void evaluateConditions()\n {\n ensureConditionContinuity() ;\n checkComponentList() ;\n\n for ( int liCondCtr = 1 ; liCondCtr <= 5 ; liCondCtr++ )\n {\n checkCondition( liCondCtr ) ;\n } /* end for */\n\n }", "private static boolean killAllWorkersExceptItself() {\n\t\treturn false;\n\t\t\n\t}" ]
[ "0.56825435", "0.55225253", "0.54152435", "0.5385247", "0.5376429", "0.5338857", "0.5325305", "0.5324536", "0.53067684", "0.5298179", "0.52637166", "0.52374524", "0.5195529", "0.51865506", "0.5186368", "0.5165001", "0.5150288", "0.514736", "0.5138366", "0.51203966", "0.51175356", "0.5078544", "0.5074819", "0.506646", "0.50626665", "0.50499535", "0.5036716", "0.5033129", "0.50282025", "0.5022606", "0.5019223", "0.50020176", "0.49987486", "0.49883416", "0.49736404", "0.49691188", "0.4968302", "0.49647743", "0.49588102", "0.49537897", "0.4953281", "0.4951106", "0.49503326", "0.4943926", "0.4933145", "0.49288392", "0.4920288", "0.49199665", "0.49063107", "0.49043065", "0.4902463", "0.49016118", "0.48966807", "0.48892903", "0.48869655", "0.4886559", "0.48848966", "0.48791423", "0.48727804", "0.48703173", "0.48693657", "0.48687655", "0.4867819", "0.48675746", "0.48602438", "0.48553985", "0.48502988", "0.48488206", "0.4839775", "0.48388088", "0.48352724", "0.48305494", "0.48295054", "0.48295018", "0.48052627", "0.48026317", "0.48010576", "0.47998616", "0.47975713", "0.47957858", "0.4793943", "0.47914523", "0.47912458", "0.47880608", "0.47843224", "0.47755647", "0.47727552", "0.47698528", "0.47609097", "0.47591066", "0.47588995", "0.47582555", "0.47574073", "0.475639", "0.47548804", "0.4753879", "0.47538173", "0.47527137", "0.4752697", "0.47513756", "0.47493786" ]
0.0
-1
Populates the app bar with the menu.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu, menu); return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "public void updateMenus() {\n\t\tSystem.out.println(\"BarGraphDisplayer.updateMenus\");\n\t\tCommandRegistrar.gRegistrar.checkAction(\"barGraph\");\n\t\tCommandRegistrar.gRegistrar.enableAction(\"viewOptions\");\n\t}", "protected void fillMenuBar(IMenuManager menuBar){\n\t\tIWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();\n\t\tmenuBar.add(createFileMenu(window));\n\t\tmenuBar.add(createEditMenu());\n\t\tmenuBar.add(ToolsBoxFonctions.createToolBoxMenu(window));\n\t\tmenuBar.add(createHelpMenu(window));\n\t}", "private void initMenubar() {\r\n\t\tsetJMenuBar(new MenuBar(controller));\r\n\t}", "private void initializeAppBar() {\n Toolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n ActionBar actionbar = getSupportActionBar();\n actionbar.setDisplayHomeAsUpEnabled(true);\n actionbar.setHomeAsUpIndicator(R.drawable.ic_menu_black_24dp);\n }", "public void createMenu() {\n\t\tmenuBar.add(createGameMenuColumn());\n\t\tmenuBar.add(createTestsMenuColumn());\n\t\tmenuBar.add(createCheatsMenuColumn());\n\n\t\tparentMainView.setJMenuBar(menuBar);\n\t}", "MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "private void contributeToActionBars() {\n\t\tIActionBars bars = getViewSite().getActionBars();\n\t\tfillLocalPullDown(bars.getMenuManager());\n\t\tfillLocalToolBar(bars.getToolBarManager());\n\t}", "private void buildMenuBar(){\n //Create the manu bar\n menuBar = new JMenuBar();\n \n //Create the file and run menus\n buildFileMenu();\n buildViewMenu();\n \n //Add the file and run menus to the menu bar\n menuBar.add(fileMenu);\n menuBar.add(viewMenu);\n \n //Set the window's menu bar\n setJMenuBar(menuBar);\n }", "private void initializeMenuBar() {\n\t\tthis.hydraMenu = new HydraMenu(this.commands);\n\t\tthis.setJMenuBar(this.hydraMenu);\n\t}", "protected void setContents() {\n\tactionBar.setHomeAction(homeAction);\r\n\tactionBar.setDisplayHomeAsUpEnabled(true);\r\n\tactionBar.addAction(shareAction);\r\n\tactionBar.addAction(otherAction);\r\n }", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "private void buildJMenuBar() {\r\n // create Menu Bar\r\n gameBar = new JMenuBar();\r\n\r\n buildGameMenu();\r\n buildSettingsMenu();\r\n\r\n gameBar.add( gameMenu );\r\n gameBar.add( settingsMenu );\r\n }", "private void loadAppBar()\n\t{\n\t\tLayoutInflater inflator=(LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView v = inflator.inflate(R.layout.search_page_header, null);\n\t\t\t\n\t\tActionBar mActionBar = getActionBar();\n\t\tmActionBar.setDisplayShowHomeEnabled(false);\n\t\tmActionBar.setDisplayShowTitleEnabled(false);\n\t\tmActionBar.setDisplayUseLogoEnabled(false);\n\t\tmActionBar.setDisplayShowCustomEnabled(true);\n\t\tmActionBar.setCustomView(v);\n\t\tif (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n\t\t\ttry{\n\t\t\t\tToolbar parent = (Toolbar) v.getParent(); \n\t\t\t\tparent.setContentInsetsAbsolute(0, 0);\n\t\t\t} catch(ClassCastException e) {\n\t\t\t\te.printStackTrace(); \n\t\t\t}\n\t\t}\n\t\t\n\t\tImageView menuBtn \t= (ImageView) v.findViewById(R.id.iv_menu_btn);\n\t\tImageView ivLogo\t\t= (ImageView) v.findViewById(R.id.iv_logo);\n\t\tImageButton ibHome = (ImageButton) v.findViewById(R.id.ib_home);\n\t\t\n\t\tibHome.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tfinish();\n\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tstartActivity(home);\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tivLogo.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t\n\t\tmenuBtn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void initMenuBar() {\n\t\t// Menu Bar\n\t\tmenuBar = new JMenuBar();\n\t\tgameMenu = new JMenu(\"Boggle\");\n\t\tgameMenu.setMnemonic('B');\n\t\tmenuBar.add(gameMenu);\n\t\tthis.setJMenuBar(menuBar);\n\t\t\n\t\t// New Game\n\t\tnewGame = new JMenuItem(\"New Game\");\n\t\tnewGame.setMnemonic('N');\n\t\tnewGame.addActionListener(new NewGameListener());\n\t\tgameMenu.add(newGame);\n\t\t\n\t\t// Exit Game\n\t\texitGame = new JMenuItem(\"Exit Game\");\n\t\texitGame.setMnemonic('E');\n\t\texitGame.addActionListener(new ExitListener());\n\t\tgameMenu.add(exitGame);\n\t}", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_app_bar, menu);\n return true;\n }", "public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuItem(\"Exit \");\n\t\tJMenuItem preferences = new JMenuItem(\"Preferences \");\n\t\tJMenuItem about = new JMenuItem(\"About \");\n\n\n\t\tfile.add(open);\n\t\tfile.add(save);\n\t\tfile.addSeparator();\n\t\tfile.add(exit);\n\t\ttools.add(preferences);\n\t\thelp.add(about);\n\n\t\tmenuBar.add(file);\n\t\tmenuBar.add(tools);\n\t\tmenuBar.add(help);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n getMenuInflater().inflate(R.menu.app_bar_menu, menu);\n return true;\n }", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }", "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "private void initializeMenuBar()\r\n\t{\r\n\t\tJMenuBar menuBar = new SmsMenuBar(this);\r\n\t\tsetJMenuBar(menuBar);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\n\t}", "private void createMenuBar(){\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\t//Create the \"File\" menu\n\t\tthis.createFileMenu();\n\t\tmenuBar.add(fileMenu);\n\t\t\t\t\n\t\t//Create \"debug\" menu[disabled]\n\t\t//createDebugMenu();\t\t\n\t\t\n\t\t//last to be added to the menubar: about\n\t\tabout = new JMenuItem(\"About\");\n\t\tabout.addActionListener(this);\n\t\tmenuBar.add(about);\n\t}", "public boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\tActionBar action = getActionBar();\n\t\taction.setBackgroundDrawable(new ColorDrawable(Color.rgb(51, 102, 153)));\n\t\taction.setTitle(\"RollBook App\");\n\t\t\n\t\t\n\t\treturn true;\n\t}", "protected void initActionBar() {\n\t\tActionBar actionBar = this.getActionBar();\r\n\t\tactionBar.setDisplayHomeAsUpEnabled(IsCanBack());\r\n\t\tactionBar.setTitle(getActionBarTitle());\r\n\t}", "protected void refreshActionBar() {\n if (mActionBarController != null) {\n mActionBarController.refresh();\n }\n mActivity.invalidateOptionsMenu();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(0, 0, 0, \"Refresh\");\n return super.onCreateOptionsMenu(menu);\n }", "private void setupActionBar() {\n\n setTitle(getString(R.string.new_pub_activity_title));\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n final ActionBar actionBar = getSupportActionBar();\n if (actionBar != null)\n actionBar.setDisplayHomeAsUpEnabled(true);\n }", "public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }", "private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }", "private void createMenuBar() {\n\t\tmenuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(\"Arquivo\");\n\t\tnewMenuItem = new JMenuItem(\"Novo\");\n\n\t\topenMenuItem = new JMenuItem(\"Abrir arquivo\");\n\t\topenMenuItem.addActionListener(new OpenFileHandler());\n\n\t\tsaveMenuItem = new JMenuItem(\"Salvar arquivo\");\n\t\texportMenuItem = new JMenuItem(\"Exportar\");\n\t\texitMenuItem = new JMenuItem(\"Sair\");\n\n\t\t// fileMenu.add(newMenuItem);\n\t\tfileMenu.add(openMenuItem);\n\t\t// fileMenu.add(saveMenuItem);\n\t\t// fileMenu.add(exportMenuItem);\n\t\t// fileMenu.addSeparator();\n\t\t// fileMenu.add(exitMenuItem);\n\n\t\thelpMenu = new JMenu(\"Ajuda\");\n\t\thelpMenuItem = new JMenuItem(\"Ajuda\");\n\t\taboutMenuItem = new JMenuItem(\"Sobre\");\n\n\t\thelpMenu.add(helpMenuItem);\n\t\thelpMenu.add(aboutMenuItem);\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(helpMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }", "@Override public boolean onCreateOptionsMenu(Menu menu)\n\t{\n\t\tgetMenuInflater().inflate(R.menu.ui_mainframe, menu);\n\t\treturn true;\n\t}", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "public void refreshMenu() {\n\t\tthis.Menu.setSize(this.Menu.getWidth(), this.Items.size() * (this.textSize + 4) + 4);\r\n\t\tthis.Menu.Camera.setPosition(0, 0);\r\n\t\tthis.anchorX();\r\n\t\tthis.anchorY();\r\n\t\t//println(\"----------\");\r\n\t\tthis.Menu.reposition((int) menuAnchor.x, (int) menuAnchor.y);\r\n\r\n\t\tfor (uTextButton t : this.Items) {\r\n\t\t\tt.setPosition(t.getX(), (this.Items.indexOf(t) * t.getHeight()));\r\n\t\t}\r\n\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n //Add any device elements we've discovered to the overflow menu\n for (int i=0; i < mDevices.size(); i++) {\n BluetoothDevice device = mDevices.valueAt(i);\n menu.add(0, mDevices.keyAt(i), 0, device.getName());\n }\n\n return true;\n }", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_bar, menu);\n return true;\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(1, 1, 1, (getString(R.string.app_name)));\r\n\t\tmenu.add(2, 2, 2, (getString(R.string.action_settings)));\r\n\t\treturn true;\r\n\t}", "protected void setupActionBar() {\n setTitle();\n setSutTitle();\n setIcon();\n setHomeAsUp(mCallback.getHomeButtonStyle() == HomeButtonStyle.SHOW_HOME_AS_UP);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n //add MenuItem(s) to ActionBar using Java code\n MenuItem menuItem_Purchase = menu.add(0, 1, Menu.NONE, \"Next\");\n MenuItemCompat.setShowAsAction(menuItem_Purchase,\n MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);\n\n //Log.d(\"recon\", savedSite.toString());\n return true;\n }", "public void setup() {\n\n // configura il navigator in base alla MenuBar\n nav.configureFromMenubar(menuBar);\n\n // manda il navigatore alla prima view\n Collection<MenuBar.MenuItem> coll = mappaItem.values();\n MenuBar.MenuItem[] items = coll.toArray(new MenuBar.MenuItem[0]);\n if (items.length>0){\n MenuBar.MenuItem item = items[0];\n MenuCommand mcmd = (MenuCommand)item.getCommand();\n String addr = mcmd.getNavigatorAddress();\n nav.navigateTo(addr);\n }\n }", "private MenuManager() {\r\n\r\n\t\t\tmenubar = new Menu(shell, SWT.BAR);\r\n\t\t\tshell.setMenuBar(menubar);\r\n\t\t}", "private JMenuBar createMenuBar(){\n\n MenuBarHandler menuBarHandler = new MenuBarHandler();\n JMenuBar menuBar = new JMenuBar();\n JMenu application = new JMenu(\"Application\");\n application.setMnemonic(KeyEvent.VK_A);\n JMenu view = new JMenu(\"View\");\n view.setMnemonic(KeyEvent.VK_V);\n JMenu help = new JMenu(\"Help\");\n help.setMnemonic(KeyEvent.VK_H);\n menuBar.add(application);\n menuBar.add(view);\n menuBar.add(help);\n JMenuItem options = new JMenuItem(\"Options\", KeyEvent.VK_O);\n JMenuItem exit = new JMenuItem(\"Exit\", KeyEvent.VK_E);\n application.add(options);\n options.addActionListener(menuBarHandler);\n application.add(exit);\n exit.addActionListener(menuBarHandler);\n JMenuItem toggleFullScreen = new JMenuItem(\"Toggle Full Screen\", KeyEvent.VK_T);\n JMenuItem toggleSideBar = new JMenuItem(\"Toggle Sidebar\", KeyEvent.VK_O);\n view.add(toggleFullScreen);\n toggleFullScreen.addActionListener(menuBarHandler);\n view.add(toggleSideBar);\n toggleSideBar.addActionListener(menuBarHandler);\n JMenuItem about = new JMenuItem(\"About\", KeyEvent.VK_A);\n JMenuItem helpItem = new JMenuItem(\"Help\", KeyEvent.VK_H);\n KeyStroke ctrlS = KeyStroke.getKeyStroke(\"control S\");\n toggleSideBar.setAccelerator(ctrlS);\n help.add(about);\n about.addActionListener(menuBarHandler);\n help.add(helpItem);\n helpItem.addActionListener(menuBarHandler);\n return menuBar;\n }", "private void setUpMenuBar() {\r\n\t\t// Create menu bar.\r\n\t\tthis.menuBar = new JMenuBar();\r\n\t\t\r\n\t\t// Create each sub-menu in the menu bar\r\n\t\tthis.setUpMenuBar_FileMenu();\r\n\t\t//this.setUpMenuBar_ZoomMenu();\r\n\t\tthis.setUpMenuBar_CompareMenu();\t\r\n\t\tthis.pictureFrame.setJMenuBar(menuBar);\r\n\t}", "private void initializeActionbar() {\n toolbar = binding.toolbar;\n Objects.requireNonNull(toolbar).setTitle(R.string.navigation_my_pets);\n setSupportActionBar(toolbar);\n ActionBar actionBar = getSupportActionBar();\n Objects.requireNonNull(actionBar).setDisplayHomeAsUpEnabled(true);\n }", "@TargetApi(14)\r\n private void initActionBar()\r\n {\r\n try\r\n {\r\n ActionBar bar = getActionBar();\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME);\r\n\r\n if (DisplayUtils.hasCentralPane(this))\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_USE_LOGO, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n else\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n\r\n if (AndroidVersion.isICSOrAbove())\r\n {\r\n bar.setHomeButtonEnabled(true);\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n Log.e(TAG, Log.getStackTraceString(e));\r\n }\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.vendor_newlead_bar, menu);\n return true;\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "private void makeMenuBar() {\n final int SHORTCUT_MASK =\n Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();\n\n JMenuBar menubar = new JMenuBar();\n setJMenuBar(menubar);\n\n JMenu menu;\n JMenuItem item;\n\n // create the File menu\n menu = new JMenu(\"File\");\n menubar.add(menu);\n\n item = new JMenuItem(\"Quit\");\n item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, SHORTCUT_MASK));\n item.addActionListener(e -> quit());\n menu.add(item);\n\n // create the Help menu\n menu = new JMenu(\"Help\");\n menubar.add(menu);\n\n item = new JMenuItem(\"About TalkBox...\");\n item.addActionListener(e -> showAbout());\n menu.add(item);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu appMenu)\n\t{\n\t\tsuper.onCreateOptionsMenu(appMenu);\n\t\treturn visitor.populateMenu(appMenu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "private JMenuBar createMenuBar()\r\n {\r\n UIManager.put(\"Menu.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.LIGHT_GRAY);\r\n JMenuBar menuBar = new JMenuBar();\r\n JMenu menu = new JMenu(\"Fil\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menu.getBackground());\r\n menuItemSave = new JMenuItem(\"Lagre\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menuItemSave.getBackground());\r\n menuItemSave.setForeground(Color.LIGHT_GRAY);\r\n menuItemSave.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemSave.setAccelerator(KeyStroke.getKeyStroke('S', Event.CTRL_MASK));\r\n menuItemSave.addActionListener(listener);\r\n menu.add(menuItemSave);\r\n menuItemPrint = new JMenuItem(\"Skriv ut\");\r\n menuItemPrint.setForeground(Color.LIGHT_GRAY);\r\n menuItemPrint.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemPrint.setAccelerator(KeyStroke.getKeyStroke('P', Event.CTRL_MASK));\r\n menuItemPrint.addActionListener(listener);\r\n menu.add(menuItemPrint);\r\n menu.addSeparator();\r\n menuItemLogout = new JMenuItem(\"Logg av\");\r\n menuItemLogout.setForeground(Color.LIGHT_GRAY);\r\n menuItemLogout.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemLogout.addActionListener(listener);\r\n menuItemLogout.setAccelerator(KeyStroke.getKeyStroke('L', Event.CTRL_MASK));\r\n menu.add(menuItemLogout);\r\n UIManager.put(\"MenuItem.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.BLACK);\r\n menuItemClose = new JMenuItem(\"Avslutt\");\r\n menuItemClose.setAccelerator(KeyStroke.getKeyStroke('A', Event.CTRL_MASK));\r\n menuItemClose.addActionListener(listener);\r\n menuBar.add(menu);\r\n menu.add(menuItemClose);\r\n JMenu menu2 = new JMenu(\"Om\");\r\n menuItemAbout = new JMenuItem(\"Om\");\r\n menuItemAbout.setAccelerator(KeyStroke.getKeyStroke('O', Event.CTRL_MASK));\r\n menuItemAbout.addActionListener(listener);\r\n menuItemAbout.setBorder(BorderFactory.createEmptyBorder());\r\n menu2.add(menuItemAbout);\r\n menuBar.add(menu2);\r\n \r\n return menuBar;\r\n }", "private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }", "private void setupActionBar() {\n\t\tgetActionBar().setDisplayHomeAsUpEnabled(true);\n\t}", "void requestActionBar();", "private void setupMenu() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tJMenuItem conn = new JMenuItem(connectAction);\n\t\tJMenuItem exit = new JMenuItem(\"退出\");\n\t\texit.addActionListener(new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\texit();\n\t\t\t}\n\t\t});\n\t\tJMenu file = new JMenu(\"客户端\");\n\t\tfile.add(conn);\n\t\tmenuBar.add(file);\n\t\tsetJMenuBar(menuBar);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n MenuItem showSystemApps = menu.findItem(R.id.action_show_system_app);\n MenuItem showPackageName = menu.findItem(R.id.action_show_package_name);\n\n showSystemApps.setChecked(pref.getBoolean(Constants.KEY_SHOW_SYSTEM_APP, false));\n showPackageName.setChecked(pref.getBoolean(Constants.KEY_SHOW_PACKAGE_NAME, false));\n refresh(showSystemApps.isChecked());\n return true;\n }", "private void startMenuBar() no topo\n {\n //Inicializa a barra de menus\n JMenuBar menuBar = new JMenuBar();\n JMenu menuFile = new JMenu(\"File\");\n JMenu menuProgram = new JMenu(\"Program\");\n JMenuItem fileOpen = new JMenuItem(\"Open\");\n fileOpen.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n setFileName();\n }\n });\n menuFile.add(fileOpen);\n \n JMenuItem programClose = new JMenuItem(\"Close\");\n programClose.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n System.exit(0);\n }\n });\n menuProgram.add(programClose);\n \n menuBar.add(menuFile);\n menuBar.add(menuProgram);\n mainFrame.add(menuBar, BorderLayout.PAGE_START);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.addtitlebar, menu);\n return true;\n }", "private MenuBar getMenuBar() {\n MenuBar menuBar = new MenuBar();\n // setup File menu\n Menu fileMenu = new Menu(\"File\");\n fileMenu.getItems().addAll(\n getMenuItem(\"New\", event -> startGame()),\n getMenuItem(\"Quit\", event -> quitGame())\n );\n\n // setup Level menu\n Menu levelMenu = new Menu(\"Level\");\n\n // for radio menu items, ensures only\n // one is selected at a time.\n ToggleGroup group = new ToggleGroup();\n\n levelMenu.getItems().addAll(\n getRadioMenuItem(\n \"Beginner - 9x9\",\n true,\n group,\n event -> setGameLevel(GameLevel.BEGINNER)\n ),\n\n getRadioMenuItem(\n \"Intermediate - 16x16\",\n false,\n group,\n event -> setGameLevel(GameLevel.INTERMEDIATE)\n ),\n\n getRadioMenuItem(\n \"Expert - 24x24\",\n false,\n group,\n event -> setGameLevel(GameLevel.EXPERT))\n );\n\n menuBar.getMenus().addAll(fileMenu, levelMenu);\n\n return menuBar;\n }", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "private void setupAppBarConfiguration() {\n appBarConfiguration = new AppBarConfiguration.Builder(\n R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)\n .build();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n ActionBar bar = getActionBar();\n int color = Color.parseColor(\"#FF038f0d\");\n bar.setBackgroundDrawable(new ColorDrawable(color));\n return true;\n }", "private static JMenuBar menuMaker(){\n final JMenuBar menuBar = new JMenuBar();\n final JMenu menu = new JMenu(\"App\");\n menuBar.add(menu);\n menu.addSeparator();\n final JMenuItem menuItem;\n (menuItem = new JMenuItem(\"Exit\", 88)).addActionListener(p0 -> System.exit(0));\n menu.add(menuItem);\n final JMenu menu2;\n (menu2 = new JMenu(\"Item\")).setMnemonic(73);\n menuBar.add(menu2);\n menu2.addSeparator();\n final JMenu menu3 = new JMenu(\"Selected\");\n menu2.add(menu3);\n menu3.addSeparator();\n\n return menuBar;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.heropagetoolbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "public static void initMenuBars()\n\t{\n\t\tmenuBar = new JMenuBar();\n\n\t\t//Build the first menu.\n\t\tmenu = new JMenu(\"Options\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(menu);\n\n\t\t//a group of JMenuItems\n\t\tmenuItem = new JMenuItem(\"Quit\",\n\t\t KeyEvent.VK_T);\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmenuItem.getAccessibleContext().setAccessibleDescription(\n\t\t \"This doesn't really do anything\");\n\t\tmenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Both text and icon\",\n\t\t new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_B);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_D);\n\t\tmenu.add(menuItem);\n\n\t\t//a group of radio button menu items\n\t\tmenu.addSeparator();\n\t\tButtonGroup group = new ButtonGroup();\n\t\trbMenuItem = new JRadioButtonMenuItem(\"A radio button menu item\");\n\t\trbMenuItem.setSelected(true);\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_R);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\trbMenuItem = new JRadioButtonMenuItem(\"Another one\");\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_O);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\t//a group of check box menu items\n\t\tmenu.addSeparator();\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"A check box menu item\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_C);\n\t\tmenu.add(cbMenuItem);\n\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"Another one\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_H);\n\t\tmenu.add(cbMenuItem);\n\n\t\t//a submenu\n\t\tmenu.addSeparator();\n\t\tsubmenu = new JMenu(\"A submenu\");\n\t\tsubmenu.setMnemonic(KeyEvent.VK_S);\n\n\t\tmenuItem = new JMenuItem(\"An item in the submenu\");\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_2, ActionEvent.ALT_MASK));\n\t\tsubmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Another item\");\n\t\tsubmenu.add(menuItem);\n\t\tmenu.add(submenu);\n\n\t\t//Build second menu in the menu bar.\n\t\tmenu = new JMenu(\"Another Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_N);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"This menu does nothing\");\n\t\tmenuBar.add(menu);\n\t}", "public void initMenu(){\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "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}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "public void barraprincipal(){\n setJMenuBar(barra);\n //Menu archivo\n archivo.add(\"Salir del Programa\").addActionListener(this);\n barra.add(archivo);\n //Menu tareas\n tareas.add(\"Registros Diarios\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Ver Catalogo de Cuentas\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Empleados\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Productos\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Generacion de Estados Financieros\").addActionListener(this);\n barra.add(tareas);\n //Menu Ayuda\n ayuda.add(\"Acerca de...\").addActionListener(this);\n ayuda.addSeparator();\n barra.add(ayuda);\n //Para ventana interna\n acciones.addItem(\"Registros Diarios\");\n acciones.addItem(\"Ver Catalogo de Cuentas\");\n acciones.addItem(\"Empleados\");\n acciones.addItem(\"Productos\");\n acciones.addItem(\"Generacion de Estados Financieros\");\n aceptar.addActionListener(this);\n salir.addActionListener(this);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_actionbar, menu);\n return true;\n }", "private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\n return true;\n\n}", "private void initStatusBar() {\n ModelerSession.getStatusBarService().addStatusBarItem(\n getIdentifier(), selectedToolStatusBarItem, JideBoxLayout.FIX\n );\n }" ]
[ "0.69491893", "0.6706855", "0.6687225", "0.66856635", "0.66389626", "0.6597113", "0.6563062", "0.65503067", "0.6499654", "0.6467342", "0.64489", "0.64408606", "0.6435216", "0.6426224", "0.6425208", "0.64227134", "0.6413359", "0.6395337", "0.6378128", "0.6368701", "0.63636744", "0.6342539", "0.6330192", "0.6311702", "0.63104904", "0.6306531", "0.6293847", "0.6257813", "0.6245426", "0.6242039", "0.6233862", "0.6209385", "0.6199573", "0.6191004", "0.6184075", "0.6176887", "0.6161386", "0.6160679", "0.61576515", "0.61535454", "0.6153472", "0.6145088", "0.6144386", "0.6142905", "0.61372775", "0.61269003", "0.6118994", "0.6116612", "0.6115414", "0.6112093", "0.61069447", "0.61065763", "0.61041623", "0.6098548", "0.6089521", "0.60829407", "0.6082824", "0.6080079", "0.6075934", "0.6075197", "0.6074821", "0.6065492", "0.60634875", "0.60585237", "0.6058022", "0.6056673", "0.60553753", "0.6053461", "0.6052877", "0.60502046", "0.60389245", "0.60342264", "0.6026853", "0.60261494", "0.60233253", "0.6017351", "0.6015694", "0.60141057", "0.6004311", "0.59939945", "0.5989784", "0.59866166", "0.5981219", "0.5975816", "0.59725076", "0.5966771", "0.5959978", "0.59580034", "0.59538686", "0.59538686", "0.5945505", "0.5944652", "0.5933376", "0.5932528", "0.59314764", "0.5925229", "0.5923531", "0.5923136", "0.5918971", "0.591645", "0.5916255" ]
0.0
-1
Handles user clicks on menu items.
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_geolocate: // COMMENTED OUT UNTIL WE DEFINE THE METHOD // Present the current place picker pickCurrentPlace(); return true; case R.id.action_search: readyToSearch(); return true; default: // If we got here, the user's action was not recognized. // Invoke the superclass to handle it. return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onMenuItemClicked();", "public void menuItemClicked( Menu2DEvent e );", "public void menuClicked(MenuItem menuItemSelected);", "void clickAmFromMenu();", "void clickFmFromMenu();", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "public void list_of_menu_items() {\n\t\tdriver.findElement(open_menu_link).click();\n\t}", "abstract public boolean cabOnMenuItemClicked(ActionMode mode, MenuItem item);", "void clickItem(int uid);", "@Override\n\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\tint id = item.getItemId();\n\t\t\t\t\tIntent i;\n\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\tcase R.id.menu_add_new_list:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(getBaseContext(), MyMap.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_dashboard:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(MyMap.this, dashboard_main.class);\n\t\t\t\t\t\t\ti.putExtra(\"edit\", \"12344\");\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_login:\n\t\t\t\t\t\tif (bedMenuItem.getTitle().equals(\"Logout\")) {\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = getSharedPreferences(\"user\", MODE_PRIVATE).edit();\n\t\t\t\t\t\t\teditor.clear();\n\t\t\t\t\t\t\teditor.commit();\n\t\t\t\t\t\t\tbedMenuItem.setTitle(\"Login/Register\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tIntent i_user = new Intent(getBaseContext(), user_login.class);\n\t\t\t\t\t\t\tstartActivity(i_user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(true);\n\t\t\t}", "@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}", "@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}", "default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n //get item id to handle item clicks\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}", "@Override\n public void itemClick(int pos) {\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item)\n\t{\n\t\tsuper.onOptionsItemSelected(item);\n\t\treturn visitor.handleMenuItemSelection(item);\n\t}", "public void clickOnMenu() {\n\t\tgetAndroidmenubtn().isPresent();\n\t\tgetAndroidmenubtn().click();\n\t\twaitForPageToLoad();\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n //HouseKeeper handles menu item click event\n mHouseKeeper.onOptionsItemSelected(item);\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Class c = Methods.onOptionsItemSelected(id);\n if (c != null) {\n Intent intent = new Intent(getBaseContext(), c);\n startActivity(intent);\n }\n return super.onOptionsItemSelected(item);\n }", "public interface OnMenuClickListener {\n /**\n * When an item is clicked, informs with the id of the item, which is given while adding the\n * items.\n *\n * @param id The id of the item.\n */\n void onClick(int id);\n }", "@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mContext, holder.tv_option_menu);\n //inflating menu from xml resource\n popup.inflate(R.menu.menu_options);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu1:\n shareStories(headlinesList.get(position).getUrl());\n return true;\n case R.id.menu2:\n //handle menu2 click\n db.insertNote(headlinesList.get(position));\n return true;\n default:\n return false;\n }\n }\n });\n //displaying the popup\n popup.show();\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tIntent i;\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.menu_add_feed:\n\t\t\ti = new Intent(this, CreateContent.class);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n//\t\tcase R.id.menu_dummy:\n//\t\t\ti = new Intent(this, Dummy.class);\n//\t\t\tstartActivity(i);\n//\t\t\tbreak;\n\t\tcase R.id.menu_circles:\n\t\t\ti = new Intent(this, UserCircles.class);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\tcase R.id.menu_users:\n\t\t\ti = new Intent(this, UserList.class);\n\t\t\ti.putExtra(\"url\", \"http://rasp.jatinhariani.com/final/random_users.php\");\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\tcase R.id.menu_logout:\n\t\t\ti = new Intent(this, Login.class);\n\t\t\tstartActivity(i);\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public void onMenuClick() {\n Toast.makeText(SearchActivity_.this, \"Menu click\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic void clicked(ItemMenuIcon icon, Player p) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonMenu();\n\t\t\t}", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n if (menuItems.get(i).getMenuIndex() == 1){\n addBaby();\n }\n else {\n onBackPressed();\n }\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) \n\t{\n\t\tswitch(position)\n\t\t{\n\t\tcase 0:ActivityStarter(\"rahulapps.apihelp.Bluetooth.BluetoothMenu\");break;\n\t\tcase 1:ActivityStarter(\"rahulapps.apihelp.Wifi.WifiMenu\");break;\n\t\tcase 2:ActivityStarter(\"rahulapps.apihelp.Sensor.SensorMenu\");break;\n\t\tcase 3:ActivityStarter(\"rahulapps.apihelp.SplashActivity.SplashMenu\");break;\n\t\tcase 4:ActivityStarter(\"rahulapps.apihelp.Menus.MenuActivityMenu\");break;\n\t\tcase 5:ActivityStarter(\"rahulapps.apihelp.Speech.SpeechRecognitionMenu\");break;\n\t\tcase 6:ActivityStarter(\"rahulapps.apihelp.Graphs.GraphMenu\");break;\n\t\tcase 7:ActivityStarter(\"rahulapps.apihelp.Notifications.NotificationMenu\");break;\n\t\tcase 8:ActivityStarter(\"rahulapps.apihelp.FileIO.FileIOMenu\");break;\n\t\tcase 9:ActivityStarter(\"rahulapps.apihelp.Email.EmailMenu\");break;\n\t\tcase 10:ActivityStarter(\"rahulapps.apihelp.Camera.CameraMenu\");break;\n\t\t}\n\t}", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }", "@Override\n\t\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\t\tcase R.id.popup_reInfo:\n\t\t\t\t\t\t\tmainAct.ResetInfo(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_upload:\n\t\t\t\t\t\t\tmainAct.addImage(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_del:\n\t\t\t\t\t\t\tmainAct.delete(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "public void clickMenuButton(){\n waitForClickable(menuHeaderIcon);\n driver.findElement(menuHeaderIcon).click();\n }", "void issuedClick(String item);", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "private boolean handleMenuClick(MenuItem item, boolean defaultReturn) {\n\n switch (item.getItemId()) {\n\n // CASE HOME\n case android.R.id.home:\n // initiate back action\n ((AppCompatActivity)mActivity).getSupportFragmentManager().popBackStack();\n return true;\n\n // CASE ICON\n case R.id.menu_icon:\n // get system picker for images\n ((MainActivity)mActivity).pickImage(mThisStation);\n return true;\n\n // CASE RENAME\n case R.id.menu_rename:\n // construct and run rename dialog\n DialogRename dialogRename = new DialogRename(mActivity, mThisStation);\n dialogRename.show();\n return true;\n\n // CASE DELETE\n case R.id.menu_delete:\n // construct and run delete dialog\n DialogDelete dialogDelete = new DialogDelete(mActivity, mThisStation);\n dialogDelete.show();\n return true;\n\n // CASE SHORTCUT\n case R.id.menu_shortcut: {\n // create shortcut\n ShortcutHelper shortcutHelper = new ShortcutHelper(mActivity.getApplication().getApplicationContext());\n shortcutHelper.placeShortcut(mThisStation);\n return true;\n }\n\n // CASE DEFAULT\n default:\n return defaultReturn;\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.miCart:\n showCart();\n return true;\n case R.id.miUser:\n user();\n break;\n case R.id.miSignout:\n signout();\n break;\n default:\n return super.onOptionsItemSelected(item);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tIntent intent;\r\n\t switch (item.getItemId()) {\r\n\t case R.id.listaCursosItem:\r\n\t \tintent = new Intent(this, ListarCursos.class);\r\n\t \tstartActivity(intent);\r\n\t return true;\r\n\t case R.id.verNotasItem:\r\n\t \tintent=new Intent(this,VerNotas.class);\r\n\t \tstartActivity(intent);\r\n\t return true;\r\n\t case R.id.administrarCuentaItem:\r\n\t \tintent=new Intent(this,AdministrarCuenta.class);\r\n\t \tstartActivity(intent);\r\n\t \treturn true;\r\n\t case R.id.cerrarSesionItem:\r\n\t \tintent=new Intent(this,Login.class);\r\n\t \tstartActivity(intent);\r\n\t \treturn true;\r\n\t default:\r\n\t return super.onOptionsItemSelected(item);\r\n\t }\r\n\t}", "@Override\n public void OnItemClick(int position) {\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.badges) {\n\t\t\tgoToBadges(item.getActionView());\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}", "@Override\n public boolean onContextItemSelected(MenuItem item) {\n switch (item.getItemId()){\n\n case R.id.item_1:\n Toast.makeText(this, \"Item 1 Clicked\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.item_2:\n Toast.makeText(this, \"Item 2 clicked\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.item_3:\n Toast.makeText(this, \"Item 3 clicked\", Toast.LENGTH_SHORT).show();\n }\n return true;\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\n\t\tswitch (item.getItemId()) {\n\t\t\n\t\tdefault:\n\t\t\t\n\t\t\tbreak;\n\n\t\t}//switch (item.getItemId())\n\n\t\t\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\treturn onMenuItemSelected(item.getItemId());\r\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.log:\r\n \tIntent i = new Intent(this, LogItemsActivity.class);\r\n \t\tstartActivity(i);\r\n return true;\r\n case R.id.edit:\r\n \tIntent i1 = new Intent(this, EditItemsActivity.class);\r\n \tstartActivity(i1);\r\n return true;\r\n case R.id.stats:\r\n \tIntent i2 = new Intent(this, BarActivity.class);\r\n \t\tstartActivity(i2);\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n Block_Dialog();\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.refresh:\n this.onRestart();\n return true;\n case R.id.search: //Navigate to the search page\n intent = new Intent(this, GroupSearch.class);\n break;\n case R.id.create: //Navigate to the group creation page\n intent = new Intent(this, CreateGroup.class);\n break;\n case R.id.edit_profile: //Navigate to the edit user profile page\n intent = new Intent(this, EditUser.class);\n break;\n default: //Refresh the homepage\n intent = new Intent(this, Homepage.class);\n\n }\n this.startActivity(intent);\n return true;\n }", "@Override\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\tOptionsMenu.selectItem(item,getApplicationContext());\n\t\treturn super.onMenuItemSelected(featureId, item);\n\t}", "@Override\r\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\r\n // TODO Auto-generated method stub\r\n return false;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public void onItemClick(int pos) {\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n //Implement action listener on the menu buttons\n int itemId = item.getItemId();\n\n //Choose the appropriate action menu based on the button selected\n switch (itemId) {\n case R.id.action_open_save_list:\n openSaveList();\n break;\n case R.id.action_settings:\n openAppSettings();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }", "public void mouseClicked(MouseEvent e) { // Methode um MausEvent zu untersuchen\r\n\t\t\t\tclickCounter++;\r\n\t\t\t\tif (clickCounter % 2 == 0) { \r\n\t\t\t\t\tmenu.setVisible(false); // bei 2 klicks geht das menü wieder zu\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpopMenu(); // das popMenu wird aufgerufen\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handling item selection\n switch (item.getItemId()) {\n case R.id.action_home:\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_birds:\n intent = new Intent(this, Birds.class);\n startActivity(intent);\n return true;\n case R.id.action_storm:\n intent = new Intent(this, Storm.class);\n startActivity(intent);\n return true;\n case R.id.action_nocturnal:\n intent = new Intent(this, Nocturnal.class);\n startActivity(intent);\n return true;\n case R.id.action_library:\n intent = new Intent(this, Mylibrary.class);\n startActivity(intent);\n return true;\n case R.id.action_now_playing:\n intent = new Intent(this, Nowplaying.class);\n startActivity(intent);\n return true;\n case R.id.action_download:\n intent = new Intent(this, Download.class);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n \t// create a new Intent to launch the Logs Activity\n \tIntent viewLogs =\n \t\t\tnew Intent(Log_Data.this, Logs.class);\n \tstartActivity(viewLogs); // start the Logs Activity\n \treturn super.onOptionsItemSelected(item); // call supers's method\n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "@Override\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\n\t\t\tcase 1:\n\t\t\t\t//Toast msg = Toast.makeText(orgDetails.this, \"Menu 1\", Toast.LENGTH_LONG);\n\t\t\t\t//msg.show();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n \n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "public void mousePressed(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n if(menu.isTopLevelMenu()) {\n if(menu.isSelected()) {\n manager.clearSelectedPath();\n } else {\n Container cnt = menu.getParent();\n if(cnt != null && cnt instanceof JMenuBar) {\n MenuElement me[] = new MenuElement[2];\n me[0]=(MenuElement)cnt;\n me[1]=menu;\n manager.setSelectedPath(me); } } }\n MenuElement selectedPath[] = manager.getSelectedPath();\n if (selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] != menu.getPopupMenu()) {\n if(menu.isTopLevelMenu() || \n menu.getDelay() == 0) {\n appendPath(selectedPath, menu.getPopupMenu());\n } else {\n setupPostTimer(menu); } } }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n //Handles item selection\n switch (item.getItemId()){\n case R.id.Quit:\n finish();\n return true;\n case R.id.About:\n DialogFragment aboutDlg = new aboutDialogue();\n aboutDlg.show(fmAboutDialogue, \"about_Dlg\");\n return true;\n case R.id.Map:\n Intent Map = new Intent(this, mapActivity.class);\n this.startActivity(Map);\n return true;\n case R.id.canvasDraw:\n Intent drawToCanvas = new Intent(this, drawToCanvas.class);\n this.startActivity(drawToCanvas);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n\t\t\tpublic boolean onMenuItemClick(int position,\n\t\t\t\t\tSwipeMenu menu, int index) {\n\t\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\t// open\n\t\t\t\t\t// open(item);\n\n\t\t\t\t\tHashMap<String, String> deleteItem = List.get(position);\n\n\t\t\t\t\tString itemId = deleteItem.get(BaseActivity.id);\n\n\t\t\t\t\tdeleteActivityItem(position, itemId);\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\tHashMap<String, String> edittem = List.get(position);\n\n\t\t\t\t\tString editemId = edittem.get(BaseActivity.id);\n\t\t\t\t\t\n\t\t\t\t\teditActivityItem(position, editemId);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected (MenuItem item)\n {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "public void openMenu() {\r\n\t\tmenu.click();\r\n\t}", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_new) {\n new_user();\n return true;\n }\n if (id == R.id.action_exit) {\n verify_close();\n return true;\n }\n if (id == R.id.action_login) {\n user_login();\n return true;\n }\n if (id == R.id.action_view) {\n view_user();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n if (_actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n switch(item.getItemId()) {\n case R.id.item_logout:\n LogOut();\n return true;\n case R.id.item_about:\n showErrorMessage(\"Clicked About\");\n return true;\n case R.id.item_refresh:\n Reload();\n return true;\n case R.id.item_search:\n LaunchSearch();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n //}\n // Handle other action bar items...\n //return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}", "private void xuLyClickItems() {\n lvMenu.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n idGroupFood=dsContents.get(i).getTxtIdGroup();\n// txtIdGroupMenu = view.findViewById(R.id.txtGroupMenu);\n// int idGroup = Integer.parseInt(txtIdGroupMenu.getText().toString());\n Intent intent = new Intent(MenuActivity.this,MenuFoodActivity.class);\n startActivity(intent);\n }\n });\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }" ]
[ "0.78072983", "0.7701913", "0.76856875", "0.75205016", "0.7159665", "0.71325016", "0.7004904", "0.6941886", "0.6938922", "0.69209075", "0.6865735", "0.68649286", "0.6857169", "0.6857169", "0.6847913", "0.6836166", "0.6832988", "0.6829189", "0.6809918", "0.6806129", "0.6740593", "0.67355007", "0.673432", "0.6697531", "0.6692868", "0.66892916", "0.66821957", "0.666269", "0.6646348", "0.6644389", "0.6622627", "0.66022253", "0.6599714", "0.65906197", "0.65880305", "0.6568388", "0.65621436", "0.6542069", "0.65310425", "0.65069854", "0.6501164", "0.6500559", "0.6482168", "0.64815897", "0.6478026", "0.6471072", "0.64646703", "0.6453268", "0.6445949", "0.6445949", "0.64397764", "0.6437021", "0.64344853", "0.6434312", "0.6434312", "0.6434312", "0.6434312", "0.6434312", "0.6434312", "0.643171", "0.64279264", "0.64268726", "0.6423033", "0.6423033", "0.6423033", "0.6423033", "0.64225715", "0.64222836", "0.64212906", "0.6416766", "0.64074534", "0.64060694", "0.64036006", "0.6399857", "0.63893163", "0.6384121", "0.6382092", "0.6380594", "0.6377212", "0.63745224", "0.63693553", "0.6368447", "0.63631594", "0.63631594", "0.6359997", "0.6358694", "0.63553196", "0.6352661", "0.6352661", "0.6352661", "0.6352661", "0.6352661", "0.6351652", "0.6348879", "0.6348879", "0.63458806", "0.6339511", "0.63366085", "0.6335826", "0.6330851", "0.6330851" ]
0.0
-1
Toast.makeText(this, "ready to seasrch", Toast.LENGTH_SHORT).show();
private void readyToSearch() { Intent intent = new Intent(this, SearchActivity.class); startActivityForResult(intent, 21); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }", "public void showComingSoonMessage() {\n showToastMessage(\"Coming soon!\");\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Not Ready Yet :(\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Goodbye!\", Toast.LENGTH_SHORT).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "void showToast(String message);", "void showToast(String message);", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to show the toast\n int duration = Toast.LENGTH_SHORT;\n\n // Get the context\n Context context = getApplicationContext();\n\n // Create the toast\n Toast toast = Toast.makeText(context, toastText, duration);\n\n // Show the toast\n toast.show();\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "public void showToast(String text){\n Toast.makeText(this,text,Toast.LENGTH_SHORT).show();\n }", "protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}", "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Hello World\", Toast.LENGTH_LONG).show();\n }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }", "public void showMessage(String text)\n {\n Toast.makeText(this, text, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "private void displayToast(String message) {\n Toast.makeText(OptionActivity.this, message, Toast.LENGTH_SHORT).show();\n }", "public void run() {\n Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); // toast for whatever reason\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Capstone app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "public void successfulReservation()\n {\n showToastMessage(getResources().getString(R.string.successfulReservation));\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Spotify Streamer app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"I'm a toast!\", Toast.LENGTH_SHORT).show();\n }", "public void showToast(View clickedButton) {\n String greetingText = getString(R.string.greeting_text);\n Toast tempMessage\n = Toast.makeText(this, greetingText,\n Toast.LENGTH_SHORT);\n tempMessage.show();\n }", "public void onClick(DialogInterface dialog, int id) {\n\r\n Context context = getApplicationContext();\r\n CharSequence text = \"Welcome \" + name + \"! Signing up...\";\r\n int duration = Toast.LENGTH_SHORT;\r\n\r\n Toast toast = Toast.makeText(context, text, duration);\r\n toast.show();\r\n }", "private void sendToCatVA()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Visual Art'\", Toast.LENGTH_SHORT).show();\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void ting(String msg) {\r\n\t\tToast.makeText(this, msg, Toast.LENGTH_SHORT).show();\r\n\t}", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Scores app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "public void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message,\n Toast.LENGTH_SHORT).show();\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}", "private void sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "private void sendToCatLit()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Literary'\", Toast.LENGTH_SHORT).show();\n }", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}", "public void yell(String message){\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).show();\n }", "private void toastMessage(String message) {\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n\n }", "public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "protected void showToast(String string)\r\n\t{\n\t\tToast.makeText(MainActivity.this, string, Toast.LENGTH_SHORT).show();\r\n\t}", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void showMessage(String message){\n Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show();\n }", "void toast(int resId);", "private void toast(String string){\n Toast.makeText(this, string, Toast.LENGTH_SHORT).show();\n }", "public void onClick(DialogInterface arg0, int arg1) {\n // the button was clicked\n Toast.makeText(getApplicationContext(), \"Professional backhand-Male Video\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }", "void showToast(String value);", "public void ToastPopper(String t){\n Context context = getApplicationContext();\n CharSequence text = t;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my XYZ Reader app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "private void showToast (String appName) {\n Toast.makeText(this,getString(R.string.openAppMessage,appName), Toast.LENGTH_SHORT).show();\n }", "public void showToast(final String message){\n\t runOnUiThread(new Runnable() {\n\t public void run()\n\t {\n\t Toast.makeText(VisitMultiplayerGame.this, message, Toast.LENGTH_SHORT).show();\n\t }\n\t });\n\t}", "protected void toast() {\n }", "private void showToast(final String message) {\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(main.getApplicationContext(), message, Toast.LENGTH_LONG).show();\n }\n });\n }", "public void showToast(View view) {\n // Initialize an object named 'toast' using the 'Toast' class\n Toast toast = Toast.makeText(this, R.string.toast_message, Toast.LENGTH_SHORT);\n\n // Use the method 'show()' under the 'Toast' class to show a message\n toast.show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartThread();\n\t\t\t Toast.makeText(getContext(), \"Êղسɹ¦\", 1).show();\n\t\t\t}", "protected void showToast(CharSequence text) {\r\n\t Context context = getApplicationContext();\r\n\t int duration = Toast.LENGTH_SHORT;\r\n\t \r\n\t Toast toast = Toast.makeText(context, text, duration);\r\n\t toast.show();\r\n\t}", "static void makeToast(Context ctx, String s){\n Toast.makeText(ctx, s, Toast.LENGTH_SHORT).show();\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Build It Bigger app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "private void mostrarToast () {\n Toast.makeText(this, \"Imagen guardada en la galería.\", Toast.LENGTH_SHORT).show();\n }", "private void sendToCatDance()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Dance'\", Toast.LENGTH_SHORT).show();\n }", "public void notificacionToast(String mensaje){\n Toast toast = Toast.makeText(getApplicationContext(),mensaje,Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0);\n toast.show();\n }", "@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }", "protected void toastshow() {\n \n\t\tToast toast=new Toast(getApplicationContext());\n\t\tImageView imageView=new ImageView(getApplicationContext());\n\t\timageView.setImageResource(R.drawable.icon);\n\t\ttoast.setView(imageView);\n\t\ttoast.show();\t\n\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(),\"hey uuuu clicked me \",Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_SHORT).show();\n\t\t\t}", "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 showToastMessage(String str) {\n Toast.makeText(self, str, Toast.LENGTH_SHORT).show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n CustomToast.show(getContext(),\"Service will be available Soon\");\n }", "protected void showToastMessage(String message)\n {\n Toast messageToast = null;\n messageToast= Toast.makeText(this,message,Toast.LENGTH_SHORT);\n\n messageToast.show();\n }", "@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Context context = getApplicationContext();\n // When the Hello button on the app is pressed this line of code will show *Hello, how are you?!\"\n Toast toast = Toast.makeText(context,\n \"Contact details for the college are - \" +\n \"\\n\\t CSN College, Tramore Road, Co.Cork\" +\n \"\\n\\t Phone number: 021-4961020\" +\n \"\\n\\t Email: INFO@CSN.IE\", Toast.LENGTH_LONG);\n // This is for the toast message to show.\n toast.show();\n\n }", "public void displayAnswer(){\r\n String message = \"That is the correct answer!\";\r\n\r\n Toast.makeText(QuizActivity.this,\r\n message, Toast.LENGTH_SHORT).show();\r\n }", "@Override\n public void onClick(View v) {\n Toast tst = Toast.makeText(MainActivity.this, \"test\", Toast.LENGTH_SHORT);\n tst.show();\n Test();\n }", "public void showReady();", "private void showToast(String message) {\n\t\tToast toast = Toast.makeText(getApplicationContext(), message,\n\t\t\t\tToast.LENGTH_SHORT);\n\n\t\ttoast.setGravity(Gravity.CENTER | Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\ttoast.show();\n\t}", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getContext(), \"המוצר נמחק בהצלחה!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void run() {\n if (mToast == null) {\n mToast = Toast.makeText(getApplicationContext(), text,\n Toast.LENGTH_SHORT);\n } else {\n mToast.setText(text);\n }\n mToast.show();\n }", "public void ToastMessage() {\n\n // create toast message object\n final Toast toast = Toast.makeText(Product_Details_Page_Type_4.this,\n \"Product added to cart\",Toast.LENGTH_LONG);\n // show method call to show Toast message\n toast.show();\n\n // create handler to set duration for toast message\n Handler handler = new Handler() {\n\n @Override\n public void close() {\n // set duration for toast message\n toast.setDuration(100);\n // cancel toast message\n toast.cancel();\n }\n @Override\n public void flush() {}\n\n @Override\n public void publish(LogRecord record) {}\n };\n }", "private void showErrorToast() {\n }", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "@Override\n public void displayMessage(String message) {\n Toast.makeText(getActivity(),message,Toast.LENGTH_SHORT).show();\n }", "public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void run() {\n Constant.showToast(getActivity().getResources().getString(R.string.internet), getActivity());\n }", "@Override\n public void run() {\n Constant.showToast(getActivity().getResources().getString(R.string.internet), getActivity());\n }", "private void sendToCatFilm()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Film'\", Toast.LENGTH_SHORT).show();\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }" ]
[ "0.7974646", "0.76604843", "0.76391", "0.7439712", "0.7416168", "0.7415572", "0.7415572", "0.7320996", "0.73203474", "0.7313382", "0.73008585", "0.72762704", "0.72736484", "0.7263377", "0.7259643", "0.7253148", "0.72410125", "0.7214844", "0.7212454", "0.7212454", "0.71973705", "0.7180999", "0.7173138", "0.7139896", "0.71357626", "0.71357626", "0.71317375", "0.71055245", "0.7103459", "0.7086393", "0.7078433", "0.7076105", "0.7057936", "0.70570356", "0.70556927", "0.7049469", "0.70473564", "0.703909", "0.7022534", "0.7012682", "0.70098424", "0.7004616", "0.7002696", "0.69949883", "0.69923127", "0.69912463", "0.6977432", "0.696696", "0.6966666", "0.6964884", "0.69643676", "0.6929902", "0.6929902", "0.6929902", "0.6922474", "0.69172525", "0.6917058", "0.69061905", "0.69028884", "0.6891837", "0.68847716", "0.68813705", "0.6881029", "0.6877424", "0.6874188", "0.6870026", "0.6866505", "0.6860498", "0.68579865", "0.6857977", "0.6857857", "0.6853999", "0.6848535", "0.6846186", "0.683883", "0.68378055", "0.6826984", "0.68101734", "0.68085444", "0.6792853", "0.67756695", "0.677088", "0.67678916", "0.676396", "0.6763719", "0.676217", "0.67570627", "0.6740597", "0.67285264", "0.67219776", "0.67175305", "0.6712832", "0.6706699", "0.6688347", "0.66820675", "0.66765314", "0.6665352", "0.665856", "0.665856", "0.6635647", "0.6631664" ]
0.0
-1
Prompts the user for permission to use the device location.
private void getLocationPermission() { /* * Request location permission, so that we can get the location of the * device. The result of the permission request is handled by a callback, * onRequestPermissionsResult. */ mLocationPermissionGranted = false; if (ContextCompat.checkSelfPermission(this.getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { mLocationPermissionGranted = true; } else { ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void askForLocationPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //this code will be executed on devices running on DONUT (NOT ICS) or later\n askForPermission(Manifest.permission.ACCESS_FINE_LOCATION, Extra.LOCATION);\n }\n }", "private void requestLocationPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Permission needed\")\n .setMessage(\"Location Permission is needed to show your current location on the map\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(ScavengerHunt.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Toast.makeText(ScavengerHunt.this, \"Location Permission is needed to update the map\", Toast.LENGTH_SHORT).show();\n }\n })\n .create()\n .show();\n\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n }", "public void getLocationPermission() {\n if (!isPermissionGranted())\n // get the location permission from user\n // this will prompt user a dialog to give the location permission\n requestPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n /*ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);*/\n }", "private void getLocation() {\n if(ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)){\n new AlertDialog.Builder(this)\n .setTitle(\"Location Permission Required\")\n .setMessage(\"This app needs permission to use your location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(RestaurantsActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n })\n .create()\n .show();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n }\n }", "private void askPermissionsAndShowMyLocation() {\n if (Build.VERSION.SDK_INT >= 23) {\n int accessCoarsePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_COARSE_LOCATION);\n int accessFinePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n\n if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n || accessFinePermission != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(activity, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n }\n\n // Show current location on Map.\n this.showMyLocation();\n }", "private void permissionLocationRequest() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int hasLocationPermission = checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION);\n if (hasLocationPermission != PackageManager.PERMISSION_GRANTED) {\n if (!shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)) {\n showMessageOKCancel(\"You need to allow access to Location\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n });\n }\n }\n\n }\n }", "public void askPermission() {\n if (ContextCompat.checkSelfPermission(getActivity()\n , android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n reqestLocationPermission);\n }\n }", "private void requestLocationPermission() {\n Log.d(MainActivity.TAG,\"Requesting location permission.\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (shouldShowRequestPermissionRationale(\n android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n Toast.makeText(this, R.string.location_permission_request_rationale, Toast.LENGTH_SHORT).show();\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n }\n requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MainActivity.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void requestPermission() {\n if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(this.getResources().getString(R.string.request_location_permission_message))\n .setPositiveButton(this.getResources().getString(R.string.OK), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n } else {\n ActivityCompat.requestPermissions((Activity) mContext,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n }", "private void askPermission() {\n if (ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n Parameters.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(activity.getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(activity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n Log.d(TAG, \"Permission Result\");\n String[] permissions = {ACCESS_FINE_LOCATION,\n ACCESS_COURSE_LOCATION};\n\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_FINE_LOCATION) == PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_COURSE_LOCATION) == PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);}\n } else{\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void setupLocation() {\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted.\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION) &&\n ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)) {\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n } else {\n // Request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n }\n } else {\n // Permission has already been granted\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void askPermissionsAndShowMyLocation() {\n boolean isGPSEnabled = false;\n // flag for network status\n boolean isNetworkEnabled = false;\n // flag for GPS status\n boolean canGetLocation = false;\n LocationManager locationManager;\n\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n if (Build.VERSION.SDK_INT >= 23) {\n // flag for GPS status\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n// if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n// || accessFinePermission != PackageManager.PERMISSION_GRANTED)\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(this, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n this.showMyLocation();\n }\n\n } else {\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n this.showMyLocation();\n }\n\n\n }\n // Show current location on Map.\n }", "private void getLocationPermission() {\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n //request location permission\n ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION\n }, LOCATION_REQUEST_CODE);\n }\n fetchLastLocation();\n }", "private void getLocationPermission(){\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationAccess = true;\n } else {\n locationAccess = false;\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION);\n }\n }", "private void locationPermission() {\n if(Build.VERSION.SDK_INT<23){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n }else{\n if(checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n return;\n }\n\n if(shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_COARSE_LOCATION) && shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)){\n Snackbar.make(drawer,\"Location access is required to show your friend and questions on map.\",Snackbar.LENGTH_INDEFINITE)\n .setAction(\"OK\", new View.OnClickListener() {\n @TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View v) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n })\n .show();\n }else{\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n }\n }", "public void askForPermissionsGrant(){\n int res =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n int res2 =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n if (res!= PackageManager.PERMISSION_GRANTED || res2!= PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"We need to access your location\")\n .setMessage(\"We want to track every breath you take\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.READ_CONTACTS},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n builder.create().show();\n }\n else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n publishLastLocation();\n }\n\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED)\n {\n mLocationPermissionGranted = true;\n } else {\n requestPermissions(\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION\n );\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void checkLocationPermission() {\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)) {\n new AlertDialog.Builder(getActivity())\n .setTitle(\"give permission\")\n .setMessage(\"give permission message\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n })\n .create()\n .show();\n }\n else{\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n }\n\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(mContext,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(mActivity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "public void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_FINE_LOCATION) == PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_COARSE_LOCATION) == PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{\n ACCESS_FINE_LOCATION,\n ACCESS_COARSE_LOCATION\n }, PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void getLocationPermission(){\n Log.d(TAG, \"getLocationPermission: getting location permission.\");\n String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n COURSE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mLocationPermissionGaranted = true;\n getDeviceLocation();\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void requestPermissionAccessLocation() {\n int permissionCheck = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n Log.d(TAG, \"permissionCheck: \" + permissionCheck);\n\n if (permissionCheck == PackageManager.PERMISSION_GRANTED) {\n updateFragmentOnLocationSuccess();\n } else {\n ActivityCompat\n .requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_PERMISSION_LOCATION);\n }\n }", "private void checkLocationPermission() {\n\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n //location permission required\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_FINE_LOCATION);\n\n }else{\n //location already granted\n checkCoarseAddress();\n }\n }", "public void startLocationButtonClick() {\n Dexter.withActivity(this)\r\n .withPermission(Manifest.permission.ACCESS_FINE_LOCATION)\r\n .withListener(new PermissionListener() {\r\n @Override\r\n public void onPermissionGranted(PermissionGrantedResponse response) {\r\n mRequestingLocationUpdates = true;\r\n startLocationUpdates();\r\n }\r\n\r\n @Override\r\n public void onPermissionDenied(PermissionDeniedResponse response) {\r\n if (response.isPermanentlyDenied()) {\r\n // open device settings when the permission is\r\n // denied permanently\r\n openSettings();\r\n }\r\n }\r\n\r\n @Override\r\n public void onPermissionRationaleShouldBeShown(PermissionRequest permission, PermissionToken token) {\r\n token.continuePermissionRequest();\r\n }\r\n }).check();\r\n }", "public void checkLocationPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n 99);\n }\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void requestPermission() {\n boolean shouldProvideRationale = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n if (shouldProvideRationale) {\n Log.i(TAG, \"requestPermission: \" + \"Displaying the permission rationale\");\n // provide a way so that user can grant permission\n\n showSnackbar(R.string.warning_txt, android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startLocationPermissionRequest();\n }\n });\n\n } else {\n startLocationPermissionRequest();\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void onGeolocationPermissionsShowPrompt(String origin,\n GeolocationPermissions.Callback callback) {\n String perm = Manifest.permission.ACCESS_FINE_LOCATION;\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M ||\n ContextCompat.checkSelfPermission(Main2Activity.this, perm) == PackageManager.PERMISSION_GRANTED) {\n // we're on SDK < 23 OR user has already granted permission\n callback.invoke(origin, true, false);\n } else {\n if (!ActivityCompat.shouldShowRequestPermissionRationale(Main2Activity.this, perm)) {\n // ask the user for permission\n ActivityCompat.requestPermissions(Main2Activity.this, new String[]{perm}, REQUEST_FINE_LOCATION);\n\n // we will use these when user responds\n mGeolocationOrigin = origin;\n mGeolocationCallback = callback;\n }\n }\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse response) {\n\n final ProgressDialog progressDialog = new ProgressDialog(InfoActivity.this);\n progressDialog.setMessage(\"Getting your location...\");\n progressDialog.show();\n SmartLocation.with(InfoActivity.this).location().oneFix().start(new OnLocationUpdatedListener() {\n @Override\n public void onLocationUpdated(Location location) {\n latitudeStr = String.valueOf(location.getLatitude());\n longitudeStr = String.valueOf(location.getLongitude());\n progressDialog.dismiss();\n Toast.makeText(InfoActivity.this, location.getLatitude() + \" \" + location.getLongitude(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AdminMap.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void getLocationPermission() {\n Log.wtf(TAG, \"getLocationPermission() has been instantiated\");\n\n Log.d(TAG, \"getLocationPermission: getting location permissions\");\n String[] permissions = {\n FINE_LOCATION,\n COARSE_LOCATION\n };\n\n if (ContextCompat.checkSelfPermission(getActivity(), FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(getActivity(), COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n Log.d(TAG, \"getLocationPermission: Permission granted\");\n initMap();\n\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "public static void checkLocationPermission() {\n globalContext.stopService(locationIntent);\n\n globalFragmentActivity.requestPermissions(\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void fetchlocation() {\n if (ContextCompat.checkSelfPermission(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)) {\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n new AlertDialog.Builder(this)\n .setTitle(\"Required Location Permission\")\n .setMessage(\"You have to give permission to fetch your current location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .create()\n .show();\n\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n fusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<android.location.Location>() {\n @Override\n public void onSuccess(android.location.Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n // Logic to handle location object\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n }\n }\n });\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(SearchActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(OwnerMapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(WeatherByGPS.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(View view) {\n locationChecker.checkBeforeAsking(new PermissionChecker.CheckPermissionListener() {\n @Override\n public void onPermissionDenied() {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onPermissionGranted() {\n\n gm.requestLastLocation(new GeoManager.GeoDirectLocationListener() {\n @Override\n public void onLocationError(Throwable error) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onLocationSuccess(double latitude, double longitude) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, latitude, longitude);\n }\n });\n }\n });\n }", "public void requestLocationPermision(){\n\n // Forma de actuar diferente si la versión del dispositivo en Marshmallow\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {\n Log.d(TAG, \"Versión 23\");\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //Si no tenemos permiso, lo pedimos\n\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) {\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n Log.d(TAG, \"Show an expanation\");\n new AlertDialog.Builder(this)\n .setMessage(getString(R.string.show_explanation))\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[] {Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n }\n })\n .create()\n .show();\n\n } else{\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_CODE_ASK_PERMISSIONS);\n }\n } else{\n Log.d(TAG, \"Tenemos permiso\");\n\n String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n if (!provider.contains(\"gps\")) {\n //Si el GPS no esta activo, pedimos su iniciación\n AlertNoGps();\n }\n\n //Inicializacion de los providers\n for (String s : locationManager.getAllProviders()) {\n int minDistance = 2;\n int checkInterval = 2;\n locationManager.requestLocationUpdates(s, checkInterval,\n minDistance, this);\n Location actualLocation = locationManager.getLastKnownLocation(s);\n //Comprobamos si es una mejor localización\n if (actualLocation!=null){\n if (isBetterLocation(actualLocation)){\n Log.d(TAG, \"Mejor localización -> \" + s + \" - \"+ actualLocation);\n bestLocation = actualLocation;\n }\n }\n }\n\n mMap.setMyLocationEnabled(true);\n setLocation();\n }\n } else{\n //Comprobacion de permisos\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"Tenemos permiso\");\n\n String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n\n if (!provider.contains(\"gps\")) {\n //Si el GPS no esta activo, pedimos su iniciación\n AlertNoGps();\n }\n\n //Inicializacion de los providers\n for (String s : locationManager.getAllProviders()) {\n int minDistance = 2;\n int checkInterval = 2;\n locationManager.requestLocationUpdates(s, checkInterval,\n minDistance, this);\n Location actualLocation = locationManager.getLastKnownLocation(s);\n if (actualLocation!=null){\n if (isBetterLocation(actualLocation)){\n Log.d(TAG, \"Mejor localización -> \" + s + \" - \"+ actualLocation);\n bestLocation = actualLocation;\n }\n }\n }\n\n mMap.setMyLocationEnabled(true);\n setLocation();\n }\n }\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(View view) {\n if (ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(IntroActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQCODELOCATION\n );\n } else {\n // caso contrario: obtener la ubicacion actual\n getCurrentLocation();\n }\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(mapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public boolean onMyLocationButtonClick() {\n LocationManager manager = (LocationManager) getContext().getSystemService(Context.LOCATION_SERVICE);\n if (!manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n // If Location disable create a alert dialog\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());\n alertDialogBuilder.setMessage(\"Location is disabled in your device. Would you like to enable it?\")\n // Have to respond to this message not cancelable\n .setCancelable(false)\n // If yes open setting page to enable location\n .setPositiveButton(\"Yes\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // intent calls the android activity of location settings\n Intent callGPSSettingIntent = new Intent(\n android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(callGPSSettingIntent);\n }\n });\n //if no close the dialog\n alertDialogBuilder.setNegativeButton(\"Maybe Later\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = alertDialogBuilder.create();\n alert.show();\n }\n\n return false;\n }", "private void displayLocation() {\n\n if(customProgressDialog.isShowing())\n customProgressDialog.cancel();\n\n boolean hasPermissionFine = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n boolean hasPermissionCoarse = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n if (!hasPermissionFine || !hasPermissionCoarse) {\n ActivityCompat.requestPermissions(LocationChooser.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_LOCATION);\n } else {\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n }\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n if (mLocation != null) {\n sLat = mLocation.getLatitude();\n sLang = mLocation.getLongitude();\n Log.d(\"curren location:\", String.valueOf(sLat) + \"::\" + String.valueOf(sLang));\n source.setText(\"Your location\");\n //locationText.setText(String.valueOf(sLat)+\"::\"+String.valueOf(sLang));\n } else {\n Toast.makeText(this, \"Location not Detected.\", Toast.LENGTH_SHORT).show();\n // showSettingsAlert();\n }\n }", "private void pickLocation() {\n // By default the location picker will enable all the included buttons like\n // Satellite view and position me\n Intent locationPicker = new LocationPickerActivity.Builder().build(this.getContext());\n startActivityForResult(locationPicker, LOCATION_REQUEST_CODE);\n }", "private void updateLocationUI() {\n if (map == null) {\n return;\n }\n try {\n if (locationPermissionGranted) {\n map.setMyLocationEnabled(true);\n map.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n map.setMyLocationEnabled(false);\n map.getUiSettings().setMyLocationButtonEnabled(false);\n lastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(Userhome.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COURSE_LOCATION);\n }", "private void getLocation() {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.INTERNET}\n , 10);\n }\n return;\n }\n\n //Update location\n locationManager.requestLocationUpdates(\"gps\", 5000, 0, listener);\n }", "private void callPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\r\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)\r\n != PackageManager.PERMISSION_GRANTED) {\r\n\r\n requestPermissions(\r\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\r\n PERMISSIONS_ACCESS_FINE_LOCATION);\r\n\r\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\r\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)\r\n != PackageManager.PERMISSION_GRANTED){\r\n\r\n requestPermissions(\r\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\r\n PERMISSIONS_ACCESS_COARSE_LOCATION);\r\n } else {\r\n isPermission = true;\r\n }\r\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }", "void configure_button(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.INTERNET}\n ,10);\n }\n\n return;\n }\n // this code won't execute IF permissions are not allowed, because in the line above there is return statement.\n\n locationManager.requestLocationUpdates(\"gps\", 5000, 0, listener);\n\n }", "private void callPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n requestPermissions(\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_ACCESS_FINE_LOCATION);\n\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n\n requestPermissions(\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_ACCESS_COARSE_LOCATION);\n } else {\n isPermission = true;\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void inputLocation() {\n// boolean googleMapExist= (ConnectionResult.SUCCESS==GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext));\n//\n// if(googleMapExist) {\n// org.wowtalk.Log.w(\"google map exist\");\n// Intent mapIntent = new Intent(mContext, PickLocActivity.class);\n// mapIntent.putExtra(\"auto_loc\", true);\n// mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n// } else {\n //org.wowtalk.Log.w(\"google map not exist\");\n Intent mapIntent = new Intent(mContext, PickLocActivityWithAMap.class);\n mapIntent.putExtra(\"auto_loc\", true);\n mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n //}\n }", "private void getLocation() {\n //if you don't have permission for location services yet, ask\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_LOCATION_PERMISSION);\n //have the app ask for location permission\n } else {\n fusedLocationClient.requestLocationUpdates\n (getLocationRequest(), mLocationCallback,\n null /* Looper */);\n //uses the type of request and the location callback to update the location\n /**fusedLocationClient.getLastLocation().addOnSuccessListener(\n new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n TextView error = findViewById(R.id.errorMsg);\n error.setVisibility(View.VISIBLE);\n\n if (location != null) {\n lastLocation = location;\n error.setText(\"location: \" + lastLocation.getLatitude());\n } else {\n error.setText(\"location not available\");\n }\n }\n });**/\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "private void startGettingLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n //should check if location is enabled\n\n initializeGoogleApiClient();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSION_ACCESS_LOCATION);\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "public void checkLocationPermission() {\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, getActivity(), getActivity())) {\n if (checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, getActivity(), getActivity())) {\n gpsTracker.getLocation();\n } else {\n requestPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n requestPermission(android.Manifest.permission.ACCESS_FINE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n gpsTracker.getLocation();\n }\n } catch (Exception e) {\n // logException(e, \"GpsMapManualFragment_checkLocationPermission()\");\n }\n\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n getCurrentLocation();\n } else {\n Toast.makeText(this, \"Permision Denied\", Toast.LENGTH_SHORT).show();\n }\n }", "private void displayLocation() {\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (mLastLocation != null) {\n double latitude = mLastLocation.getLatitude();\n double longitude = mLastLocation.getLongitude();\n\n\n String add = getAddressString(latitude, longitude);\n\n //Check in\n student_checkin chkIn = new student_checkin(getActivity(), sessionId, \"Lat: \" + latitude + \" Long: \" + longitude);\n chkIn.execute();\n lblLocation.setText(latitude + \", \" + longitude);\n cords.setText(add);\n\n\n\n } else {\n\n lblLocation\n .setText(\"(Couldn't get the location. Make sure location is enabled on the device)\");\n }\n }", "public void requestLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.INTERNET}, 12);\n }\n return;\n }\n //this line updates location\n mMap.setMyLocationEnabled(true);\n providerClient.requestLocationUpdates(locationRequest, locationCallback, getMainLooper());\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n try {\n if (mLocationPermissionGranted){\n Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()){\n Location currentLocation = (Location) task.getResult();\n if (currentLocation != null){\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude()), DEFAULT_ZOOM));\n\n } else {\n /*\n AlertDialog alertDialog = new AlertDialog.Builder(MapActivity.this).create();s\n alertDialog.setMessage(\"Activa ubicación\");\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n */\n Toast.makeText(MapActivity.this, \"Tu ubicación es nula\", Toast.LENGTH_SHORT).show();\n }\n } else Toast.makeText(MapActivity.this, \"Error al obtener la ubicación\", Toast.LENGTH_LONG).show();\n }\n });\n }else Toast.makeText(MapActivity.this, \"Da permiso para acceder a la ubicación\", Toast.LENGTH_LONG).show();\n } catch (SecurityException e){\n Toast.makeText(MapActivity.this, \"Seleciona un punto en el mapa primero\", Toast.LENGTH_LONG).show();\n }\n }", "private void initializeLocation() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n Constants.PERMISSION_FINE_LOCATION);\n } else {\n createLocationRequest();\n }\n } else {\n createLocationRequest();\n }\n }", "private void requestPermission(){\r\n ActivityCompat.requestPermissions(activity,new String[]{Manifest.permission.ACCESS_FINE_LOCATION},1);\r\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n getLocationPermission();\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 100) {\n if (resultCode != RESULT_OK)\n Toast.makeText(getContext(), \"GPS est déactivé\", Toast.LENGTH_LONG).show();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }", "private boolean isLocationAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n //If permission is granted returning true\r\n if (result == PackageManager.PERMISSION_GRANTED)\r\n return true;\r\n\r\n //If permission is not granted returning false\r\n return false;\r\n }", "private void askForPermission(String permission) {\n ActivityCompat.requestPermissions(\n this,\n new String[] {Manifest.permission.ACCESS_COARSE_LOCATION},\n PERM_REQUEST_CODE\n );\n }", "private void updateLocationUi() {\n if (mMap == null) {\n return;\n }\n try {\n if (mPermissionCheck.locationPermissionGranted()) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "void requestPermissionAndPopulateDistance(){\n //Check and acquire COARSE location permissions, to calculate distance, if not already granted\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)){\n // show rationale\n }else{\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_CONS);\n }\n }else{\n //If the permission is already acquired, calculate the distance and update the view\n calculateAndPopulateDistance();\n }\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "@Override\n public void onRequestPermissionsResult(@NonNull int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (permissions.length == 0) {\n return;\n }\n boolean allPermissionsGranted = true;\n if (grantResults.length > 0) {\n for (int grantResult : grantResults) {\n if (grantResult != PackageManager.PERMISSION_GRANTED) {\n allPermissionsGranted = false;\n break;\n }\n }\n }\n if (!allPermissionsGranted) {\n boolean somePermissionsForeverDenied = false;\n for (String permission : permissions) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) {\n //denied\n } else {\n if (ActivityCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED\n && requestCode == Extra.LOCATION) {\n getLocation();\n } else {\n //set to never ask again\n somePermissionsForeverDenied = true;\n }\n }\n }\n if (somePermissionsForeverDenied) {\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);\n alertDialogBuilder.setTitle(R.string.permissions_required)\n .setMessage(R.string.you_have_explicitly_denied_permissions_which_are_required_by_this_app_to_run_for_this_action_open_settings_go_to_permissions_and_allow_them)\n .setPositiveButton(R.string.settings, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,\n Uri.fromParts(Extra.PACKAGE, getPackageName(), null));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n })\n .setCancelable(false)\n .create()\n .show();\n }\n } else if (requestCode == Extra.LOCATION) {\n getLocation();\n }\n }", "private void startTrackingRoute(){\n if(ContextCompat.checkSelfPermission(this, ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n //Starts up alert dialog for getting permission\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOC_PERMISSION);\n }\n else{\n //Start the location updater listener\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, MIN_DISTANCE, this);\n }\n }", "private void getLocation() {\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n\t\t\tif (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tFusedLocationProviderClient locationProviderClient = LocationServices.getFusedLocationProviderClient(getApplicationContext());\n\t\tlocationProviderClient.getLastLocation().addOnSuccessListener(new OnSuccessListener<Location>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(Location location) {\n\t\t\t\t\n\t\t\t\tfinal Location finalLocation = location;\n\t\t\t\t\n\t\t\t\tbtnGoToYou.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tLatLng userLocation = new LatLng(finalLocation.getLatitude(), finalLocation.getLongitude());\n\t\t\t\t\t\tmMap.addMarker(new MarkerOptions().position(userLocation).title(\"You are Here!\"));\n\t\t\t\t\t\tmMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t}", "protected void getLocation() {\n if (isLocationEnabled(Navigate.this)) {\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n criteria = new Criteria();\n bestProvider = String.valueOf(locationManager.getBestProvider(criteria, true)).toString();\n\n //You can still do this if you like, you might get lucky:\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(bestProvider);\n if (location != null) {\n Log.e(\"TAG\", \"GPS is on\");\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n } else {\n //This is what you need:\n locationManager.requestLocationUpdates(bestProvider, 1000, 0, this);\n }\n } else {\n// final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n// builder.setMessage(\"Your GPS seems to be disabled, do you want to enable it?\")\n// .setCancelable(false)\n// .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n// public void onClick(final DialogInterface dialog, final int id) {\n// startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));\n// }\n// })\n// .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n// public void onClick(final DialogInterface dialog, final int id) {\n// dialog.cancel();\n// }\n// });\n// final AlertDialog alert = builder.create();\n// alert.show();\n }\n }", "private boolean checkPermissonLocationRequest(int requestCode) {\n if (Build.VERSION.SDK_INT >= 23) {\n if (checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, requestCode);\n return false;\n }\n } else {\n return true;\n }\n }", "void configure_button(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.INTERNET}\n ,10);\n }\n return;\n }\n // this code won't execute IF permissions are not allowed, because in the line above there is return statement.\n locButton.setOnClickListener(new View.OnClickListener() {\n @SuppressLint(\"MissingPermission\")\n @Override\n public void onClick(View view) {\n //noinspection MissingPermission\n switcher = true;\n locManager.requestLocationUpdates(\"gps\", 5000, 0, locListener);\n }\n });\n }", "protected void startLocationUpdates() {\n\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n /*if (shouldShowRequestPermissionRationale(\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n showExplanationDialog(new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(\n new String[]{ Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n } else {\n requestPermissions(\n new String[]{ Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }*/\n } else {\n if (mGoogleApiClient.isConnected()) {\n LocationServices.FusedLocationApi.requestLocationUpdates(\n mGoogleApiClient, mLocationRequest, this);\n mRequestingLocationUpdates = true;\n Fog.d(TAG, \"requestedLocationUpdates\");\n }\n }\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }" ]
[ "0.776698", "0.7651568", "0.7638665", "0.76210517", "0.74222696", "0.7376342", "0.72495216", "0.7231457", "0.72216654", "0.72000766", "0.7024308", "0.7022187", "0.7013939", "0.6992729", "0.6987125", "0.6987125", "0.6986646", "0.69855034", "0.698384", "0.69727206", "0.69494087", "0.6944171", "0.69438535", "0.6940635", "0.6940635", "0.6927119", "0.6906697", "0.69026685", "0.6891465", "0.687489", "0.6863529", "0.6848028", "0.6840768", "0.6836656", "0.68039286", "0.6774371", "0.6758584", "0.67571265", "0.673376", "0.6723588", "0.67183065", "0.6712618", "0.6677001", "0.66759384", "0.6673356", "0.66588396", "0.6656386", "0.6647213", "0.6639417", "0.6573793", "0.6558253", "0.65477383", "0.6546998", "0.6540419", "0.6535042", "0.6485757", "0.64789546", "0.64782673", "0.64257294", "0.6423337", "0.64147455", "0.63951784", "0.63863087", "0.6379868", "0.6370859", "0.6369825", "0.6367581", "0.6360887", "0.63563144", "0.6346496", "0.6344851", "0.63219655", "0.6317804", "0.6304545", "0.629183", "0.62882435", "0.6272583", "0.62681174", "0.62670237", "0.6265583", "0.6248075", "0.6247825", "0.6247302", "0.6240661", "0.6228602", "0.62091637", "0.6206315", "0.6196269", "0.6190574", "0.61687946", "0.6165918", "0.6163796", "0.615594", "0.61530435", "0.61468345", "0.61103374", "0.6107765", "0.61063844", "0.61063844" ]
0.69819254
20
Handles the result of the request for location permissions.
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) { mLocationPermissionGranted = false; switch (requestCode) { case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: { // If request is cancelled, the result arrays are empty. if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { mLocationPermissionGranted = true; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n Log.d(TAG, \"Permission Result\");\n String[] permissions = {ACCESS_FINE_LOCATION,\n ACCESS_COURSE_LOCATION};\n\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_FINE_LOCATION) == PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_COURSE_LOCATION) == PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);}\n } else{\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void getLocationPermission() {\n Log.wtf(TAG, \"getLocationPermission() has been instantiated\");\n\n Log.d(TAG, \"getLocationPermission: getting location permissions\");\n String[] permissions = {\n FINE_LOCATION,\n COARSE_LOCATION\n };\n\n if (ContextCompat.checkSelfPermission(getActivity(), FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(getActivity(), COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n Log.d(TAG, \"getLocationPermission: Permission granted\");\n initMap();\n\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void fetchlocation() {\n if (ContextCompat.checkSelfPermission(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)) {\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n new AlertDialog.Builder(this)\n .setTitle(\"Required Location Permission\")\n .setMessage(\"You have to give permission to fetch your current location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .create()\n .show();\n\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n fusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<android.location.Location>() {\n @Override\n public void onSuccess(android.location.Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n // Logic to handle location object\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n }\n }\n });\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case LOCATION_REQUEST_CODE:\n if(grantResults.length>0&& grantResults[0] == PackageManager.PERMISSION_GRANTED){\n fetchLastLocation();\n }\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n getCurrentLocation();\n } else {\n Toast.makeText(this, \"Permision Denied\", Toast.LENGTH_SHORT).show();\n }\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n switch (requestCode) {\n case REQUEST_LOCATION_PERMISSION:\n // If the permission is granted, get the location,\n // otherwise, write a message to the log\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n getLocation();\n } else {\n Log.d(\"HackCMU19\", \"location permission denied\");\n }\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults){\n switch (requestCode){\n case MY_PERMISSIONS_LOCATIONS: {\n if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED){\n mFusedClient.requestLocationUpdates(mLocationRequest,mLocationCallback, Looper.myLooper());\n }\n } else {\n Toast.makeText(this, \"permission denied\", Toast.LENGTH_LONG).show();\n }\n return;\n }\n }\n }", "private void getLocationPermission() {\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n //request location permission\n ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION\n }, LOCATION_REQUEST_CODE);\n }\n fetchLastLocation();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n //switch\n switch (requestCode) {\n case ACCESS_REQUEST_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // permission was granted.\n Log.i(getResources().getString(R.string.app_name),\n \"Location Permission granted by user.\");\n setLocationUpdateFunction();\n } else {\n // permission denied, boo! Disable the functionality that depends on this permission.\n Log.e(getResources().getString(R.string.app_name),\n \"No Location Permission granted by user.\");\n //toast message telling the user to enable location permissions\n Toast.makeText(this, \"You have not enabled Location services for this app, please enable them in this apps settings\", Toast.LENGTH_LONG);\n }\n return;\n }\n\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n mLocationPermissionGaranted = false;\n Log.d(TAG, \"onRequestPermissionsResult: called.\");\n switch ( requestCode){\n case LOCATION_PERMISSION_REQUEST_CODE:{\n if (grantResults.length >0){\n for (int i =0; i < grantResults.length; i++) {\n if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGaranted = false;\n Log.d(TAG, \"onRequestPermissionsResult: failed.\");\n return;\n }\n }\n mLocationPermissionGaranted =true;\n Log.d(TAG, \"onRequestPermissionsResult: permission granted.\");\n //obtener la localizacion\n getDeviceLocation();\n }\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(\n int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case PERMISSION_REQ:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n fineLocationPermissionGranted();\n }\n }\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse response) {\n\n final ProgressDialog progressDialog = new ProgressDialog(InfoActivity.this);\n progressDialog.setMessage(\"Getting your location...\");\n progressDialog.show();\n SmartLocation.with(InfoActivity.this).location().oneFix().start(new OnLocationUpdatedListener() {\n @Override\n public void onLocationUpdated(Location location) {\n latitudeStr = String.valueOf(location.getLatitude());\n longitudeStr = String.valueOf(location.getLongitude());\n progressDialog.dismiss();\n Toast.makeText(InfoActivity.this, location.getLatitude() + \" \" + location.getLongitude(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n Log.d(TAG, \"onRequestPermissionsResult()\");\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (requestCode == REQ_PERMISSION) {\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission granted\n getLastKnownLocation();\n\n } else {\n // Permission denied\n permissionsDenied();\n }\n }\n }", "public void getLocationPermission() {\n if (!isPermissionGranted())\n // get the location permission from user\n // this will prompt user a dialog to give the location permission\n requestPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n /*ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);*/\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,@NonNull int[] grantResults) {\n if (requestCode != PermissionUtils.REQUEST_CODE) {\n return;\n }\n if (PermissionUtils.isPermissionGranted(new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION}, grantResults)) {\n //If you have permission, go to the code to get the location value\n initGoogleMapLocation();\n } else {\n Toast.makeText(this, \"Stop apps without permission to use location information\", Toast.LENGTH_SHORT).show();\n //finish();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[], int[] grantResults) {\n\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n //\n switch (requestCode) {\n case REQUEST_ID_ACCESS_COURSE_FINE_LOCATION: {\n\n // Note: If request is cancelled, the result arrays are empty.\n // Permissions granted (read/write).\n if (grantResults.length > 1\n && grantResults[0] == PackageManager.PERMISSION_GRANTED\n && grantResults[1] == PackageManager.PERMISSION_GRANTED) {\n\n Toast.makeText(this, \"Permission granted!\", Toast.LENGTH_LONG).show();\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n\n }\n\n // Show current location on Map.\n this.showMyLocation();\n }\n // Cancelled or denied.\n else {\n Toast.makeText(this, \"Permission denied!\", Toast.LENGTH_LONG).show();\n }\n break;\n }\n }\n }", "@Override\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\n Log.i(TAG, \"All location settings are satisfied.\");\n requestDangerousPermission();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n switch (requestCode) {\n case MY_LOCATION:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n gMap.setMyLocationEnabled(true);\n }\n } else {\n Toast.makeText(getActivity().getApplicationContext(), \"Bit Chat requires location permissions to be granted\", Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if(requestCode==REQUEST_location)\n if (Connectivity.Checkinternet(getActivity())) {\n if (requestCode == 100) {\n if (!PermissionUtils.isPermissionGranted(permissions, grantResults, Manifest.permission.ACCESS_FINE_LOCATION) &&\n !PermissionUtils.isPermissionGranted(permissions, grantResults, Manifest.permission.ACCESS_COARSE_LOCATION))\n setupmap();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case LOCATION_REQUEST_CODE:\n // If request is denied, the result arrays are empty.\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n //Permission Granted\n fetchLastLocation();\n } else {\n AlertDialog alertDialog = new AlertDialog.Builder(MapsActivity.this).create();\n alertDialog.setTitle(\" Location Permission Denied!\");\n alertDialog.setMessage(\"\\nDefault Birmingham Location Used:\\n New Street Train Station\");\n alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n //Set default current location of New Street\n Location defaultLocation = new Location(\"LocationManager.GPS_PROVIDER\");\n defaultLocation.setLatitude(52.478060);\n defaultLocation.setLongitude(-1.898493);\n currentLocation = defaultLocation;\n supportMapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_content);\n supportMapFragment.getMapAsync(MapsActivity.this);\n break;\n }\n }\n }", "private void locationPermission() {\n if(Build.VERSION.SDK_INT<23){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n }else{\n if(checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n return;\n }\n\n if(shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_COARSE_LOCATION) && shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)){\n Snackbar.make(drawer,\"Location access is required to show your friend and questions on map.\",Snackbar.LENGTH_INDEFINITE)\n .setAction(\"OK\", new View.OnClickListener() {\n @TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View v) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n })\n .show();\n }else{\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n Log.d(LOG_TAG, \"onRequestPermissionsResult() called\");\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n boolean permissionsAccepted = false;\n switch (requestCode) {\n case REQUEST_LOCATION_PERMISSIONS:\n permissionsAccepted = (grantResults[0] == PackageManager.PERMISSION_GRANTED) && (grantResults[1] == PackageManager.PERMISSION_GRANTED);\n }\n Log.d(LOG_TAG, \"onRequestPermissionsResult(): \" + permissionsAccepted);\n if (!permissionsAccepted) {\n // User is required to allow location tracking - display error message\n Toast.makeText(this, getString(R.string.require_location_permissions), Toast.LENGTH_LONG).show();\n finish();\n } else {\n initializeComponents();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case 1:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n\n } else {\n Toast.makeText(getContext(), \"This app needs location permission to be granted!,\",\n Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n break;\n }\n }", "private void requestLocationPermission() {\n Log.d(MainActivity.TAG,\"Requesting location permission.\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (shouldShowRequestPermissionRationale(\n android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n Toast.makeText(this, R.string.location_permission_request_rationale, Toast.LENGTH_SHORT).show();\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n }\n requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MainActivity.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onSuccess(Location location) {\n Log.e(\"onRequestPermissions\", \"Success\");\n if (location != null) {\n wayLatitude = location.getLatitude();\n wayLongitude = location.getLongitude();\n Log.e(\"getLocation\", String.valueOf(wayLongitude));\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_FINE_LOCATION) == PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_COARSE_LOCATION) == PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{\n ACCESS_FINE_LOCATION,\n ACCESS_COARSE_LOCATION\n }, PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@SuppressLint(\"NewApi\")\n @Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case 1340:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n Toast.makeText(this, \"Location cannot be obtained due to \" + \"missing permission.\", Toast.LENGTH_LONG).show();\n }\n break;\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void\n onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n if (requestCode == PERMISSION_ID) {\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n getLastLocation();\n }\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocation() {\n if(ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)){\n new AlertDialog.Builder(this)\n .setTitle(\"Location Permission Required\")\n .setMessage(\"This app needs permission to use your location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(RestaurantsActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n })\n .create()\n .show();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n }\n }", "@Override\n public void\n onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n if (requestCode == PERMISSION_ID) {\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n getLastLocation1();\n }\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[],\n @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case LOCATION_PERMISSION_REQUEST_CODE: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0) {\n for (int i = 0; i < permissions.length; i++) {\n if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = false;\n return;\n }\n }\n mLocationPermissionGranted = true;\n //initialize our map\n initMap();\n getDeviceLocation();\n }\n }\n }\n\n }", "private void getLocationPermission(){\n Log.d(TAG, \"getLocationPermission: getting location permission.\");\n String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n COURSE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mLocationPermissionGaranted = true;\n getDeviceLocation();\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(activity.getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(activity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED)\n {\n mLocationPermissionGranted = true;\n } else {\n requestPermissions(\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION\n );\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n mLocationPermissionGranted = false;\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n mLocationPermissionGranted = false;\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(mContext,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(mActivity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // permission was granted by the user. Proceed with GPS location check\n mRequestingLocationUpdates = true;\n } else {\n // permission denied. Do not proceed with GPS location check\n mRequestingLocationUpdates = false;\n //If permission has been denied, lets the user know that the app cannot be operated\n //without the location permissions enabled\n if (ActivityCompat.shouldShowRequestPermissionRationale(RecordLapActivity.this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n Toast.makeText(RecordLapActivity.this,\n \"Location permissions required to operate Sprint\", Toast.LENGTH_LONG).show();\n }\n }\n // Include any other permission requests after this point\n }\n }\n }", "private void requestLocationPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Permission needed\")\n .setMessage(\"Location Permission is needed to show your current location on the map\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(ScavengerHunt.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Toast.makeText(ScavengerHunt.this, \"Location Permission is needed to update the map\", Toast.LENGTH_SHORT).show();\n }\n })\n .create()\n .show();\n\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n }", "private void fetchPermissionsFromUser() {\n Log.d(TAG, \"in fetch permisssion s\");\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_CONTACTS)) {\n\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION show request\");\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION with return request\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION erequest\");\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION with return requet\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == MY_PERMISSIONS_REQUEST_LOCATION) {\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n\n // permission was granted. Do the\n // contacts-related task you need to do.\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n\n if (mGoogleApiClient == null) {\n buildGoogleApiClient();\n }\n mMap.setMyLocationEnabled(true);\n }\n\n } else {\n\n // Permission denied, Disable the functionality that depends on this permission.\n Toast.makeText(this, \"permission denied\", Toast.LENGTH_LONG).show();\n }\n\n // other 'case' lines to check for other permissions this app might request.\n // You can add here other case statements according to your requirement.\n }\n }", "private void checkLocationPermission() {\n\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n //location permission required\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_FINE_LOCATION);\n\n }else{\n //location already granted\n checkCoarseAddress();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[], @NonNull int[] grantResults) {\n switch (requestCode) {\n case MainActivity.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if ((grantResults.length > 0)\n && (grantResults[0] == PackageManager.PERMISSION_GRANTED)) {\n Log.d(MainActivity.TAG,\"Location Permission Granted.\");\n if(checkGoogleApiAvailability()) {\n start();\n }\n } else {\n alertUserAboutError(getString(R.string.no_location_found_address),\"Open Settings?\",ForecastRetrievalServiceConstants.LOCATION_FAILURE_RESULT);\n }\n }\n }\n }", "public void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n getDeviceLocation();\n updateLocationUI();\n }\n }\n }\n }", "private void requestPermissionAccessLocation() {\n int permissionCheck = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n Log.d(TAG, \"permissionCheck: \" + permissionCheck);\n\n if (permissionCheck == PackageManager.PERMISSION_GRANTED) {\n updateFragmentOnLocationSuccess();\n } else {\n ActivityCompat\n .requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_PERMISSION_LOCATION);\n }\n }", "public void checkLocationPermission() {\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, getActivity(), getActivity())) {\n if (checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, getActivity(), getActivity())) {\n gpsTracker.getLocation();\n } else {\n requestPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n requestPermission(android.Manifest.permission.ACCESS_FINE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n gpsTracker.getLocation();\n }\n } catch (Exception e) {\n // logException(e, \"GpsMapManualFragment_checkLocationPermission()\");\n }\n\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n\n int coarseLocation = ActivityCompat.checkSelfPermission(this, PERMISSIONS_LOCATION[0]);\n int fineLocation = ActivityCompat.checkSelfPermission(this, PERMISSIONS_LOCATION[1]);\n\n switch (requestCode) {\n\n case (REQUEST_LOCATION_PERMISSION):\n\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Log.v(TAG, \"Permission Granted\");\n\n if (coarseLocation == PackageManager.PERMISSION_GRANTED && fineLocation == PackageManager.PERMISSION_GRANTED) {\n\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 20000, 10, locationListener);\n\n // Permission are granted. Check if GPS and bluetooth are enabled or send an alert to activate them\n if (!mBluetoothAdapter.isEnabled() && mAlertBlue == null)\n mAlertBlue = showAlert(ALERT_BLUE).create();\n if (!mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) && mAlertGps == null) {\n mAlertGps = showAlert(ALERT_GPS).create();\n mAlertGps.show();\n }\n if (mBluetoothAdapter.isEnabled() && mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n Log.d(TAG, \"scanLeDevice(true) after permission and all enabled\");\n scanLeDevice(true);\n }\n }\n\n } else {\n\n Log.v(TAG, \"Permission NOT Granted\");\n showNegativeDialog(getResources().getString(R.string.perm_error_title),\n getResources().getString(R.string.perm_error_msg)\n );\n if (mLocationManager != null)\n mLocationManager.removeUpdates(locationListener);\n }\n break;\n\n default:\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[], @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n }\n }\n }\n updateLocationUI();\n }", "@Override\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\n if (ActivityCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { //check for permission\n //Permission Required\n } else {\n mFusedLocationClient.requestLocationUpdates(mLocationRequest,\n mLocationCallback,\n null /* Looper */);\n }\n }", "private void getLocationPermission(){\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationAccess = true;\n } else {\n locationAccess = false;\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION);\n }\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n Log.d(TAG, \"onSuccess: Location : \" + locationResult);\n if (locationResult == null) {\n return;\n }\n for (Location location : locationResult.getLocations()) {\n // Update UI with location data\n Toast.makeText(MainActivity.this, \"Location : \" + location, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[],\n @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n }\n }\n }\n updateLocationUI();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[],\n @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n }\n }\n }\n updateLocationUI();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[],\n @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n }\n }\n }\n updateLocationUI();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[],\n @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n }\n }\n }\n updateLocationUI();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[],\n @NonNull int[] grantResults) {\n mLocationPermissionGranted = false;\n switch (requestCode) {\n case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n }\n }\n }\n updateLocationUI();\n }", "public static void checkLocationPermission() {\n globalContext.stopService(locationIntent);\n\n globalFragmentActivity.requestPermissions(\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n locationPermissionGranted = false;\n if (requestCode == PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION) {// If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n }\n }\n }", "private void permissionLocationRequest() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int hasLocationPermission = checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION);\n if (hasLocationPermission != PackageManager.PERMISSION_GRANTED) {\n if (!shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)) {\n showMessageOKCancel(\"You need to allow access to Location\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n });\n }\n }\n\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode){\n case PERMISSION_FINE_LOCATION:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED){\n updateGPS();\n }else{\n Toast.makeText(this, \"This app requires permission.\", Toast.LENGTH_SHORT).show();\n finish();\n }\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,@NonNull String[] permissions,@NonNull int[] grantResults) {\n switch (requestCode) {\n case 1:\n if (grantResults.length > 0\n && grantResults[0]\n == PackageManager.PERMISSION_GRANTED) {\n enableMyLocation();\n break;\n }else{\n Toast.makeText(this,\"Permission Denied.\",Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n switch (requestCode) {\n case REQUEST_LOCATION_PERMISSION:\n if (grantResults.length > 0\n && grantResults[0]\n == PackageManager.PERMISSION_GRANTED) {\n enableMyLocation();\n break;\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[],\n int[] grantResults) {\n //In our example we only have one permission, but we could have more\n //we use the requestCode to distinguish them\n switch (requestCode) {\n case LOCATION_PERMISSION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n permissionGranted = true;\n checkAndStartLocationUpdate();\n } else {\n // permission denied, boo! Disable the\n // functionality that depends on this permission.\n AlertDialog.Builder builder = new AlertDialog.Builder(AggStato.this);\n builder.setMessage(\"Questa app necessita dei permessi di locazione\").setTitle(\"Login Error\");\n\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n return;\n }\n\n // other 'case' lines to check for other\n // permissions this app might request\n }\n }", "@Override\n public void onClick(View view) {\n locationChecker.checkBeforeAsking(new PermissionChecker.CheckPermissionListener() {\n @Override\n public void onPermissionDenied() {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onPermissionGranted() {\n\n gm.requestLastLocation(new GeoManager.GeoDirectLocationListener() {\n @Override\n public void onLocationError(Throwable error) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onLocationSuccess(double latitude, double longitude) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, latitude, longitude);\n }\n });\n }\n });\n }", "private void setupLocation() {\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted.\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION) &&\n ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)) {\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n } else {\n // Request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n }\n } else {\n // Permission has already been granted\n }\n }", "public void checkLocationPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n 99);\n }\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == RC_PERMISSION_ALL) {\n if (permissions.length > 0 && /*permissions[0].equals(android.Manifest.permission.READ_EXTERNAL_STORAGE) &&*/ grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n recreate();\n } else if (grantResults.length > 0 &&/* permissions[0].equals(Manifest.permission.ACCESS_FINE_LOCATION) && */grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n recreate();\n// mLocationPermissionGranted = true;\n } else if (/*grantResults.length > 0 &&*/ grantResults[0] == PackageManager.PERMISSION_DENIED) {\n Toast.makeText(this, \"Permissions denied the app will shut down shortly\", Toast.LENGTH_LONG).show();\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n finish();\n }\n }, 2000);\n }\n }\n\n // donot allow the onmap raedy proceed unless the permissions are granted and gps is on\n//\n }", "private void requestPermission() {\n if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(this.getResources().getString(R.string.request_location_permission_message))\n .setPositiveButton(this.getResources().getString(R.string.OK), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n } else {\n ActivityCompat.requestPermissions((Activity) mContext,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n if (requestCode == REQUEST_FINE_LOCATION) {\n if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(getApplicationContext(), \"Permissão Concedida\", Toast.LENGTH_LONG).show();\n //populateAutoComplete();\n }\n }\n }", "@Override\n public void onSuccess(Location location) {\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n Log.i(\"INFO\", \"onRequestPermissionResult\");\n if (requestCode == REQUEST_PERMISSIONS_REQUEST_CODE) {\n if (grantResults.length <= 0) {\n // If user interaction was interrupted, the permission request is cancelled and you\n // receive empty arrays.\n Log.i(\"INFO\", \"User interaction was cancelled.\");\n } else if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission granted.\n getLastLocation();\n }\n }\n }", "@Override\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\n getCurrentLocation();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[], int[] grantResults) {\n switch (requestCode) {\n case ACCESS_LOCATION_CODE: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n\n // permission was granted, yay! Do the\n // contacts-related task you need to do.\n mLocationPermissionsGranted = true;\n\n } else {\n\n // permission denied, boo! Disable the\n // functionality that depends on this permission.\n mLocationPermissionsGranted = false;\n }\n return;\n }\n\n // other 'case' lines to check for other\n // permissions this app might request.\n }\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n Location location = locationResult.getLastLocation();\n if (location != null) {\n onLocationChanged(location);\n }\n }", "private void getLocation(LocationListener listener){\n FusedLocationProviderClient fusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n try {\n if (locationPermissionGranted){\n Task<Location> locationResult = fusedLocationClient.getLastLocation();\n locationResult.addOnCompleteListener(this, task -> {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n listener.onSuccess(task.getResult());\n } else {\n Toast.makeText(this, task.getException().getMessage(), Toast.LENGTH_LONG).show();\n }\n progressBar.setVisibility(View.GONE);\n });\n }\n } catch (SecurityException e){\n Log.e(\"Exception: %s\", e.getMessage(), e);\n }\n }", "private boolean checkPermissonLocationRequest(int requestCode) {\n if (Build.VERSION.SDK_INT >= 23) {\n if (checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, requestCode);\n return false;\n }\n } else {\n return true;\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 100) {\n if (resultCode != RESULT_OK)\n Toast.makeText(getContext(), \"GPS est déactivé\", Toast.LENGTH_LONG).show();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }", "private void askPermissionsAndShowMyLocation() {\n boolean isGPSEnabled = false;\n // flag for network status\n boolean isNetworkEnabled = false;\n // flag for GPS status\n boolean canGetLocation = false;\n LocationManager locationManager;\n\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n if (Build.VERSION.SDK_INT >= 23) {\n // flag for GPS status\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n// if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n// || accessFinePermission != PackageManager.PERMISSION_GRANTED)\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(this, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n this.showMyLocation();\n }\n\n } else {\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n this.showMyLocation();\n }\n\n\n }\n // Show current location on Map.\n }", "public void requestLocationPermision(){\n\n // Forma de actuar diferente si la versión del dispositivo en Marshmallow\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {\n Log.d(TAG, \"Versión 23\");\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //Si no tenemos permiso, lo pedimos\n\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) {\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n Log.d(TAG, \"Show an expanation\");\n new AlertDialog.Builder(this)\n .setMessage(getString(R.string.show_explanation))\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[] {Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n }\n })\n .create()\n .show();\n\n } else{\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_CODE_ASK_PERMISSIONS);\n }\n } else{\n Log.d(TAG, \"Tenemos permiso\");\n\n String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n if (!provider.contains(\"gps\")) {\n //Si el GPS no esta activo, pedimos su iniciación\n AlertNoGps();\n }\n\n //Inicializacion de los providers\n for (String s : locationManager.getAllProviders()) {\n int minDistance = 2;\n int checkInterval = 2;\n locationManager.requestLocationUpdates(s, checkInterval,\n minDistance, this);\n Location actualLocation = locationManager.getLastKnownLocation(s);\n //Comprobamos si es una mejor localización\n if (actualLocation!=null){\n if (isBetterLocation(actualLocation)){\n Log.d(TAG, \"Mejor localización -> \" + s + \" - \"+ actualLocation);\n bestLocation = actualLocation;\n }\n }\n }\n\n mMap.setMyLocationEnabled(true);\n setLocation();\n }\n } else{\n //Comprobacion de permisos\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"Tenemos permiso\");\n\n String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n\n if (!provider.contains(\"gps\")) {\n //Si el GPS no esta activo, pedimos su iniciación\n AlertNoGps();\n }\n\n //Inicializacion de los providers\n for (String s : locationManager.getAllProviders()) {\n int minDistance = 2;\n int checkInterval = 2;\n locationManager.requestLocationUpdates(s, checkInterval,\n minDistance, this);\n Location actualLocation = locationManager.getLastKnownLocation(s);\n if (actualLocation!=null){\n if (isBetterLocation(actualLocation)){\n Log.d(TAG, \"Mejor localización -> \" + s + \" - \"+ actualLocation);\n bestLocation = actualLocation;\n }\n }\n }\n\n mMap.setMyLocationEnabled(true);\n setLocation();\n }\n }\n\n }", "@Override\n public void onRequestPermissionsResult (int requestCode, String[] permissions,\n int[] grantResults) {\n int index = 0;\n Map<String, Integer> PermissionsMap = new HashMap<String, Integer>();\n for (String permission : permissions){\n PermissionsMap.put(permission, grantResults[index]);\n index++;\n }\n\n if((PermissionsMap.get(Manifest.permission.ACCESS_FINE_LOCATION) != 0)\n || PermissionsMap.get(Manifest.permission.ACCESS_COARSE_LOCATION) != 0){\n Toast.makeText((AppCompatActivity)getActivity(), \"Location permission is a must\", Toast.LENGTH_SHORT).show();\n// finish();\n }\n else\n {\n// this.ble.initializeBle((AppCompatActivity)getActivity());\n }\n }", "private boolean isLocationAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n //If permission is granted returning true\r\n if (result == PackageManager.PERMISSION_GRANTED)\r\n return true;\r\n\r\n //If permission is not granted returning false\r\n return false;\r\n }", "@Override\r\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\r\n @NonNull int[] grantResults) {\r\n Log.i(TAG, \"onRequestPermissionResult\");\r\n if (requestCode == REQUEST_PERMISSIONS_REQUEST_CODE) {\r\n if (grantResults.length <= 0) {\r\n // If user interaction was interrupted, the permission request is cancelled and you\r\n // receive empty arrays.\r\n Log.i(TAG, \"User interaction was cancelled.\");\r\n } else if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\r\n if (mRequestingLocationUpdates) {\r\n Log.i(TAG, \"Permission granted, updates requested, starting location updates\");\r\n startLocationUpdates();\r\n }\r\n } else {\r\n // Permission denied.\r\n Log.i(TAG, \"Permission denied\");\r\n }\r\n }\r\n }", "@Override\n public void onRequestPermissionsResult(@NonNull int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (permissions.length == 0) {\n return;\n }\n boolean allPermissionsGranted = true;\n if (grantResults.length > 0) {\n for (int grantResult : grantResults) {\n if (grantResult != PackageManager.PERMISSION_GRANTED) {\n allPermissionsGranted = false;\n break;\n }\n }\n }\n if (!allPermissionsGranted) {\n boolean somePermissionsForeverDenied = false;\n for (String permission : permissions) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) {\n //denied\n } else {\n if (ActivityCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED\n && requestCode == Extra.LOCATION) {\n getLocation();\n } else {\n //set to never ask again\n somePermissionsForeverDenied = true;\n }\n }\n }\n if (somePermissionsForeverDenied) {\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);\n alertDialogBuilder.setTitle(R.string.permissions_required)\n .setMessage(R.string.you_have_explicitly_denied_permissions_which_are_required_by_this_app_to_run_for_this_action_open_settings_go_to_permissions_and_allow_them)\n .setPositiveButton(R.string.settings, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,\n Uri.fromParts(Extra.PACKAGE, getPackageName(), null));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n })\n .setCancelable(false)\n .create()\n .show();\n }\n } else if (requestCode == Extra.LOCATION) {\n getLocation();\n }\n }", "public void askForPermissionsGrant(){\n int res =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n int res2 =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n if (res!= PackageManager.PERMISSION_GRANTED || res2!= PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"We need to access your location\")\n .setMessage(\"We want to track every breath you take\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.READ_CONTACTS},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n builder.create().show();\n }\n else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n publishLastLocation();\n }\n\n }", "private void checkLocationPermission() {\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)) {\n new AlertDialog.Builder(getActivity())\n .setTitle(\"give permission\")\n .setMessage(\"give permission message\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n })\n .create()\n .show();\n }\n else{\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n }\n\n }", "@Override\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\n }", "@Override\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n onLocationChanged(location);\n findNearbyHospitals(location);\n }\n }" ]
[ "0.71567273", "0.7141907", "0.71304005", "0.7114405", "0.7099874", "0.69807446", "0.6941455", "0.6903116", "0.6890953", "0.68448895", "0.683298", "0.6827792", "0.6819534", "0.68057734", "0.68019074", "0.6792721", "0.67802286", "0.6773205", "0.67676735", "0.67322105", "0.67148507", "0.66946524", "0.6685742", "0.6681441", "0.66693145", "0.6664885", "0.66585773", "0.6655855", "0.6652527", "0.6650862", "0.6647419", "0.66424155", "0.6637791", "0.66320693", "0.6629032", "0.66255295", "0.6603396", "0.66008085", "0.6598446", "0.65955085", "0.659256", "0.659256", "0.65838546", "0.65838546", "0.65809137", "0.65809137", "0.65795827", "0.65788156", "0.6574361", "0.6567929", "0.6554764", "0.6541093", "0.65380913", "0.6513956", "0.6505365", "0.6504921", "0.65044177", "0.6494669", "0.6490741", "0.6489007", "0.64807147", "0.6476674", "0.6474935", "0.6474935", "0.6474935", "0.6474935", "0.6474935", "0.6456714", "0.64514107", "0.6433928", "0.64040434", "0.6391496", "0.63639605", "0.63624805", "0.63538575", "0.63462555", "0.6336674", "0.6331324", "0.6321815", "0.62819725", "0.6270427", "0.6269897", "0.62609833", "0.6260742", "0.62461084", "0.62400615", "0.62238604", "0.62090695", "0.6205922", "0.6200176", "0.6198495", "0.61854833", "0.61478764", "0.6140348", "0.61329585", "0.61263067", "0.6110252", "0.6110252", "0.6102335" ]
0.6301209
80
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app.
@Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; // Add a marker in Sydney and move the camera LatLng sydney = new LatLng(-34, 151); mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney")); mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney)); // Enable the zoom controls for the map mMap.getUiSettings().setZoomControlsEnabled(true); // Prompt the user for permission. getLocationPermission(); addMarkerToMap(mMap.getCameraPosition().target, "Plceaaa"); mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() { @Override public void onMarkerDragStart(Marker marker) { } @Override public void onMarkerDrag(Marker marker) { // draggedMarker.setPosition(marker.getPosition()); /*LatLng midLatLng = mMap.getCameraPosition().target; draggedMarker.setPosition(midLatLng);*/ } @Override public void onMarkerDragEnd(Marker marker) { Log.d(TAG, "Marker dragged to latitude" + marker.getPosition().latitude + " longitude " + marker.getPosition().longitude); // draggedMarker = marker; // marker.setPosition(marker.getPosition()); } }); mMap.setOnCameraIdleListener(new GoogleMap.OnCameraIdleListener() { @Override public void onCameraIdle() { //get latlng at the center by calling LatLng midLatLng = mMap.getCameraPosition().target; draggedMarker.setPosition(midLatLng); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n lat = addresses.get(0).getLatitude();\n lng = addresses.get(0).getLongitude();\n } catch (Exception e) {\n lat = -34;\n lng = 151;\n }\n\n LatLng sydney = new LatLng(lat, lng);\n googleMap.addMarker(new MarkerOptions().position(sydney).title(\"WSU Paramatta\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n googleMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney, Australia, and move the camera.\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(17.2231, 78.2827);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Hyderbbad\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n initializeMap();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n // Add a marker in Sydney and move the camera\n if (loc != -1 && loc != 0) {\n locationManager.removeUpdates(this);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(MainActivity.locations.get(loc), 10));\n\n mMap.addMarker(new MarkerOptions().position(MainActivity.locations.get(loc)).title(MainActivity.places.get(loc)));\n } else {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationManager.requestLocationUpdates(provider, 400, 1, this);\n\n }\n mMap.setOnMapLongClickListener(this);\n }", "@SuppressLint(\"MissingPermission\")\n @Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"MAP_FRAG\", \"MapCallback\");\n\n mMap = googleMap;\n\n Log.d(\"MAP\", mMap.toString());\n\n mMap.setPadding(0, 0, 0, 300);\n\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(Common.latitude, Common.longitude))\n .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_mark_red)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Common.latitude, Common.longitude), 15.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getMarkers();\n\n // Add a marker in Sydney and move the camera\n LatLng penn = new LatLng(39.952290, -75.197060);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(penn, 15));\n mMap.setMyLocationEnabled(true);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setCompassEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n //below line is use to add custom marker on our map.\n .icon(BitmapFromVector(getApplicationContext(), R.drawable.ic_flag)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mapReady = true;\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng Bangalore = new LatLng(12.972442, 77.580643);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(Bangalore)\n .zoom(17)\n .bearing(90)\n .tilt(30)\n .build();\n mMap.addMarker(new MarkerOptions().position(Bangalore).title(\"Marker in Bangalore\"));\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.setIndoorEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(43.777365,-79.3406);\n LatLng loc22=new LatLng(43.775748,-79.336674);\n LatLng loc3=new LatLng(43.769240,-79.360010);\n LatLng loc4=new LatLng(43.769290,-79.400101);\n LatLng loc5=new LatLng(43.769552,-79.601201);\n mMap.addMarker(new MarkerOptions().position(sydney).title(values[0]));\n mMap.addMarker(new MarkerOptions().position(loc22).title(values[1]));\n mMap.addMarker(new MarkerOptions().position(loc3).title(values[2]));\n mMap.addMarker(new MarkerOptions().position(loc4).title(values[3]));\n mMap.addMarker(new MarkerOptions().position(loc5).title(values[4]));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng position = new LatLng(latitude, longitude);\n\n // centre the map around the specified location\n mMap.animateCamera(CameraUpdateFactory.newLatLng(position));\n\n // add a marker at the specified location\n MarkerOptions options = new MarkerOptions();\n mMap.addMarker(options.position(position).title(locationName));\n\n // configure the map settings\n mMap.setTrafficEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n // enable the zoom controls\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n\n /* // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in city and move the camera\n LatLng cityCoord = new LatLng(lat, lng);\n float zoom = (float) 9.0;\n mMap.addMarker(new MarkerOptions().position(cityCoord).title(cityAddr));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(cityCoord, zoom));\n }", "public static void onMapReady() {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n LatLng singapore = new LatLng(1.338709, 103.819519);\n googleMap.addMarker(new MarkerOptions().position(singapore)\n .title(\"Marker in Singapore\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(singapore));\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11),3000,null);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n addMarkers();\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng place = new LatLng(Double.parseDouble(lat),Double.parseDouble(longitude));\n\n mMap.addMarker(new MarkerOptions().position(place));\n moveToCurrentLocation(place);\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\r\n googleMap.setMyLocationEnabled(true);\r\n\r\n LocationManager locationManager = (LocationManager)\r\n getSystemService(Context.LOCATION_SERVICE);\r\n Criteria criteria = new Criteria();\r\n\r\n Location currentLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\r\n\r\n LatLng sydney = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\r\n\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 13));\r\n\r\n } else {\r\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true);\r\n }\r\n\r\n updateMarkersData(googleMap);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n CameraUpdate cUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(35.68, 139.76), 12);\n //mMap.addMarker(new MarkerOptions().position(new LatLng(35.68, 139.76)).title(\"Marker in Tokyo\"));\n mMap.moveCamera(cUpdate);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng wroclaw = new LatLng(51.110, 17.034);\n mMap.addMarker(new MarkerOptions().position(wroclaw));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(wroclaw, 12));\n mMap.clear();\n // Setting a click event handler for the map\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n bSelect.setEnabled(true);\n // Creating a marker\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting the position for the marker\n markerOptions.position(latLng);\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(\"NOWY: \" + latLng.latitude + \" : \" + latLng.longitude);\n\n markerOptions.alpha(0.6f);\n // Clears the previously touched position\n mMap.clear();\n\n // Animating to the touched position\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n\n location = latLng.latitude + \" \" + latLng.longitude;\n\n setupMarker();\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mLocationRequest = LocationRequest.create()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(1*1000)\n .setFastestInterval(5 * 100);\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n Log.i(TAG, \"map is ready\");\r\n mMap = googleMap;\r\n\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(this);\r\n mMap.setOnMyLocationClickListener(this);\r\n\r\n startLocationUpdates();\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n frLatLng = new LatLng(getLatitude, getLongitude);\n\n map = googleMap;\n map.getUiSettings().setMyLocationButtonEnabled(false);\n\n if (ActivityCompat.checkSelfPermission(getContext()\n , Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(getContext(),\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n\n map.addMarker(new MarkerOptions().position(frLatLng)).setTitle(getString(R.string.my_location));\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(frLatLng, 520));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng montesson = new LatLng(48.9190286,2.1380955);\n mMap.addMarker(new MarkerOptions().position(montesson).title(\"Marker in Montesson\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(montesson));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n int i = 12;\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n i);\n\n }\n mMap.setMyLocationEnabled(true); //when location changed call line. loaction manager\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latitude, longitude);\n addMarker(myLocation, name);\n moveCamera(myLocation, 3);\n\n //search a place\n /*searchInput = (EditText) findViewById(R.id.map_search_input);\n searchInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if(actionId == EditorInfo.IME_ACTION_SEARCH\n || actionId == EditorInfo.IME_ACTION_DONE\n || actionId == KeyEvent.ACTION_DOWN\n || actionId == KeyEvent.KEYCODE_ENTER)\n //search location\n geoLocate();\n return false;\n }\n });*/\n\n //add location\n addButton = findViewById(R.id.map_add_button);\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.putExtra(\"latitude\", marker.getPosition().latitude);\n intent.putExtra(\"longitude\", marker.getPosition().longitude);\n intent.putExtra(\"name\", marker.getTitle());\n setResult(4, intent);\n finish();\n }\n });\n\n //long tap to add a marker\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(@NonNull LatLng latLng) {\n addMarker(latLng, name);\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(this);\n markerIconBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.ic_driver_check_in);\n\n mFillColor = Color.HSVToColor(50, new float[]{0, 1, 1});\n mStrokeColor = Color.BLACK;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n updateLocationUI();\n getDeviceLocation();\n // Add a marker in Sydney and move the camera\n //float zoom = 15;\n //LatLng gbc = new LatLng(43.676209, -79.410703);\n //mMap.addMarker(new MarkerOptions().position(gbc).title(\"Marker in GBC\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(gbc, zoom));\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(121.5729889, 25.0776557);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"This is my first Maker\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng CSN = new LatLng(51.87, -8.481);\n mMap.setMapType(MAP_TYPE_HYBRID);\n mMap.addMarker(new MarkerOptions().position(CSN).title(\"Marker at CSN college\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CSN, 15F));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mGoogleMap != null) {\n if (checkPermission()) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n // Check if we were successful in obtaining the map.\n if (mMapView != null) {\n\n mGoogleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"It's Me!\"));\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 10));\n }\n });\n\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"TEST\", \"MAP READY\");\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n LatLng curLocation = new LatLng(latitude,longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(curLocation,15.0f);\n setPin(latitude,longitude, null);\n mMap.moveCamera(cameraUpdate);\n for(int i = 0; i < restaurantList.size(); i++){\n double lat = restaurantList.get(i).getLatitude();\n double lng = restaurantList.get(i).getLongitude();\n setPin(lat, lng, restaurantList.get(i));\n }\n //Check we have the users permission to access their location\n // if we dont have it, we have to request it\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n\n } else {\n //we dont have permission, so we have to ask for it\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_LOCATION_REQUEST_CODE);\n //run asychronously.. show an alert dialog\n //user can choose allow or deny\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n // Add a marker in Sydney and move the camera\r\n LatLng charlotte = new LatLng(35.22, -80.84);\r\n //currentMarker = mMap.addMarker(new MarkerOptions().position(charlotte).title(\"Charlotte, NC\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(charlotte));\r\n //currentMarker.setTag(0);\r\n\r\n mMap.setOnMapLongClickListener(this);\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n //&& ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n ) {\r\n // TODO: Consider calling\r\n\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\r\n @Override\r\n public boolean onMyLocationButtonClick() {\r\n Log.d(\"maps\", \"On my location button click\");\r\n return false;\r\n }\r\n });\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setTrafficEnabled(true);\n googleMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(onMyLocationChangeListener);\n\n // mMap.setPadding(0, 0, 0, 100);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(65.9667, -18.5333))\n .title(\"Hello world\"));\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng loc = new LatLng(v, v1);\n mMap.addMarker(new\n MarkerOptions().position(loc).title(\"0000000000\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"you are in sydney\").draggable(true));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.setOnMarkerDragListener(this);\n mMap.setOnMapLongClickListener(this);\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n // Home Mark\n LatLng home = new LatLng(41.374736, 2.168308);\n float zoom = 13;\n\n // Inicialitzem mapa\n mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN); //Tipus de mapa\n mMap.addMarker(new MarkerOptions().position(home).title(\"IOC\")); //Marcador inicial\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(home, zoom)); //Centrem mapa en el marcador inicial\n\n this.setMapLongClick(mMap);\n this.enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n final LatLng[] myLoc = {new LatLng(1, 1)};\n mMap.setMyLocationEnabled(true);\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n// @Override\n// public void onMyLocationChange(Location location) {\n// myLoc[0] = new LatLng(location.getLatitude(), location.getLongitude());\n// mMap.addCircle(new CircleOptions().center(myLoc[0]));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLoc[0], 15));\n// }\n// });\n\n mMap.addCircle(new CircleOptions().center(new LatLng(lat, lng)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lng), 18));\n\n mMap.setOnPoiClickListener(new GoogleMap.OnPoiClickListener() {\n @Override\n public void onPoiClick(PointOfInterest poi) {\n\n }\n });\n\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n // Add a marker in Sydney and move the camera\n\n\n showItems(lat, lng, radius);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng posini = new LatLng(3.4,-76.5);\n myMarker = mMap.addMarker(new MarkerOptions().position(posini));\n\n requestLocation();\n\n googleMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() {\n @Override\n public void onCameraMove() {\n if (!flag) {\n\n addMarker();\n flag = true;\n }\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(logTag,\"4\");\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST);\n return;\n }\n mMap.setOnMapLongClickListener(this);\n mMap.setOnInfoWindowClickListener( this );\n mMap.setOnMapClickListener(this);\n mMap.setMyLocationEnabled(true);\n ll=new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options = new MarkerOptions().position(ll);\n options.title(getAddressFromLatLng(ll));\n\n Log.d(logTag,\"5\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng hn = new LatLng(14.079526, -87.180662);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(hn));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(hn,7));\n helperFacturacion = new FacturacionHelper(MapListClientesActivity.this);\n\n\n addMarkers();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n setInitialLocation(VehicleData.getLatitude(), VehicleData.getLongitude());\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},101);\r\n }\r\n loc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n populateMap(loc);\r\n try {\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(), lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()), 15.0f));\r\n }catch(Exception blyat){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"No hemos podido acceder a tu localización, revisa el estado de GPS y reinicia la app\");\r\n builder.show();\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n try{\n Geocoder geo = new Geocoder(this);\n\n //Get address provided for location as Address object\n List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);\n Address address = geo.getFromLocationName(location.getAddress(),1).get(0);\n\n LatLng position= new LatLng(address.getLatitude(),address.getLongitude());\n\n googleMap.addMarker(new MarkerOptions().position(position)\n .title(location.getTitle()));\n googleMap.setMinZoomPreference(12);\n googleMap.setMaxZoomPreference(15);\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(position));\n }\n catch (IOException e){\n e.printStackTrace();\n }\n catch(IndexOutOfBoundsException e){\n e.printStackTrace();\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n// updateMap(new LocationModel(41.806363, 44.768531, \"Agmasheneblis Xeivani\"));\n if (shoppingList.getLocationReminder() != null) {\n updateMap(shoppingList.getLocationReminder());\n } else {\n updateMap(null);\n }\n }", "@Override\n @SuppressWarnings({\"MissingPermission\"})\n public void onMapReady(GoogleMap googleMap) {\n\n Log.d(TAG, \"Map is ready.\");\n mMap = googleMap;\n\n mMap.setMyLocationEnabled(true);\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n mGoogleApiClient);\n\n setMarkerToCurrentLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(LocationStorage.getInstance().getLocation().getLatitude(), LocationStorage.getInstance().getLocation().getLongitude());\n// BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_large_marker);\n Marker marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Current Location\").snippet(\"Hold and drag to your desired location\"));\n marker.showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(sydney, 15);\n mMap.animateCamera(cameraUpdate);\n marker.setDraggable(true);\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n LatLng latLng=marker.getPosition();\n Location temp = new Location(LocationManager.GPS_PROVIDER);\n temp.setLatitude(latLng.latitude);\n temp.setLongitude(latLng.longitude);\n LocationStorage.getInstance().setLocation(temp);\n }\n });\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n//\n// return true;\n// }\n// });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mcircleOptions = mcircleOptions.center(sydney);\n mcircleOptions = mcircleOptions.radius(500);\n mcircleOptions = mcircleOptions.strokeWidth(2);\n mcircleOptions = mcircleOptions.strokeColor(Color.argb(100, 255, 73, 73));\n mcircleOptions = mcircleOptions.fillColor(Color.argb(100, 255, 73, 73));\n mMap.addCircle(mcircleOptions);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n !=\n PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n mlatLng = latLng;\n mMap.clear();\n mMap.addMarker(new MarkerOptions().position(mlatLng));\n mcircleOptions = mcircleOptions.center(mlatLng);\n mMap.addCircle(mcircleOptions);\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n geocoder = new Geocoder(Maps.this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(mlatLng.latitude, mlatLng.longitude, 1);\n for (int i=0; i < addresses.get(0).getMaxAddressLineIndex(); i++) {\n Log.e(\"Address\", addresses.get(0).getAddressLine(i) + \"\");\n caddress = addresses.get(0).getAddressLine(i);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n loc_data = getSharedPreferences(\"loc_data\", MODE_PRIVATE);\n SharedPreferences.Editor loc_data_editor = loc_data.edit();\n loc_data_editor.putString(\"lat\", Double.toString(mlatLng.latitude));\n loc_data_editor.putString(\"lng\", Double.toString(mlatLng.longitude));\n loc_data_editor.putString(\"add\", caddress + \"\");\n loc_data_editor.commit();\n }\n });\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n\r\n //Initialize Google Play Services\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n initializeOtherSettlements(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n initializeQuestLocations(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n\n mMap.setOnMarkerClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnPoiClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), 9));\n\n final PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)\n getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);\n\n autocompleteFragment.getView().setBackgroundColor(Color.WHITE);\n autocompleteFragment.getView().setVisibility(View.GONE);\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n //Bias results towards the user's current location\n /*autocompleteFragment.setBoundsBias(new LatLngBounds(\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude),\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude)));*/\n\n //Get info about the selected place.\n //Log.i(TAG, \"Place: \" + place.getName());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n\n updateMapHistory();\n updateCustomTimeUI();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n enableMyLocation();\n buildGoogleApiClient();\n\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n String info = sTitle;\n // Add a marker in Sydney and move the camera\n LatLng pos = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(pos).title(info));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pos));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 8));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n gpsTracker = new GPSTracker(this);\n\n // TODO Cek Permission >= Marshmellow\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&\n checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION\n }, 110);\n return;\n }\n }\n\n if (gpsTracker.canGetLocation()) {\n latawal = gpsTracker.getLatitude();\n lonawal = gpsTracker.getLongitude();\n namelocationawal = myLocation(latawal, lonawal);\n }\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latawal, lonawal);\n locawal.setText(namelocationawal);\n mMap.addMarker(new MarkerOptions().position(myLocation).title(namelocationawal));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 14));\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.setPadding(30, 80, 30, 80);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng oregon = new LatLng(45.3, -122);\n mMap.addMarker(new MarkerOptions().position(oregon).title(\"Marker in Oregon\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(oregon));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n /* mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n LatLng ifto = new LatLng(-10.199202218157746, -48.31158433109522);\n mMap = googleMap;\n mMap.setOnCameraIdleListener(this);\n mMap.addMarker(new MarkerOptions().position(ifto).title(\"IFTO Campus Palmas\"));\n }", "private void setupMap() {\n if (googleMap == null) {\n SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFrag.getMapAsync(this);\n mLocationProvider = new LocationProvider(this, this);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n\n mMap.getUiSettings().setCompassEnabled(true);\n// mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setIndoorLevelPickerEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n mMap.getUiSettings().setAllGesturesEnabled(true);\n getDeviceLocation();\n mMap.setOnMarkerDragListener(this);\n\n }\n }", "public void onMapReady(GoogleMap googleMap , double lati, double longi) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(lati, longi);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mGoogleMap = map;\n mGoogleMap.setMyLocationEnabled(true);\n Log.d(TAG, \"Map Ready\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n\n mMap = googleMap;\n\n attachLocationListener();\n\n\n mMap.setOnMarkerDragListener(this);\n\n }", "public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n mMap.moveCamera(CameraUpdateFactory.zoomTo(1));\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n\r\n /// This allows the user to zoom in and out of the map\r\n mMap.getUiSettings().setZoomControlsEnabled(true);\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n mMap.getUiSettings().isMyLocationButtonEnabled();\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n //Agafar la localitzacio actual per mostrar-ho al mapa\n LocationManager locationManager = (LocationManager)\n getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n LatLng actual = new LatLng((location.getLatitude()),location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(actual,13));\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(getContext());\n mMap = googleMap;\n mMap.setMinZoomPreference(13.0f);\n mMap.setMaxZoomPreference(20.0f);\n mMap.setOnMapClickListener(this);\n mMap.setInfoWindowAdapter(this);\n mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener);\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.\n ACCESS_FINE_LOCATION}, 1);\n } else {\n mMap.setMyLocationEnabled(true);\n }\n }\n\n mMap.setMyLocationEnabled(true);\n\n buildGoogleApiClient();\n mGoogleApiClient.connect();\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n mMap = map;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng point) {\n mMap.clear();\n buildMarker(\"User Tap\", \"This is snippet\", point, true);\n @SuppressLint(\"DefaultLocale\") String latLong = String.format(\"%f,%f\", point.latitude, point.longitude);\n String endPoint = String.format(placesURL,latLong, String.valueOf(distance), BuildConfig.API_KEY);\n Location locationSelected = new Location(mLastKnownLocation);\n locationSelected.setLatitude(point.latitude);\n locationSelected.setLongitude(point.longitude);\n showPlacesNearby(locationSelected, endPoint);\n }\n });\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n mMap.clear();\n }\n });\n\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n mMap.clear();\n updateLocationUI();\n getDeviceLocation();\n return true;\n }\n });\n\n\n // Prompt the user for permission.\n getLocationPermission();\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setAllGesturesEnabled(mLock);\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n riderLat = getIntent().getDoubleExtra(DriverActivity.RIDER_LATITUDE_EXTRA, 0.0);\n riderLong = getIntent().getDoubleExtra(DriverActivity.RIDER_LONGITUDE_EXTRA, 0.0);\n LatLng rider = new LatLng(riderLat, riderLong);\n riderMarker = mMap.addMarker(new MarkerOptions()\n .position(rider)\n .title(\"Rider\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n Toast.makeText(this, \"You don't have location permission\", Toast.LENGTH_LONG).show();\n return;\n }\n\n Location hereNow = mLocationManager.getLastKnownLocation(mBestProvider);\n if (hereNow != null) {\n onLocationChanged(hereNow);\n }\n\n mLocationManager.requestLocationUpdates(mBestProvider, 400, 1, this);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n //Enable Current location\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.\n PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.\n ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, MY_REQUEST_INT);\n\n }\n\n\n return;\n\n } else {\n mMap.setMyLocationEnabled(true);\n\n\n }\n\n\n // Add a marker in Sydney and move the camera\n //LatLng sydney = new LatLng(-34, 151);\n //mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot))\n // );\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney,16),5000,null);\n //new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot));\n\n //LatLng latLng = new LatLng(-1.2652560778411037, 36.81265354156495);\n //mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Parklands\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n //BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.blackspot);\n ////LatLng harmbug = new LatLng(-37, 120);\n //mMap.addMarker(new MarkerOptions().position(harmbug).title(\"Marker in Harmbug\")\n //.icon(icon));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(harmbug,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(harmbug));\n\n //LatLng kenya = new LatLng(-2.456, 37);\n //mMap.addMarker(new MarkerOptions().position(kenya).title(\"Marker in Kenya\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(kenya,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(kenya));\n\n LatLng sydney = new LatLng(-0.8041213212075744, 36.53117179870606);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Blackspot at Kinungi\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney, 18), 5000, null);\n\n LatLng gilgil = new LatLng(-0.2167, 36.2667);\n mMap.addMarker(new MarkerOptions().position(gilgil).title(\"Blackspot at Gilgil\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(gilgil));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(gilgil, 18), 5000, null);\n\n LatLng njoro = new LatLng(-0.3290, 35.9440);\n mMap.addMarker(new MarkerOptions().position(njoro).title(\"Blackspot at Njoro\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(njoro));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(njoro, 18), 5000, null);\n\n LatLng bluepost = new LatLng(-1.0226988092777693, 37.06806957721711);\n mMap.addMarker(new MarkerOptions().position(bluepost).title(\"Blackspot at Bluepost Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(bluepost));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Nithi = new LatLng(-0.26649259802107667, 37.66248464584351);\n mMap.addMarker(new MarkerOptions().position(Nithi).title(\"Blackspot at Nithi Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Nithi));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Maungu = new LatLng(-3.558353542362671, 38.74993801116944);\n mMap.addMarker(new MarkerOptions().position(Maungu).title(\"Blackspot at Maungu Area\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Maungu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Misikhu = new LatLng(0.6662027919912484, 34.75215911865235);\n mMap.addMarker(new MarkerOptions().position(Misikhu).title(\"Blackspot at Misikhu\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Misikhu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Muthaiga = new LatLng(-1.2614375406469367, 36.840720176696784);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Muthaiga Road\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Muthaiga));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Pangani = new LatLng(-1.2665003190843396, 36.834239959716804);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Pangani\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Pangani));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Pangani, 18), 5000, null);\n\n LatLng KU = new LatLng(-1.1823303731373749, 36.93703293800355);\n mMap.addMarker(new MarkerOptions().position(KU).title(\"Blackspot at KU\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(KU));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(KU, 18), 5000, null);\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Toast.makeText(this, \"Map is Ready\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n getDeviceLocation();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n init();\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng location = new LatLng(mLat, mLng);\n moveCamera(location, DEFAUT_ZOOM);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(\n this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Pula and move the camera\n LatLng pula = new LatLng(44.86726450096342, 13.850460687162476);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(pula, 13));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n enableUserLocation();\n zoomTooUserLocation();\n } else {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission\n .ACCESS_FINE_LOCATION)) {\n //we can show user dialog why this permission is necessery\n\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.mapstyle_day);\n mMap.setMapStyle(style);\n\n if (locationProvider != null) {\n enableLocationBullet();\n if (lastpos != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(lastpos));\n }\n }\n // Start clustermanager and add markers\n setUpClusterManager();\n\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapReady = true;\n if (searchedRestaurants != null) {\n addRestaurants(searchedRestaurants, false);\n }\n\n Location loc = locationProvider.getLastLocation();\n if (!init) {\n zoomMapToPosition(loc, MY_LOCATION_ZOOM);\n init = true;\n }\n\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n ////run with it to check what is happening and remove it to see\n\n\n //Initialize Google Play Services\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n\r\n //Initialize Google Play Services\r\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(false);\n mUiSettings.setMapToolbarEnabled(false);\n mUiSettings.setZoomControlsEnabled(false);\n mUiSettings.setScrollGesturesEnabled(false);\n mUiSettings.setTiltGesturesEnabled(false);\n mUiSettings.setRotateGesturesEnabled(false);\n\n // Add a marker in Sydney and move the camera\n final LatLng airport = new LatLng(listAirport.get(index).getLatitude(), listAirport.get(index).getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(airport));\n mMap.setMinZoomPreference(10.0f);\n mMap.setMaxZoomPreference(10.0f);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n onClick(index, MapsActivity.class);\n }\n });\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n LatLng latlong = new LatLng(29.375859, 47.977405);\n googleMap.addMarker(new MarkerOptions().position(latlong).title(\"\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlong, 9.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng livraria = new LatLng(maps.getLatitude(), maps.getLongitude());\n if(this.maps.getId() == 1){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Saraiva - Praia de Belas\"));\n } else if(this.maps.getId() == 2){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cultura - Bourbon Country\"));\n } else if(this.maps.getId() == 3){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cameron\"));\n } else if(this.maps.getId() == 4){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Siciliano\"));\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(livraria, 15f));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(LOG_TAG, \"called onMapReady()\");\n mMap = googleMap;\n\n // Set up UI for map\n mMap.setMyLocationEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings = mMap.getUiSettings(); // https://developers.google.com/maps/documentation/android-sdk/controls\n mUiSettings.setMyLocationButtonEnabled(false);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n\n\n // Move the camera to last known user location\n fusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() { // this -> getActivity()??\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng startingLocation = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(startingLocation) // Sets the center of the map\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null);\n Log.d(LOG_TAG, \" > moved map to last known location\");\n }\n }\n });\n addZoneHolesToMap(shiftZones);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng liege = new LatLng(50.620552, 5.581177);\n LatLng victime = new LatLng(50.620957, 5.582263);\n mMap.addMarker(new MarkerOptions()\n .position(liege)\n .title(\"You are here !\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW)));\n mMap.addMarker(new MarkerOptions()\n .position(victime)\n .title(\"Aurélie\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(liege,17));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng parque = new LatLng(latitud, longitud);\n mMap.addMarker(new MarkerOptions().position(parque).title(lugar).icon(BitmapDescriptorFactory.fromResource(R.drawable.icons8_terraria_48)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(parque));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitud, longitud),16.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n marker = googleMap.addMarker(markerOptions);\n googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n\n }", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapLoaded = true;\n waitForMapPlease();\n }\n });\n }" ]
[ "0.8187966", "0.8043203", "0.80369437", "0.8032803", "0.79981315", "0.7977223", "0.79578143", "0.7957492", "0.7953909", "0.79428774", "0.7936515", "0.79303294", "0.7915085", "0.79050475", "0.7888802", "0.7885309", "0.7885309", "0.7885309", "0.7885309", "0.787769", "0.78448915", "0.7828284", "0.7820108", "0.7812954", "0.7796448", "0.77925605", "0.7787149", "0.778627", "0.7763289", "0.7744543", "0.7741663", "0.7735723", "0.77302146", "0.7686669", "0.76739526", "0.7667308", "0.7666494", "0.765996", "0.765988", "0.7657871", "0.7657393", "0.76471514", "0.7640365", "0.7633595", "0.7628192", "0.76219267", "0.7620562", "0.7617687", "0.7617375", "0.7608737", "0.7605181", "0.7599906", "0.7598643", "0.7593456", "0.75858843", "0.7584924", "0.7579237", "0.7570633", "0.75685054", "0.75646967", "0.7564087", "0.75540906", "0.75513375", "0.7544968", "0.7543908", "0.75391614", "0.75310916", "0.75266427", "0.75196606", "0.75189084", "0.75152326", "0.7492693", "0.74905485", "0.7490191", "0.7486466", "0.7473794", "0.7467318", "0.7461733", "0.7457985", "0.7457302", "0.745233", "0.7450617", "0.7449316", "0.7448354", "0.74382555", "0.7430123", "0.74252295", "0.74177665", "0.74170506", "0.74164027", "0.7411671", "0.74104816", "0.7409408", "0.74014", "0.73956335", "0.7394174", "0.73890275", "0.73888576", "0.73783195", "0.73695433", "0.73592997" ]
0.0
-1
draggedMarker.setPosition(marker.getPosition()); /LatLng midLatLng = mMap.getCameraPosition().target; draggedMarker.setPosition(midLatLng);
@Override public void onMarkerDrag(Marker marker) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCameraIdle() {\n LatLng midLatLng = mMap.getCameraPosition().target;\n draggedMarker.setPosition(midLatLng);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n // Enable the zoom controls for the map\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n // Prompt the user for permission.\n getLocationPermission();\n\n addMarkerToMap(mMap.getCameraPosition().target, \"Plceaaa\");\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n // draggedMarker.setPosition(marker.getPosition());\n /*LatLng midLatLng = mMap.getCameraPosition().target;\n draggedMarker.setPosition(midLatLng);*/\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n Log.d(TAG, \"Marker dragged to latitude\" + marker.getPosition().latitude + \" longitude \" + marker.getPosition().longitude);\n // draggedMarker = marker;\n // marker.setPosition(marker.getPosition());\n }\n });\n\n mMap.setOnCameraIdleListener(new GoogleMap.OnCameraIdleListener() {\n @Override\n public void onCameraIdle() {\n //get latlng at the center by calling\n LatLng midLatLng = mMap.getCameraPosition().target;\n draggedMarker.setPosition(midLatLng);\n }\n });\n }", "@Override\n public void onMarkerDrag(Marker marker) {\n\n }", "@Override\n public void onMarkerDragStart(Marker arg0) {\n Log.d(\"System out\", \"onMarkerDragStart...\"+arg0.getPosition().latitude+\"...\"+arg0.getPosition().longitude);\n }", "@Override\n public void onMarkerDragStart(Marker marker) {\n\n }", "@Override\n public void onMarkerDrag(Marker marker) {\n }", "private void moveMap() {\n //String to display current latitude and longitude\n String msg = latitude + \", \" + longitude;\n //Creating a LatLng Object to store Coordinates\n LatLng latLng = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng) // Sets the center of the map to location user\n .zoom(15) // Sets the zoom\n .bearing(0) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n\n // Add Marker to Map\n MarkerOptions option = new MarkerOptions();\n option.title(\" Current Location\");\n option.snippet(\"....\");\n option.position(latLng);\n option.draggable(true);//Making the marker draggable\n\n Marker currentMarker = mMap.addMarker(option);\n currentMarker.showInfoWindow();\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n\n }", "@Override\n\tpublic void onMarkerDragStart(Marker marker) {\n\t\t\n\t}", "@Override\n public void onMarkerDragEnd (Marker marker){\n lat = marker.getPosition().latitude;\n lng = marker.getPosition().longitude;\n Log.d(\"MapMarkerActivity\", \"lat: \"+lat+\" lng: \"+lng);\n }", "@Override\n public void onMarkerDragEnd(Marker arg0) {\n Log.d(\"System out\", \"onMarkerDragEnd...\"+arg0.getPosition().latitude+\"...\"+arg0.getPosition().longitude);\n map.animateCamera(CameraUpdateFactory.newLatLng(arg0.getPosition()));\n showPopUp(new LatLng(arg0.getPosition().latitude,arg0.getPosition().longitude));\n }", "@Override\n\tpublic void onMarkerDrag(Marker arg0) {\n\t\t\n\t}", "private void moveMap() {\n //String to display current latitude and longitude\n String msg = latitude + \", \" + longitude;\n\n //Creating a LatLng Object to store Coordinates\n LatLng latLng = new LatLng(latitude, longitude);\n\n //Adding marker to map\n mMap.addMarker(new MarkerOptions()\n .position(latLng) //setting position\n .draggable(true) //Making the marker draggable\n .title(\"you are here\")); //Adding a title\n\n //Moving the camera\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n //Animating the camera\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n //Displaying current coordinates in toast\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n// marker_address_tv.setText(msg);\n setAddressInTVFromLatlong(latitude, longitude);\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public void onMarkerDragEnd(Marker arg0) {\n Log.d(\"System out\", \"onMarkerDragEnd...\" + arg0.getPosition().latitude + \"...\" + arg0.getPosition().longitude);\n LocationLat = String.valueOf(arg0.getPosition().latitude);\n LocationLong = String.valueOf(arg0.getPosition().longitude);\n mMap.animateCamera(CameraUpdateFactory.newLatLng(arg0.getPosition()));\n }", "@Override\n\tpublic void onMarkerDragStart(Marker arg0) {\n\t}", "@Override\n public void onMarkerDragStart(Marker marker){\n int indexOf = locationNames.indexOf(marker.getTitle());\n marker.setPosition(latLngs.get(indexOf));\n }", "@Override\n public void onMarkerDragStart(Marker arg0) {\n Log.d(\"System out\", \"onMarkerDragStart...\" + arg0.getPosition().latitude + \"...\" + arg0.getPosition().longitude);\n LocationLat = String.valueOf(arg0.getPosition().latitude);\n LocationLong = String.valueOf(arg0.getPosition().longitude);\n }", "@Override\n public void onMarkerDrag(Marker marker) {\n Log.i(TAG, \"Dragging M:\" + marker);\n Integer markerId = markers.get(marker);\n // if it's a marker for draggable circle then it's not in the hashmap, Ui will not receive this dragging event\n if (markerId != null) {\n LatLng latlng = marker.getPosition();\n OnMarkerDrag(markerId, latlng.latitude, latlng.longitude);\n }\n // find if the marker is the center or radius marker of any existing draggable circle,\n // then call the move or resize this draggable circle\n for (DraggableCircle dCircle: mCircles){\n if ((dCircle.getCenterMarker().equals(marker)) || (dCircle.getRadiusMarker().equals(marker))) {\n dCircle.onMarkerMoved(marker); //ask the draggable circle to change it's appearance\n }\n }\n }", "@Override\n public void onMarkerDrag(Marker arg0) {\n Log.i(\"System out\", \"onMarkerDrag...\");\n }", "@Override\r\n public void onGlobalLayout() {\r\n LatLngBounds bounds = new LatLngBounds.Builder()\r\n .include(origi)\r\n .include(desti)\r\n .build();\r\n\r\n\r\n map.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 50));\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera - Latitud, longitud\n LatLng aqp = new LatLng(-16.39871566652775, -71.53667298251604);\n mMap.addMarker(new MarkerOptions().position(aqp).title(\"Arequipa - Peru\").snippet(\"Plaza de armas de arequipa!!\").icon(BitmapDescriptorFactory.fromResource(R.drawable.arequipa)));\n\n LatLng parqueSelva = new LatLng(-16.39007867124903, -71.53099669378967);\n mMap.addMarker(new MarkerOptions().position(parqueSelva).draggable(true).title(\"Arequipa - Peru\").snippet(\"Parque selva alegre\").icon(BitmapDescriptorFactory.fromResource(R.drawable.peru)));\n\n //Marcador de prueba\n\n LatLng prueba = new LatLng(-16.40487652036424,-71.52662374006134);\n markerPrueba = googleMap.addMarker(new MarkerOptions()\n .position(prueba)\n .title(\"UNSA\")\n );\n\n //Marcador de prueba\n LatLng prueba2 = new LatLng(-16.406287680784075,-71.52470863139479);\n markerPruebaDrag = googleMap.addMarker(new MarkerOptions()\n .position(prueba2)\n .title(\"Prueba Drag\")\n .snippet(\"Escuela de computación\")\n .draggable(true) // para arrastrar el marcador\n );\n\n\n // Posicionar la camara , con un zoom\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(aqp));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(aqp, 14));\n\n // Habilitar para escuchar eventos de los marcadores\n googleMap.setOnMarkerClickListener(this);\n\n // Habilitar para escuchar el arrastre del marcador\n googleMap.setOnMarkerDragListener(this);\n\n //Habilitar la ventana de informacion\n googleMap.setOnInfoWindowClickListener(this);\n\n\n //////////// HBILITAR MAS CONTROLES POR DEFECTO\n UiSettings uiSettings = googleMap.getUiSettings();\n uiSettings.setCompassEnabled(false);\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setMyLocationButtonEnabled(false);\n }", "@Override\n public void onMarkerDrag(Marker arg0) {\n Log.i(\"System out\", \"onMarkerDrag...\");\n }", "@Override\n public void onMarkerDragStart(Marker marker) {\n if(marker.equals(markerPruebaDrag)){\n Toast.makeText(this, \"Start\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n // Add a marker in Sydney and move the camera\r\n\r\n\r\n\r\n LatLng salud = new LatLng(18.5094113, -69.8923432);\r\n mMap.addMarker(new MarkerOptions().position(salud).draggable(true).title(\"Centro De salud\").snippet(\"Centro de salud \").icon(BitmapDescriptorFactory.fromResource(R.drawable.salud)));\r\n\r\n\r\n LatLng monjas = new LatLng(18.509410, -69.891796);\r\n mMap.addMarker(new MarkerOptions().position(monjas).title(\"Casa de las hermnas\").snippet(\"Casa de las hermnas\").icon(BitmapDescriptorFactory.fromResource(R.drawable.monjas)));\r\n\r\n\r\n LatLng parroquia = new LatLng(18.510546, -69.891847);\r\n mMap.addMarker(new MarkerOptions().position(parroquia).title(\"Parroquia\").snippet(\"Parroquia \").icon(BitmapDescriptorFactory.fromResource(R.drawable.parroquia)));\r\n LatLng escuela = new LatLng(18.5110794, -69.8921382);\r\n mMap.addMarker(new MarkerOptions().position(escuela).title(\"Escuela Hogar pituca florez\").snippet(\"Escuela hogar pituca florez\").icon(BitmapDescriptorFactory.fromResource(R.drawable.escuela)));\r\n\r\n LatLng CIJE = new LatLng(18.509463 , -69.891545);\r\n markerPrueba =googleMap.addMarker(new MarkerOptions()\r\n .position(CIJE)\r\n .title(\"CIJE, Centro Infantil Juvenil Enmanuel\").snippet(\"Centro de estudios para todas las edades\").icon(BitmapDescriptorFactory.fromResource(R.drawable.cije)));\r\n\r\n\r\n mMap.getUiSettings().setZoomControlsEnabled(true);\r\n\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CIJE,18));\r\n\r\n googleMap.setOnMarkerClickListener(this);\r\n googleMap.setOnInfoWindowClickListener(this);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in DVC and move the camera\n\n LatLng DVC = new LatLng(37.9688, -122.0710); //Changed the latitude and longitude to CA, DVC (previously\n mMap.addMarker(new MarkerOptions().position(DVC).title(\"Marker in DVC, Pleasant Hill\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(DVC));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(17)); //Added this line to focus on DVC map only instead of the world map\n\n\n // mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 500));\n\n\n // public static CameraUpdate newLatLngBounds ( bounds, 500, 500, 2000);\n\n // mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, getResources().getDimensionPixelSize(R.dimen.mMap_camera_padding_new_bounds)));\n\n//37.976243, -122.073407\n//37.965902, -122.071549\n\n LatLng NorthEastBound = new LatLng(37.971363, -122.066986);\n LatLng SouthWestBound = new LatLng(37.966364, -122.074532);\n\n\n LatLngBounds DVCBounds = new LatLngBounds( SouthWestBound, NorthEastBound); //Setting up boundaries\n\n\n\n mMap.setLatLngBoundsForCameraTarget(DVCBounds);\n\n\n\n // https://gis.stackexchange.com/questions/49805/can-i-view-a-google-maps-map-by-bounding-latitude-and-longitude-coordinates\n// LatLngBounds DVCBounds = new LatLngBounds( new LatLng(37.965902, 122.071549 ), new LatLng(37.976243, -122.073407)); //Setting up boundaries\n\n\n // mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(DVCBounds.getCenter(), 50));\n // and works with this mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(DVCBounds, 50, 50, 2));\n\n\n /**\n * https://stackoverflow.com/questions/40866431/how-to-use-latlngbounds?rq=1\n * LatLng pickupLatLng = new LatLng(37.976186,122.072527);\n * LatLng destinationLatLng = new LatLng(37.965831,122.071647);\n * LatLngBounds bounds = LatLngBounds.builder().include(pickupLatLng).include(destinationLatLng).build();\n *\n * mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 500));\n */\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position we are also making the draggable true\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n// Toast.makeText(this, \"longitude=\" + latLng.longitude + \"latitude=\" + latLng.latitude, Toast.LENGTH_LONG).show();\n String msg = latLng.longitude + \", \" + latLng.latitude;\n// marker_address_tv.setText(msg);\n setAddressInTVFromLatlong(latLng.latitude, latLng.longitude);\n\n }", "private void moveCamera(LatLng latLng, float zoom){\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, zoom));\n mMap.addMarker(new MarkerOptions().position(latLng).title(mImageAddress));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(LocationStorage.getInstance().getLocation().getLatitude(), LocationStorage.getInstance().getLocation().getLongitude());\n// BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_large_marker);\n Marker marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Current Location\").snippet(\"Hold and drag to your desired location\"));\n marker.showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(sydney, 15);\n mMap.animateCamera(cameraUpdate);\n marker.setDraggable(true);\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n LatLng latLng=marker.getPosition();\n Location temp = new Location(LocationManager.GPS_PROVIDER);\n temp.setLatitude(latLng.latitude);\n temp.setLongitude(latLng.longitude);\n LocationStorage.getInstance().setLocation(temp);\n }\n });\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n//\n// return true;\n// }\n// });\n }", "private void moveCamera(LatLng latLng, float zoom){\n Log.d(TAG,\"moveCamera: Moving camera to: lat: \" + latLng.latitude + \", lng: \" + latLng.longitude);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,zoom));\n }", "@Override\n public void onMapLoaded() {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 13.3f));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n }", "@Override\n public void onMarkerDragStart(Marker marker) {\n Integer markerId = markers.get(marker);\n if (markerId != null) {\n LatLng latLng = marker.getPosition();\n OnMarkerDragStart(markerId, latLng.latitude, latLng.longitude); //fire event to UI\n }\n // find if the marker is the center or radius marker of any existing draggable circle, then call the move or resize\n // this draggable circle\n for (DraggableCircle dCircle: mCircles){\n if ((dCircle.getCenterMarker().equals(marker)) || (dCircle.getRadiusMarker().equals(marker))) {\n dCircle.onMarkerMoved(marker); //ask the draggable circle to change it's appearance\n }\n }\n\n\n }", "@Override\n public void onLocationChanged(Location location) {\n Toast.makeText(MapsActivity.this, \"\" + location, Toast.LENGTH_SHORT).show();\n //mMap.clear();\n// longi = location.getLongitude();\n// lat = location.getLatitude();\n//\n// mLastLocation.set(location);\n\n\n mLastLocation = location;\n longi = mLastLocation.getLongitude();\n lat = mLastLocation.getLatitude();\n LatLng lt = new LatLng(lat,longi);\n Log.d(\"cxcxcx\",longi+\"\");\n mMap.addMarker(new MarkerOptions().position(lt).title(longi + \"\" + lat));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(lt, 8));\n\n\n }", "@Override\n public void onMarkerDragStart(Marker marker) {\n\n int selectedItem = spnPointType.getSelectedItemPosition();\n\n switch (selectedItem){\n case 0:\n markerDraggedPos = markersMain.indexOf(marker);\n if (markerDraggedPos != -1) Log.d(TAG, \"Dragged marker at pos \" + markerDraggedPos);\n //remove the marker of the array.\n markersMain.remove(markerDraggedPos);\n break;\n case 1:\n markerDraggedPos = markersWater.indexOf(marker);\n if (markerDraggedPos != -1) Log.d(TAG, \"Dragged marker at pos \" + markerDraggedPos);\n //remove the marker of the array.\n markersWater.remove(markerDraggedPos);\n break;\n case 2:\n markerDraggedPos = markersAtractivos.indexOf(marker);\n if (markerDraggedPos != -1) Log.d(TAG, \"Dragged marker at pos \" + markerDraggedPos);\n //remove the marker of the array.\n markersAtractivos.remove(markerDraggedPos);\n break;\n\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n //setZoomControlsEnabled\n UiSettings uiSettings = mMap.getUiSettings();\n\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setCompassEnabled(true);\n //uiSettings.setMyLocationEnabled(true);\n uiSettings.setMapToolbarEnabled(true);\n\n LatLng ubication;\n\n // Add a marker in Sydney and move the camera\n ubication = new LatLng(-16.4955455, -68.1336229);\n mMap.addMarker(new MarkerOptions().position(ubication)\n .title(\"La Paz\")\n .snippet(\"Ciudad de La Paz, Bolivia\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.mexico)));\n\n ubication = new LatLng(-16.4955593, -68.1934964);\n mMap.addMarker(new MarkerOptions().position(ubication)\n .title(\"El Alto\")\n .snippet(\"Ciudad de El Alto, Bolivia\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_CYAN)));\n\n ubication = new LatLng(-16.56812812228955, -68.17105065791885);\n mMap.addMarker(new MarkerOptions().position(ubication)\n .draggable(true)\n .title(\"Achocalla\")\n .snippet(\"Comunidad Achocalla\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));\n\n LatLng prueba;\n prueba = new LatLng(-16.4908505, -68.1934713);\n markerPrueba = googleMap.addMarker(new MarkerOptions().position(prueba)\n .draggable(true)\n .title(\"Prueba\")\n .snippet(\"Marca de prueba\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));\n\n //Dragable\n LatLng umsa;\n umsa = new LatLng(-16.5048959, -68.1300381);\n markerDrag = googleMap.addMarker(new MarkerOptions().position(umsa)\n .draggable(true)\n .title(\"UMSA\")\n .snippet(\"Prueba dragable\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\n\n //Información extendida\n LatLng infocal;\n infocal = new LatLng(-16.5068811, -68.1647368);\n infoWindow = googleMap.addMarker(new MarkerOptions().position(infocal)\n .draggable(true)\n .title(\"INFOCAL\")\n .snippet(\"Prueba Información Extendida\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n\n //CAMARA\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(ubication));infoWindow\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(ubication,12));\n\n //CLICK EN EL MARCADOR\n googleMap.setOnMarkerClickListener(this);\n\n //ARRASTRAR EL MARCADOR\n googleMap.setOnMarkerDragListener(this);\n\n //DIALOG EN EL TITULO DEL MARCADOR\n googleMap.setOnInfoWindowClickListener(this);\n }", "@Override\n public void onMarkerDrag(Marker marker) {\n String data_map = marker.getPosition().toString();\n String[] result = data_map.split(\",\");\n Log.d(TAG, \"ON DRAG SOMETHING \" + result[0] + \" | \" + result[1]);\n }", "private void setCameraPosition(GoogleMap mMap, ArrayList<Marker> markersList) {\n float[] distance = new float[1];\n HashMap<Marker, Float> distanceHashMap = new HashMap<>();\n\n for (Marker m : markersList) {\n Location.distanceBetween(currentPosition.latitude, currentPosition.longitude,\n m.getPosition().latitude, m.getPosition().longitude, distance);\n distanceHashMap.put(m, distance[0]);\n }\n\n //sort by distance shortest to furthest.\n List<Map.Entry<Marker, Float>> list = new LinkedList<>(distanceHashMap.entrySet());\n Collections.sort(list, new Comparator<Map.Entry<Marker, Float>>() {\n public int compare(Map.Entry<Marker, Float> o1,\n Map.Entry<Marker, Float> o2) {\n return (o1.getValue()).compareTo(o2.getValue());\n }\n });\n Marker nearestMarker1 = list.get(0).getKey();\n Marker nearestMarker2 = list.get(1).getKey();\n Marker nearestMarker3 = list.get(2).getKey();\n\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n builder.include(nearestMarker1.getPosition());\n builder.include(nearestMarker2.getPosition());\n builder.include(nearestMarker3.getPosition());\n builder.include(currentPosition);\n\n LatLngBounds bounds = builder.build();\n\n int width = getResources().getDisplayMetrics().widthPixels;\n int height = getResources().getDisplayMetrics().heightPixels;\n int padding = (int) (width * 0.10);\n //move camera into position\n mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, width, height, padding));\n }", "@Override\n public void onCameraMove() {\n if(!markerClickflag)\n showMarkerButtons(false);\n }", "@Override\n public void onMapViewCenterPointMoved(MapView arg0, MapPoint arg1) {\n\n }", "private void xxx() {\n LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(westfieldNJ).title(\"Westfield, New Jersey\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(westfieldNJ));\n\n }", "public void addMapMarker() {\n if (iLat != null && !iLat.equals(\"\") && iLon != null && !iLon.equals(\"\") && iLatRef != null && !iLatRef.equals(\"\") && iLonRef != null && !iLonRef.equals(\"\")) {\n\n if (iLatRef.equals(\"N\")) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n }\n\n if (iLonRef.equals(\"E\")) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n }\n }\n\n final MapView gMap = (MapView) findViewById(R.id.map);\n\n if (addedMarker == false) {\n posMarker = gMap.getMap().addMarker(posMarkerOptions);\n posMarker.setTitle(getString(R.string.map_position));\n addedMarker = true;\n }\n\n posMarker.setVisible(true);\n posMarker.setPosition(new LatLng(iLatFloat, iLonFloat));\n\n GoogleMap gMapObj = gMap.getMap();\n\n gMapObj.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n posMarker.setPosition(latLng);\n displayCoordsInDegrees();\n\n //Use text view values instead of posMarker values\n iLat = toDMS(posMarker.getPosition().latitude);\n iLon = toDMS(posMarker.getPosition().longitude);\n\n if (posMarker.getPosition().latitude > 0) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n iLatRef = \"N\";\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n iLatRef = \"S\";\n }\n\n if (posMarker.getPosition().longitude > 0) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n iLonRef = \"E\";\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n iLonRef = \"W\";\n }\n }\n });\n }", "@Override\n public void onMapReady(final GoogleMap googleMap) {\n mMap = googleMap;\n\n //zoom controller\n //mMap.getUiSettings().setZoomControlsEnabled(true);\n\n //maximum or minimum of zoom\n //mMap.setMinZoomPreference(14);\n\n // Add a marker in Sydney and move the camera\n LatLng tehran = new LatLng(35.6892, 51.3890);\n\n //mMap.addMarker(new MarkerOptions().position(tehran).title(\"Marker in Tehran\"));\n\n MarkerOptions markerOptions = new MarkerOptions().position(tehran)\n .title(\"مبدا\").icon(BitmapDescriptorFactory.fromResource(R.drawable.map_marker_first));\n\n //Destination Marker\n final MarkerOptions markerOptions2 = new MarkerOptions().position(tehran)\n .title(\"مقصد\").icon(BitmapDescriptorFactory.fromResource(R.drawable.map_marker_second));\n\n m1 = mMap.addMarker(markerOptions);\n final String m1_id = m1.getId();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n //MY Location Marker\n mMap.setMyLocationEnabled(true);\n }\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(tehran, 16));\n //Moving the marker\n mMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() {\n @Override\n public void onCameraMove() {\n Log.i(\"getCameraPosition\", String.valueOf(googleMap.getCameraPosition()));\n LatLng position = googleMap.getCameraPosition().target;\n //marker for default size\n int height = 100;\n int width = 100;\n\n if (set_latlng1 == 1) {\n BitmapDrawable bitmapDrawable = (BitmapDrawable) getResources().getDrawable(R.drawable.map_marker_first);\n Bitmap bitmap = bitmapDrawable.getBitmap();\n Bitmap small = Bitmap.createScaledBitmap(bitmap, width, height, true);\n\n m1.setIcon(BitmapDescriptorFactory.fromBitmap(small));\n m1.setPosition(position);\n } else {\n if (set_latlng2 == 1) {\n BitmapDrawable bitmapDrawable = (BitmapDrawable) getResources().getDrawable(R.drawable.map_marker_second);\n Bitmap bitmap = bitmapDrawable.getBitmap();\n Bitmap small = Bitmap.createScaledBitmap(bitmap, width, height, true);\n\n m2.setIcon(BitmapDescriptorFactory.fromBitmap(small));\n\n m2.setPosition(position);\n }\n }\n\n\n }\n });\n\n //return the size of marker\n mMap.setOnCameraIdleListener(new GoogleMap.OnCameraIdleListener() {\n @Override\n public void onCameraIdle() {\n\n LatLng position = googleMap.getCameraPosition().target;\n m1.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.map_marker_first));\n if (m2 != null) {\n m2.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.map_marker_second));\n }\n\n if (set_latlng1 == 1){\n\n get_driver(position.latitude, position.longitude);\n\n }\n\n\n }\n });\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n if (marker.getId().equals((m1_id))) {\n latLng1 = marker.getPosition();\n m2 = mMap.addMarker(markerOptions2);\n m2.setZIndex(1);\n m2.setPosition(marker.getPosition());\n m2_id = m2.getId();\n set_latlng1 = 0;\n }\n if (marker.getId().equals(m2_id)) {\n set_latlng2 = 0;\n latLng2 = marker.getPosition();\n\n mMap.setMinZoomPreference(14);\n mMap.setMaxZoomPreference(14);\n\n get_directions();\n }\n\n\n return true;\n }\n });\n\n //default MY Location Mark for designing\n FloatingActionButton my_location = findViewById(R.id.myLocation);\n my_location.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (CheckGPS()) {\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(MapsActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(MapsActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n Location last_location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n LatLng user_location = new LatLng(last_location.getLatitude(), last_location.getLongitude());\n\n if(user_location != null){\n\n m1.setPosition(user_location);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_location, 16));\n\n }\n else {\n set_location();\n }\n\n }else {\n show_dialog_box();\n }\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng posini = new LatLng(3.4,-76.5);\n myMarker = mMap.addMarker(new MarkerOptions().position(posini));\n\n requestLocation();\n\n googleMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() {\n @Override\n public void onCameraMove() {\n if (!flag) {\n\n addMarker();\n flag = true;\n }\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /* LatLng origin = new LatLng(pLat1, plng1);\n LatLng destination = new LatLng(dLat1, dLng1);\n DrawRouteMaps.getInstance(this)\n .draw(origin, destination, mMap);\n DrawMarker.getInstance(this).draw(mMap, origin, R.drawable.marker_a, \"Origin Location\");\n DrawMarker.getInstance(this).draw(mMap, destination, R.drawable.marker_b, \"Destination Location\");\n*/\n /* LatLngBounds bounds = new LatLngBounds.Builder()\n .include(origin)\n .include(destination).build();\n Point displaySize = new Point();\n getWindowManager().getDefaultDisplay().getSize(displaySize);\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, displaySize.x, 250, 30));*/\n LatLng origin = new LatLng(pLat1, plng1);\n LatLng destination = new LatLng(dLat1, dLng1);\n DrawRouteMaps.getInstance(this)\n .draw(origin, destination, mMap);\n DrawMarker.getInstance(this).draw(mMap, origin, R.drawable.marker_a, RegPrefManager.getInstance(this).getPickLocationName());\n DrawMarker.getInstance(this).draw(mMap, destination, R.drawable.marker_b, RegPrefManager.getInstance(this).getDropLocationName());\n mMap\n .addPolyline((new PolylineOptions())\n .add(pickupLatLng, dropLatLng,pickupLatLng).width(5).color(Color.RED)\n .geodesic(true));\n\n // move camera to zoom on map\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pickupLatLng));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(13));\n\n\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n\n\n // Add a marker in Sydney and move the camera\n sydney = new LatLng(8.552161651991246, 79.94052328405958);\n\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n\n\n //mMap.setMinZoomPreference(11);\n\n\n\n\n\n }", "@Override\n public void onMarkerDragEnd(Marker marker){\n int indexOf = locationNames.indexOf(marker.getTitle());\n latLngs.set(indexOf, marker.getPosition());\n saveMarkerPrefs();\n }", "@Override\n public void onMapClick(LatLng latLng) {\n if (markerDestination != null)\n markerDestination.remove();\n markerDestination = mMap.addMarker(new MarkerOptions()\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.destination_marker))\n .position(latLng)\n .title(\"Destination\"));\n\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15.0f));\n //show bottom sheet\n\n BottomSheetRiderFragment mBottomSheet = BottomSheetRiderFragment.newInstance(String.format(\"%f,%f\", mLastLocation.getLatitude(), mLastLocation.getLongitude()),\n String.format(\"%f,%f\", latLng.latitude, latLng.longitude),\n true);\n Home.super.onPostResume();\n mBottomSheet.show(getSupportFragmentManager(), mBottomSheet.getTag());\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LatLng sydney = new LatLng(40.362552, -94.767392);\n\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Joseph Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.362552,-94.767392), 12.0f));\n\n LatLng publicUser1 = new LatLng(40.332692, -94.870458);\n mMap.addMarker(new MarkerOptions().position(publicUser1).title(\"David Location\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.332692,-94.870458), 12.0f));\n\n LatLng publicUser2 = new LatLng(40.350650, -94.886080);\n mMap.addMarker(new MarkerOptions().position(publicUser2).title(\"Alex Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.350650,-94.886080), 12.0f));\n\n LatLng publicUser3 = new LatLng(40.357818, -94.890868);\n mMap.addMarker(new MarkerOptions().position(publicUser3).title(\"Johnson Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.357818,-94.890868), 12.0f));\n\n LatLng publicUser4 = new LatLng(40.348272, -94.871527);\n mMap.addMarker(new MarkerOptions().position(publicUser4).title(\"Mike Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.348272,-94.871527), 12.0f));\n }", "@Override\n public void onCameraChange(CameraPosition arg0) {\n center = map.getCameraPosition().target;\n Log.v(\"Center\", \"lattitude=\" + center.latitude + \" &longitude=\" + center.longitude);\n map.clear();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n myMap = googleMap;\n setMap();\n try{\n myMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lastKnown.getLatitude(), lastKnown.getLongitude()), 18.0f));\n }catch (NullPointerException e){\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(mContext);\n gMap = googleMap;\n\n //you can move map here to item specific 'location'\n int pos = getAdapterPosition();\n\n LatLng latLng = new LatLng(6.42788, 3.4274513);\n LatLng NIGERIA = new LatLng(9.0611017, 4.1763482);\n\n gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n gMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(false)\n .flat(true)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n }", "@Override\n public void onTouch() {\n mScrollView.requestDisallowInterceptTouchEvent(true);\n\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng location) {\n\n\n Toast.makeText(DoctorRegistration.this, \"\"+location, Toast.LENGTH_SHORT).show();\n if(marker!=null)\n {\n marker.remove();\n map.clear();\n }\n marker=map.addMarker(new MarkerOptions().position(location));\n\n new_lat=location.latitude;\n new_log=location.longitude;\n }\n });\n\n }", "private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Sét OnMapLoadedCallback Listener.\n googleMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n myProgress.dismiss();\n askPermissionsAndShowMyLocation();\n }\n });\n// if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n// ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n// mMap.setMyLocationEnabled(true);\n// // return;\n// }\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //User has previously accepted this permission\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n } else {\n //Not in api-23, no need to prompt\n mMap.setMyLocationEnabled(true);\n }\n\n// getCurrentLocation();\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n\n @Override\n public void onMarkerDrag(Marker marker) {\n LatLng newLocation = marker.getPosition();\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n LatLng newLocationLatLng = marker.getPosition();\n // mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocationLatLng, 15.0f));\n mMap.clear();\n //Adding a new marker to the current pressed position we are also making the draggable true\n mMap.addMarker(new MarkerOptions().position(newLocationLatLng).draggable(true).title(\"موقعي\")).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(newLocationLatLng));\n latitude = newLocationLatLng.latitude;\n longitude = newLocationLatLng.longitude;\n }\n\n @Override\n public void onMarkerDragStart(Marker marker) {\n LatLng newLocation = marker.getPosition();\n }\n\n });\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n\n @Override\n public void onMapLongClick(LatLng latLng) {\n // Creating a marker\n mMap.clear();\n //Adding a new marker to the current pressed position we are also making the draggable true\n mMap.addMarker(new MarkerOptions().position(latLng).draggable(true).title(\"My location\")).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n latitude = latLng.latitude;\n longitude = latLng.longitude;\n\n\n }\n });\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true));\n }", "@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName() + \", \" + place.getId());\n\n move=place.getLatLng();\n moveCamera(move,15f);\n }", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n //Set position of market\n\n\n //markerOptions.position(latLng);\n markerOptions.position(defaultLocation);\n //set title marker\n markerOptions.title(defaultLocation.latitude + \": \" + defaultLocation.longitude);\n\n //removeall markers\n // googleMap.clear();\n //Animating to zoom the marker\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n defaultLocation, 10\n ));\n //Add marker on map\n googleMap.addMarker(markerOptions);\n\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /*GPSTracker gps = new GPSTracker(this);\n if(gps.canGetLocation()) {\n //lat=gps.getLatitude();\n //lon=gps.getLongitude();\n }*/\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n //mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n //mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n // Add a marker in Sydney and move the camera\n /*LatLng current = new LatLng(lat, lon);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));\n LatLng new1 = new LatLng(lat+0.0008, lon+0.00004);\n mMap.addMarker(new MarkerOptions().position(new1).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new1));\n LatLng new2 = new LatLng(lat+0.0005, lon+0.0004);\n mMap.addMarker(new MarkerOptions().position(new2).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new2));\n mMap.addMarker(new MarkerOptions().position(current).title(lat+\" \"+lon+\n \"\"));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(new LatLng(lat, lon)) // Sets the center of the map to location user\n .zoom(18) // Sets the zoom\n .bearing(90) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));*/\n }", "public void onMapReady(final GoogleMap googleMap) {\n this.googleMap = googleMap;\n googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n final ScrollView mScrollView = (ScrollView) findViewById(R.id.scrollMap); //parent scrollview in xml, give your scrollview id value\n\n ((WorkaroundMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .setListener(new WorkaroundMapFragment.OnTouchListener() {\n @Override\n public void onTouch() {\n mScrollView.requestDisallowInterceptTouchEvent(true);\n }\n });\n\n final LatLng latLng = new LatLng(31.203156318491384, 29.915557913482193);\n fromLot = 29.915557913482193;\n fromLat = 31.203156318491384;\n toLat = fromLat;\n toLot = fromLot;\n markerOptions = new MarkerOptions().position(latLng)\n .title(\"مكان الاقلاع\").draggable(true);\n\n\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n zoomIn(latLng);\n\n marker = googleMap.addMarker(markerOptions);\n marker.showInfoWindow();\n\n\n googleMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n if (secondClick) {\n toLat = marker.getPosition().latitude;\n toLot = marker.getPosition().longitude;\n\n\n Geocoder geocoder = new Geocoder(AskForTaxiActivity.this, Locale.getDefault());\n List<Address> toAddresses = null;\n try {\n toAddresses = geocoder.getFromLocation(toLat, toLot, 1);\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n if (toAddresses != null) {\n toAddress = toAddresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n toCity = toAddresses.get(0).getAdminArea();\n } else {\n //Toast.makeText(AskForTaxiActivity.this,\"لا يوجد انترنت\",Toast.LENGTH_LONG).show();\n Helper.showSnackBarMessage(\"لا يوجد انترنت\",AskForTaxiActivity.this);\n finish();\n }\n addressEditText.setText(toAddress);\n\n GMethods.writeToLog(\"To lat\" + toLat + \" \" + \" to lot\" + toLot);\n } else {\n fromLat = marker.getPosition().latitude;\n fromLot = marker.getPosition().longitude;\n\n Geocoder geocoder = new Geocoder(AskForTaxiActivity.this, Locale.getDefault());\n List<Address> toAddresses = null;\n try {\n toAddresses = geocoder.getFromLocation(fromLat, fromLot, 1);\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n if (toAddresses!= null) {\n toAddress = toAddresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n toCity = toAddresses.get(0).getAdminArea();\n\n } else {\n //Toast.makeText(AskForTaxiActivity.this,\"لا يوجد انترنت\",Toast.LENGTH_LONG).show();\n Helper.showSnackBarMessage(\"لا يوجد انترنت\",AskForTaxiActivity.this);\n finish();\n }\n addressEditText.setText(toAddress);\n\n GMethods.writeToLog(\"from lat \" + fromLat + \" \" + \"from lot\" + fromLot);\n }\n }\n });\n\n\n googleMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n marker.setPosition(latLng);\n marker.showInfoWindow();\n if (secondClick) {\n toLat = marker.getPosition().latitude;\n toLot = marker.getPosition().longitude;\n\n\n Geocoder geocoder = new Geocoder(AskForTaxiActivity.this, Locale.getDefault());\n List<Address> toAddresses = null;\n try {\n toAddresses = geocoder.getFromLocation(toLat, toLot, 1);\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n if (toAddresses != null) {\n toAddress = toAddresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n toCity = toAddresses.get(0).getAdminArea();\n } else {\n //Toast.makeText(AskForTaxiActivity.this,\"لا يوجد انترنت\",Toast.LENGTH_LONG).show();\n Helper.showSnackBarMessage(\"لا يوجد انترنت\",AskForTaxiActivity.this);\n finish();\n }\n addressEditText.setText(toAddress);\n\n GMethods.writeToLog(\"To lat\" + toLat + \" \" + \" to lot\" + toLot);\n } else {\n fromLat = marker.getPosition().latitude;\n fromLot = marker.getPosition().longitude;\n\n Geocoder geocoder = new Geocoder(AskForTaxiActivity.this, Locale.getDefault());\n List<Address> toAddresses = null;\n try {\n toAddresses = geocoder.getFromLocation(fromLat, fromLot, 1);\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n if (toAddresses!= null) {\n toAddress = toAddresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n toCity = toAddresses.get(0).getAdminArea();\n\n } else {\n //Toast.makeText(AskForTaxiActivity.this,\"لا يوجد انترنت\",Toast.LENGTH_LONG).show();\n Helper.showSnackBarMessage(\"لا يوجد انترنت\",AskForTaxiActivity.this);\n finish();\n }\n addressEditText.setText(toAddress);\n\n GMethods.writeToLog(\"from lat \" + fromLat + \" \" + \"from lot\" + fromLot);\n }\n }\n });\n\n\n }", "@Override\n public void onLocationChanged(Location location) {\n locationLast = location;\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n //move camera at same pace as user moving\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n\n //stop map from re-orientating. allows user to zoom in and move camera around\n if(!oriented){\n\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n oriented = true;\n }\n\n }", "private void onMapMoving(GoogleMap map){\n map.setOnCameraMoveStartedListener(new GoogleMap.OnCameraMoveStartedListener() {\n @Override\n public void onCameraMoveStarted(int reason) {\n if (reason == GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE){\n if(isTracking){\n Position.stopTrackingPosition(fusedLocationClient, locationCallback);\n isTracking = false;\n }\n }\n }\n });\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng miUbicacion = new LatLng(location.getLatitude(), location.getLongitude());\n\n //Marcador de la ub. actual\n mMap.addMarker(new MarkerOptions().position(miUbicacion).title(\"Ubicación actual\").icon(BitmapDescriptorFactory.fromResource(R.drawable.marca3)));\n\n //Foco de la camara según la ubicación\n mMap.moveCamera(CameraUpdateFactory.newLatLng(miUbicacion));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(miUbicacion)\n .zoom(14)\n .bearing(90)\n .tilt(45)\n .build();\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng barcelona = new LatLng(41.3887901, 2.1589899);\n LatLng marcador1 = new LatLng(41.379564, 2.167203);\n LatLng marcador2 = new LatLng(41.394327, 2.191843);\n LatLng marcador3 = new LatLng(41.398121, 2.199290);\n LatLng marcador4 = new LatLng(41.386235, 2.146300);\n LatLng marcador5 = new LatLng(41.395933, 2.136832);\n LatLng marcador6 = new LatLng(41.441696, 2.237285);\n LatLng marcador7 = new LatLng(41.457493, 2.255982);\n LatLng marcador8 = new LatLng(41.316202, 2.028248);\n LatLng marcador9 = new LatLng(41.333813, 2.035098);\n LatLng marcador10 = new LatLng(41.357954, 2.061158);\n\n\n mMap.addMarker(new MarkerOptions().position(marcador1).title(\"Los amigos\"));\n mMap.addMarker(new MarkerOptions().position(marcador2).title(\"El dorado\"));\n mMap.addMarker(new MarkerOptions().position(marcador3).title(\"Juan y Luca\"));\n mMap.addMarker(new MarkerOptions().position(marcador4).title(\"Durums\"));\n mMap.addMarker(new MarkerOptions().position(marcador5).title(\"Restaurante Jose Fina\"));\n mMap.addMarker(new MarkerOptions().position(marcador6).title(\"Los Hermanos\"));\n mMap.addMarker(new MarkerOptions().position(marcador7).title(\"Paella para todos\"));\n mMap.addMarker(new MarkerOptions().position(marcador8).title(\"Señor Pollo\"));\n mMap.addMarker(new MarkerOptions().position(marcador9).title(\"Restaurante Boliviano\"));\n mMap.addMarker(new MarkerOptions().position(marcador10).title(\"Laguna Alalay\"));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(barcelona,12), 4000,null);\n mMap.setMaxZoomPreference(1000);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n sourceLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n\n CameraPosition position = CameraPosition.builder()\n .target(sourceLatLng)\n .zoom(16)\n //.tilt(30)\n .build();\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(position));\n\n } else {\n Snackbar snackbar = Snackbar\n .make(findViewById(R.id.drawer_layout), \"Location not available.\", Snackbar.LENGTH_LONG);\n snackbar.show();\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n Log.d(\"GeoPost Location\", \"Location update received: \" + location.toString());\n\n mMap.clear();\n\n latitudine = location.getLatitude();\n longitudine = location.getLongitude();\n myPosition = new LatLng(latitudine, longitudine);\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"Marker in myPosition\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myPosition, 15));\n Log.d(\"GeoPost Location\", \"lat: \"+latitudine+\" longi: \"+longitudine);\n\n }", "@Override\n public void onLocationUpdated(Location location) {\n fromPosition = new LatLng(location.getLatitude(), location.getLongitude());\n btn1.setVisibility(View.VISIBLE);\n moveCamera(new LatLng(location.getLatitude(), location.getLongitude()),\n DEFAULT_ZOOM, \"My Location\");\n }", "@Override\n public void onMarkerDragEnd(Marker marker) {\n\n Integer markerId = markers.get(marker);\n // if it's a marker for draggable circle then it's not in the hashmap, Ui will not receive this dragging event\n if (markerId != null) {\n LatLng latlng = marker.getPosition();\n OnMarkerDragEnd(markerId, latlng.latitude, latlng.longitude);\n }\n // find if the marker is the center or radius marker of any existing draggable circle, then call the move or resize\n // this draggable circle\n for (DraggableCircle dCircle: mCircles){\n if ((dCircle.getCenterMarker().equals(marker)) || (dCircle.getRadiusMarker().equals(marker))) {\n dCircle.onMarkerMoved(marker); //ask the draggable circle to change it's appearance\n // also fire FinishedDraggingCircle() to UI\n int uid = circles.get(dCircle);\n LatLng center = dCircle.getCenterMarker().getPosition();\n FinishedDraggingCircle(uid, center.latitude, center.longitude, dCircle.getRadius());\n }\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng posicio = new LatLng(location.getLatitude(),location.getLongitude());\n //Afegir la camera amb el punt generat abans i un nivell de zoom\n CameraUpdate camera = CameraUpdateFactory.newLatLngZoom(posicio,13);\n //Desplacem la camera al nou punt\n mMap.moveCamera(camera);\n posicioActual = posicio;\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"you are in sydney\").draggable(true));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.setOnMarkerDragListener(this);\n mMap.setOnMapLongClickListener(this);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n\n mMap = googleMap;\n\n attachLocationListener();\n\n\n mMap.setOnMarkerDragListener(this);\n\n }", "private void updateUserPosition()\n {\n LatLng current = new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude());\n circle.setCenter(current);\n Log.i(\"ZOOM:\", \" \" + mMap.getCameraPosition().zoom);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));//move map to the user's position\n updateMap();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LatLng indiaLatitudeLongitude = new LatLng(20.5937, 78.9629);\n MarkerOptions indiaMarker = new MarkerOptions();\n indiaMarker.position(indiaLatitudeLongitude);\n indiaMarker.title(\"I Love My India...\");\n indiaMarker.icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher));\n mMap.addMarker(indiaMarker);\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(indiaLatitudeLongitude));\n CameraPosition newPosition = new CameraPosition.Builder()\n .target(indiaLatitudeLongitude)\n// .zoom(14)\n .build();\n\n\n MarkerOptions mumbai = new MarkerOptions();\n mumbai.position(new LatLng(20, 78));\n mumbai.title(\"Mumbai\");\n mMap.addMarker(mumbai);\n mMap.addCircle(new CircleOptions().center(new LatLng(20, 78)).radius(20000));\n\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(newPosition));\n\n\n }", "@Override\n public void onMarkerDragEnd(Marker marker) {\n int selectedItem = spnPointType.getSelectedItemPosition();\n\n switch (selectedItem) {\n case 0:\n markersMain.add(markerDraggedPos, marker);\n //update polilyme\n rutaMain.setPoints(getCoordinatesOfMarkers(markersMain));\n break;\n case 1:\n markersWater.add(markerDraggedPos, marker);\n //update polilyme\n rutaWater.setPoints(getCoordinatesOfMarkers(markersWater));\n break;\n case 2:\n markersAtractivos.add(markerDraggedPos, marker);\n //update polilyme\n rutaAtractivos.setPoints(getCoordinatesOfMarkers(markersAtractivos));\n break;\n }\n\n }", "@Override\n public void run() {\n LatLng myLoc = new LatLng(myLatitude, myLongitude);\n myMarker.setPosition(myLoc);\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng newLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (marker == null) {\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n textView.setText(\"Your Current Location: \" + address); //For Testing, display coordinates on textView every time it's triggered\n marker = mMap.addMarker(new MarkerOptions().position(newLocation).title(\"Your current location:\"));\n arrayMarker.add(0, marker);\n builder.include(marker.getPosition());\n marker.setSnippet(address);\n } else {\n marker.setPosition(newLocation);\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n// textView.setText(\"\\nCurrent Location: \" + address);\n marker.setTitle(\"Your current location:\");\n marker.setSnippet(address);\n }\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocation, 14.0f));\n renderCamera();\n }", "@Override\n public void onLocationChanged(Location location) {\n if(location != null){\n originLocation = location;\n setCameraPosition(location);\n\n LatLng point = new LatLng();\n point.setLongitude(finalLon);\n point.setLatitude(finalLat);\n onMapClick(point);\n\n startButton.setVisibility(View.VISIBLE);\n\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n getDataFromDatabase();\n\n // Add a marker in Sydney and move the camera\n //LatLng hellas = new LatLng(38.311449, 25.022821);\n // mMap.addMarker(new MarkerOptions().position(hellas).title(\"Marker in Aegean Sea\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(hellas,5));\n\n //Initalize MyLocation stuff\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMyLocationClickListener(this);\n\n //setMarkersOnMap();\n\n if(mLocationPermissionGranted){\n getDeviceLocation();\n }\n\n\n ic_plus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n DEFAULT_ZOOM = 17f;\n getDeviceLocation();\n\n //double lat = currentLocation.getLatitude();\n //double lon = currentLocation.getLongitude();\n LatLng currlatlon = new LatLng(currentLocation.getLatitude()+0.0002,currentLocation.getLongitude()+0.0002);\n\n\n curraddmarker = mMap.addMarker(new MarkerOptions().position(currlatlon).draggable(true));\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n hideUI();\n showConfirm();\n\n }\n });\n\n addMarker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n showUI();\n addMarker.setVisibility(View.GONE);\n\n //double lat = curraddmarker.getPosition().latitude;\n //double lon = curraddmarker.getPosition().longitude;\n\n //Toast.makeText(AEDMapActivity.this, \"Lat:\"+currentMarkerLat+\" Lon:\"+currentMarkerLon, Toast.LENGTH_SHORT).show();\n Intent i =new Intent(AEDMapActivity.this, addMarkerActivity.class);\n i.putExtra(\"Lat\",curraddmarker.getPosition().latitude);\n i.putExtra(\"Lon\",curraddmarker.getPosition().longitude);\n startActivity(i);\n }\n });\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n hideConfirm();\n showUI();\n curraddmarker.remove();\n\n getDeviceLocation();\n\n }\n });\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener()\n {\n @Override\n public void onMapClick(LatLng arg0)\n {\n if(menuUI){\n if(markerInfo){\n hideMarkerInfoIcon();\n return;\n }\n\n if(adminEkav || adminDimos){\n hideReportIcon();\n }\n\n menuUI = false;\n hideUI();\n\n\n }\n else{\n menuUI = true;\n showUI();\n if(adminEkav || adminDimos){\n showReportIcon();\n }\n }\n }\n });\n\n\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n showMarkerInfoIcon();\n\n Log.d(TAG,marker.getTag().toString());\n\n if(!markerMap.isEmpty()){\n for(int i=0; i<markerMap.size(); i++) {\n marker_id = (String) markerMap.get(i).get(\"Id\");\n //Log.d(TAG,id);\n if(marker_id.equals(marker.getTag().toString())){\n marker_name = (String) markerMap.get(i).get(\"Name\");\n marker_desc = (String) markerMap.get(i).get(\"Description\");\n marker_pic = (String) markerMap.get(i).get(\"ImageUrl\");\n marker_geo = (GeoPoint) markerMap.get(i).get(\"Geolocation\");\n\n Log.d(TAG,\"Marker Clicked!! - name: \"+marker_name+\" desc: \"+marker_desc+\" geo: \"+marker_geo+ \" imgurl: \"+marker_pic);\n\n ic_info.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i =new Intent(AEDMapActivity.this, MarkerInfoActivity.class);\n i.putExtra(\"Id\",marker_id);\n i.putExtra(\"Name\",marker_name);\n i.putExtra(\"Description\",marker_desc);\n i.putExtra(\"Lat\",marker_geo.getLatitude());\n i.putExtra(\"Lon\",marker_geo.getLongitude());\n i.putExtra(\"imgUrl\",marker_pic);\n startActivity(i);\n }\n });\n\n break;\n }\n }\n }\n\n return false;\n }\n });\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n\n\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n }\n });\n\n }", "@Override\n public void onLocationChanged(Location location) {\n if (location.getProvider().equals(\"gps\")){\n\n locationManager.removeUpdates(this);\n }\n LatLng user_location = new LatLng(location.getLatitude(), location.getLongitude());\n m1.setPosition(user_location);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_location, 16));\n\n }", "public void toggleCamera() {\n\t\tif (map != null && map.getCameraPosition().zoom != MBDefinition.DEFAULT_ZOOM && carLatLng!=null) {\n\t\t\tmap.moveCamera(CameraUpdateFactory.newLatLngZoom(carLatLng, MBDefinition.DEFAULT_ZOOM));\n\t\t} else if (map != null && carMarker != null && pickupMarker != null) {\n\t\t\tLatLngBounds.Builder builder = new LatLngBounds.Builder();\n\n\t\t\tbuilder.include(carMarker.getPosition());\n\t\t\tbuilder.include(pickupMarker.getPosition());\n\n\t\t\tLatLngBounds bounds = builder.build();\n\n\t\t\tint padding = 150; // offset from edges of the map in pixels\n\t\t\tCameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, padding);\n\t\t\tmap.moveCamera(cu);\n\t\t}\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n\n String[] xy = new String[]{\"37.221900\",\"127.18800\",\"37.221804\",\"127.186695\",\"37.220000\",\"127.186666\"};\n\n ArrayList<LatLng> loc=new ArrayList<LatLng>();\n\n int count = 1;\n for (int i=0;i<xy.length;i++){\n\n double tmp = Double.parseDouble(xy[i]);\n double tmp2 = Double.parseDouble(xy[++i]);\n\n\n LatLng latLng = new LatLng(tmp, tmp2);\n\n loc.add(latLng);\n\n\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"Pin\"+count).icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_pin_purple)));\n count++;\n }\n\n\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc.get(loc.size()-1)));\n\n\n// // 서울 위치\n// LatLng seoul = new LatLng(37.566535, 126.97796919);\n// mMap.addMarker(new MarkerOptions().position(seoul).title(\"Marker in Seoul\"));\n//\n// // 명지대 위치 추가\n// LatLng MJU = new LatLng(37.221804, 127.186695);\n// mMap.addMarker(new MarkerOptions()\n// .position(MJU)\n// .title(\"명지대\"));\n//\n// //핀 연결 확인용 좌표 추가\n// LatLng MJU2 = new LatLng(37.220000, 127.186666);\n// mMap.addMarker(new MarkerOptions()\n// .position(MJU2)\n// .title(\"명지대2\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(MJU2));\n\n // 카메라 줌\n mMap.animateCamera(CameraUpdateFactory.zoomTo(17.0f));\n\n // 인포 윈도우 클릭시 전화 걸기 -> 뭔가 게시물 쓸때 쓸수있을거 같아서 남겨둠\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:0312365043\"));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n });\n\n //arraylist 다시 배열에 넣는거 아직 않마 까먹ㅇ멋어ㅏ\n LatLng[] line = {\n loc.get(0),loc.get(1),loc.get(2)\n };\n //좌표끼리 선 긋기 좌표가 추가 될때마다 새로운 선을 만들어야 하나.. 아니면 그냥 좌표하나씩 추가해야하나 고민\n //일단 좌표에 들어온 순서로 선이 그어짐 -> 시간별로 추가할수 있도록 해야 함\n\n\n //좌표 두개마다 각각의 polyline을 생성해야 각각 화살표로 나올수 있음\n //for문 사용해서 polyline 만들어보기\n// for(int i=0; i<line.length;){\n// Polyline polyline1 = googleMap.addPolyline(new PolylineOptions()\n// .clickable(true)\n// .add( line[i], line[++i]\n// ) .width(10)\n//\n// .geodesic(true));\n//\n//\n// }\n\n\n Polyline polyline1 = googleMap.addPolyline(new PolylineOptions()\n .clickable(true)\n .add( line\n ) .width(10)\n\n .geodesic(true));\n\n polyline1.setEndCap(new CustomCap(BitmapDescriptorFactory.fromResource(R.drawable.ic_arrow), 15));\n polyline1.setStartCap(new CustomCap(BitmapDescriptorFactory.fromResource(R.drawable.ic_circle), 15));\n\n\n\n googleMap.setOnPolylineClickListener(this);\n googleMap.setOnPolygonClickListener(this);\n\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(2.16, 102.43);\n LatLng merlimau = new LatLng(2.153708, 102.427699);\n LatLng jamaluddin = new LatLng(2.153708, 102.427699);\n LatLng malaya = new LatLng(2.155456, 102.427411);\n LatLng ting = new LatLng(2.147843, 102.426639);\n LatLng limHang = new LatLng(2.146331, 102.425942);\n LatLng mariam = new LatLng(2.145006, 102.422510);\n LatLng yunus = new LatLng(2.145441, 102.421779);\n\n mMap.addMarker(new MarkerOptions().position(sydney)\n .title(\"Taman Harmoni\")\n .snippet(\"Ramai Budak Poli dan U duduk disini\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 16));\n mMap.addMarker(new MarkerOptions().position(merlimau)\n .title(\"Klinik Kesihatan merlimau \")\n .snippet(\"Klinik Kesihatan merlimau\"));\n mMap.addMarker(new MarkerOptions().position(jamaluddin)\n .title(\"Klinik Dr Jamaludin dan surgery \")\n .snippet(\"Klinik Jr Jamaludin dan surgery\"));\n mMap.addMarker(new MarkerOptions().position(malaya)\n .title(\"Poliklinik Malaya \")\n .snippet(\"Ramai Budak Poli dan U duduk disini\"));\n mMap.addMarker(new MarkerOptions().position(ting)\n .title(\"Klinik Dr Ting \")\n .snippet(\"Ramai Budak Poli dan U duduk disini\"));\n mMap.addMarker(new MarkerOptions().position(limHang)\n .title(\"Limhang Klinik & surgery \")\n .snippet(\"Ramai Budak Poli dan U duduk disini\"));\n mMap.addMarker(new MarkerOptions().position(yunus)\n .title(\"Poliklinik Mohd Yunus \")\n .snippet(\"Ramai Budak Poli dan U duduk disini\"));\n mMap.addMarker(new MarkerOptions().position(mariam)\n .title(\"Klinik Dr Mariam Poliklinik & surgery \")\n .snippet(\"Ramai Budak Poli dan U duduk disini\"));\n\n\n mMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(final GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n\n // Add a marker in Sydney and move the camera\n final LatLng sementeryo = new LatLng(7.063907, 125.585014);\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n\n @Override\n public void onMapClick(LatLng point) {\n\n if(destinationMarker != null) {\n\n destinationMarker.remove();\n\n }\n marker = new MarkerOptions().position(new LatLng(point.latitude, point.longitude)).title(\"Grave Location\");\n\n marker.icon(BitmapDescriptorFactory.fromResource(R.mipmap.grave_ic1));\n destinationMarker = mMap.addMarker(marker);\n\n\n System.out.println(point.latitude + \"---\" + point.longitude);\n\n // Toast.makeText(add_map.this, (point.latitude + \"---\" + point.longitude), Toast.LENGTH_LONG).show();\n\n Button button = (Button) findViewById(R.id.addlatlang);\n\n button.setBackgroundResource(R.drawable.blue_btn);\n button.setEnabled(true);\n\n lat=point.latitude;\n lang=point.longitude;\n\n\n }\n });\n\n Location locationf;\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationf = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\n double latitude = locationf.getLatitude();\n double longitude = locationf.getLongitude();\n\n final LatLng coordinate = new LatLng(latitude, longitude); //Store these lat lng values somewhere. These should be constant.\n CameraUpdate location = CameraUpdateFactory.newLatLngZoom(\n coordinate, 15);\n googleMap.animateCamera(location);\n\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(coordinate,18));\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n\n\n CameraUpdate location = CameraUpdateFactory.newLatLngZoom(\n sementeryo, 17);\n googleMap.animateCamera(location);\n\n }\n }, 5000);\n\n\n\n }", "private void getDeviceLocation(){\n Log.d(TAG, \"getDeviceLocation: getting the device location\");\n\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n\n try {\n if(mLocationPermissionsGranted){\nfinal Task location=mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n@Override\npublic void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: found location\");\n Location currentLocation=(Location)task.getResult();\n moveCamera(new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude()),\n /*this is wew i stopped*/ Deafult_ZOOM);\n\n\n\n /* LatLng latLng = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options=new MarkerOptions().position(latLng).title(\"test\");\n mMap.addMarker(options);*/\n\n }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(selectLocation.this,\"unable to get current location \",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n\n }catch (SecurityException e){\n Log.e(TAG, \"getDeviceLocation:SecurityException \"+e.getMessage() );\n }\n\n }", "public void moveTheMap() {\n \t if(streetLevelFragment != null && map != null){\n \t\t map.setCenter(streetLevelFragment.getStreetLevelModel().getPosition(), MapAnimation.LINEAR, map.getZoomLevel(), streetLevelFragment.getStreetLevelModel().getHeading(), 0);\n \t }\n }", "public void initGoogleMaps(){\n\n double lat = getIntent().getDoubleExtra(\"lat\", 0);\n double lng = getIntent().getDoubleExtra(\"lng\", 0);\n LatLng latLng = new LatLng(lat, lng);\n\n MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.map);\n GoogleMap googleMap = mapFragment.getMap();\n //googleMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(25.017273, 121.542012)));\n //googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));\n\n\n MarkerOptions markerOptions = new MarkerOptions().position(latLng).title(\"here\");\n googleMap.addMarker(markerOptions);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n TypedValue tv = new TypedValue();\n // move my location button down under toolbar\n if (getActivity().getTheme().resolveAttribute(R.attr.actionBarSize, tv, true))\n {\n int actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics());\n mMap.setPadding(0, actionBarHeight, 0, 0);\n }\n\n if (mParkedMarker != null) {\n mMap.animateCamera(CameraUpdateFactory.newLatLng(mParkedMarker.getPosition()));\n } else if (ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(getActivity());\n mFusedLocationClient.getLastLocation()\n .addOnSuccessListener(getActivity(), new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n LatLng myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n }\n }\n });\n } else {\n Toast.makeText(getActivity(), \"Don't have permission\", Toast.LENGTH_LONG).show();\n }\n\n\n mMap.setMaxZoomPreference(20);\n\n // Add a marker in Corvallis and move the camera\n LatLng corvallis = new LatLng(44.5646, -123.2620);\n\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(corvallis, 14));\n\n TileProvider tileProvider = new SpotsTileProvider(getActivity());\n mTileOverlay = mMap.addTileOverlay(new TileOverlayOptions().tileProvider(tileProvider));\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMyLocationClickListener(this);\n\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n layoutManager.smoothScrollToPosition(recyclerView, null, stationList.indexOf(main.stationMap.get(marker.getTag())));\n centreOnStation(main.stationMap.get(marker.getTag()), true);\n return true;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n final LatLng latLng = new LatLng(latitude, longitude);\n mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(75)\n .strokeWidth(2f));\n CameraUpdate center=\n CameraUpdateFactory.newLatLng(latLng);\n CameraUpdate zoom=CameraUpdateFactory.zoomTo(21);\n\n mMap.moveCamera(center);\n mMap.animateCamera(zoom);\n Marker mark= mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .title(\"I'm here...\")\n .snippet(\"Its My Location\")\n .rotation((float) -15.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n Tmarker=mMap.addMarker(new MarkerOptions()\n .snippet(tuition_id)\n .rotation((float)12.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE))\n .position(new LatLng(lat,lan)));\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n if(marker!=null) {\n marker.remove();\n }\n marker=mMap.addMarker(new MarkerOptions()\n .snippet(\"My Home\")\n .rotation((float)0.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .position(latLng));\n }\n });\n\n//.fillColor(0x55ffff99));\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n @Override\n public View getInfoWindow(Marker marker) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n View v = getLayoutInflater().inflate(R.layout.layout_marker, null);\n\n TextView info= (TextView) v.findViewById(R.id.info);\n TextView hotelname= (TextView) v.findViewById(R.id.info1);\n\n\n hotelname.setText(\"\"+HotelName+\"\");\n info.setText(\"\"+CurrencySymbol+\"\"+TotalFare);\n\n return v;\n }\n });\n int height = 180;\n int width = 200;\n BitmapDrawable bitmapdraw=(BitmapDrawable)getResources().getDrawable(R.drawable.blu_pointer);\n Bitmap b=bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n\n\n\n\n\n mMap.getUiSettings().setMapToolbarEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(Lati,Longi);\n mMap.addMarker(new MarkerOptions().position(sydney).\n title(HotelName).\n snippet(\"\"+CurrencySymbol+\" \"+TotalFare).\n icon(BitmapDescriptorFactory.fromBitmap(smallMarker)));\n CameraPosition cameraPosition = new CameraPosition.Builder().target(sydney).zoom(18).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n //googleMap.moveCamera(cameraUpdate);\n mMap.animateCamera(cameraUpdate);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "public void gotoMap(double lat, double lng) {\n if (map == null)\n return;\n\n //do not animate if already there\n if (!(lat == targetLat && lng == targetLng)) {\n targetLat = lat;\n targetLng = lng;\n\n //convert to LatLng\n LatLng coordinate = new LatLng(lat, lng);\n\n // Save current zoom\n float originalZoom = map.getCameraPosition().zoom;\n\n // Move temporarily camera zoom\n map.moveCamera(CameraUpdateFactory.zoomTo(13));\n\n //get display height\n Display display = getActivity().getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n\n //offset\n Point pointInScreen = map.getProjection().toScreenLocation(coordinate);\n Point newPoint = new Point();\n newPoint.x = pointInScreen.x;\n newPoint.y = pointInScreen.y + (int) (size.y / 4.5f);\n LatLng newCenterLatLng = map.getProjection().fromScreenLocation(newPoint);\n\n // Restore original zoom\n map.moveCamera(CameraUpdateFactory.zoomTo(originalZoom));\n\n //animate\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(newCenterLatLng, 13));\n }\n }", "@SuppressLint(\"MissingPermission\")\r\n @Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n Toast.makeText(MapsActivity.this, \"onMapReady call\", Toast.LENGTH_SHORT).show();\r\n mMap = googleMap;\r\n\r\n LatLng mySweetHome = new LatLng(25.3535828,68.36197439);\r\n\r\n CameraPosition cameraPosition = new CameraPosition.Builder()\r\n .target(mySweetHome)\r\n .zoom(16)\r\n .build();\r\n\r\n\r\n googleMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n\r\n// if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n// return;\r\n// }\r\n\r\n// mMap.setMyLocationEnabled(true);\r\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\r\n// @Override\r\n// public void onMyLocationChange(Location location) {\r\n// Toast.makeText(MapsActivity.this,\"onLocationChanged is called\",Toast.LENGTH_SHORT).show();\r\n//\r\n// CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(location.getLatitude(), location.getLongitude()));\r\n// CameraUpdate zoom = CameraUpdateFactory.zoomTo(11);\r\n// mMap.clear();\r\n//\r\n// MarkerOptions mp = new MarkerOptions();\r\n//\r\n// mp.position(new LatLng(location.getLatitude(), location.getLongitude()));\r\n// mp.icon(BitmapDescriptorFactory.fromResource(R.drawable.home));\r\n// mp.title(\"my position\");\r\n//\r\n// mMap.addMarker(mp);\r\n// mMap.moveCamera(center);\r\n// mMap.animateCamera(zoom);\r\n//\r\n// }\r\n// });\r\n\r\n\r\n// LatLng latifabad = new LatLng(25.354514, 68.358056);\r\n// MarkerOptions markerOptions = new MarkerOptions().position(latifabad).title(\"My sweet home\");\r\n// markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.home));\r\n// mMap.addMarker(markerOptions);\r\n\r\n\r\n// mMap.addMarker(new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_home_black_24dp)).position(latifabad).title(\"My Home\"));\r\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(latifabad));\r\n\r\n\r\n// CameraPosition cameraPosition = new CameraPosition.Builder()\r\n// .target(latifabad)\r\n// .zoom(15)\r\n// .build();\r\n// //move the map to selected marker\r\n// googleMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n\r\n // Add a marker in Sydney and move the camera\r\n// LatLng sydney = new LatLng(-34, 151);\r\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\r\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\r\n\r\n\r\n// if (mMap == null) {\r\n// // Try to obtain the map from the SupportMapFragment.\r\n// if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n// // TODO: Consider calling\r\n// // ActivityCompat#requestPermissions\r\n// // here to request the missing permissions, and then overriding\r\n// // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n// // int[] grantResults)\r\n// // to handle the case where the user grants the permission. See the documentation\r\n// // for ActivityCompat#requestPermissions for more details.\r\n// return;\r\n// }\r\n// mMap.setMyLocationEnabled(true);\r\n// // Check if we were successful in obtaining the map.\r\n// if (mMap != null) {\r\n//\r\n//\r\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\r\n//\r\n// @Override\r\n// public void onMyLocationChange(Location arg0) {\r\n// // TODO Auto-generated method stub\r\n//\r\n// mMap.addMarker(new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title(\"It's Me!\"));\r\n// }\r\n// });\r\n//\r\n// }\r\n\r\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\r\n\r\n locationListener = new LocationListener() {\r\n @Override\r\n public void onLocationChanged(Location location) {\r\n\r\n\r\n Toast.makeText(MapsActivity.this,\"onLocationChanged\",Toast.LENGTH_SHORT).show();\r\n mMap.clear();\r\n\r\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\r\n\r\n mMap.addMarker(new MarkerOptions().position(userLocation).icon(BitmapDescriptorFactory.fromResource(R.drawable.homelocationmarker)).title(\"My Sweet Home\"));\r\n\r\n\r\n //move the map to selected marker\r\n // mMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n\r\n\r\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\r\n\r\n Toast.makeText(MapsActivity.this, userLocation.toString(), Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n @Override\r\n public void onStatusChanged(String provider, int status, Bundle extras) {\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderEnabled(String provider) {\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderDisabled(String provider) {\r\n\r\n }\r\n\r\n\r\n };\r\n\r\n if (Build.VERSION.SDK_INT < 23) {\r\n\r\n\r\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\r\n\r\n }\r\n\r\n// else if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\r\n// Toast.makeText(MapsActivity.this,\"else if \",Toast.LENGTH_SHORT).show();\r\n//\r\n//\r\n// locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\r\n//\r\n// Location lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\r\n//\r\n// LatLng userLocation = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\r\n//\r\n// mMap.clear();\r\n//\r\n// mMap.addMarker(new MarkerOptions().position(userLocation).title(\"Marker\"));\r\n//\r\n//\r\n//\r\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\r\n//\r\n// Toast.makeText(MapsActivity.this, userLocation.toString(), Toast.LENGTH_SHORT).show();\r\n//\r\n//\r\n// }\r\n\r\n else {\r\n\r\n Toast.makeText(MapsActivity.this,\"else\",Toast.LENGTH_SHORT).show();\r\n\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\r\n\r\n }\r\n\r\n }", "protected void updateCameraPosition(MapConfiguration.CameraPosition cameraPosition) {\n\n switch (cameraPosition) {\n\n // Center on the device location\n case DEFAULT:\n case CENTER_DEVICE_LOCATION:\n\n if (getDeviceLocation() != null) {\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(getDeviceLocation().getLatitude(),\n getDeviceLocation().getLongitude()), mMapConfiguration.getZoomLevel()), mMapConfiguration.getAnimationSpeed(), mCameraAnimationCallback);\n } else if (mBoundsToFitMap != null) {\n updateCameraPosition(MapConfiguration.CameraPosition.FITS_ALL_ITEMS);\n }\n\n break;\n\n case CENTER_FIRST_ITEM:\n\n if (mMarkerIdMapItem != null && !mMarkerIdMapItem.isEmpty()) {\n MapItem mapItem = mMarkerIdMapItem.entrySet().iterator().next().getValue();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(mapItem.getLocation().latitude, mapItem.getLocation().longitude), mMapConfiguration.getZoomLevel()), mMapConfiguration.getAnimationSpeed(), mCameraAnimationCallback);\n } else if (mBoundsToFitMap != null) {\n updateCameraPosition(MapConfiguration.CameraPosition.DEFAULT);\n }\n\n break;\n\n // Fits all items in the map\n case FITS_ALL_ITEMS:\n\n if (mBoundsToFitMap != null) {\n mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(mBoundsToFitMap, mMapConfiguration.getPadding()), mMapConfiguration.getAnimationSpeed(), mCameraAnimationCallback);\n } else {\n updateCameraPosition(MapConfiguration.CameraPosition.DEFAULT);\n }\n\n break;\n\n // Fits the device location + the nearest item\n case FITS_DEVICE_LOCATION_NEAREST_ITEM:\n\n if (getDeviceLocation() != null && mMarkerIdMapItem != null && !mMarkerIdMapItem.isEmpty()) {\n\n float[] results = new float[1];\n\n // Dummy distance as far as possible\n float distance = 1000000000;\n\n LatLng nearestItem = null;\n\n // Calculating the nearest point from the list\n for (Map.Entry<String, MapItem> mapItem : mMarkerIdMapItem.entrySet()) {\n\n // First item initialization\n if (nearestItem == null) {\n nearestItem = new LatLng(mapItem.getValue().getLocation().latitude, mapItem.getValue().getLocation().longitude);\n }\n\n // Calculating the distance\n Location.distanceBetween(getDeviceLocation().getLatitude(), getDeviceLocation().getLongitude(), mapItem.getValue().getLocation().latitude, mapItem.getValue().getLocation().longitude, results);\n\n // If the item is closer than the previous one we save it\n if (results[0] < distance) {\n nearestItem = new LatLng(mapItem.getValue().getLocation().latitude, mapItem.getValue().getLocation().longitude);\n distance = results[0];\n }\n }\n\n // Bounds with the device location + the nearest item\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n builder.include(nearestItem != null ? nearestItem : null);\n builder.include(new LatLng(getDeviceLocation().getLatitude(), getDeviceLocation().getLongitude()));\n\n mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), mMapConfiguration.getPadding()), mMapConfiguration.getAnimationSpeed(), mCameraAnimationCallback);\n } else {\n updateCameraPosition(MapConfiguration.CameraPosition.DEFAULT);\n }\n\n break;\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n float zoomLevel = 7.0f;\n\n // Add a markers of every destination and move the camera\n Bundle b = this.getIntent().getExtras();\n String[] records = b.getStringArray(\"Records\");\n\n double lat;\n double lon;\n\n int index = 1;\n\n for(int r = 0; r < records.length; r++){\n\n if(index == records.length - 7){\n lat = Double.parseDouble(records[records.length - 4]);\n lon = Double.parseDouble(records[records.length - 3]);\n LatLng dest = new LatLng(lat, lon);\n mMap.addMarker(new MarkerOptions().position(dest).title(records[index])).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(dest, zoomLevel));\n break;\n }\n\n lat = Double.parseDouble(records[index+3]);\n lon = Double.parseDouble(records[index+4]);\n\n LatLng dest = new LatLng(lat, lon);\n mMap.addMarker(new MarkerOptions().position(dest).title(records[index])).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(dest, zoomLevel));\n index+=8;\n }\n\n\n /*\n // Царевец\n LatLng carevec = new LatLng(43.084030f, 25.652586f);\n mMap.addMarker(new MarkerOptions().position(carevec).title(\"Царевец\")).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carevec, zoomLevel));\n\n // Чудни мостове\n LatLng chydniMostove = new LatLng(41.819929f, 24.581748f);\n mMap.addMarker(new MarkerOptions().position(chydniMostove).title(\"„Чудните Мостове“\")).showInfoWindow();\n\n // Ягодинска Пещера\n LatLng yagodinskaPeshtera = new LatLng(41.628984f, 24.329589f);\n mMap.addMarker(new MarkerOptions().position(yagodinskaPeshtera).title(\"Ягодинска Пещера\")).showInfoWindow();\n\n // Връх Снежанка\n LatLng vruhSnejanka = new LatLng(41.638506f, 24.675594f);\n mMap.addMarker(new MarkerOptions().position(vruhSnejanka).title(\"Връх Снежанка\")).showInfoWindow();\n\n // Белоградчишки скали\n LatLng belogradchiskiSkali = new LatLng(43.623361f, 22.677964f);\n mMap.addMarker(new MarkerOptions().position(belogradchiskiSkali).title(\"Белоградчишки Скали\")).showInfoWindow();\n\n // Пещера „Леденика“\n LatLng peshteraLedenika = new LatLng(43.204703f, 23.493687f);\n mMap.addMarker(new MarkerOptions().position(peshteraLedenika).title(\"Пещера „Леденика“\")).showInfoWindow();\n\n // Паметник На Христо Ботев И Неговата Чета\n LatLng pametneikHristoBotev = new LatLng(43.798045f, 23.677926f);\n mMap.addMarker(new MarkerOptions().position(pametneikHristoBotev).title(\"Паметник На Христо Ботев И Неговата Чета\")).showInfoWindow();\n\n // Национален Музей \"Параход Радецки\"\n LatLng myzeiParahodRadecki = new LatLng(43.799125f, 23.676921f);\n mMap.addMarker(new MarkerOptions().position(myzeiParahodRadecki).title(\"Национален Музей 'Параход Радецки'\")).showInfoWindow();\n\n // Археологически Резерват „Калиакра”\n LatLng rezervatKaliakra = new LatLng(43.361190f, 28.465788f);\n mMap.addMarker(new MarkerOptions().position(rezervatKaliakra).title(\"Археологически Резерват „Калиакра”\")).showInfoWindow();\n\n // Перперикон\n LatLng perperikon = new LatLng(41.718126f, 25.468954f);\n mMap.addMarker(new MarkerOptions().position(perperikon).title(\"Перперикон\")).showInfoWindow();\n\n // Вр. Мусала (2925 М.) - Рила\n LatLng vruhMysala = new LatLng(42.180021f, 23.585167f);\n mMap.addMarker(new MarkerOptions().position(vruhMysala).title(\"Вр. Мусала (2925 М.) - Рила\")).showInfoWindow();\n\n // Връх Шипка – Национален Парк-Музей „Шипка“ - Паметник На Свободата\n LatLng vruhShipka = new LatLng(42.748281f, 25.321387f);\n mMap.addMarker(new MarkerOptions().position(vruhShipka).title(\"Връх Шипка – Национален Парк-Музей „Шипка“ - Паметник На Свободата\")).showInfoWindow();\n\n // Пещера – Пещера „Снежанка“ (Дължина: 145 М)\n LatLng peshteraSnejanka = new LatLng(42.004459f, 24.278645f);\n mMap.addMarker(new MarkerOptions().position(peshteraSnejanka).title(\"Пещера – Пещера „Снежанка“ (Дължина: 145 М)\")).showInfoWindow();\n\n // Античен Театър\n LatLng antichenTeatur = new LatLng(42.147109f, 24.751005f);\n mMap.addMarker(new MarkerOptions().position(antichenTeatur).title(\"Античен Театър\")).showInfoWindow();\n\n // Асенова Крепост\n LatLng asenovaKrepost = new LatLng(41.987020f, 24.873552f);\n mMap.addMarker(new MarkerOptions().position(asenovaKrepost).title(\"Асенова Крепост\")).showInfoWindow();\n\n // Бачковски Манастир\n LatLng bachkovskiManastir = new LatLng(41.942380f, 24.849340f);\n mMap.addMarker(new MarkerOptions().position(bachkovskiManastir).title(\"Бачковски Манастир\")).showInfoWindow();\n\n // Резерват „Сребърна“\n LatLng rezervatSreburna = new LatLng(44.115654f, 27.071807f);\n mMap.addMarker(new MarkerOptions().position(rezervatSreburna).title(\"Резерват „Сребърна“\")).showInfoWindow();\n\n // Мадарски Конник\n LatLng madarskiKonnik = new LatLng(43.277708f, 27.118949f);\n mMap.addMarker(new MarkerOptions().position(madarskiKonnik).title(\"Мадарски Конник\")).showInfoWindow();\n\n // Седемте Рилски езера\n LatLng sedemteRilskiEzera = new LatLng(42.203413f, 23.319871f);\n mMap.addMarker(new MarkerOptions().position(sedemteRilskiEzera).title(\"Седемте Рилски езера\")).showInfoWindow();\n\n //Храм-Паметник „Александър Невски“\n LatLng aleksandurNevski = new LatLng(42.696000f, 23.332879f);\n mMap.addMarker(new MarkerOptions().position(aleksandurNevski).title(\"Храм-Паметник „Александър Невски“\")).showInfoWindow();\n */\n\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n searchMarker.remove();\n if(truckMarker!= null) {\n truckMarker.remove();\n }\n truckMarker = mMap.addMarker(new MarkerOptions().position(marker.getPosition()));\n new LoadTruckDetails().execute(marker.getTag());\n return true;\n }", "private void positionCamera(DirectionsRoute route, GoogleMap mMap)\n {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(route.legs[overview].startLocation.lat, route.legs[overview].startLocation.lng), 12));\n }", "@Override\n public void setCameraCoordinate(double latitude, double longitude) {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(latitude, longitude)));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setCompassEnabled(true);\n String mPermission = Manifest.permission.ACCESS_FINE_LOCATION;\n // if Permission not already given\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n ActivityCompat.requestPermissions(getActivity(), new String[]{mPermission}, REQUEST_CODE_PERMISSION);\n Toast.makeText(getContext(), \"Location permission not granted\", Toast.LENGTH_SHORT).show();\n // checkLocationPermission();\n return;\n } else {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n getDeviceLocation();\n init();\n }\n if(sharedPref.getString(\"shared_status\",null).equalsIgnoreCase(\"User\")) { // if user in show driver\n showNearBy();\n }\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n if (mPreviousMarker != null) {\n mPreviousMarker.remove();\n mPreviousMarker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Destination\"));\n // Toast.makeText(getContext(), mPreviousMarker.getSnippet(), Toast.LENGTH_LONG).show();\n }\n else\n mPreviousMarker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Destination\"));\n }\n });\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n // Toast.makeText(getContext(), \"MARKER CLICKED \"+marker.getTitle(), Toast.LENGTH_SHORT).show();\n if(!marker.getTitle().equalsIgnoreCase(\"Destination\")) {\n if(mPreviousMarker !=null) // destination is marked\n show_card(marker.getTitle(),true,mlocation,mPreviousMarker);\n else\n show_card(marker.getTitle(),false,mlocation,mPreviousMarker);\n }else\n mPreviousMarker.getSnippet();\n\n return false;\n }\n });\n }", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n MapAddress durban= new MapAddress(\"Gordon Rajapogal: Durban Teen Challenge\",\"Afrique du Sud\",\"Durban\",\"Newlands East\",-29.777830,30.988298,\"5/7 Marlin Grov Newlands East Durban\",0,\"0833448430\");\n MapAddress nigeria= new MapAddress(\"BETLAADA ADULT & TEEN CHALLENGE\",\"Nigeria\",\"Ibadan\",\"\",7.323658, 3.898848,\"42A UNIQUE ESTATE, SANYO , IBADAN, NIGERIA\",0,\"+234-810-508-7705\");\n MapAddress ghana= new MapAddress(\"Teen Challenge, Ghana.\",\"Ghana\",\"Koforidua\",\"Eastern Region\",6.065691, -0.252336,\"Hse No. 193A, Adweso, Koforidua, Eastern Region, Ghana.\",0,\"+233243841230\");\n MapAddress nairo= new MapAddress(\"Teen Challenge Kenya\",\"Kenya\",\"Nairobi\",\"Kiambu\",-1.197566, 36.845074,\"Mushroom Rd, Kiambu, Kenya\",0,\"+254 722 410751\");\n MapAddress nigeria_jos= new MapAddress(\"Teen Challenge Jos, Nigeria\",\"Nigeria\",\"Jos\",\"Plateu State\",9.897248, 8.896680,\" No 74 Liberty Boulevard Gwarandok, Jos Plateau State, Nigeria\",0,\"\");\n mMap.addMarker(new MarkerOptions().position(new LatLng(durban.getLat(),durban.getLng())).title(durban.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(nigeria.getLat(),nigeria.getLng())).title(nigeria.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(ghana.getLat(),ghana.getLng())).title(ghana.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(nairo.getLat(),nairo.getLng())).title(nairo.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(nigeria_jos.getLat(),nigeria_jos.getLng())).title(nigeria_jos.getOrganisation()));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(durban.getLat(), durban.getLng())));\n }", "double a_marker_position ()\n {\n double l_return = 0.0;\n\n if (marker != null)\n {\n l_return = marker.getPosition ();\n }\n\n return l_return;\n\n }", "@SuppressWarnings({\"MissingPermission\"})\n private void setMarkerToCurrentLocation() {\n if(mLastLocation != null){\n Log.d(TAG, \"Current location latitude = \"+ mLastLocation.getLatitude() +\n \"Current location latitude = \" + mLastLocation.getLongitude());\n LatLng currentLocationMarker = new LatLng(mLastLocation.getLatitude(), mLastLocation.getLongitude());\n mMap.addMarker(new MarkerOptions().position(currentLocationMarker).title(\"Current location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocationMarker, 10));\n }\n else{\n Log.d(TAG, \"Last location is NULL\");\n LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this);\n }\n }" ]
[ "0.87945944", "0.775349", "0.76493484", "0.7573535", "0.75569296", "0.7475918", "0.74220914", "0.73881096", "0.7367179", "0.73344225", "0.73268265", "0.7323099", "0.71378106", "0.7113639", "0.7077304", "0.6994377", "0.69001", "0.68813443", "0.6874549", "0.67340785", "0.6730046", "0.6716687", "0.66859114", "0.6674549", "0.6658033", "0.6648972", "0.66349864", "0.66116154", "0.6610101", "0.65936977", "0.65833277", "0.657738", "0.6556089", "0.65011007", "0.64586514", "0.6454828", "0.64429325", "0.6406885", "0.64056385", "0.6398026", "0.63819885", "0.63816047", "0.63701975", "0.6361168", "0.63426894", "0.63394207", "0.631602", "0.6291238", "0.6270458", "0.6257427", "0.62519145", "0.623901", "0.62166464", "0.6215943", "0.6194259", "0.61829996", "0.6174568", "0.6174035", "0.6139507", "0.613484", "0.6119458", "0.6113061", "0.6106483", "0.61041003", "0.610098", "0.6096712", "0.60900146", "0.6089884", "0.60887706", "0.60674083", "0.60668343", "0.6053792", "0.6051652", "0.60494936", "0.6046283", "0.6043435", "0.6034144", "0.6023883", "0.60189265", "0.6018472", "0.60176766", "0.6002069", "0.59911466", "0.5988146", "0.5979023", "0.5977281", "0.5967382", "0.5959969", "0.594718", "0.5946998", "0.5916414", "0.59148484", "0.5912229", "0.59041595", "0.589638", "0.58877486", "0.5879875", "0.5874424", "0.5866873", "0.5862683" ]
0.73824507
8
get latlng at the center by calling
@Override public void onCameraIdle() { LatLng midLatLng = mMap.getCameraPosition().target; draggedMarker.setPosition(midLatLng); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Point getCenter();", "Point getCenter();", "public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}", "private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }", "public final native LatLng getCenter() /*-{\n return this.getCenter();\n }-*/;", "public LatLng getCenter() {\n return center;\n }", "public int getLat();", "public Point getCenter() {\n return location.center();\n }", "com.google.type.LatLng getLatLng();", "public Point getLocation();", "public GJPoint2D center();", "public Point getCenter() {\n \treturn new Point(x+width/2,y+height/2);\n }", "public Point getCenter() {\n return new Point((int) getCenterX(), (int) getCenterY());\n }", "public LatLng getPosition() { return new LatLng(latitude, longitude); }", "public Coordinate getCenter() {\n return center;\n }", "public Coordinate getLocation();", "public int getLon();", "public Point getCenter() {\r\n return this.center;\r\n }", "public Coords getCenter()\r\n {\r\n return new Coords(Math.round(x + width / 2), Math.round(y + height / 2));\r\n }", "public Point getCenter() {\n return center;\n }", "IntPoint getLocation();", "public Location getCenter() {\n return new Location(location.getWorld(), (float) getRectangle().getCenterX(), (float) getRectangle().getCenterY());\n }", "public Point getAbsPosition() {\n return Game.getMap().TFMapCoordinateToMapCenter(position);\n }", "public Location3D getCenter() {\n\t\treturn new Location3D(world, lowPoint.getBlockX() + getXSize() / 2, lowPoint.getBlockY() + getYSize() / 2, lowPoint.getBlockZ() + getZSize() / 2);\n\t}", "public Point getCenter() {\r\n\t\treturn center;\r\n\t}", "MapLocation getPosition(Unit unit);", "public GeoPointND getStartPoint();", "public native vector kbGetMapCenter();", "public double getCenterLongitude() {\n return centerLongitude;\n }", "public Point getCarLocation() {\r\n\r\n SQLiteQueryBuilder builder = new SQLiteQueryBuilder();\r\n builder.setTables(FTS_VIRTUAL_TABLE_CAR);\r\n builder.setProjectionMap(mColumnMapCar);\r\n\r\n Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(),\r\n null, null, null, null, null, null);\r\n\r\n if (cursor == null) {\r\n return null;\r\n } else if (!cursor.moveToFirst()) {\r\n cursor.close();\r\n return null;\r\n }\r\n\r\n String point_str = cursor.getString(1);\r\n\r\n point_str = point_str.trim();\r\n String[] coordinates = point_str.split(\",\");\r\n String lon = coordinates[0];\r\n String lat = coordinates[1];\r\n\r\n double flon = Float.valueOf(lon);\r\n double flat = Float.valueOf(lat);\r\n\r\n return (new Point(flon, flat));\r\n }", "public Point getPointMiddle()\n {\n Point temp = new Point();\n temp.x = Math.round((float)(rettangoloX + larghezza/2));\n temp.y = Math.round((float)(rettangoloY + altezza/2)); \n return temp;\n }", "public Point getLocation() { return loc; }", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "private static Coordinates getCountryCenter(String country) {\n\t\n\t\tCoordinates countryCenter = null;\n\t\tMap<String, Coordinates> countries = CountryUtil.getInstance().getCountries();\n\t\tcountryCenter = countries.get(country);\n\t\treturn countryCenter;\n\t}", "double getLatitude();", "long getLatitude();", "public PointF getCenter() {\n return center;\n }", "public Vector2f getPosition() { return new Vector2f(centroid_pos); }", "public final Point getCenterPointOnScreen() {\n\t\treturn Calculations.tileToScreen(getLocalRegionX(), getLocalRegionY(),\n\t\t\t\t0.5D, 0.5D, 0);\n\t}", "public double getCenter() {\n return 0.5 * (lo + hi);\n }", "public ImageWorkSpacePt findCurrentCenterPoint() {\n WebPlot plot= getPrimaryPlot();\n\n\n int screenW= plot.getScreenWidth();\n int screenH= plot.getScreenHeight();\n int sw= getScrollWidth();\n int sh= getScrollHeight();\n int cX;\n int cY;\n if (screenW<sw) {\n cX= screenW/2;\n }\n else {\n int scrollX = getScrollX();\n cX= scrollX+sw/2- wcsMarginX;\n }\n\n if (screenH<sh) {\n cY= screenH/2;\n }\n else {\n int scrollY = getScrollY();\n cY= scrollY+sh/2- wcsMarginY;\n }\n\n ScreenPt pt= new ScreenPt(cX,cY);\n\n return plot.getImageWorkSpaceCoords(pt);\n }", "public Point getPoint(EastNorth p) {\n if(null == p)\n return new Point();\n double x = (p.east()-center.east())/scale + getWidth()/2;\n double y = (center.north()-p.north())/scale + getHeight()/2;\n return new Point((int)x,(int)y);\n }", "public native GLatLng getPoint(GInfoWindow self)/*-{\r\n\t\treturn self.getPoint();\r\n\t}-*/;", "public final Point getCenterPointOnScreen() {\n return bot.getManagers().getCalculations().tileToScreen(localRegionX, localRegionY,\n 0.5D, 0.5D, 0);\n }", "public Point2D.Double getImageCenter();", "int getLatitude();", "Double getLatitude();", "Double getLatitude();", "public Point2D getLocation();", "public Point getLocation() {\r\n\t\tint[] p = value.getIntArray();\r\n\t\tif (p.length < 2) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Location parameters must contain at least 2 values\");\r\n\t\t}\r\n\t\treturn (new Point(p[0], p[1]));\r\n\t}", "public Point getLocation() {\n Map<String, Long> map = (java.util.Map<String, Long>) driver.executeAtom(\n atoms.getLocationJs, false, this);\n return new Point(map.get(\"x\").intValue(), map.get(\"y\").intValue());\n }", "private void getMyLocation() {\n LatLng latLng = new LatLng(latitude, longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 18);\n googleMap.animateCamera(cameraUpdate);\n }", "private Point getCentreCoordinate(Point t)\n {\n \treturn new Point (t.x + Constants.cell_length /2f, t.y, t.z+Constants.cell_length/2f );\n }", "public double[] getHitGeoCoord();", "public Point getStartPoint() {\n // First, this is Settler's location\n UnitList units = unitService.findByClassUuid(Settlers.CLASS_UUID);\n if (units != null && !units.isEmpty()) {\n return units.getAny().getLocation();\n }\n\n // If Settlers were destroyed then it is the first city's location\n City city = cityService.getAny();\n if (city != null) {\n return city.getLocation();\n }\n\n // If there is no cities, then the first Unit's location\n AbstractUnit unit = unitService.getAny();\n if (unit != null) {\n return unit.getLocation();\n }\n\n // If there is no units then (0, 0)\n return new Point(0, 0);\n }", "int getLongitude();", "Point getPosition();", "Point getPosition();", "private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_point;\n }", "public Location getCenterLocation() \n\t{\n\t\treturn factoryLocation;\n\t}", "public double getLat() {\n return lat;\n }", "public double getLat() {\n return lat;\n }", "public double getLat() {\n return lat;\n }", "public Vector2 getCenter() {\n return center;\n }", "private GPoint findCenterCorner(double r, double x, double y) {\n\t\tdouble cornerX = (lastClick.getX() + x)/2.0 - r;\n\t\tdouble cornerY = lastClick.getY() - r;\n\t\tGPoint point = new GPoint(cornerX,cornerY);\n\t\treturn point;\n\t}", "public LatLng getCentrePos() {\n double lat = 0;\n double lon = 0;\n for (int i=0; i<newHazards.size(); i++) {\n lat += frags.get(i).getHazard().getLatitude();\n lon += frags.get(i).getHazard().getLongitude();\n }\n return new LatLng(lat / newHazards.size(), lon / newHazards.size());\n }", "public Point getMinimapLocation() {\n Actor c = getAccessor();\n int cX = methods.client.getBaseX() + (c.getLocalLocation().getX() / 32 - 2) / 4;\n int cY = methods.client.getBaseY() + (c.getLocalLocation().getY() / 32 - 2) / 4;\n return methods.calc.worldToMinimap(cX, cY);\n }", "public Point getPosition();", "private void centerOnLatLon(Point2D newCenter){\n Point2D currentCenter = getCenterLatLon();\n double dx = currentCenter.getX() - newCenter.getX();\n double dy = currentCenter.getY() - newCenter.getY();\n panMapCoords(dx, dy);\n }", "public Point getLocation ( )\r\n\t{\r\n\t\treturn new Point ( currentCol, currentRow );\r\n\t}", "protected Point getCenter(ArrayList<Unit> units) {\n\t\tint x = 0, y = 0;\n\t\t\n\t\tif(units.size() >= 1) {\n\t\t\tfor(Unit unit: units) {\n\t\t\t\tx += unit.getX();\n\t\t\t\ty += unit.getY();\n\t\t\t}\n\t\t\tx = x / units.size();\n\t\t\ty = y / units.size();\n\t\t}\n\t\treturn new Point(x,y);\n\t}", "public final Vector getCenter() {\n\t\treturn (center == null) ? computeCenter() : center;\n\t}", "public double getCenterX() { return centerX.get(); \t}", "long getCoordinates();", "long getCoordinates();", "double getLongitude();", "public Coord3d getCenter() {\n return new Coord3d((xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2);\n }", "public KDPoint getPoint() {\n\t\treturn new KDPoint(this.loc.lat,this.loc.lng,0.0);\n\t}", "final public Vector2 getCenter()\n\t{\n\t\treturn center;\n\t}", "public Point getPanelPoint(double lat, double lng) {\r\n Point pt = null;\r\n adjustBoundaries();\r\n if (_north != _south && _east != _west) {\r\n double gAmpl; // = Math.abs(_east - _west);\r\n for (gAmpl = _east - _west; gAmpl < 0D; gAmpl += 360D) ;\r\n double graph2chartRatio = (double) w / gAmpl;\r\n double _lng = lng;\r\n if (Math.abs(_west) > 180D && sign(_lng) != sign(_west) && sign(_lng) > 0)\r\n _lng -= 360D;\r\n if (gAmpl > 180D && _lng < 0D && _west > 0D)\r\n _lng += 360D;\r\n if (gAmpl > 180D && _lng >= 0D && _west > 0D && _lng < _east)\r\n _lng += (_west + (gAmpl - _east));\r\n int x = 0;\r\n double[] xy = null;\r\n switch (projection) {\r\n case ChartPanelInterface.ANAXIMANDRE:\r\n case ChartPanelInterface.MERCATOR:\r\n// x = (int)(Math.abs(_lng - _west) * graph2chartRatio);\r\n x = (int) ((_lng - _west) * graph2chartRatio);\r\n break;\r\n case ChartPanelInterface.LAMBERT:\r\n x = (int) Math.round(conic_ratio * calculateLambertXCoordinates(Math.toRadians(lat), Math.toRadians(_lng), Math.toRadians(contactParallel)));\r\n x = conicOffset_X + x;\r\n break;\r\n case ChartPanelInterface.CONIC_EQUIDISTANT:\r\n double[] ald = calculateCECoordinates(Math.toRadians(lat), Math.toRadians(_lng), Math.toRadians(contactParallel));\r\n x = conicOffset_X + (int) Math.round(conic_ratio * ald[0]);\r\n break;\r\n case ChartPanelInterface.GLOBE_VIEW:\r\n x = (int) Math.round(globeView_ratio * calculateGlobeViewXCoordinates(Math.toRadians(lat), Math.toRadians(_lng - globeViewLngOffset)));\r\n x += globeViewOffset_X;\r\n break;\r\n case ChartPanelInterface.SATELLITE_VIEW:\r\n xy = getSatelliteViewXY(lat, lng);\r\n x = (int) Math.round(globeView_ratio * xy[0]);\r\n x += globeViewOffset_X;\r\n// x = (int)xy[0];\r\n break;\r\n case ChartPanelInterface.STEREOGRAPHIC:\r\n xy = calculateStereoGraphicXYCoordinates(lat, lng);\r\n x = (int) Math.round(stereoView_ratio * xy[0]);\r\n x += stereoViewOffset_X;\r\n break;\r\n case ChartPanelInterface.POLAR_STEREOGRAPHIC:\r\n xy = calculatePolarStereoGraphicXYCoordinates(lat, lng);\r\n x = (int) Math.round(stereoView_ratio * xy[0]);\r\n x += stereoViewOffset_X;\r\n if (south < 0) // Southern hemisphere\r\n x = w - x;\r\n break;\r\n }\r\n double incSouth = 0.0D;\r\n switch (projection) {\r\n case ChartPanelInterface.ANAXIMANDRE:\r\n incSouth = _south;\r\n break;\r\n case ChartPanelInterface.MERCATOR:\r\n incSouth = MercatorUtil.getIncLat(_south);\r\n break;\r\n case ChartPanelInterface.LAMBERT:\r\n incSouth = (int) Math.round(conic_ratio * calculateLambertYCoordinates(Math.toRadians(_south), Math.toRadians(_lng), Math.toRadians(contactParallel)));\r\n break;\r\n case ChartPanelInterface.CONIC_EQUIDISTANT:\r\n double[] ald = calculateCECoordinates(Math.toRadians(_south), Math.toRadians(_lng), Math.toRadians(contactParallel));\r\n incSouth = (int) Math.round(conic_ratio * ald[1]);\r\n break;\r\n case ChartPanelInterface.GLOBE_VIEW:\r\n incSouth = (int) Math.round(globeView_ratio * calculateGlobeViewYCoordinates(Math.toRadians(lat), Math.toRadians(_lng - globeViewLngOffset)));\r\n break;\r\n case ChartPanelInterface.SATELLITE_VIEW:\r\n incSouth = (int) Math.round(globeView_ratio * xy[1]);\r\n// incSouth = xy[1];\r\n break;\r\n case ChartPanelInterface.STEREOGRAPHIC:\r\n xy = calculateStereoGraphicXYCoordinates(lat, lng);\r\n incSouth = (int) Math.round(stereoView_ratio * xy[1]);\r\n break;\r\n case ChartPanelInterface.POLAR_STEREOGRAPHIC:\r\n xy = calculatePolarStereoGraphicXYCoordinates(lat, lng);\r\n incSouth = (int) Math.round(stereoView_ratio * xy[1]);\r\n break;\r\n }\r\n double incLat = 0.0D;\r\n int y = 0;\r\n switch (projection) {\r\n case ChartPanelInterface.ANAXIMANDRE:\r\n incLat = lat;\r\n y = h - (int) ((incLat - incSouth) * ((double) h / (north - south)));\r\n break;\r\n case ChartPanelInterface.MERCATOR:\r\n incLat = MercatorUtil.getIncLat(lat);\r\n y = h - (int) ((incLat - incSouth) * graph2chartRatio);\r\n break;\r\n case ChartPanelInterface.LAMBERT:\r\n incLat = conic_ratio * calculateLambertYCoordinates(Math.toRadians(lat), Math.toRadians(_lng), Math.toRadians(contactParallel));\r\n y = (int) Math.round(incLat) + conicOffset_Y;\r\n break;\r\n case ChartPanelInterface.CONIC_EQUIDISTANT:\r\n double[] ald = calculateCECoordinates(Math.toRadians(lat), Math.toRadians(_lng), Math.toRadians(contactParallel));\r\n y = (int) Math.round(conic_ratio * ald[1]) + conicOffset_Y;\r\n break;\r\n case ChartPanelInterface.GLOBE_VIEW:\r\n y = (int) Math.round(globeView_ratio * calculateGlobeViewYCoordinates(Math.toRadians(lat), Math.toRadians(_lng - globeViewLngOffset)));\r\n y = globeViewOffset_Y - y;\r\n break;\r\n case ChartPanelInterface.SATELLITE_VIEW:\r\n// y = h - (int)(globeViewOffset_Y - (int)incSouth);\r\n y = (int) (globeViewOffset_Y - (int) incSouth);\r\n break;\r\n case ChartPanelInterface.STEREOGRAPHIC:\r\n incLat = lat;\r\n y = (int) (stereoViewOffset_Y - (int) incSouth);\r\n break;\r\n case ChartPanelInterface.POLAR_STEREOGRAPHIC:\r\n incLat = lat;\r\n y = (int) (stereoViewOffset_Y - (int) incSouth);\r\n if (south < 0) // Southern hemisphere\r\n y = h + y;\r\n break;\r\n }\r\n pt = new Point(x, y);\r\n if (projection != ChartPanelInterface.GLOBE_VIEW &&\r\n projection != ChartPanelInterface.SATELLITE_VIEW)\r\n pt = rotate(pt);\r\n }\r\n return pt;\r\n }", "public String getLocationString() {\n return getCenter().toString();\n }", "@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}", "public double getLat() {\r\n\t\treturn lat;\r\n\t}", "public static Location getEntityCenter(Entity entity) {\n\t\treturn entity.getBoundingBox().getCenter().toLocation(entity.getWorld());\n\t}", "public Point getLocation() {\n return pos;\n }", "public Vector2 getCenter() {\n\t\treturn new Vector2(position.x + size / 4f, position.y + size / 4f);\n\t}", "public Point2D.Float getCenter() {\r\n\t\treturn center;\r\n\t}", "public GeoPoint getStart(){\n return getOrigin();\n }", "public double getLat() {\r\n\t\t\treturn lat;\r\n\t\t}", "long getLongitude();", "public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }", "public void centerUserLocation(){\n ImageButton userLocation = (ImageButton) findViewById(R.id.userLocation);\n LatLng latLngUser = new LatLng(mapboxMap.getLocationComponent().getLastKnownLocation().getLatitude(),\n mapboxMap.getLocationComponent().getLastKnownLocation().getLongitude());\n\n userLocation.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n CameraPosition position = new CameraPosition.Builder()\n .target(latLngUser)\n .zoom(18)\n .tilt(0) // inclinaison de la camera max:60\n .build();\n\n mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(position), 500);\n }\n });\n\n }", "public geo_location getLocation() {\n return _pos;\n }", "private static Point areaCentre() {\r\n\t\tvar centreLon = (lonLB + lonUB)/2;\r\n\t\tvar centreLat = (latLB + latUB)/2;\r\n\t\treturn Point.fromLngLat(centreLon, centreLat);\r\n\t}", "public Point getLocPoint(){\n return super.getLocation();\n }", "public LatLng getLocation() {\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n String locationProvider = LocationManager.NETWORK_PROVIDER;\n Location location = locationManager.getLastKnownLocation(locationProvider);\n\n Double lat,lon;\n try {\n lat = location.getLatitude();\n lon = location.getLongitude();\n return new LatLng(lat, lon);\n }\n catch (NullPointerException e){\n e.printStackTrace();\n return null;\n }\n\n\n\n }", "public Vector2f getCenter(Transform t) {\n\t\treturn new Vector2f(center.x * t.scale.x, center.y * t.scale.y).add(t.position);\n\t}", "double getMapPositionX();", "PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }", "private LatLng getAdjustedLatLon(LatLng points) { \n\t\tdouble offsetLat = 1000;\n\t\tdouble offsetLon = 1000;\n\t\t//double offsetAlt = 1;\n\n\tdouble objLat = points.latitude;\n\tdouble objLon = points.longitude;\n\tdouble[] latlon = new double[2];\n\tdouble dLat = offsetLat/6378100.0;\n\tdouble dLon = offsetLon/(6378100.0*Math.cos(Math.PI*objLat/180.));\n\tlatlon[0] = objLat + dLat * 180./Math.PI;\n\tlatlon[1] = objLon + dLon * 180./Math.PI;\n\t\n\treturn new LatLng(latlon[0] , latlon[1]);\n\t}", "public Point getTopLeft() {\n return location.topLeft();\n }" ]
[ "0.7963245", "0.7963245", "0.7501722", "0.7467071", "0.7345376", "0.73068964", "0.71360403", "0.7112412", "0.7047811", "0.70387167", "0.6938225", "0.6889561", "0.6846913", "0.68017733", "0.67888546", "0.6757213", "0.67439526", "0.6728926", "0.67129946", "0.6695628", "0.66954076", "0.66899586", "0.6675074", "0.66473794", "0.6598261", "0.65785205", "0.65783274", "0.6516105", "0.6463805", "0.6461187", "0.6456797", "0.6441607", "0.643771", "0.6420221", "0.6401796", "0.64010966", "0.6399251", "0.63987464", "0.6390221", "0.63896", "0.6388186", "0.63809866", "0.6379457", "0.637353", "0.6364739", "0.63572234", "0.6346078", "0.6346078", "0.63459384", "0.63019943", "0.6287024", "0.6280734", "0.6277884", "0.62732136", "0.6265413", "0.6243614", "0.6241906", "0.6241906", "0.6232383", "0.6225", "0.6224474", "0.6224474", "0.6224474", "0.6222289", "0.6219825", "0.62116396", "0.62095785", "0.620247", "0.6195219", "0.61868674", "0.6186761", "0.61860085", "0.616894", "0.615862", "0.615862", "0.61481214", "0.6138977", "0.6125171", "0.61237615", "0.6120948", "0.61154836", "0.610989", "0.6109395", "0.61089844", "0.6099792", "0.60930395", "0.60857403", "0.6084143", "0.60799706", "0.60783106", "0.6072253", "0.6061724", "0.6055788", "0.6054994", "0.6052594", "0.60509646", "0.60357183", "0.6034534", "0.60258144", "0.6016665", "0.6013658" ]
0.0
-1
Calls the findCurrentPlace method in Google Maps Platform Places API. Response contains a list of placeLikelihood objects. Takes the most likely places and extracts the place details for access in other methods.
private void getCurrentPlaceLikelihoods() { // Use fields to define the data types to return. List<Place.Field> placeFields = Arrays.asList(Place.Field.NAME, Place.Field.ADDRESS, Place.Field.LAT_LNG); // Get the likely places - that is, the businesses and other points of interest that // are the best match for the device's current location. @SuppressWarnings("MissingPermission") final FindCurrentPlaceRequest request = FindCurrentPlaceRequest.builder(placeFields).build(); Task<FindCurrentPlaceResponse> placeResponse = mPlacesClient.findCurrentPlace(request); placeResponse.addOnCompleteListener(this, new OnCompleteListener<FindCurrentPlaceResponse>() { @Override public void onComplete(@NonNull Task<FindCurrentPlaceResponse> task) { if (task.isSuccessful()) { FindCurrentPlaceResponse response = task.getResult(); // Set the count, handling cases where less than 5 entries are returned. int count; if (response.getPlaceLikelihoods().size() < M_MAX_ENTRIES) { count = response.getPlaceLikelihoods().size(); } else { count = M_MAX_ENTRIES; } int i = 0; mLikelyPlaceNames = new String[count]; mLikelyPlaceAddresses = new String[count]; mLikelyPlaceAttributions = new String[count]; mLikelyPlaceLatLngs = new LatLng[count]; for (PlaceLikelihood placeLikelihood : response.getPlaceLikelihoods()) { Place currPlace = placeLikelihood.getPlace(); mLikelyPlaceNames[i] = currPlace.getName(); mLikelyPlaceAddresses[i] = currPlace.getAddress(); mLikelyPlaceAttributions[i] = (currPlace.getAttributions() == null) ? null : TextUtils.join(" ", currPlace.getAttributions()); mLikelyPlaceLatLngs[i] = currPlace.getLatLng(); String currLatLng = (mLikelyPlaceLatLngs[i] == null) ? "" : mLikelyPlaceLatLngs[i].toString(); Log.i(TAG, String.format("Place " + currPlace.getName() + " has likelihood: " + placeLikelihood.getLikelihood() + " at " + currLatLng)); i++; if (i > (count - 1)) { break; } } // COMMENTED OUT UNTIL WE DEFINE THE METHOD // Populate the ListView fillPlacesList(); } else { Exception exception = task.getException(); if (exception instanceof ApiException) { ApiException apiException = (ApiException) exception; Log.e(TAG, "Place not found: " + apiException.getStatusCode()); } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "public final native PlaceResult getPlace() /*-{\n return this.getPlace();\n }-*/;", "public void scanCurrentPlace()\r\n\t{\r\n\t\tSystem.out.println(this.getCurrentPlace().toString());\r\n\t\tSystem.out.println(\"The place contains these objects: \");\r\n\t\tSystem.out.println(this.getCurrentPlace().getItems().toString());\r\n\t}", "@Override\n public void onResult(@NonNull PlaceBuffer places) {\n // Update the UI via callbacks to methods defined in the view layer\n if (places.getStatus().isSuccess() && places.getCount() > 0\n && places.get(0) != null) {\n // Successfully retrieved Place object\n if (responseRunnable != null)\n responseRunnable.run(places.get(0));\n } else { // Did not successfully retrieve Place object\n if (failureRunnable != null)\n failureRunnable.run();\n }\n places.release(); // release buffer to prevent memory leak\n }", "public void getPlacesList(final ApiPlacesResult<List<Place>> callback) {\n Call<List<Place>> call = this.mPlaceCall.getPlaces();\n call.enqueue(new Callback<List<Place>>() {\n @Override\n public void onResponse(Call<List<Place>> call, Response<List<Place>> response) {\n int statusCode = response.code();\n if (statusCode == HTTP_200) {\n initRetrofitClient();\n List<Place> places = response.body();\n callback.success(places);\n } else {\n callback.error(statusCode, response.message());\n }\n }\n\n @Override\n public void onFailure(Call<List<Place>> call, Throwable t) {\n Log.e(TAG, \"Error while calling the 'getPlacesList' method!\", t);\n callback.error(-1, t.getLocalizedMessage());\n }\n });\n }", "public ArrayList<Place> getPlaceList() {\n\t\treturn this.places;\n\t}", "Place getPlace();", "@Override\r\n\tpublic List<Place> searchPlaces(String placeName, String city) {\n\t\tGoogleMapsSearchPlaceAPI googleMapsSearchPlaceAPI = new GoogleMapsSearchPlaceAPI();\r\n\t\tList<Place> places = googleMapsSearchPlaceAPI.search(placeName, city);\r\n\r\n\t\tfor (Place place : places) {\r\n\t\t\tsavePlace(place);\r\n\t\t}\r\n\r\n\t\treturn places;\r\n\t}", "public Pull<Place> thisPlace();", "private void performPlaceDetailSearch(String placeId)\n {\n GenerateGoogleMapApiUrl urlGenerator = new GenerateGoogleMapApiUrl();\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(placeId,GenerateGoogleMapApiUrl.PLACE_DETAIL,mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n final JsonObjectRequest placeDetailReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n // Parsing json\n //for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = result.getJSONObject(\"result\");\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"price_level\"))\n {\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n }\n if(!obj.isNull(\"international_phone_number\"))\n {\n newPlace.setPhone_number(obj.getString(\"international_phone_number\"));\n }\n if(!obj.isNull(\"formatted_address\"))\n {\n newPlace.setAddress(obj.getString(\"formatted_address\"));\n }\n if(!obj.isNull(\"website\"))\n {\n newPlace.setWebsite(obj.getString(\"website\"));\n }\n\n\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n\n\n\n newPlacesList.add(newPlace);\n\n //currentPlaceDetail = newPlace; // set currentPlaceDetail\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceDetail = newPlacesList;\n generateWorld(mWorld,mPlaceDetail,viewSetting,true);//rerender\n zoomToLocationSearchResult(newPlacesList);\n\n if(currentDisplayMode==DISPLAY_PLACE_LIST)\n {\n placeListBottomSheetBehavior.setHideable(true);\n placeListBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_DETAIL;\n\n\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n extendButton.setVisibility(View.VISIBLE);\n //region for putting the result into place details\n\n placeNameTextView.setText(newPlacesList.get(0).getName()); // set place name\n ratingBar.setRating(newPlacesList.get(0).getRating()); // set Rating\n\n if(!newPlacesList.get(0).getPrice_level().equals(\"\"))\n {\n String priceString=\"\";\n int price = Integer.parseInt(newPlacesList.get(0).getPrice_level()); // set price\n for(int i=0;i<=price;i++)\n {\n priceString = priceString+\"£\";\n }\n priceTextView.setText(priceString);\n /*priceTextView.requestLayout();\n priceTextView.invalidate();*/\n }\n else\n {\n priceTextView.setText(\"\");\n }\n\n if(!newPlacesList.get(0).getPhone_number().equals(\"\"))\n {\n\n phoneTextView.setText(newPlacesList.get(0).getPhone_number()); // set phone number\n /*phoneTextView.requestLayout();\n phoneTextView.invalidate();*/\n phone_row.setVisibility(View.VISIBLE);\n }\n else\n {\n phone_row.setVisibility(View.GONE);\n }\n\n if(!newPlacesList.get(0).getAddress().equals(\"\"))\n {\n\n addressTextView.setText(newPlacesList.get(0).getAddress()); // set address\n /*addressTextView.requestLayout();\n addressTextView.invalidate();*/\n address_row.setVisibility(View.VISIBLE);\n\n }\n else\n {\n phone_row.setVisibility(View.GONE);\n }\n\n if(!newPlacesList.get(0).getWebsite().equals(\"\"))\n {\n websiteTextView.setText(newPlacesList.get(0).getWebsite()); // set website\n /*websiteTextView.requestLayout();\n websiteTextView.invalidate();*/\n website_row.setVisibility(View.VISIBLE);\n\n }\n else\n {\n website_row.setVisibility(View.GONE);\n }\n //endregion\n bottomSheetCOntentLayout.requestLayout();\n bottomSheetCOntentLayout.invalidate();\n\n layoutUpdater.wrapContentAgain(bottomSheetCOntentLayout,true);\n imgPlaceDetail.requestLayout();\n imgPlaceDetail.invalidate();\n placePhotosTask(newPlacesList.get(0).getPlace_id());\n //bottomSheetPlaceDetails.requestLayout();\n\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(placeDetailReq);\n }", "public void getPlaceInfo(String id, final ApiPlaceInfoResult callback) {\n Call<Place> call = this.mPlaceCall.getPlaceInfo(id);\n call.enqueue(new Callback<Place>() {\n @Override\n public void onResponse(Call<Place> call, Response<Place> response) {\n int statusCode = response.code();\n if (statusCode == HTTP_200) {\n initRetrofitClient();\n Place repository = response.body();\n Log.d(TAG, repository.toString());\n callback.success(repository);\n } else {\n callback.error(statusCode, response.message());\n }\n }\n\n @Override\n public void onFailure(Call<Place> call, Throwable t) {\n Log.e(TAG, \"Error while calling the 'getPlaceInfo' method!\", t);\n callback.error(-1, t.getLocalizedMessage());\n }\n });\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "private void getPlaces() {\n places = new ArrayList<Place>();\n ref = new Firebase(\"https://flickering-torch-2192.firebaseio.com/places\");\n Query likeQuery = ref.orderByChild(\"likes\").limitToLast(10);\n likeQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot querySnapshot) {\n for (DataSnapshot d : querySnapshot.getChildren()) {\n ref.child(d.getKey()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n Place p = dataSnapshot.getValue(Place.class);\n mMap.addMarker(new MarkerOptions().position(new LatLng(p.getLat(), p.getLon()))\n .title(p.getName()).snippet(p.getDescription())\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.happy_marker)));\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }\n }\n\n @Override\n public void onCancelled(FirebaseError error) {\n showToast(error.getMessage());\n }\n });\n\n LatLng bristol = new LatLng(51.4556676, -2.6266423);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(bristol, zoomLevel));\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n getLocationPermission();\n }\n }", "private Place getPlace(Integer idPlace) {\n\t\tPlace place = null;\n\t\tfor(Place p: places ){\n\t\t\tif(p.getId().equals(idPlace)){\n\t\t\t\tplace = p;\n\t\t\t}\n\t\t}\n\t\treturn place;\n\t}", "@Override\n\tpublic synchronized Collection<Place> getPlaces() {\n\t\treturn this.places;\n\t}", "public String getPlace() {\n\t\treturn place;\n\t}", "@SuppressLint(\"MissingPermission\")\n @AfterPermissionGranted(PERMISSION_LOCATION_ID)\n private void getCurrentLocation() {\n Task<Location> task = fusedLocationProviderClient.getLastLocation();\n task.addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if(location != null) {\n currentLat = location.getLatitude();\n currentLong = location.getLongitude();\n\n String placeType = \"museum\";\n\n int radius = ProfileFragment.getRadius();\n\n String url = \"https://maps.googleapis.com/maps/api/place/nearbysearch/json\" +\n \"?location=\" + currentLat + \",\" + currentLong +\n \"&radius=\" + radius +\n \"&type=\" + placeType +\n \"&key=\" + getResources().getString(R.string.maps_api_key);\n\n new NearbyMuseumTask().execute(url);\n\n mapFragment.getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n map = googleMap;\n setMapUISettings();\n\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(currentLat,currentLong), 12\n ));\n }\n });\n }\n }\n });\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public List<Place> getPlaces(){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\tQuery<Place> theQuery = currentSession.createQuery(\"FROM Place\", Place.class);\r\n\t\t\r\n\t\tList<Place> resultList = theQuery.getResultList();\r\n\t\t\t\r\n\t\treturn resultList;\r\n\t}", "@Override\n public Observable<Result> apply(Places places) {\n return Observable.fromIterable(places.getResults()); //topRated.results is the results field of the JSON object\n }", "public Place getStartingPlace() {\n return startingPlace;\n }", "public Place getPlace() {\n\t\treturn null;\r\n\t}", "private Place getFromPlace(Element passageElement, ArrayList<Place> places) {\n Place start = null;\n for (int i = 0; i <= places.size() - 1; i++) {\n if (passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent()\n .equals(places.get(i).getName())) {\n start = places.get(i);\n }\n }\n return start;\n }", "public String Get_place() \n {\n\n return place;\n }", "void getPlacements() {\n previousTotalPlacement = 0;\n loadingPlacement = true;\n page_to_call_placement = 1;\n isFirstRunPlacement = true;\n isLastPageLoadedPlacement = false;\n lastPageFlagPlacement = 0;\n Log.d(\"PlacmentTesting\", \"previousTotalPlacement: \" + previousTotalPlacement);\n Log.d(\"PlacmentTesting\", \"page_to_call_placement: \" + page_to_call_placement);\n Log.d(\"PlacmentTesting\", \"lastPageFlagPlacement: \" + lastPageFlagPlacement);\n\n GetPlacementsByAdminMetadata();\n\n }", "public List<String> getPlaces() {\n\t\treturn places;\n\t}", "private void perPollingPlaceResults() {\n\t\tif (election.pollsStatus()){\n\t\t\t// when the election is not closed,\n\t\t\tSystem.out.println(\"The election is still open for votes.\");\n\t\t\tSystem.out.println(\"You must close the election before viewing results.\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry{\n\t\t\tString pollingPlaceName = ValidInputReader.getValidString(\"Name of polling place:\", \"^[a-zA-Z0-9 ]+$\");\n\t\t\tMap<String,Integer> results = election.resultsForSpecficPollingPlace(pollingPlaceName);\n\t\t\tCollection<Integer> values = results.values();\n\t\t\tint totalVotes = 0;\n\n\t\t\tfor(Integer i:values){\n\t\t\t\ttotalVotes += i;\n\t\t\t}\n\n\t\t\t// when the polling place exists,\n\t\t\tSystem.out.println(\"Current election results for \" + pollingPlaceName + \".\");\n\t\t\tSystem.out.println(\"NAME PARTY VOTES %\");\n\t\t\tprintResultsHelper(results,totalVotes);\n\n\t\t}catch(UnsupportedOperationException uoeError){\n\n\n\t\t}catch(IllegalArgumentException iaeError){\n\t\t\t// when the polling place doesn't exist,\n\t\t\tSystem.out.println(\"No such polling place was found.\");\n\t\t}\n\t}", "public void Print_place()\n {\n\n System.out.println(\"Place: \" + place);\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = location;\n Log.d(TAG, \"Latitude: \" + mLastKnownLocation.getLatitude());\n Log.d(TAG, \"Longitude: \" + mLastKnownLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n }\n\n getCurrentPlaceLikelihoods();\n }\n });\n }\n } catch (Exception e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public int getPlace() {\n\t\treturn place;\n\t}", "private void performPlaceSearch(String userQuery)\n {\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(userQuery,GenerateGoogleMapApiUrl.TEXT_SEARCH, mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n JsonObjectRequest movieReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n JSONArray response = null;\n try {\n response = result.getJSONArray(\"results\");\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n // Parsing json\n for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = response.getJSONObject(i);\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"photos\"))\n newPlace.setPhoto_reference(obj.getJSONArray(\"photos\").getJSONObject(0).getString(\"photo_reference\"));\n\n if(!obj.isNull(\"price_level\"))\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n newPlacesList.add(newPlace);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceListMain = newPlacesList;\n //List<Place> filteredList = filterPlaceResult(mPlaceListMain);\n\n generateWorld(mWorld,mPlaceListMain,viewSetting,true);\n zoomToLocationSearchResult(newPlacesList);\n if(newPlacesList.size()==1)\n {\n performPlaceDetailSearch(newPlacesList.get(0).getPlace_id());\n }\n else if(newPlacesList.size()>1)\n {\n\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n {\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_LIST;\n createPlacesListBottomSheet(newPlacesList);\n }\n\n // set radar renderer to furthestPlace\n radarPlugin.setMaxDistance(furthestPlace+200.0f);\n distanceSeekBar.setProgress((int)(furthestPlace+200));\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(movieReq);\n }", "public ArrayList<String> getAllPlacesData() {\n\t\t\n\t\tArrayList<String> place_data = new ArrayList<String>();\n\t\t\n\t\t// String array for [place id, place name, place type, place latitude, place longitude]\n\t\tString[] parsed_place_value = new String[5];\n\t\t\t\t\n\t\t// Get SharedPref map\n\t\tMap<String,?> prefsMap = mPref.getAll();\n\t\t\n\t\t// Iterate over SharedPref map and get key, value pairs\n\t\tfor (Map.Entry<String, ?> entry : prefsMap.entrySet()) {\n\t\t\t\n\t\t\t// Ignore position data for clicked ListView item\n\t\t\tif (entry.getKey().equals(\"KEY_DATA_POSITION\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Store place id, place name, place type, place latitude, place longitude from values obtained in SharedPref map\n\t\t\tparsed_place_value = entry.getValue().toString().split(\",\");\n\n\t\t\t// Obtain place id and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString id = parsed_place_value[0];\n\t\t\tid = id.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tid = id.trim();\n\t\t\t\n\t\t\t// Obtain place name and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString name = parsed_place_value[1];\n\t\t\tname = name.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tname = name.trim();\n\t\t\t\n\t\t\t// Obtain place type and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString type = parsed_place_value[2];\n\t\t\ttype = type.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\ttype = type.trim();\n\t\t\t\n\t\t\t// Obtain place latitude and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString latitude = parsed_place_value[3];\n\t\t\tlatitude = latitude.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tlatitude = latitude.trim();\n\t\t\t\t\t\n\t\t\t// Obtain place longitude and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString longitude = parsed_place_value[4];\n\t\t\tlongitude = longitude.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tlongitude = longitude.trim();\n\t\t\t\n\t\t\t// Obtain SharedPref key for place\n\t\t\tString sharedPref_key = entry.getKey();\n\t\t\t\n\t\t\t// Add place id, name, type, latitude, longitude, SharedPref key to ArrayList (separated by ## symbol)\n\t\t\tplace_data.add(id + \"##\" + name + \"##\" + type + \"##\" + latitude + \"##\" + longitude + \"##\" + sharedPref_key);\n\t\t\t\n\t\t\t\n\t\t\tLog.i(\"SHARED_PREFS_DATA\", entry.getKey() + \": \" + entry.getValue().toString());\n\t\t}\n\t\t\n\t\treturn place_data;\n\t}", "public void GetPlace(String placeid,\n String key,\n Callback<GooglePlaceData> cb) {\n if (CMAppGlobals.DEBUG) Logger.i(TAG, \":: GoogleModel.GetAutocomplete placeid : \" + placeid\n + \" : key : \" + key\n + \" : cb : \" + cb);\n\n Call<GooglePlaceData> googleGeocodeCall = googleService.GetPlace(placeid, key);\n googleGeocodeCall.enqueue(cb);\n\n }", "static Place getRandomPlace()\r\n\t{\r\n\t\tPlace randomPlace = knownPlaces.get( new Random().nextInt ( knownPlaces.size()));\r\n\t\treturn randomPlace;\r\n\t}", "private void ShowNearbyPlaces(List<HashMap<String, String>> nearbyPlacesList) {\n for (int i = 0; i < nearbyPlacesList.size(); i++) {\n Log.d(\"onPostExecute\",\"Entered into showing locations\");\n MarkerOptions markerOptions = new MarkerOptions();\n HashMap<String, String> googlePlace = nearbyPlacesList.get(i);\n double lat = Double.parseDouble(googlePlace.get(\"lat\"));\n double lng = Double.parseDouble(googlePlace.get(\"lng\"));\n String placeName = googlePlace.get(\"place_name\");\n String vicinity = googlePlace.get(\"vicinity\");\n LatLng latLng = new LatLng(lat, lng);\n markerOptions.position(latLng);\n markerOptions.title(placeName);\n markerOptions.snippet(vicinity);\n\n if (this.mKind == \"police\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n else if (this.mKind == \"hospital\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n\n mMap.addMarker(markerOptions);\n }\n mMap.animateCamera(CameraUpdateFactory.zoomTo(12));\n }", "public int getPlaceLocation() {\n return mPlaceLocation;\n }", "Place resolveLocation( Place place );", "public synchronized Place getPlace() throws InterruptedException {\n\t\tif (!spatialCheckThread.isAlive())\n\t\t\tspatialCheckThread.start();\n\n\t\tif (currentPlace == null)\n\t\t\twait();\n\t\treturn currentPlace;\n\t}", "public String getLocationInfo(String _placeInfo) {\r\n String urlString = apiUrl;\r\n obj = getConnection(urlString);\r\n try {\r\n return obj.getString(fixParams(_placeInfo));\r\n } catch (JSONException ex) {\r\n return \"JSONException: Info not found\";\r\n }\r\n }", "static void m6856a(@NonNull Context context, @Nullable CurrentPlace currentPlace) {\n C1940b.m6820a(context, \"current_place.json\", 0, (Object) currentPlace, (Type) CurrentPlace.class);\n }", "public static ArrayList<Review> getReviewInfo(String placeID) {\r\n\t\tArrayList<Review> reviewList = new ArrayList<Review>();\r\n\t\tString output = \"\";\r\n\t\ttry {\r\n\t\t\tURL url = new URL(\"https://maps.googleapis.com/maps/api/place/details/json?place_id=\"+placeID+\"&fields=review&key=AIzaSyAcM2vc8-2JY9I5P7jgvt61TCYa1vo0b98\");\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection)url.openConnection();\r\n\t\t\tconn.setRequestMethod(\"GET\");\r\n\t\t\tconn.connect();\r\n\t\t\tint responsecode = conn.getResponseCode();\r\n\t\t\tif(responsecode != 200) {\r\n\t\t\t\tthrow new RuntimeException(\"HttpResponseCode: \"+responsecode);\r\n\t\t\t} else {\r\n\t\t\t\tJSONParser parse = new JSONParser();\r\n\t\t\t\tScanner scanner = new Scanner(url.openStream());\r\n\t\t\t\twhile (scanner.hasNext()) {\r\n\t\t\t\t\toutput+=scanner.nextLine();\r\n\t\t\t\t}\r\n\t\t\t\tJSONObject jsonobject = (JSONObject)parse.parse(output);\r\n\t\t\t\tJSONObject jsonobject2 = (JSONObject) jsonobject.get(\"result\");\r\n\t\t\t\tJSONArray reviewArray = (JSONArray)jsonobject2.get(\"reviews\");\r\n\t\t\t\tfor (int count=0; count<reviewArray.size(); count++) {\r\n\t\t\t\t\tJSONObject jsonObject3 = (JSONObject) reviewArray.get(count);\r\n\t\t\t\t\tReview newReview = new Review();\r\n\t\t\t\t\t newReview.setReviewer(jsonObject3.get(\"author_name\").toString());\r\n\t\t\t\t\t newReview.setReview(jsonObject3.get(\"text\").toString());\r\n\t\t\t\t\t newReview.setRating(jsonObject3.get(\"rating\").toString()+\".0\");\r\n\t\t\t\t\t reviewList.add(newReview);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Reviews retrieved.\");\r\n\t\t\t\tscanner.close();\r\n\t\t\t}\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParseException 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 reviewList;\r\n\t}", "public String getLivingPlace() {\n return livingPlace;\n }", "@Override\n public void onPlaceSelected(Place place) {\n initiateSearch(place.getLatLng());\n }", "@Override\n public void onPlaceSelected(Place place) {\n latLng = place.getLatLng();\n locationName = place.getName().toString();\n locationAddress = place.getAddress().toString();\n Log.i(TAG, \"Location:latitude: \" + place.getLatLng().latitude);\n Log.i(TAG, \"Location:Address: \" + place.getAddress());\n Log.i(TAG, \"Location:Web: \" + place.getWebsiteUri());\n Log.i(TAG, \"Location:Place: \" + place.getName());\n mMap.addMarker(new MarkerOptions().position(latLng).title(locationName).snippet(locationAddress)).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public void onSuccess(FetchPlaceResponse task) {\n\n\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getName());\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getId());\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getAddress());\n\n// getValuesFromCityID(task.getPlace().getId());\n// cityGoogleId = task.getPlace().getId();\n\n\n placeId = null;\n\n// final Place place = task.getPlace();\n\n try{\n mPlace = new PlaceInfo();\n mPlace.setName( task.getPlace().getName().toString());\n// Log.d(TAG, \"onResult: name: \" + place.getName());\n placeName = task.getPlace().getName().toString();\n mPlace.setAddress( task.getPlace().getAddress().toString());\n placeAddress = task.getPlace().getAddress().toString();\n// Log.d(TAG, \"onResult: address: \" + place.getAddress());\n mPlace.setAttributions( task.getPlace().getAttributions().toString());\n//// Log.d(TAG, \"onResult: attributions: \" + place.getAttributions());\n mPlace.setId( task.getPlace().getId());\n placeId = task.getPlace().getId();\n// Log.d(TAG, \"onResult: id:\" + place.getId());\n mPlace.setLatlng( task.getPlace().getLatLng());\n// Log.d(TAG, \"onResult: latlng: \" + place.getLatLng());\n// mPlace.setRating( task.getPlace().getRating());\n// Log.d(TAG, \"onResult: rating: \" + place.getRating());\n mPlace.setPhoneNumber( task.getPlace().getPhoneNumber().toString());\n// Log.d(TAG, \"onResult: phone number: \" + place.getPhoneNumber());\n mPlace.setWebsiteUri( task.getPlace().getWebsiteUri());\n// Log.d(TAG, \"onResult: website uri: \" + place.getWebsiteUri());\n//\n// Log.d(TAG, \"onResult: place: \" + mPlace.toString());\n }catch (NullPointerException e){\n Log.e(TAG, \"onResult: NullPointerException: \" + e.getMessage() );\n }\n\n\n mPlace.setId(task.getPlace().getId());\n moveCamera(task.getPlace().getLatLng(), DEFAULT_ZOOM, task.getPlace().getName());\n\n// places.release();\n\n\n }", "public void searchPlace(String value)\n\t\t{ \n\t\t Geocoder geoCoder = new Geocoder(getBaseContext(), Locale.getDefault()); \n\t\t try {\n\t\t List<Address> addresses = geoCoder.getFromLocationName(\n\t\t value, 5);\t\t \n\t\t if (addresses.size() > 0) {\n\t\t \t\n\t\t \tdouble latitude= 0.0, longtitude= 0.0;\n\t\t \tGeoPoint p = new GeoPoint(\n\t\t (int) (addresses.get(0).getLatitude() * 1E6), \n\t\t (int) (addresses.get(0).getLongitude() * 1E6));\n\t\t \tlatitude=p.getLatitudeE6()/1E6;\n\t\t\t\t\t\tlongtitude=p.getLongitudeE6()/1E6;\t \n\t\t\t\t\t\tlat = String.valueOf(latitude);\n\t\t\t\t\t\tlongi = String.valueOf(longtitude);\n\t\t\t\t\t\torigin = new LatLng(latitude,longtitude);\n\t\t \tmap.moveCamera( CameraUpdateFactory.newLatLngZoom(origin, (float) 14.0) ); \n\t\t } \n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\n\n\n\t\t \n\n\t\t}", "public List<String> trendsClosest() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.trends.closest\") + \"?lat=37.7749&long=122.4194\";\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 0; i < jsonArray.length() && i < 10; i++) {\r\n\t\t\t\t\tJSONObject object = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tString displayText = (String) object.get(\"country\") + \" : \" + (String) object.get(\"url\");\r\n\t\t\t\t\ttwitterResponseList.add(displayText);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\t}", "void getDrivableLocations() {\n\t\t\tSystem.out.print(\"\\nPlaces you can drive to: \");\n\t\t\tfor (int i = 0; i < places.length; i++)\n\t\t\t\tif (places[i].drivable) //looks to see if you can drive there \n\t\t\t\t\tif ((places[i] != this)) //if it's not you're current location.\n\t\t\t\t\t\tSystem.out.print(places[i].locationName + \", \");\t//prints the name of the location\t\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}", "private HashMap<String, String> getPlace(JSONObject jPlace) {\n\n HashMap<String, String> place = new HashMap<String, String>();\n\n String id = \"\";\n String reference = \"\";\n String description = \"\";\n\n try {\n\n description = jPlace.getString(\"description\");\n id = jPlace.getString(\"place_id\");\n reference = jPlace.getString(\"reference\");\n\n place.put(\"description\", description);\n place.put(\"_id\", id);\n place.put(\"reference\", reference);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return place;\n }", "public static String getPlaceID(String placeName) {\r\n\t\tString output = \"\";\r\n\t\ttry {\r\n\t\t\tURL url = new URL(\"https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=\"+placeName+\"&inputtype=textquery&fields=place_id&key=AIzaSyAcM2vc8-2JY9I5P7jgvt61TCYa1vo0b98\");\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection)url.openConnection();\r\n\t\t\tconn.setRequestMethod(\"GET\");\r\n\t\t\tconn.connect();\r\n\t\t\tint responsecode = conn.getResponseCode();\r\n\t\t\tif(responsecode != 200) {\r\n\t\t\t\tthrow new RuntimeException(\"HttpResponseCode: \"+responsecode);\r\n\t\t\t} else {\r\n\t\t\t\tJSONParser parse = new JSONParser();\r\n\t\t\t\tScanner scanner = new Scanner(url.openStream());\r\n\t\t\t\twhile (scanner.hasNext()) {\r\n\t\t\t\t\toutput+=scanner.nextLine();\r\n\t\t\t\t}\r\n\t\t\t\tJSONObject jsonobject = (JSONObject)parse.parse(output);\r\n\t\t\t\tJSONArray resultArray = (JSONArray) jsonobject.get(\"candidates\");\r\n\t\t\t\tfor(int count=0; count<1;count++) {\r\n\t\t\t\t\tJSONObject jsonobject1 = (JSONObject)resultArray.get(count);\r\n\t\t\t\t\tSystem.out.println(placeName+\" Place ID: \"+jsonobject1.get(\"place_id\"));\r\n\t\t\t\t\toutput = (String) jsonobject1.get(\"place_id\");\r\n\t\t\t\t}\r\n\t\t\t\tscanner.close();\r\n\t\t\t}\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParseException 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 output;\r\n\t}", "public void loadPlaces(Map<String, String> queryMap){\n showProgressBar();\n\n call = foursquareApiService.getPlaces(queryMap);\n call.enqueue(new Callback<SearchResult>() {\n @Override\n public void onResponse(Call<SearchResult> call, Response<SearchResult> response) {\n hideProgressBar();\n\n ResponseList rl = response.body().getResponseList();\n placeArrayList = (ArrayList<Place>) rl.getPlaceList();\n placesListAdapter = new PlacesListAdapter(MainActivity.this,R.layout.activity_main_places_list_item,placeArrayList, MainActivity.this);\n recyclerViewPlacesList.setLayoutManager(new LinearLayoutManager(MainActivity.this));\n recyclerViewPlacesList.setAdapter(placesListAdapter);\n placesListAdapter.notifyDataSetChanged();\n\n Log.d(\"Array Size\", String.valueOf( placeArrayList.size()));\n Log.d(\"Success\",String.valueOf(response.code()));\n }\n\n @Override\n public void onFailure(Call<SearchResult> call, Throwable t) {\n Log.d(\"Fail\", \"Fail\");\n }\n });\n }", "public Integer getQueryplace() {\n\t\treturn queryplace;\n\t}", "private PlacesReadTask getPlace(JSONObject googlePlaceJson) {\n PlacesReadTask record=new PlacesReadTask();;\n String placeName = \"-NA-\";\n String id = \"-NA-\";\n String latitude = \"\";\n String longitude = \"\";\n String reference = \"\";\n String rating=\"\";\n\n try {\n if (!googlePlaceJson.isNull(\"name\")) {\n placeName = googlePlaceJson.getString(\"school_name\");\n }\n if (!googlePlaceJson.isNull(\"vicinity\")) {\n id = googlePlaceJson.getString(\"dbn\");\n }\n\n record.setSchool_name(placeName);\n record.setId(id);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return record;\n }", "@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName());\n editTextBusinessName.setText(place.getName());\n editTextLocation.setText(place.getAddress());\n editTextPhone.setText(place.getPhoneNumber());\n barCoordinates = place.getLatLng();\n //editTextBusinessDescription.setText(place.getAttributions());\n\n }", "public String getPlace(){\n return place;\n }", "private void zoomToLocationSearchResult(List<Place> places) {\n\n if(places.size()>1)\n {\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for(Place place:places)\n {\n LatLng latLng = new LatLng(Double.parseDouble(place.getLat()), Double.parseDouble(place.getLng()));\n builder.include(latLng);\n }\n LatLngBounds bounds = builder.build();\n\n // note need to set device screen size if not the application will crash before google map is layed out\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngBounds(bounds,deviceWidth,deviceHeight,0);\n googleMap.animateCamera(cameraUpdate);\n }\n else if (places.size()==1)\n {\n LatLng latLng = new LatLng(Double.parseDouble(places.get(0).getLat()),Double.parseDouble(places.get(0).getLng()));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 18);\n googleMap.animateCamera(cameraUpdate);\n }\n }", "private Place getPlace(String identifierPlace) {\n\t\tPlace place = null;\n\t\tfor(Place p: places ){\n\t\t\tif(p.getName().equals(identifierPlace)){\n\t\t\t\tplace = p;\n\t\t\t}\n\t\t}\n\t\treturn place;\n\t}", "@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t\n\t\t\t\tmLatitude = location.getLatitude();\n\t\t\t\tmLongitude = location.getLongitude();\n\t\t\t\t\n\t\t\t\t LatLng point = new LatLng(mLatitude, mLongitude);\n\t\t\t\t\n\t\t\t\t try {\n\t\t\t\t \taddresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t \t// TODO Auto-generated catch block\n\t\t\t\t \te.printStackTrace();\n\t\t\t\t }\n\t\t\t\t MarkerOptions maker= new MarkerOptions().position(point);\n\n\t\t\t\t address = addresses.get(0).getAddressLine(0);\n\t\t\t\t if(address==null)\n\t\t\t\t {\n\t\t\t\t\t maker.title(\"My Location\");\n\t\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\tmaker.title(\"\"+address);\n\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t String type = mPlaceType;\n\t\t\t StringBuilder sb = new StringBuilder(\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?\");\n\t\t\t sb.append(\"location=\"+mLatitude+\",\"+mLongitude);\n\t\t\t sb.append(\"&radius=1500\");\n\t\t\t sb.append(\"&types=\"+type);\n\t\t\t sb.append(\"&sensor=true\");\n\t\t\t sb.append(\"&key=AIzaSyAwZSGS1kZG7_UuqxqHH3MdO1hbwB2cjag\"); \n\t\t\t PlacesTask placesTask = new PlacesTask(); \n\t\t\t placesTask.execute(sb.toString());\n\t\t\t \n\t\t\t \n\t\t\t if(zoomm)\n\t\t\t {\n\t\t\t \t googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(point, 15, 30, 0)));\n\t\t\t \t zoomm=false;\n\t\t\t }\n\t\t\t\t\n\t\t\t}", "@SuppressLint(\"NewApi\")\n @Override\n public void onPlaceSelected(@NonNull final Place place) {\n Log.i(\"ssd\", \"Place: \" + place.getName() + \", \" + place.getId());\n\n final LatLng latLng = place.getLatLng();\n name = place.getName();\n lat= Objects.requireNonNull(place.getLatLng()).latitude;\n longt= Objects.requireNonNull(place.getLatLng()).longitude;\n\n Log.i(\"la\", String.valueOf(latLng));\n\n final MarkerOptions markerOptions = new MarkerOptions();\n\n Toast.makeText(getApplicationContext(), String.valueOf(place.getLatLng()), Toast.LENGTH_LONG).show();\n // Setting the position for the marker\n markerOptions.position(Objects.requireNonNull(place.getLatLng()));\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(name);\n\n // Clears the previously touched position\n mMap.clear();\n\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n // Animating to the touched position\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 13.3f));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n }\n });\n\n\n Log.i(\"lt\", String.valueOf(Objects.requireNonNull(place.getLatLng()).latitude));\n }", "public static Instance<PlaceNode> findPlaceByName(String name, List<Instance<PlaceNode>> allPlaces)\r\n\t{\t\r\n\t\tfor (Instance<PlaceNode> p : allPlaces)\r\n\t\t{\r\n\t\t\tif (p.toString().equals(name))\r\n\t\t\t{\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new java.lang.Error(\"No place with this name could be found.\");\r\n\t}", "public String getplaceName() {\n\t\treturn placeName;\n\t}", "public interface GooglePlacesApi {\n\n @GET(\"maps/api/place/autocomplete/json?type=(cities)&language=es\")\n Call<PredictionResult> autoComplete(@Query(\"input\") String text);\n\n @GET(\"maps/api/place/details/json\")\n Call<DetailsResult> getPlaceDetails(@Query(\"place_id\") String text);\n\n\n}", "private void getPlace(String _id) {\n this.binding.main.setVisibility(View.GONE);\n this.binding.loading.setVisibility(View.VISIBLE);\n\n ParseQuery<Place> query = ParseQuery.getQuery(Place.class);\n query.whereEqualTo(Place.KEY_OBJECT_ID, _id);\n query.include(Place.KEY_CATEGORY);\n query.include(Place.KEY_USER);\n query.getFirstInBackground(new GetCallback<Place>() {\n @Override\n public void done(Place object, ParseException e) {\n if(e == null) {\n place = object;\n bindInformation();\n enterReveal();\n } else {\n Toast.makeText(PlaceDetailActivity.this, \"Place not found\", Toast.LENGTH_LONG).show();\n finish();\n }\n }\n });\n\n // Set up elements visibility\n binding.fabCall.setVisibility(View.INVISIBLE);\n binding.fabLike.setVisibility(View.INVISIBLE);\n binding.main.setVisibility(View.VISIBLE);\n binding.loading.setVisibility(View.GONE);\n }", "public String getPlaceId() {\n return placeId;\n }", "public HashMap<String, String> getInfoForNextPlace() {\n\t\tif (buildingName != null) {\n\t\t\treturn buildingInfo.get(buildingName);\n\t\t}\n\t\treturn storyInfo;\n\t}", "public void onSuccess(Collection<Place> result) {\n\t\t\t\t\t\t\t\tfinal MapWidget map = (MapWidget) RootPanel\n\t\t\t\t\t\t\t\t\t\t.get(\"mapsTutorial\").getWidget(0);\n\t\t\t\t\t\t\t\tmap.clearOverlays();\n\n\t\t\t\t\t\t\t\tLatLng markerPos = null;\n\t\t\t\t\t\t\t\tfor (final Place place : result) {\n\t\t\t\t\t\t\t\t\tLocation coordinates = place.getCoordinates();\n\t\t\t\t\t\t\t\t\tmarkerPos = LatLng.newInstance(\n\t\t\t\t\t\t\t\t\t\t\tcoordinates.getLatitude(), coordinates.getLongitude());\n\n\t\t\t\t\t\t\t\t\t// Add a marker\n\t\t\t\t\t\t\t\t\tMarkerOptions options = MarkerOptions\n\t\t\t\t\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\t\t\t\t\toptions.setTitle(place.getAddress());\n\t\t\t\t\t\t\t\t\tMarker marker = new Marker(markerPos,\n\t\t\t\t\t\t\t\t\t\t\toptions);\n\t\t\t\t\t\t\t\t\tfinal LatLng currMarkerPos = markerPos;\n\t\t\t\t\t\t\t\t\tmarker.addMarkerClickHandler(new MarkerClickHandler() {\n\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\tMarkerClickEvent event) {\n\t\t\t\t\t\t\t\t\t\t\tPlaceFormatter places = new PlaceFormatter();\n\t\t\t\t\t\t\t\t\t\t\tInfoWindowContent wnd = new InfoWindowContent(places.format(place));\n\t\t\t\t\t\t\t\t\t\t\twnd.setMaxWidth(200);\n\t\t\t\t\t\t\t\t\t\t\tmap.getInfoWindow().open(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrMarkerPos,\n\t\t\t\t\t\t\t\t\t\t\t\t\twnd);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tmap.addOverlay(marker);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (markerPos != null) {\n\t\t\t\t\t\t\t\t\tmap.setCenter(markerPos);\n\t\t\t\t\t\t\t\t\tmap.setZoomLevel(12);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "public String getOtherPlace() {\r\n return otherPlace;\r\n }", "private void startPlaceListActivity() {\n if (mLastLocation == null) {\n Toast.makeText(getContext(), getResources().getString(R.string.location_unavailable), Toast.LENGTH_SHORT).show();\n\n // after announcing user that their location is unknown, try getting their location again\n startLocationUpdate();\n\n } else {\n Intent intent = new Intent(getContext(), PlaceListActivity.class);\n intent.putExtra(PLACE_TYPE_KEY, mPlaceType);\n intent.putExtra(CURRENT_LOCATION_KEY, mLastLocation);\n startActivity(intent);\n }\n }", "List<Place> findUnboundLocationPlaceholders();", "public int getPlaceDescription() {\n return mPlaceDescription;\n }", "static void requestPlaceById(@NonNull final String placeId,\n @Nullable final ParameterRunnable<Place> responseRunnable,\n @Nullable final Runnable failureRunnable) {\n if (Controller.getGoogleApiClient() != null)\n Places.GeoDataApi.getPlaceById(Controller.getGoogleApiClient(), placeId)\n .setResultCallback(new ResultCallback<PlaceBuffer>() {\n\n /**\n * Automatically invoked upon reception of result from the Google Places\n * GeoDataApi server\n * @param places buffer containing the Place object that corresponds to\n * the submitted placeId\n */\n @Override\n public void onResult(@NonNull PlaceBuffer places) {\n // Update the UI via callbacks to methods defined in the view layer\n if (places.getStatus().isSuccess() && places.getCount() > 0\n && places.get(0) != null) {\n // Successfully retrieved Place object\n if (responseRunnable != null)\n responseRunnable.run(places.get(0));\n } else { // Did not successfully retrieve Place object\n if (failureRunnable != null)\n failureRunnable.run();\n }\n places.release(); // release buffer to prevent memory leak\n }\n });\n }", "@ApiModelProperty(value = \"A list of places available to the user (for multimedia only users). Effect: The list is written to the current CfgPerson's \\\"htcc\\\" annex. e.g. CfgPerson/userProperties/htcc/place = p1, p2, p3 \")\n public List<String> getPlaceNames() {\n return placeNames;\n }", "public int getPlaces() {\r\n return places;\r\n }", "@Override\n\tpublic List<String> move(String newPlace) throws ServiceException, UnknownPlaceException, WrongPlaceException {\n\t\treturn null;\n\t}", "public Matrix getPlaceMatrix() {\n return placeMatrix;\n }", "@Override\r\n\tpublic LatLong findLatLong(String place) { // place can be a postal code string or an address string\r\n\t\t// some simple code inspired by http://stackoverflow.com/questions/7467568/parsing-json-from-url\r\n\t\tLatLong aLatLong = null;\r\n\t\ttry {\r\n\t\t\tJSONObject geoCodeJSON = new JSONObject(readUrl(\"http://maps.googleapis.com/maps/api/geocode/json?address=\" + place + \"&sensor=false\"));\r\n\t\t\tString latit = geoCodeJSON.getJSONArray(\"results\").getJSONObject(0).getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\");\r\n\t\t\tString longit = geoCodeJSON.getJSONArray(\"results\").getJSONObject(0).getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\");\r\n\t\t\taLatLong = new LatLong(Double.parseDouble(latit), Double.parseDouble(longit));\r\n\t\t\tSystem.out.println(\"latitude, longitude are\" + latitude + \" \" + longitude);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn aLatLong;\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn aLatLong;\r\n\t\t}\r\n\t\treturn aLatLong;\r\n\t}", "public static String getPlace(String place) {\n if (place != null\n && place.contains(\" of \")) {\n return place.substring(place.lastIndexOf(\" of \") + \" of \".length());\n }\n return place;\n }", "@Override\n public void onPlaceSelected(Place place) {\n Log.i(\"Place: \", place.getAddress().toString());\n if (mybound != null) {\n if (mybound.contains(place.getLatLng())) {\n zoomToSearchedLocation(place);\n }\n }\n// zoomToSearchedLocation(place);\n bolFlag = true;\n }", "@Override\n public void getPlacesFromNetwork(DataBaseConnector contactsDB, Util.Subject subject, Context context) {\n MyLocation currentLocation = Util.getInstance().getCurrentLocation();\n String location = currentLocation.getLat() + \",\" + currentLocation.getLon();\n double radius = Util.getInstance().getSearchRadius();\n String type = subject.toString().toLowerCase();\n\n //get Places from the URL\n Observable<Places> placesObservable = placeApiService.getPlacesInArea(location, radius, type);\n\n Observable<Result> placeObservable = placesObservable.flatMap(new Function<Places, Observable<Result>>() {\n //Observable stream of inner objects of results\n @Override\n public Observable<Result> apply(Places places) {\n return Observable.fromIterable(places.getResults()); //topRated.results is the results field of the JSON object\n }\n });\n registerResultsInDB(placeObservable, contactsDB, subject);\n\n }", "Map<Long,String> getPlaces(String experiment_no,String laboratory_no) throws IOException;", "static Place getPlaceByID ( int key)\r\n\t{\r\n\t\treturn tm.get(key);\r\n\t}", "private void sendRequestAPI(Double lat,Double lng, String places) {\n\n String origin = String.valueOf(lat) + \",\" + String.valueOf(lng);\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n String destination = \"0,0\";\n String wayPoints = \"0,0\";\n\n switch (places) {\n case \"Family Walk\" :\n destination = formatCoordinates(6);\n wayPoints = formatCoordinates(4) + \"|\" + formatCoordinates(5);\n break;\n\n case \"Retro Tour\" :\n destination = formatCoordinates(9);\n wayPoints =formatCoordinates(7) + \"|\" + formatCoordinates(8);\n break;\n\n case \"Sports Tour\" :\n destination = formatCoordinates(11);\n wayPoints = formatCoordinates(9) + \"|\" + formatCoordinates(8);\n break;\n case \"custom\":\n destination = getActivity().getIntent().getStringExtra(\"destination\");\n wayPoints = getActivity().getIntent().getStringExtra(\"waypoints\");\n break;\n\n }\n //String destination = \"-27.494721,153.014262\";\n //String wayPoints = \"-27.498172, 153.013585\";\n try {\n\n new Directions(this, origin, destination, wayPoints).execute();\n Double latDes= Double.parseDouble(destination.split(\",\")[0]);\n Double lngDes= Double.parseDouble(destination.split(\",\")[1]);\n String [] points = wayPoints.split(Pattern.quote(\"|\")) ;\n\n if(wayPoints.equals(\"\")){\n\n }\n else{\n for(String point : points) {\n Double latPoint = Double.parseDouble((point.split(\",\")[0]));\n Double lngPoint = Double.parseDouble((point.split(\",\")[1]));\n List<Address> addressesPoint = geocoder.getFromLocation(latPoint, lngPoint, 1);\n wayPointsMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesPoint.get(0).getAddressLine(0))\n .position(new LatLng(latPoint, lngPoint))));\n }\n }\n\n\n List<Address> addressesStart = geocoder.getFromLocation(lat, lng, 1);\n List<Address> addressesEnd = geocoder.getFromLocation(latDes,\n lngDes, 1);\n //originMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesStart.get(0).getAddressLine(0))\n //.position(new LatLng(lat, lng))));\n destinationMarkers.add(mMap.addMarker((new MarkerOptions().title(addressesEnd.get(0).getAddressLine(0))\n .position(new LatLng(latDes, lngDes)))));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latDes,\n lngDes), 16));\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName() + \", \" + place.getId());\n\n move=place.getLatLng();\n moveCamera(move,15f);\n }", "public int getPlacesY()\n {\n return this.placesY;\n }", "@Override\n protected String doInBackground(String... place) {\n String data = \"\";\n\n // Obtain browser key from https://code.google.com/apis/console\n String key = \"key=AIzaSyCFGvOeMTe7h9ukQYAzMIDBmDs52SnuPb4\";\n\n String input = \"\";\n\n try {\n input = \"input=\" + URLEncoder.encode(place[0], \"utf-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n // place type to be searched\n String types = \"types=geocode\";\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = input + \"&\" + types + \"&\" + sensor + \"&\" + key;\n\n // Output format\n String output = \"json\";\n\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/place/autocomplete/\" + output + \"?\" + parameters;\n\n try {\n // Fetching the data from we service\n data = downloadUrl(url);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "void getData(){\n getListPlaceBody getListPlaceBody = new getListPlaceBody(0,0,\"\");\n Retrofit retrofit = new Retrofit\n .Builder()\n .addConverterFactory(GsonConverterFactory.create())\n .baseUrl(\"http://150.95.115.192/api/\")\n .build();\n retrofit.create(WonderVNAPIService.class)\n .getListPlace(getListPlaceBody)\n .enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n try {\n Log.e(\"onResponse\", \"Response\");\n String strJson = response.body().string();\n tvContent.setText(strJson);\n Gson gson = new Gson();\n placeData =gson.fromJson(strJson, PlaceData.class);\n }catch (IOException e){\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n Log.e(\"onFailure\", \"Failure\");\n }\n });\n\n }", "@Override\n public void onPlaceSelected(Place place) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }", "private Place getFollowPlace(Element passageElement, ArrayList<Place> places) {\n Place follow = null;\n for (int i = 0; i <= places.size() - 1; i++) {\n if (passageElement.getElementsByTagName(\"connectTo\").item(0).getTextContent()\n .equals(places.get(i).getName())) {\n follow = places.get(i);\n }\n }\n return follow;\n }", "public interface PlaceInfo {\n\n\t\n\t/**\n\t * Return the place name\n\t * @return the place name\n\t */\n\tpublic String getName();\n\t\n\t\n\t/**\n\t * Return the place description\n\t * @return the place description\n\t */\n\tpublic String getDescription();\n\n\n\t/**\n\t * Is this place the space ship?\n\t * @return true if the place represents a space ship\n\t */\n\tpublic boolean isSpaceship();\n}", "@Override\n\tpublic Place find(Place obj) {\n\t\treturn null;\n\t}", "public void performPlaceTypeSearch(String userQuery)\n {\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(userQuery,GenerateGoogleMapApiUrl.SEARCH_BY_TYPE, mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n JsonObjectRequest movieReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n JSONArray response = null;\n try {\n response = result.getJSONArray(\"results\");\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n // Parsing json\n for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = response.getJSONObject(i);\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"photos\"))\n newPlace.setPhoto_reference(obj.getJSONArray(\"photos\").getJSONObject(0).getString(\"photo_reference\"));\n\n if(!obj.isNull(\"price_level\"))\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n newPlacesList.add(newPlace);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceListMain = newPlacesList;\n //List<Place> filteredList = filterPlaceResult(mPlaceListMain);\n generateWorld(mWorld,mPlaceListMain,viewSetting,true);\n zoomToLocationSearchResult(newPlacesList);\n if(newPlacesList.size()==1)\n {\n performPlaceDetailSearch(newPlacesList.get(0).getPlace_id());\n }\n else if(newPlacesList.size()>1)\n {\n\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n {\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_LIST;\n createPlacesListBottomSheet(newPlacesList);\n }\n\n // set radar renderer to furthestPlace\n radarPlugin.setMaxDistance(furthestPlace+200.0f);\n distanceSeekBar.setProgress((int)(furthestPlace+200));\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(movieReq);\n }", "private void GetLocation(final String str) {\n AlertUtils.showCustomProgressDialog(LocationSearchActivityNew.this);\n String selectedPlaceKey = DataToPref.getSharedPreferanceData(LocationSearchActivityNew.this, LaoxiConstant.SELECTED_PLACE_ID, LaoxiConstant.SELECTED_PLACE_ID_KEY);\n\n CommonImplementation.getInstance().doGetLocation(null, \"https://maps.googleapis.com/maps/api/place/details/json?placeid=\" + selectedPlaceKey + \"&sensor=false&key=\" + getString(R.string.browser_key) + \"&language=\" + Locale.getDefault().getCountry(), new OnTaskComplete() {\n @Override\n public void onSuccess(Response data, boolean success) {\n AlertUtils.dismissDialog();\n if (data.code() == 200) {\n\n String LAT = \"\";\n String Long = \"\";\n String Location = \"\";\n String City = \"\";\n String State = \"\";\n String postal_code = \"\";\n String country = \"\";\n\n try {\n\n String response = data.body().string();\n JSONObject object = new JSONObject(response);\n\n String status = object.getString(\"status\").toString();\n\n if (object.has(\"result\")) {\n //JSONArray results = object.getJSONArray(\"results\");\n int i = 0;\n //Log.i(\"i\", i + \",\" + results.length());\n JSONObject r = object.getJSONObject(\"result\");\n JSONArray addressComponentsArray = r.getJSONArray(\"address_components\");\n do {\n\n JSONObject addressComponents = addressComponentsArray.getJSONObject(i);\n JSONArray typesArray = addressComponents.getJSONArray(\"types\");\n String types = typesArray.getString(0);\n\n if (types.equalsIgnoreCase(\"sublocality\")) {\n Location = addressComponents.getString(\"short_name\");\n Log.i(\"Locality\", Location);\n\n } else if (types.equalsIgnoreCase(\"locality\")) {\n City = addressComponents.getString(\"long_name\");\n Log.i(\"City\", City);\n\n } else if (types.equalsIgnoreCase(\"administrative_area_level_1\")) {\n State = addressComponents.getString(\"long_name\");\n Log.i(\"State\", State);\n\n } else if (types.equalsIgnoreCase(\"postal_code\")) {\n postal_code = addressComponents.getString(\"long_name\");\n Log.i(\"postal_code\", postal_code);\n } else if (types.equalsIgnoreCase(\"country\")) {\n country = addressComponents.getString(\"long_name\");\n Log.i(\"country\", country);\n }\n\n i++;\n } while (i < addressComponentsArray.length());\n\n\n JSONObject geometry = r.getJSONObject(\"geometry\");\n JSONObject location = geometry.getJSONObject(\"location\");\n\n LAT = location.getString(\"lat\");\n Long = location.getString(\"lng\");\n\n\n /* Log.i(\"JSON Geo Locatoin =>\", currentLocation);\n return currentLocation;*/\n\n String Data = LAT + \",,,\" + Long + \",,,\" + Location + \",,,\" + City + \",,,\" + State + \",,,\" +\n postal_code + \",,,\" + country;\n\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\", Data + \",,,\" + str);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else if (data.code() == 404) {\n\n }\n }\n\n @Override\n public void onFailure() {\n AlertUtils.dismissDialog();\n }\n });\n }", "public ArrayList<NewLocation> getMyPlaces_ra() {\n return myPlaces_ra;\n }", "public Iterable<Place> places(){\n return places;\n }", "@Override\n public void onPlaceSelected(Place place) {\n String name = place.getName();\n double lat, lng;\n lat = 0;\n lng = 0;\n if (place.getLatLng() != null) {\n lat = place.getLatLng().latitude;\n lng = place.getLatLng().longitude;\n }\n fromPosition = new LatLng(place.getLatLng().latitude, place.getLatLng().longitude);\n //do something\n moveCamera(new LatLng(lat, lng), DEFAULT_ZOOM,\n \"Start Location\");\n }" ]
[ "0.713827", "0.7037936", "0.60780466", "0.596063", "0.5758382", "0.5637029", "0.55355346", "0.53694916", "0.5362828", "0.53620255", "0.53425604", "0.53306973", "0.5322849", "0.53121287", "0.52881294", "0.5171729", "0.5162798", "0.5131345", "0.51041734", "0.5096352", "0.5096352", "0.5096352", "0.5096352", "0.50565076", "0.50537795", "0.5044883", "0.50326735", "0.5019672", "0.5004007", "0.49980327", "0.4974875", "0.497393", "0.4959219", "0.4954764", "0.49493402", "0.49414855", "0.4921321", "0.49060607", "0.49051574", "0.48826566", "0.48560628", "0.48470443", "0.4836087", "0.48323587", "0.4822797", "0.48155072", "0.48128802", "0.4794006", "0.47915676", "0.47739062", "0.4768609", "0.47517553", "0.47492826", "0.47469547", "0.47465396", "0.47450998", "0.47237545", "0.47222036", "0.47214857", "0.47028875", "0.46944278", "0.46921274", "0.46917698", "0.46886727", "0.46867475", "0.46800533", "0.46777773", "0.4677312", "0.4676734", "0.46656206", "0.46518978", "0.465087", "0.46492124", "0.464629", "0.463823", "0.4635552", "0.4635108", "0.46349326", "0.46348867", "0.4634803", "0.4612951", "0.46113724", "0.46113232", "0.46065006", "0.46012604", "0.45854825", "0.45755246", "0.45672318", "0.45494804", "0.45469278", "0.45425123", "0.4538971", "0.45237622", "0.45172477", "0.45140705", "0.45118243", "0.45077816", "0.44906032", "0.44901323", "0.44863814" ]
0.7951302
0
Get the current location of the device, and position the map's camera
private void getDeviceLocation() { /* * Get the best and most recent location of the device, which may be null in rare * cases when a location is not available. */ try { if (mLocationPermissionGranted) { Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation(); locationResult.addOnSuccessListener(this, new OnSuccessListener<Location>() { @Override public void onSuccess(Location location) { if (location != null) { // Set the map's camera position to the current location of the device. mLastKnownLocation = location; Log.d(TAG, "Latitude: " + mLastKnownLocation.getLatitude()); Log.d(TAG, "Longitude: " + mLastKnownLocation.getLongitude()); mMap.moveCamera(CameraUpdateFactory.newLatLngZoom( new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()), DEFAULT_ZOOM)); } else { Log.d(TAG, "Current location is null. Using defaults."); mMap.moveCamera(CameraUpdateFactory .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM)); } getCurrentPlaceLikelihoods(); } }); } } catch (Exception e) { Log.e("Exception: %s", e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getDeviceLocation() {\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the customer_map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n getNearestDriver();\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getDeviceLocation() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n if (mLocationPermissionGranted) {\n mLastKnownLocation = LocationServices.FusedLocationApi\n .getLastLocation(mGoogleApiClient);\n if (world.geoHome == null && mLastKnownLocation != null) {\n world.geoHome = new Vector2f(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n }\n }\n\n // Set the map's camera position to the current location of the device.\n /*if (mCameraPosition != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(mCameraPosition));\n } else if (mLastKnownLocation != null) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), mMap.getCameraPosition().zoom));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }*/\n }", "private void getDeviceLocation() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n if (mLocationPermissionGranted) {\n mLastKnownLocation = LocationServices.FusedLocationApi\n .getLastLocation(mGoogleApiClient);\n }\n\n // Set the map's camera position to the current location of the device.\n if (mCameraPosition != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(mCameraPosition));\n } else if (mLastKnownLocation != null) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = location;\n Log.d(TAG, \"Latitude: \" + mLastKnownLocation.getLatitude());\n Log.d(TAG, \"Longitude: \" + mLastKnownLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n }\n\n }\n });\n }\n } catch (Exception e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n currLatLng = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n destinationPoint.set(0,currLatLng);\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n currLatLng = mDefaultLocation;\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getDeviceLocation() {\n try {\n if (mLocationPermissionGranted) {\n Task locationResult = fusedLocationClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG,\"Current location is null. Using defaults.\");\n Log.e(TAG, task.getException().toString());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch(SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n showCurrentPlace();\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getDeviceLocation() {\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = (Location) task.getResult();\n if (mLastKnownLocation != null) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n\n\n }\n\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n } catch (NullPointerException e) {\n Log.e(\"....\", \"Null pointer exception\");\n }\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n try {\n if (mLocationPermissionGranted){\n Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()){\n Location currentLocation = (Location) task.getResult();\n if (currentLocation != null){\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude()), DEFAULT_ZOOM));\n\n } else {\n /*\n AlertDialog alertDialog = new AlertDialog.Builder(MapActivity.this).create();s\n alertDialog.setMessage(\"Activa ubicación\");\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n */\n Toast.makeText(MapActivity.this, \"Tu ubicación es nula\", Toast.LENGTH_SHORT).show();\n }\n } else Toast.makeText(MapActivity.this, \"Error al obtener la ubicación\", Toast.LENGTH_LONG).show();\n }\n });\n }else Toast.makeText(MapActivity.this, \"Da permiso para acceder a la ubicación\", Toast.LENGTH_LONG).show();\n } catch (SecurityException e){\n Toast.makeText(MapActivity.this, \"Seleciona un punto en el mapa primero\", Toast.LENGTH_LONG).show();\n }\n }", "private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(mActivity, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getMyLocation() {\n LatLng latLng = new LatLng(latitude, longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 18);\n googleMap.animateCamera(cameraUpdate);\n }", "void getDeviceLocation() {\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful() && task.getResult()!=null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n getProfile(mLastKnownLocation);\n } else {\n Log.d(\"Map\", \"Current location is null. Using defaults.\");\n Log.e(\"Map\", \"Exception: %s\", task.getException());\n googleMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n googleMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getCurrentLocation() {\n try {\n if (locationPermissionGranted) {\n Task<Location> locationResult = fusedLocationClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n lastKnownLocation = task.getResult();\n if (lastKnownLocation != null) {\n map.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(lastKnownLocation.getLatitude(),\n lastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n updateCameraBearing(map, location.getBearing());\n }\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage(), e);\n }\n }", "private void getDeviceLocation(){\n if(mMap == null){\n return;\n }\n\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(activity, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful() && task.getResult() !=null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(\"error\", \"Current location is null. Using defaults.\");\n Log.e(\"error\", \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mFusedLocationProviderClient.requestLocationUpdates(mLocationRequest,mLocationCallback,null);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n\n mLocationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n List<Location> locationList = locationResult.getLocations();\n if (locationList.size() > 0) {\n //The last location in the list is the newest\n Location location = locationList.get(locationList.size() - 1);\n Log.i(\"MapsActivity\", \"Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n mLastKnownLocation = location;\n }\n }\n };\n }", "private void getDeviceLocation() {\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (!hasPermissions(MapActivity.this, PERMISSIONS)) {\n ActivityCompat.requestPermissions(this, PERMISSIONS, LOCATION_PERMISSION_REQUEST_CODE);\n } else {\n mLocationPermissionGranted = true;\n\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n mLastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n source = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n googleMap.clear();\n }\n\n // Set the map's camera position to the current location of the device.\n if (mCameraPosition != null) {\n\n googleMap.moveCamera(CameraUpdateFactory.newCameraPosition(mCameraPosition));\n } else if (mLastKnownLocation != null) {\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n\n String address = getCompleteAddressString(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude());\n\n googleMap.clear();\n\n MarkerOptions markerOptions = new MarkerOptions()\n .position(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()))\n .title(address)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n\n mCurrLocationMarker = googleMap.addMarker(markerOptions);\n mCurrLocationMarker.showInfoWindow();\n tvAddressDisplay.setText(address);\n\n } else {\n Log.d(MapActivity.class.getSimpleName(), \"Current location is null. Using defaults.\");\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n googleMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n\n\n }", "public Coord getCameraPosition() {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getCenter();\n } \n // TODO: Browser component\n return new Coord(0, 0);\n }\n return new Coord(internalNative.getLatitude(), internalNative.getLongitude());\n }", "public Location getCurrentLocation(){\n if (mapController == null){\n logMessage(TAG, \"getCurrentLocation -> mMapController is null\");\n return null;\n }\n return mapController.getCurrentLocation();\n }", "private void getDeviceLocation(){\n Log.d(TAG, \"getDeviceLocation: getting the device location\");\n\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n\n try {\n if(mLocationPermissionsGranted){\nfinal Task location=mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n@Override\npublic void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: found location\");\n Location currentLocation=(Location)task.getResult();\n moveCamera(new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude()),\n /*this is wew i stopped*/ Deafult_ZOOM);\n\n\n\n /* LatLng latLng = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options=new MarkerOptions().position(latLng).title(\"test\");\n mMap.addMarker(options);*/\n\n }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(selectLocation.this,\"unable to get current location \",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n\n }catch (SecurityException e){\n Log.e(TAG, \"getDeviceLocation:SecurityException \"+e.getMessage() );\n }\n\n }", "private void getDeviceLocation( ) {\n\n if (searchLocationMarker != null) {\n searchLocationMarker.remove();\n }\n\n mFusedLocationProviderClient =\n LocationServices.getFusedLocationProviderClient(this);\n //Task locationResult = mFusedLocationProviderClient.getLastLocation();\n try {\n if (mLocationPermissionGranted) {\n Task locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n System.out.println(\"Current location retrieved successfully!\");\n mLastKnownLocation = (Location) task.getResult(); // location?\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n searchLocationMarker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()))\n .title(\"Current Location\")\n .icon(BitmapDescriptorFactory.fromBitmap(\n getBitmapFromVectorDrawable(\n MainActivity.this, R.drawable.ic_current_location_marker))));\n getNearbyStations(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n searchLocationMarker = mMap.addMarker(new MarkerOptions()\n .position(mDefaultLocation)\n .title(\"Current Location\")\n .icon(BitmapDescriptorFactory.fromBitmap(\n getBitmapFromVectorDrawable(\n MainActivity.this, R.drawable.ic_current_location_marker))));\n }\n }\n });\n }\n } catch(SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n\n }", "public Location getCurrentLocation();", "private void getDeviceLocation(){\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n\n try {\n if (mLocationPermissionsGranted) {\n\n final Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n\n Location currentLocation = (Location) task.getResult();\n\n if (currentLocation == null) {\n\n // Provide default current location\n\n currentLocation = new Location(\"\");\n currentLocation.setLatitude(51.454514);\n currentLocation.setLongitude(-2.587910);\n }\n\n } else {\n Helpers.showToast(getApplicationContext(), \"Could not get current location\");\n }\n }\n });\n }\n } catch (SecurityException e) {\n Helpers.showToast(getApplicationContext(), \"Could not get current location\");\n }\n }", "private void getMyLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n\n if (AnimationStatus) {\n myUpdatedLocation = location;\n } else {\n myLocation = location;\n myUpdatedLocation = location;\n LatLng latlng = new LatLng(location.getLatitude(), location.getLongitude());\n carMarker = mMap.addMarker(new MarkerOptions().position(latlng).\n flat(true).icon(BitmapDescriptorFactory.fromBitmap(BitMapMarker)));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(\n latlng, 17f);\n mMap.animateCamera(cameraUpdate);\n }\n Bearing = location.getBearing();\n LatLng updatedLatLng = new LatLng(myUpdatedLocation.getLatitude(),\n myUpdatedLocation.getLongitude());\n changePositionSmoothly(carMarker, updatedLatLng, Bearing);\n\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n\n // Recherche de la derniere localisation\n Criteria criteria = new Criteria();\n String provider = locationManager.getBestProvider(criteria, false);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(provider);\n\n // Initialize the location fields\n if (location != null) {\n float lat = (float) (location.getLatitude());\n float lng = (float) (location.getLongitude());\n\n currentPosition = new Point(location.getLongitude(), location.getLatitude());\n\n // Add a marker at our position and move the camera\n LatLng lastCoord = new LatLng(lat, lng);\n mMap.addMarker(new MarkerOptions().position(lastCoord).title(\"Last time we were here\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(lastCoord));\n\n lblPosition.setText(\"Last Position: \"+location.getLatitude()+\", \"+location.getLongitude());\n\n Log.i(this.getClass().getName(), String.valueOf(lat));\n Log.i(this.getClass().getName(), String.valueOf(lng));\n } else {\n Log.w(this.getClass().getName(), \"Provider not available\");\n }\n\n // dessine points intérets et sector de la database\n loadPOI();\n loadSector();\n\n // attache le callback\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 10, 1, this);\n }", "public void getDeviceLocation() {\n try {\n if (locationPermissionGranted) {\n Task<Location> locationResult = fusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n lastKnownLocation = task.getResult();\n\n if (lastKnownLocation != null) {\n if (checkInLACounty(lastKnownLocation) != -1) {\n // geofenceHelper(getContext());\n lastKnownLocationInLA = true;\n sharedViewModel.setCountyData(\"Los Angeles County\");\n backLA.setVisibility(View.INVISIBLE);\n } else if (lastKnownLocationInLA) {\n lastKnownLocationInLA = false;\n sharedViewModel.setCountyData(\"Not in Los Angeles County\");\n\n backLA.setVisibility(View.VISIBLE);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());\n alertDialogBuilder.setTitle(\"Friendly Warning\");\n alertDialogBuilder.setMessage(\"Out of Los Angeles County \\n(Current Service Area)\");\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show(); // Show Dialog\n }\n } else {\n sharedViewModel.setCountyData(\"Los Angeles County\");\n }\n\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n map.moveCamera(CameraUpdateFactory\n .newLatLngZoom(defaultLocation, DEFAULT_ZOOM));\n map.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage(), e);\n }\n }", "public static MapLocation myLocation() {\n return RC.getLocation();\n }", "public Point getCameraPosition() {\n\t\treturn new Point(cameraPosition.x, cameraPosition.y, cameraPosition.z);\n\t}", "MapLocation getPosition(Unit unit);", "@Override\n public void onLocationChanged(Location location) {\n LatLng posicio = new LatLng(location.getLatitude(),location.getLongitude());\n //Afegir la camera amb el punt generat abans i un nivell de zoom\n CameraUpdate camera = CameraUpdateFactory.newLatLngZoom(posicio,13);\n //Desplacem la camera al nou punt\n mMap.moveCamera(camera);\n posicioActual = posicio;\n\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n getLocationPermission();\n }\n }", "private void getlocation() {\n\t\t\t\ttry {\n\n\t\t\t\t\tgps = new GPSTracker(RegisterActivity.this);\n\t\t\t\t\tLog.d(\"LOgggg\", \"inCurrentlocation\");\n\n\t\t\t\t\t// check if GPS enabled\n\t\t\t\t\tif (gps.canGetLocation()) {\n\n\t\t\t\t\t\tlatitude = gps.getLatitude();\n\t\t\t\t\t\tlongitude = gps.getLongitude();\n\n\t\t\t\t\t\tLog.i(\"latitude\", \"\" + latitude);\n\t\t\t\t\t\tLog.i(\"longitude\", \"\" + longitude);\n\n\t\t\t\t\t\tnew getLoc().execute(\"\");\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgps.showSettingsAlert();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void handleLocationChange(Location newLocation) {\n super.handleLocationChange(newLocation);\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().handleLocationChange(newLocation);\n setCamera();\n if(mainActivity.getGeofenceMonitor().currentLocation != null) {\n if(debugMode) {\n TextView txt_lat = (TextView) view.findViewById(R.id.txt_lat);\n TextView txt_long = (TextView) view.findViewById(R.id.txt_long);\n txt_lat.setVisibility(View.VISIBLE);\n txt_long.setVisibility(View.VISIBLE);\n txt_lat.setText(\"Latitude: \" + mainActivity.getGeofenceMonitor().currentLocation.getLatitude());\n txt_long.setText(\"Longitude: \" + mainActivity.getGeofenceMonitor().currentLocation.getLongitude());\n }\n setUpMapIfNeeded();\n }\n }", "public Point getRobotLocation();", "@Override\n public void onLocationUpdated(Location location) {\n fromPosition = new LatLng(location.getLatitude(), location.getLongitude());\n btn1.setVisibility(View.VISIBLE);\n moveCamera(new LatLng(location.getLatitude(), location.getLongitude()),\n DEFAULT_ZOOM, \"My Location\");\n }", "private void getLocation() {\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n\t\t\tif (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tFusedLocationProviderClient locationProviderClient = LocationServices.getFusedLocationProviderClient(getApplicationContext());\n\t\tlocationProviderClient.getLastLocation().addOnSuccessListener(new OnSuccessListener<Location>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(Location location) {\n\t\t\t\t\n\t\t\t\tfinal Location finalLocation = location;\n\t\t\t\t\n\t\t\t\tbtnGoToYou.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tLatLng userLocation = new LatLng(finalLocation.getLatitude(), finalLocation.getLongitude());\n\t\t\t\t\t\tmMap.addMarker(new MarkerOptions().position(userLocation).title(\"You are Here!\"));\n\t\t\t\t\t\tmMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n Location getCurrentLocation();", "@SuppressWarnings({\"MissingPermission\"})\n void getMyLocation() {\n mGoogleMap.setMyLocationEnabled(true);\n FusedLocationProviderClient locationClient = getFusedLocationProviderClient(getContext());\n locationClient.getLastLocation()\n .addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n onLocationChanged(location);\n moveCamera();\n drawCircle();\n drawMarkers();\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"MapDemoActivity\", \"Error trying to get last GPS location\");\n e.printStackTrace();\n }\n });\n }", "private void getLocation(LocationListener listener){\n FusedLocationProviderClient fusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n try {\n if (locationPermissionGranted){\n Task<Location> locationResult = fusedLocationClient.getLastLocation();\n locationResult.addOnCompleteListener(this, task -> {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n listener.onSuccess(task.getResult());\n } else {\n Toast.makeText(this, task.getException().getMessage(), Toast.LENGTH_LONG).show();\n }\n progressBar.setVisibility(View.GONE);\n });\n }\n } catch (SecurityException e){\n Log.e(\"Exception: %s\", e.getMessage(), e);\n }\n }", "private LatLng getCurrentLocation() {\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return new LatLng(0, 0);\n }\n LocationManager locationManager = (LocationManager) getSystemService(this.LOCATION_SERVICE);\n Location current_location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (current_location == null) {\n return new LatLng(0, 0);\n }\n return new LatLng(current_location.getLatitude(), current_location.getLongitude());\n }", "private void getDeviceLocation(){\n\n Log.d(TAG, \"getDeviceLocation: getting device current location\");\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n try{\n if(mLocationPermissionGaranted){\n\n final Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(task -> {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: found location!\");\n Location currentLocation = (Location) task.getResult();\n System.out.println(currentLocation);\n if (currentLocation !=null) {\n if (numDispositivo==1) {\n disp_Lat1 = Double.toString(currentLocation.getLatitude());\n disp_Long1 = Double.toString(currentLocation.getLongitude());\n }\n if (numDispositivo==2) {\n disp_Lat2 = Double.toString(currentLocation.getLatitude());\n disp_Long2 = Double.toString(currentLocation.getLongitude());\n }\n }\n System.out.println(disp_Lat1+\"-\"+disp_Long1);\n System.out.println(disp_Lat2+\"-\"+disp_Long2);\n Guardar();\n\n }else{\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(FormularioCurso.this, \"unable to get current location\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n }catch (SecurityException e){\n Log.e(TAG, \"getDeviceLocation: SecurityException: \" + e.getMessage() );\n }\n }", "public void getLocation() {\n\n\t\t// If Google Play Services is available\n\t\tif (servicesConnected()) {\n\t\t\t// Get the current location\n\t\t\tLocation currentLocation = mLocationClient.getLastLocation();\n\n\t\t\t// Display the current location in the UI\n\t\t\tmLatLng.setText(LocationUtils.getLatLng(this, currentLocation));\n\n\t\t\tlatCurrent=(float) currentLocation.getLatitude();\n\t\t\tlntCurrent=(float) currentLocation.getLongitude();\n\n\t\t}\n\t}", "@Override\n public void onCameraIdle() {\n Location centerLocation = new Location(\"\");\n LatLng midLatLng = this.map.getCameraPosition().target;\n centerLocation.setLatitude(midLatLng.latitude);\n centerLocation.setLongitude(midLatLng.longitude);\n hitNeighboursApi(centerLocation);\n HomeActivity activity = (HomeActivity) getActivity();\n activity.setmRequestLocation(midLatLng);\n requestedLocation.setText(\"\"+centerLocation.getLatitude()+\",\"+centerLocation.getLongitude());\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n if (displayGpsStatus()) {\n\n Log.v(TAG, \"onClick\");\n\n\n locationListener = new MyLocationListener();\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ) {\n locationMangaer.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n\n }\n else{\n Toast.makeText(this,\"Kindly Provide Location Acces\",Toast.LENGTH_SHORT).show();\n }\n\n Log.v(TAG,latitudeUsers +\" , \"+longitudeUsers);\n\n } else {\n Toast.makeText(this,\"GPS not available!!\",Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n\n }", "public Point getLocation() { return loc; }", "public Point getCarLocation() {\r\n\r\n SQLiteQueryBuilder builder = new SQLiteQueryBuilder();\r\n builder.setTables(FTS_VIRTUAL_TABLE_CAR);\r\n builder.setProjectionMap(mColumnMapCar);\r\n\r\n Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(),\r\n null, null, null, null, null, null);\r\n\r\n if (cursor == null) {\r\n return null;\r\n } else if (!cursor.moveToFirst()) {\r\n cursor.close();\r\n return null;\r\n }\r\n\r\n String point_str = cursor.getString(1);\r\n\r\n point_str = point_str.trim();\r\n String[] coordinates = point_str.split(\",\");\r\n String lon = coordinates[0];\r\n String lat = coordinates[1];\r\n\r\n double flon = Float.valueOf(lon);\r\n double flat = Float.valueOf(lat);\r\n\r\n return (new Point(flon, flat));\r\n }", "private void showCurrentLocation() {\n if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationRequest locationRequest = LocationRequest.create();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(5000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n LocationCallback mLocationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n if (locationResult == null) {\n return;\n }\n for (Location location : locationResult.getLocations()) {\n if (location != null) {\n LatLng current = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(current, 18));\n if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n\n }\n }\n }\n };\n\n LocationServices.getFusedLocationProviderClient(this).requestLocationUpdates(locationRequest, mLocationCallback, null);\n\n } else { // Show default location\n requestLocationPermission();\n\n LatLng current = new LatLng(34.180972800611016, -117.32337489724159);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(current, 18));\n }\n }", "public geo_location getLocation() {\n return _pos;\n }", "void getMyCurrentLocation() { \r\n\t\t \r\n\t\t \r\n\t \t // map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lon), 16));\r\n\t\t \r\n\t LocationManager locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\t try{\r\n\t \t\tgps_enabled=locManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\r\n\t }catch(Exception ex){\r\n\t \t\r\n\t }\r\n\t try{\r\n\t \tnetwork_enabled=locManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\r\n\t }catch(Exception ex){\r\n\t \t\r\n\t }\r\n\r\n\t if(gps_enabled){\r\n\t location=locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n\r\n\t } \r\n\r\n\t \r\n\t if(network_enabled && location==null) {\r\n\t location=locManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\r\n\r\n\t }\r\n\r\n\t\t if (location != null) { \r\n\t\t \t//accLoc=location.getAccuracy();\r\n\t\t lat = location.getLatitude();\r\n\t\t\t lon= location.getLongitude();\r\n\t\t } \r\n\t \r\n\t try\r\n\t {\r\n\t \t //Getting address based on coordinates.\r\n\t Geocoder geocoder; \r\n\t List<Address> addresses;\r\n\t geocoder = new Geocoder(this, Locale.getDefault());\r\n\t addresses = geocoder.getFromLocation(lat, lon, 1);\r\n\t \r\n\t Address = addresses.get(0).getAddressLine(0);\r\n\t City = addresses.get(0).getAddressLine(1);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t e.printStackTrace();\r\n\t }\r\n\r\n\t if (Address != null && !Address.isEmpty()) {\r\n\t\t \t try\r\n\t\t \t {\r\n\t\t \t \t //Getting address based on coordinates.\r\n\t\t \t Geocoder geocoder; \r\n\t\t \t List<Address> addresses;\r\n\t\t \t geocoder = new Geocoder(this, Locale.getDefault());\r\n\t\t \t addresses = geocoder.getFromLocation(lat, lon, 1);\r\n\t\t \t\r\n\t\t \t Address = addresses.get(0).getAddressLine(0);\r\n\t\t \t City = addresses.get(0).getAddressLine(1);\r\n\t\t \t }\r\n\t\t \t catch (Exception e)\r\n\t\t \t {\r\n\t\t \t e.printStackTrace();\r\n\t\t \t }\r\n\t\t \t //mp.position(new LatLng(location.getLatitude(), location.getLongitude()));\r\n\t\t \t //mp.title(\"You are here\");\t\t \t \r\n\t\t \t //map.addMarker(mp).showInfoWindow();\t\r\n\t\t \t //map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(1.3667, 103.8), 10));\r\n\t }\r\n\t else{ \r\n\t /* AlertDialog.Builder builder1 = new AlertDialog.Builder(ArticleLatestMoreDetailActivity.this);\r\n\t builder1.setTitle(\"Service Unavailable\");\r\n\t \t\t builder1.setMessage(\"Unable to get your location, check if your GPS and Network are turned on.\");\r\n\t \t\t builder1.setCancelable(true);\r\n\t builder1.setNegativeButton(\"OK\",new DialogInterface.OnClickListener() {\r\n\t public void onClick(DialogInterface dialog, int id) {\r\n\t \t dialog.cancel();\r\n\t }\r\n\t });\r\n\t AlertDialog alert11 = builder1.create();\r\n\t alert11.show();\r\n\t \r\n\t lat=1.3667;\r\n\t lon=103.8; */ \r\n\t // mp.position(new LatLng(1.3667, 103.8));\r\n\t\t // mp.draggable(true);\r\n\t\t \t // map.addMarker(mp).showInfoWindow();\r\n\t\t \t \r\n\t\t \t //map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(1.3667, 103.8), 10));\r\n\t }\r\n\t \r\n\t \r\n\t \r\n\t Bundle extras = this.getIntent().getExtras();\r\n\t\t double dbLat = extras.getDouble(\"dbLat\");\r\n\t\t double dbLon = extras.getDouble(\"dbLon\");\r\n\t\t artLoc.position(new LatLng(dbLat, dbLon));\r\n\t\t artLoc.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\t\t artLoc.title(\"Place of occurrence\");\r\n\t\t map.addMarker(artLoc).showInfoWindow();\r\n\t\t map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(dbLat, dbLon), 18));\r\n\t \r\n\t \r\n\t \r\n\t }", "private void setUpMap() throws IOException {\n // Get last location which means current location\n lastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (lastKnownLocation != null) {\n // shift view to current location\n LatLng latlng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n Geocoder geocoder = new Geocoder(this);\n adminArea = geocoder.getFromLocation(latlng.latitude, latlng.longitude, 1).get(0).getAdminArea();\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latlng, 12);\n mMap.moveCamera(update);\n } else {\n Toast.makeText(this, \"Current Location is not Available\", Toast.LENGTH_SHORT).show();\n }\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraLocation getAuvLoc();", "public Vector2F getScreenLocation() {\n\t\treturn new Vector2F(xPos, yPos);\n\t}", "public Point getLocation() {\n return currentLocation;\n }", "public Vector2 getCameraPosition()\n {\n\n Vector2 tmpVector = new Vector2(camera.position.x/camera.zoom - Gdx.graphics.getWidth()/2, camera.position.y/camera.zoom - Gdx.graphics.getHeight()/2);\n return tmpVector;\n }", "private void getLocation() {\n NimbeesLocationManager.NimbeesLocationListener mNimbeesLocationListener = new NimbeesLocationManager.NimbeesLocationListener() {\n @Override\n public void onGetCurrentLocation(Location location) {\n mLocation = location;\n setUpMap();\n }\n\n @Override\n public void onError(NimbeesException e) {\n }\n };\n NimbeesClient.getLocationManager().obtainCurrentLocation(mNimbeesLocationListener);\n }", "public Location getCurrentLocation() { return entity.getLocation(); }", "public Location getCurrentLocation()\n\t{\n\t\treturn currentLocation;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.clear();\n\n\n loc = null;\n try {\n loc = getLocation();\n } catch (SecurityException ex) {\n Toast.makeText(MapsActivity.this, \"Current location not accesed\", Toast.LENGTH_SHORT).show();\n }\n if (loc != null) {\n LatLng latLng = new LatLng(loc.getLatitude(), loc.getLongitude());\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"Current location\")).setDraggable(true);\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latLng, 27);\n mMap.moveCamera(update);\n\n } else\n Toast.makeText(MapsActivity.this, \"Location Not Foound\", Toast.LENGTH_SHORT).show();\n\n\n getloc.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Location loc = null;\n try {\n loc = getLocation();\n } catch (SecurityException ex) {\n Toast.makeText(MapsActivity.this, \"Current location not accesed\", Toast.LENGTH_SHORT).show();\n }\n\n\n }\n });\n\n // Add a marker in Sydney and move the camera\n // LatLng sydney = new LatLng(-34, 151);\n // mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n client = new GoogleApiClient.Builder(this)\n .addApi(LocationServices.API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this).build();\n client.connect();\n\n }", "private void showMyLocation() {\n\n LocationManager locationManager = (LocationManager) activity.getSystemService(LOCATION_SERVICE);\n\n String locationProvider = this.getEnabledLocationProvider();\n\n if (locationProvider == null) {\n return;\n }\n\n // Millisecond\n final long MIN_TIME_BW_UPDATES = 1000;\n // Met\n final float MIN_DISTANCE_CHANGE_FOR_UPDATES = 1;\n\n Location myLocation = null;\n try {\n // This code need permissions (Asked above ***)\n\n /* locationManager.requestLocationUpdates(\n locationProvider,\n MIN_TIME_BW_UPDATES,\n MIN_DISTANCE_CHANGE_FOR_UPDATES, (android.location.LocationListener) this); */\n\n\n // Getting Location.\n myLocation = locationManager\n .getLastKnownLocation(locationProvider);\n }\n // With Android API >= 23, need to catch SecurityException.\n catch (SecurityException e) {\n\n Log.e(\"ActivityTackeSegment\", \"Show My Location Error:\" + e.getMessage());\n e.printStackTrace();\n return;\n }\n\n if (myLocation != null) {\n\n// // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// myMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// myMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n// Toast.makeText(getActivity(),\"Je suis a Sydney\",Toast.LENGTH_SHORT);\n\n\n LatLng latLng = new LatLng(myLocation.getLatitude(), myLocation.getLongitude());\n // LatLng latLng = new LatLng(-34, 151);\n //myMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Sydney\"));\n // myMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 14));\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng) // Sets the center of the map to location user\n .zoom(currentZoom) // Sets the zoom\n .bearing(0) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n myMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n /*\n // Add Marker to Map\n MarkerOptions option = new MarkerOptions();\n option.title(\"My Location\");\n option.snippet(\"....\");\n option.position(latLng);\n Marker currentMarker = myMap.addMarker(option);\n currentMarker.showInfoWindow();\n */\n } else {\n\n Log.i(\"ActivityTrackerFragment\", \"Location not found\");\n }\n\n }", "public Vector2f getLocation() {\r\n\t\treturn location.getLocation();\r\n\t}", "protected void updateCameraPosition() {\n if (!mIsMapStatic && mMap != null && mMapConfiguration != null && mIsMapLoaded) {\n updateCameraPosition(mMapConfiguration.getCameraPosition());\n }\n }", "public StarSystem getCurrentLocation() {\n\t\treturn player.getLocation();\n\t}", "public Coordinate getLocation();", "public void myLocationClick() {\n\n //Set the initial camera position to the current location\n GridPoint gridPoint = myGridPoint();\n float mpp = 1;\n\n if (gridPoint != null) {\n\n CameraPosition cameraPosition = new CameraPosition(gridPoint, mpp);\n mMap.moveCamera(cameraPosition, true);\n\n } else {\n\n //If GPS is off, notify the user to turn it on\n Toast.makeText(MainActivity.this,\"Turn on GPS.\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public PVector getLocation()\n\t{\n\t\treturn location;\n\t}", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n sourceLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n\n CameraPosition position = CameraPosition.builder()\n .target(sourceLatLng)\n .zoom(16)\n //.tilt(30)\n .build();\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(position));\n\n } else {\n Snackbar snackbar = Snackbar\n .make(findViewById(R.id.drawer_layout), \"Location not available.\", Snackbar.LENGTH_LONG);\n snackbar.show();\n }\n }", "public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }", "public int getCurrentLocation() {\n\t\treturn currentLocation;\n\t}", "public PVector getLoc() {\n return location;\n }", "public PVector getLoc() {\n return location;\n }", "public LatLng getLocation() {\n return location;\n }", "private void setCurrentLocation() {\n foundLocation = false;\n //Ignore the red line - we check for permissions before this function is called\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n googleMap.setMyLocationEnabled(true);\n FusedLocationProviderClient mFusedLocationProviderClient = LocationServices\n .getFusedLocationProviderClient(getActivity());\n //Ignore the red line - we check for permissions before this function is called\n Task<Location> lastLocation = mFusedLocationProviderClient.getLastLocation();\n lastLocation.addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n Location location = task.getResult();\n if (location == null) {\n locationControlTask = new LocationControl();\n locationControlTask.execute(getActivity());\n } else {\n LatLng currentLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(currentLatLng,\n DEFAULT_ZOOM);\n googleMap.moveCamera(update);\n foundLocation = true;\n }\n }\n });\n }", "Location getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "@Override\n public void onLocationChanged(Location location) {\n\n clientlat = location.getLatitude();\n clientlon = location.getLongitude();\n System.out.println(\"latitude is \"+clientlat);\n System.out.println(\"longitude is \"+clientlon);\n }", "public LatLng getLocation() {\n\t\treturn location;\n\t}", "private void getDeviceLocation(){\n Log.d(TAG,\"get device location currently\");\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n try{\n if(mLocationPermissionGranted){\n @SuppressLint(\"MissingPermission\") final Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG,\"onComplete: found Location\");\n mLastKnownLocation= (Location) task.getResult();\n moveCamera(new LatLng(mLastKnownLocation.getLatitude(),mLastKnownLocation.getLongitude()),DEFAULT_ZOOM);\n\n Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude(), 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n LatLng latLng = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n\n address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n city = addresses.get(0).getLocality();\n state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName(); // Only\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(address);\n mMap.clear();//Not sure\n mMap.addMarker(markerOptions);\n Marker here = mMap.addMarker(markerOptions.title(address + \", \" + city + \", \" + state + \", \" + country\n + \", \" + postalCode + \", \" + knownName));\n here.showInfoWindow();\n } catch (IOException e) {\n e.printStackTrace();\n } }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(MapsActivity.this, \"unable to get current location\",Toast.LENGTH_SHORT).show();\n getLocationPermission();\n }\n }\n });\n\n }\n }catch (SecurityException e){\n Log.e(TAG,\"getDeviceLocation: SecurityException: \" + e.getMessage() );\n }\n\n\n\n }", "public double getLocation(){\n\t\treturn location;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /*GPSTracker gps = new GPSTracker(this);\n if(gps.canGetLocation()) {\n //lat=gps.getLatitude();\n //lon=gps.getLongitude();\n }*/\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n //mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n //mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n // Add a marker in Sydney and move the camera\n /*LatLng current = new LatLng(lat, lon);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));\n LatLng new1 = new LatLng(lat+0.0008, lon+0.00004);\n mMap.addMarker(new MarkerOptions().position(new1).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new1));\n LatLng new2 = new LatLng(lat+0.0005, lon+0.0004);\n mMap.addMarker(new MarkerOptions().position(new2).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new2));\n mMap.addMarker(new MarkerOptions().position(current).title(lat+\" \"+lon+\n \"\"));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(new LatLng(lat, lon)) // Sets the center of the map to location user\n .zoom(18) // Sets the zoom\n .bearing(90) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));*/\n }", "@Override\n public void onMapReady(final GoogleMap googleMap) {\n\n mMap = googleMap;\n setUpMapIfNeeded();\n\n mMap.setLocationSource(mLocationSource);\n mMap.setOnMapLongClickListener(mLocationSource);\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n// enableLocationSettings(getActivity());\n buildGoogleApiClient();\n return false;\n }\n });\n // Add a marker in tehran and move the camera\n LatLng tehran = new LatLng(35.6892, 51.3890);\n marker=mMap.addMarker(new MarkerOptions().position(tehran).title(\"Marker in Tehran\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(tehran));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(tehran,14));\n\n View viewById = getView();\n\n if(viewById!=null) {\n TextView viewlatlongLocation = (TextView)viewById.findViewById(R.id.latlongLocation);;\n viewlatlongLocation.setText(\"35.6892\" + \" \" + \"51.3890\");\n }\n //show error dialog if GoolglePlayServices not available\n// if (!isGooglePlayServicesAvailable()) {\n// finish();\n// }\n\n if (getContext()==null || ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n buildGoogleApiClient();\n\n mMap.setMyLocationEnabled(true);\n\n// LocationManager locationManager = (LocationManager) this.getActivity().getSystemService(Context.LOCATION_SERVICE);\n// Criteria criteria = new Criteria();\n// String bestProvider = locationManager.getBestProvider(criteria, true);\n// Location location = locationManager.getLastKnownLocation(bestProvider);\n// if (location != null) {\n// onLocationChanged(location);\n// }\n// CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(),location.getLongitude()), 15);\n// mMap.animateCamera(cameraUpdate);\n// locationManager.requestLocationUpdates(bestProvider, 0, 500, this);\n // Check if we were successful in obtaining the map.\n// if (mMap != null) {\n//\n//\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n//\n// @Override\n// public void onMyLocationChange(Location arg0) {\n// // TODO Auto-generated method stub\n// marker.remove();\n// marker = mMap.addMarker(new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title(\"It's Me!\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA)));\n// mMap.animateCamera(CameraUpdateFactory.zoomTo(14));\n// TextView viewById = (TextView)getView().findViewById(R.id.latlongLocation);\n// viewById.setText(arg0.getLatitude()+\" \"+ arg0.getLongitude());\n//\n// }\n// });\n//\n// }\n //DO WHATEVER YOU WANT WITH GOOGLEMAP\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n// mMap.setIndoorEnabled(true);\n// mMap.setBuildingsEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng miUbicacion = new LatLng(location.getLatitude(), location.getLongitude());\n\n //Marcador de la ub. actual\n mMap.addMarker(new MarkerOptions().position(miUbicacion).title(\"Ubicación actual\").icon(BitmapDescriptorFactory.fromResource(R.drawable.marca3)));\n\n //Foco de la camara según la ubicación\n mMap.moveCamera(CameraUpdateFactory.newLatLng(miUbicacion));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(miUbicacion)\n .zoom(14)\n .bearing(90)\n .tilt(45)\n .build();\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }", "public Point getLocation();", "public void onLocationChanged(Location location) {\n Log.d(\"Location\",location.toString());\n currentPosition.setAltitude(location.getAltitude());\n currentPosition.setCoordinate(new SKCoordinate(location.getLongitude(),location.getLatitude()));\n currentPosition.setSpeed(location.getSpeed());\n mapView.setPositionAsCurrent(currentPosition.getCoordinate(),1,true);\n }", "public Point getScreenCoordinate(double lat, double lon) {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getPointFromCoord(new Coord(lat, lon));\n }\n // TODO: Browser component\n return new Point(0, 0);\n }\n internalNative.calcScreenPosition(lat, lon);\n return new Point(internalNative.getScreenX(), internalNative.getScreenY());\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng location = new LatLng(mLat, mLng);\n moveCamera(location, DEFAUT_ZOOM);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(\n this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n listener.onMapSuccess(mMap);\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n System.out.println(\"Perm Loc\" + mLocationPermissionGranted);\n createLocationRequest();\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n getCurrentPlace();\n\n }", "public void setLocation(){\n //Check if user come from notification\n if (getIntent().hasExtra(EXTRA_PARAM_LAT) && getIntent().hasExtra(EXTRA_PARAM_LON)){\n Log.d(TAG, \"Proviene del servicio, lat: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LAT) + \" - lon: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LON));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(getIntent().getExtras().getDouble(EXTRA_PARAM_LAT), getIntent().getExtras().getDouble(EXTRA_PARAM_LON)), 18));\n NotificationManager mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNM.cancel(1);\n } else{\n if (bestLocation!=null){\n Log.d(TAG, \"Posicion actual -> LAT: \"+ bestLocation.getLatitude() + \" LON: \" + bestLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(bestLocation.getLatitude(), bestLocation.getLongitude()), 16));\n } else{\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(41.651981, -4.728561), 16));\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n updateLocationUI();\n getDeviceLocation();\n // Add a marker in Sydney and move the camera\n //float zoom = 15;\n //LatLng gbc = new LatLng(43.676209, -79.410703);\n //mMap.addMarker(new MarkerOptions().position(gbc).title(\"Marker in GBC\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(gbc, zoom));\n\n }", "public LatLng getCurrentPosition(){\n if(currentPosition == null) {\n return null;\n }\n else\n return currentPosition;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n getLat g = new getLat();\n g.execute(tid);\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if (checkPermissions()) {\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n mMap.addMarker(new MarkerOptions().position(currLocation).title(\"Current Location\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currLocation));\r\n getLastLocation();\r\n }", "@Override\n public PointF getLocation() {\n return location;\n }", "public final Coord getLocation() {\n return location;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n if (savedInstanceState != null) {\n mLastKnownLocation = savedInstanceState.getParcelable(KEY_LOCATION);\n //CameraPosition mCameraPosition = savedInstanceState.getParcelable(KEY_CAMERA_POSITION);\n }\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_maps);\n\n\n //getSupportActionBar().setTitle(\"Map Location Activity\");\n\n // Construct a FusedLocationProviderClient.\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n\n Button btnFindPath = findViewById(R.id.btnFindPath);\n spinner = findViewById(R.id.spinner);\n\n\n btnFindPath.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n sendRequest();\n }\n });\n\n getDeviceLocation();\n setSpinner();\n\n //sensor pedometer\n count = (TextView) findViewById(R.id.stepText);\n manager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n Sensor countSensor = manager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);\n if(countSensor != null){\n manager.registerListener(this, countSensor, SensorManager.SENSOR_DELAY_UI);\n }else{\n Toast.makeText(this, \"Count sensor error!\", Toast.LENGTH_LONG).show();\n }\n\n // Build the map.\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }", "private void moveMap() {\n //String to display current latitude and longitude\n String msg = latitude + \", \" + longitude;\n //Creating a LatLng Object to store Coordinates\n LatLng latLng = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng) // Sets the center of the map to location user\n .zoom(15) // Sets the zoom\n .bearing(0) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n\n // Add Marker to Map\n MarkerOptions option = new MarkerOptions();\n option.title(\" Current Location\");\n option.snippet(\"....\");\n option.position(latLng);\n option.draggable(true);//Making the marker draggable\n\n Marker currentMarker = mMap.addMarker(option);\n currentMarker.showInfoWindow();\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n\n }", "private void getGpsLocation() {\n Log.d(LOG_TAG, \"In getGpsLocation\");\n mLocationMgr = (LocationManager) mContext.getSystemService(mContext.LOCATION_SERVICE);\n try {\n Location mLocation = mLocationMgr.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (null != mLocation) {\n mLatitude = mLocation.getLatitude();\n mLongitude = mLocation.getLongitude();\n }\n } catch (SecurityException se) {\n Log.d(LOG_TAG, \"Security Exception\", se);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n\n /* // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n }", "@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n Toast.makeText(this, currentLatitude + \", \" + currentLongitude + \"\", Toast.LENGTH_LONG).show();\n }" ]
[ "0.77770704", "0.77158237", "0.7678068", "0.76565397", "0.76411164", "0.7636113", "0.7582076", "0.755882", "0.75521076", "0.7493388", "0.747046", "0.7457338", "0.7412395", "0.7337549", "0.7132724", "0.71256536", "0.70594543", "0.7004422", "0.68331134", "0.68105817", "0.6802611", "0.6684504", "0.66792405", "0.6622064", "0.6615134", "0.656717", "0.656005", "0.6558519", "0.65516484", "0.6544167", "0.65384924", "0.6536782", "0.6528961", "0.65240234", "0.6515503", "0.6514332", "0.6452702", "0.64494276", "0.64482594", "0.64416087", "0.6435055", "0.64285666", "0.64063066", "0.6386473", "0.6359965", "0.63592637", "0.6341464", "0.63388604", "0.63372135", "0.6333766", "0.63306916", "0.63220984", "0.63145053", "0.62956035", "0.62937117", "0.6291682", "0.62560016", "0.62437594", "0.62412053", "0.6239308", "0.6235825", "0.6233843", "0.6229015", "0.6221505", "0.6212813", "0.62048656", "0.6200842", "0.618149", "0.6178219", "0.6178219", "0.6176878", "0.61732244", "0.6170693", "0.6170693", "0.6170693", "0.6170693", "0.61677796", "0.6162965", "0.6155499", "0.61471075", "0.6132296", "0.612425", "0.611695", "0.6115146", "0.61148477", "0.6111454", "0.6108843", "0.61071694", "0.6104081", "0.6103831", "0.6100007", "0.6096511", "0.6092157", "0.6084507", "0.60723454", "0.6069944", "0.6068507", "0.6067742", "0.60662675", "0.60641325" ]
0.7506279
9
Fetch a list of likely places, and show the current place on the map provided the user has granted location permission.
private void pickCurrentPlace() { if (mMap == null) { return; } if (mLocationPermissionGranted) { getDeviceLocation(); } else { // The user has not granted permission. Log.i(TAG, "The user did not grant location permission."); // Add a default marker, because the user hasn't selected a place. mMap.addMarker(new MarkerOptions() .title(getString(R.string.default_info_title)) .position(mDefaultLocation) .snippet(getString(R.string.default_info_snippet))); // Prompt the user for permission. getLocationPermission(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "private void ShowNearbyPlaces(List<HashMap<String, String>> nearbyPlacesList) {\n for (int i = 0; i < nearbyPlacesList.size(); i++) {\n Log.d(\"onPostExecute\",\"Entered into showing locations\");\n MarkerOptions markerOptions = new MarkerOptions();\n HashMap<String, String> googlePlace = nearbyPlacesList.get(i);\n double lat = Double.parseDouble(googlePlace.get(\"lat\"));\n double lng = Double.parseDouble(googlePlace.get(\"lng\"));\n String placeName = googlePlace.get(\"place_name\");\n String vicinity = googlePlace.get(\"vicinity\");\n LatLng latLng = new LatLng(lat, lng);\n markerOptions.position(latLng);\n markerOptions.title(placeName);\n markerOptions.snippet(vicinity);\n\n if (this.mKind == \"police\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n else if (this.mKind == \"hospital\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n\n mMap.addMarker(markerOptions);\n }\n mMap.animateCamera(CameraUpdateFactory.zoomTo(12));\n }", "private void getPlaces() {\n places = new ArrayList<Place>();\n ref = new Firebase(\"https://flickering-torch-2192.firebaseio.com/places\");\n Query likeQuery = ref.orderByChild(\"likes\").limitToLast(10);\n likeQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot querySnapshot) {\n for (DataSnapshot d : querySnapshot.getChildren()) {\n ref.child(d.getKey()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n Place p = dataSnapshot.getValue(Place.class);\n mMap.addMarker(new MarkerOptions().position(new LatLng(p.getLat(), p.getLon()))\n .title(p.getName()).snippet(p.getDescription())\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.happy_marker)));\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }\n }\n\n @Override\n public void onCancelled(FirebaseError error) {\n showToast(error.getMessage());\n }\n });\n\n LatLng bristol = new LatLng(51.4556676, -2.6266423);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(bristol, zoomLevel));\n }", "private void getCurrentPlaceLikelihoods() {\n // Use fields to define the data types to return.\n List<Place.Field> placeFields = Arrays.asList(Place.Field.NAME, Place.Field.ADDRESS,\n Place.Field.LAT_LNG);\n\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\") final FindCurrentPlaceRequest request =\n FindCurrentPlaceRequest.builder(placeFields).build();\n Task<FindCurrentPlaceResponse> placeResponse = mPlacesClient.findCurrentPlace(request);\n placeResponse.addOnCompleteListener(this,\n new OnCompleteListener<FindCurrentPlaceResponse>() {\n @Override\n public void onComplete(@NonNull Task<FindCurrentPlaceResponse> task) {\n if (task.isSuccessful()) {\n FindCurrentPlaceResponse response = task.getResult();\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (response.getPlaceLikelihoods().size() < M_MAX_ENTRIES) {\n count = response.getPlaceLikelihoods().size();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : response.getPlaceLikelihoods()) {\n Place currPlace = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = currPlace.getName();\n mLikelyPlaceAddresses[i] = currPlace.getAddress();\n mLikelyPlaceAttributions[i] = (currPlace.getAttributions() == null) ?\n null : TextUtils.join(\" \", currPlace.getAttributions());\n mLikelyPlaceLatLngs[i] = currPlace.getLatLng();\n\n String currLatLng = (mLikelyPlaceLatLngs[i] == null) ?\n \"\" : mLikelyPlaceLatLngs[i].toString();\n\n Log.i(TAG, String.format(\"Place \" + currPlace.getName()\n + \" has likelihood: \" + placeLikelihood.getLikelihood()\n + \" at \" + currLatLng));\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n\n // COMMENTED OUT UNTIL WE DEFINE THE METHOD\n // Populate the ListView\n fillPlacesList();\n } else {\n Exception exception = task.getException();\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n Log.e(TAG, \"Place not found: \" + apiException.getStatusCode());\n }\n }\n }\n });\n }", "private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }", "public void onSuccess(Collection<Place> result) {\n\t\t\t\t\t\t\t\tfinal MapWidget map = (MapWidget) RootPanel\n\t\t\t\t\t\t\t\t\t\t.get(\"mapsTutorial\").getWidget(0);\n\t\t\t\t\t\t\t\tmap.clearOverlays();\n\n\t\t\t\t\t\t\t\tLatLng markerPos = null;\n\t\t\t\t\t\t\t\tfor (final Place place : result) {\n\t\t\t\t\t\t\t\t\tLocation coordinates = place.getCoordinates();\n\t\t\t\t\t\t\t\t\tmarkerPos = LatLng.newInstance(\n\t\t\t\t\t\t\t\t\t\t\tcoordinates.getLatitude(), coordinates.getLongitude());\n\n\t\t\t\t\t\t\t\t\t// Add a marker\n\t\t\t\t\t\t\t\t\tMarkerOptions options = MarkerOptions\n\t\t\t\t\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\t\t\t\t\toptions.setTitle(place.getAddress());\n\t\t\t\t\t\t\t\t\tMarker marker = new Marker(markerPos,\n\t\t\t\t\t\t\t\t\t\t\toptions);\n\t\t\t\t\t\t\t\t\tfinal LatLng currMarkerPos = markerPos;\n\t\t\t\t\t\t\t\t\tmarker.addMarkerClickHandler(new MarkerClickHandler() {\n\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\tMarkerClickEvent event) {\n\t\t\t\t\t\t\t\t\t\t\tPlaceFormatter places = new PlaceFormatter();\n\t\t\t\t\t\t\t\t\t\t\tInfoWindowContent wnd = new InfoWindowContent(places.format(place));\n\t\t\t\t\t\t\t\t\t\t\twnd.setMaxWidth(200);\n\t\t\t\t\t\t\t\t\t\t\tmap.getInfoWindow().open(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrMarkerPos,\n\t\t\t\t\t\t\t\t\t\t\t\t\twnd);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tmap.addOverlay(marker);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (markerPos != null) {\n\t\t\t\t\t\t\t\t\tmap.setCenter(markerPos);\n\t\t\t\t\t\t\t\t\tmap.setZoomLevel(12);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "void displayFragmentPlaceTypeList(Location location);", "@Override\n protected void onPostExecute(HashMap<String,PlaceData> placeList){\n places = placeList;\n loadImages(placeList);\n showNearbyPlaces(placeList);\n }", "public ArrayList<String> getAllPlacesData() {\n\t\t\n\t\tArrayList<String> place_data = new ArrayList<String>();\n\t\t\n\t\t// String array for [place id, place name, place type, place latitude, place longitude]\n\t\tString[] parsed_place_value = new String[5];\n\t\t\t\t\n\t\t// Get SharedPref map\n\t\tMap<String,?> prefsMap = mPref.getAll();\n\t\t\n\t\t// Iterate over SharedPref map and get key, value pairs\n\t\tfor (Map.Entry<String, ?> entry : prefsMap.entrySet()) {\n\t\t\t\n\t\t\t// Ignore position data for clicked ListView item\n\t\t\tif (entry.getKey().equals(\"KEY_DATA_POSITION\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Store place id, place name, place type, place latitude, place longitude from values obtained in SharedPref map\n\t\t\tparsed_place_value = entry.getValue().toString().split(\",\");\n\n\t\t\t// Obtain place id and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString id = parsed_place_value[0];\n\t\t\tid = id.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tid = id.trim();\n\t\t\t\n\t\t\t// Obtain place name and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString name = parsed_place_value[1];\n\t\t\tname = name.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tname = name.trim();\n\t\t\t\n\t\t\t// Obtain place type and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString type = parsed_place_value[2];\n\t\t\ttype = type.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\ttype = type.trim();\n\t\t\t\n\t\t\t// Obtain place latitude and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString latitude = parsed_place_value[3];\n\t\t\tlatitude = latitude.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tlatitude = latitude.trim();\n\t\t\t\t\t\n\t\t\t// Obtain place longitude and remove all occurrences of '[' and ']' and leading/trailing whitespace\n\t\t\tString longitude = parsed_place_value[4];\n\t\t\tlongitude = longitude.replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\tlongitude = longitude.trim();\n\t\t\t\n\t\t\t// Obtain SharedPref key for place\n\t\t\tString sharedPref_key = entry.getKey();\n\t\t\t\n\t\t\t// Add place id, name, type, latitude, longitude, SharedPref key to ArrayList (separated by ## symbol)\n\t\t\tplace_data.add(id + \"##\" + name + \"##\" + type + \"##\" + latitude + \"##\" + longitude + \"##\" + sharedPref_key);\n\t\t\t\n\t\t\t\n\t\t\tLog.i(\"SHARED_PREFS_DATA\", entry.getKey() + \": \" + entry.getValue().toString());\n\t\t}\n\t\t\n\t\treturn place_data;\n\t}", "@SuppressLint(\"MissingPermission\")\n @AfterPermissionGranted(PERMISSION_LOCATION_ID)\n private void getCurrentLocation() {\n Task<Location> task = fusedLocationProviderClient.getLastLocation();\n task.addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if(location != null) {\n currentLat = location.getLatitude();\n currentLong = location.getLongitude();\n\n String placeType = \"museum\";\n\n int radius = ProfileFragment.getRadius();\n\n String url = \"https://maps.googleapis.com/maps/api/place/nearbysearch/json\" +\n \"?location=\" + currentLat + \",\" + currentLong +\n \"&radius=\" + radius +\n \"&type=\" + placeType +\n \"&key=\" + getResources().getString(R.string.maps_api_key);\n\n new NearbyMuseumTask().execute(url);\n\n mapFragment.getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n map = googleMap;\n setMapUISettings();\n\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(currentLat,currentLong), 12\n ));\n }\n });\n }\n }\n });\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n getLocationPermission();\n }\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n mMap = map;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng point) {\n mMap.clear();\n buildMarker(\"User Tap\", \"This is snippet\", point, true);\n @SuppressLint(\"DefaultLocale\") String latLong = String.format(\"%f,%f\", point.latitude, point.longitude);\n String endPoint = String.format(placesURL,latLong, String.valueOf(distance), BuildConfig.API_KEY);\n Location locationSelected = new Location(mLastKnownLocation);\n locationSelected.setLatitude(point.latitude);\n locationSelected.setLongitude(point.longitude);\n showPlacesNearby(locationSelected, endPoint);\n }\n });\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n mMap.clear();\n }\n });\n\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n mMap.clear();\n updateLocationUI();\n getDeviceLocation();\n return true;\n }\n });\n\n\n // Prompt the user for permission.\n getLocationPermission();\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "void getDrivableLocations() {\n\t\t\tSystem.out.print(\"\\nPlaces you can drive to: \");\n\t\t\tfor (int i = 0; i < places.length; i++)\n\t\t\t\tif (places[i].drivable) //looks to see if you can drive there \n\t\t\t\t\tif ((places[i] != this)) //if it's not you're current location.\n\t\t\t\t\t\tSystem.out.print(places[i].locationName + \", \");\t//prints the name of the location\t\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}", "private void openPlacesDialog() {\n // Ask the user to choose the place where they are now.\n DialogInterface.OnClickListener listener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "public void loadPlaces() {\n\n if (getActivity() == null || !isAdded())\n return;\n\n //clear markers\n markers.clear();\n map.clear();\n\n //add new markers\n for (int i = 0; i < places.size(); i++) {\n LatLng coordinate = new LatLng(places.get(i).gpslat, places.get(i).gpslng);\n\n //add marker with no icon\n Marker marker;\n\n marker = map.addMarker(new MarkerOptions().position(coordinate).icon(BitmapDescriptorFactory.fromBitmap(resizeMapIcons(\"pin\", 100))));\n marker.setTag(i);\n markers.add(marker);\n\n //load icon from server using the picasso library\n places.get(i).loadPinBitmap(context, i, new Place.PinLoadedListener() {\n @Override\n public void onLoaded(Bitmap bitmap, Place place, int i) {\n markers.get(i).setIcon(BitmapDescriptorFactory.fromBitmap(bitmap));\n }\n\n @Override\n public void onFailed(Place place, int i) {\n\n }\n });\n }\n\n //create list\n mAdapter = new MapPlaceAdapter(places, new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n //open ad. If ad not open attempt to open rate\n if (!((MainActivity) getActivity()).loadInterstitial()) {\n if (!AskRate()) {\n System.out.println(\"click: \" + places.get(i).id + \" \" + places.get(i).name);\n Intent intent = new Intent(context, SinglePlaceActivity.class);\n intent.putExtra(ITEM_KEY, places.get(i).id);\n startActivity(intent);\n }\n }\n }\n }, context);\n mRecyclerView.swapAdapter(mAdapter, false);\n scrollListener.resetState();\n\n //set marker to first item\n if (places.size() > 0) {\n Place p = places.get(0);\n gotoMap(p.gpslat, p.gpslng);\n }\n }", "private void retrieveListings(GoogleMap googleMap) {\n Projection projection = googleMap.getProjection();\n VisibleRegion visibleRegion = projection.getVisibleRegion();\n LatLng sw = visibleRegion.latLngBounds.southwest;\n LatLng ne = visibleRegion.latLngBounds.northeast;\n double left = sw.longitude;\n double bottom = sw.latitude;\n double right = ne.longitude;\n double top = ne.latitude;\n\n // Find listings on the visible region of the map\n queryListings(left, right, top, bottom);\n }", "@Override\n public void onResult(@NonNull PlaceBuffer places) {\n // Update the UI via callbacks to methods defined in the view layer\n if (places.getStatus().isSuccess() && places.getCount() > 0\n && places.get(0) != null) {\n // Successfully retrieved Place object\n if (responseRunnable != null)\n responseRunnable.run(places.get(0));\n } else { // Did not successfully retrieve Place object\n if (failureRunnable != null)\n failureRunnable.run();\n }\n places.release(); // release buffer to prevent memory leak\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n initializeOtherSettlements(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n initializeQuestLocations(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n\n mMap.setOnMarkerClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnPoiClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), 9));\n\n final PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)\n getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);\n\n autocompleteFragment.getView().setBackgroundColor(Color.WHITE);\n autocompleteFragment.getView().setVisibility(View.GONE);\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n //Bias results towards the user's current location\n /*autocompleteFragment.setBoundsBias(new LatLngBounds(\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude),\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude)));*/\n\n //Get info about the selected place.\n //Log.i(TAG, \"Place: \" + place.getName());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n\n updateMapHistory();\n updateCustomTimeUI();\n }", "public void getPlacesList(final ApiPlacesResult<List<Place>> callback) {\n Call<List<Place>> call = this.mPlaceCall.getPlaces();\n call.enqueue(new Callback<List<Place>>() {\n @Override\n public void onResponse(Call<List<Place>> call, Response<List<Place>> response) {\n int statusCode = response.code();\n if (statusCode == HTTP_200) {\n initRetrofitClient();\n List<Place> places = response.body();\n callback.success(places);\n } else {\n callback.error(statusCode, response.message());\n }\n }\n\n @Override\n public void onFailure(Call<List<Place>> call, Throwable t) {\n Log.e(TAG, \"Error while calling the 'getPlacesList' method!\", t);\n callback.error(-1, t.getLocalizedMessage());\n }\n });\n }", "public List<Place> getPlaces(){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\tQuery<Place> theQuery = currentSession.createQuery(\"FROM Place\", Place.class);\r\n\t\t\r\n\t\tList<Place> resultList = theQuery.getResultList();\r\n\t\t\t\r\n\t\treturn resultList;\r\n\t}", "public ArrayList<Place> getPlaceList() {\n\t\treturn this.places;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n LocationManager manager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria mCriteria = new Criteria();\n String bestProvider = String.valueOf(manager.getBestProvider(mCriteria, true));\n\n Location mLocation = manager.getLastKnownLocation(bestProvider);\n\n checkLocationPermission();\n mMap.setMyLocationEnabled(true);\n\n final double currentLatitude = mLocation.getLatitude();\n final double currentLongitude = mLocation.getLongitude();\n LatLng loc1 = new LatLng(currentLatitude, currentLongitude);\n mMap.addMarker(new MarkerOptions().position(loc1).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLatitude, currentLongitude), 15));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);\n\n Geocoder geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(currentLatitude, currentLongitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n cityName = addresses.get(0).getAddressLine(0);\n\n GraphRequest request = GraphRequest.newGraphPathRequest(\n accessToken,\n \"/search\",\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n JSONObject eventsInCityObject = response.getJSONObject();\n RealmList<Event> cityEvents = new RealmList<Event>();\n\n\n try {\n JSONArray eventsInCityArray = eventsInCityObject.getJSONArray(\"data\");\n for (int i = 0; i < eventsInCityArray.length(); i++) {\n JSONObject eventJSON = eventsInCityArray.getJSONObject(i);\n JSONObject placeJSON = (JSONObject) eventJSON.get(\"place\");\n\n if (placeJSON.has(getString(R.string.getEventLocation))){\n JSONObject locJSON = (JSONObject) placeJSON.get(getString(R.string.getEventLocation));\n\n String city = locJSON.getString(getString(R.string.getEventCity));\n String country = locJSON.getString(getString(R.string.getEventCountry));\n Double lat = locJSON.getDouble(getString(R.string.getEventLat));\n Double lng = locJSON.getDouble(getString(R.string.getEventLng));\n\n EventLocation loc = getRealm().createObject(EventLocation.class, UUID.randomUUID().toString());\n loc.setCity(city);\n loc.setCountry(country);\n loc.setLat(lat);\n loc.setLng(lng);\n\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n String placeID = placeJSON.getString(getString(R.string.getPlaceID));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n place.setId(placeID);\n place.setLoc(loc);\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n\n cityEvents.add(event);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(event.getPlace().getLoc().getLat(),\n event.getPlace().getLoc().getLng())).title(event.getName()));\n } else {\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n }\n }\n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n });\n\n Bundle parameters = new Bundle();\n parameters.putString(getString(R.string.query), cityName);\n parameters.putString(getString(R.string.type), getString(R.string.event));\n request.setParameters(parameters);\n request.executeAsync();\n\n\n }", "public void givePlaceInList() {\r\n\t\tmyPlaceInList = allyTracker.getPlaceInList();\r\n\t}", "private void startPlaceListActivity() {\n if (mLastLocation == null) {\n Toast.makeText(getContext(), getResources().getString(R.string.location_unavailable), Toast.LENGTH_SHORT).show();\n\n // after announcing user that their location is unknown, try getting their location again\n startLocationUpdate();\n\n } else {\n Intent intent = new Intent(getContext(), PlaceListActivity.class);\n intent.putExtra(PLACE_TYPE_KEY, mPlaceType);\n intent.putExtra(CURRENT_LOCATION_KEY, mLastLocation);\n startActivity(intent);\n }\n }", "public void scanCurrentPlace()\r\n\t{\r\n\t\tSystem.out.println(this.getCurrentPlace().toString());\r\n\t\tSystem.out.println(\"The place contains these objects: \");\r\n\t\tSystem.out.println(this.getCurrentPlace().getItems().toString());\r\n\t}", "private void fillPlacesList() {\n // Set up an ArrayAdapter to convert likely places into TextViews to populate the ListView\n ArrayAdapter<String> placesAdapter =\n new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mLikelyPlaceNames);\n lstPlaces.setAdapter(placesAdapter);\n lstPlaces.setOnItemClickListener(listClickedHandler);\n }", "@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t\n\t\t\t\tmLatitude = location.getLatitude();\n\t\t\t\tmLongitude = location.getLongitude();\n\t\t\t\t\n\t\t\t\t LatLng point = new LatLng(mLatitude, mLongitude);\n\t\t\t\t\n\t\t\t\t try {\n\t\t\t\t \taddresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t \t// TODO Auto-generated catch block\n\t\t\t\t \te.printStackTrace();\n\t\t\t\t }\n\t\t\t\t MarkerOptions maker= new MarkerOptions().position(point);\n\n\t\t\t\t address = addresses.get(0).getAddressLine(0);\n\t\t\t\t if(address==null)\n\t\t\t\t {\n\t\t\t\t\t maker.title(\"My Location\");\n\t\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\tmaker.title(\"\"+address);\n\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t String type = mPlaceType;\n\t\t\t StringBuilder sb = new StringBuilder(\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?\");\n\t\t\t sb.append(\"location=\"+mLatitude+\",\"+mLongitude);\n\t\t\t sb.append(\"&radius=1500\");\n\t\t\t sb.append(\"&types=\"+type);\n\t\t\t sb.append(\"&sensor=true\");\n\t\t\t sb.append(\"&key=AIzaSyAwZSGS1kZG7_UuqxqHH3MdO1hbwB2cjag\"); \n\t\t\t PlacesTask placesTask = new PlacesTask(); \n\t\t\t placesTask.execute(sb.toString());\n\t\t\t \n\t\t\t \n\t\t\t if(zoomm)\n\t\t\t {\n\t\t\t \t googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(point, 15, 30, 0)));\n\t\t\t \t zoomm=false;\n\t\t\t }\n\t\t\t\t\n\t\t\t}", "public void getPlacesFor(String query, SimpleLocation location, PlacesFetchListener listener) {\n this.location = location;\n this.listener = listener;\n\n // if offline or user prefers offline, get places from local database\n if (!nm.connectedToInternet() || Prefs.offline) {\n db.findPlacesByName(query, listener);\n } else { // else fetch from API endpoint\n String url = getRequestUrl(query);\n Log.i(C.TAG, \"url: \" + url);\n nm.makeGETRequest(url, this);\n }\n\n }", "public void loadPlaces(Map<String, String> queryMap){\n showProgressBar();\n\n call = foursquareApiService.getPlaces(queryMap);\n call.enqueue(new Callback<SearchResult>() {\n @Override\n public void onResponse(Call<SearchResult> call, Response<SearchResult> response) {\n hideProgressBar();\n\n ResponseList rl = response.body().getResponseList();\n placeArrayList = (ArrayList<Place>) rl.getPlaceList();\n placesListAdapter = new PlacesListAdapter(MainActivity.this,R.layout.activity_main_places_list_item,placeArrayList, MainActivity.this);\n recyclerViewPlacesList.setLayoutManager(new LinearLayoutManager(MainActivity.this));\n recyclerViewPlacesList.setAdapter(placesListAdapter);\n placesListAdapter.notifyDataSetChanged();\n\n Log.d(\"Array Size\", String.valueOf( placeArrayList.size()));\n Log.d(\"Success\",String.valueOf(response.code()));\n }\n\n @Override\n public void onFailure(Call<SearchResult> call, Throwable t) {\n Log.d(\"Fail\", \"Fail\");\n }\n });\n }", "@Override\n\tpublic synchronized Collection<Place> getPlaces() {\n\t\treturn this.places;\n\t}", "public void Print_place()\n {\n\n System.out.println(\"Place: \" + place);\n }", "private void askPermissionsAndShowMyLocation() {\n if (Build.VERSION.SDK_INT >= 23) {\n int accessCoarsePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_COARSE_LOCATION);\n int accessFinePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n\n if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n || accessFinePermission != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(activity, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n }\n\n // Show current location on Map.\n this.showMyLocation();\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "Place resolveLocation( Place place );", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.getUiSettings().setZoomControlsEnabled(true);\n googleMap.setPadding(0, 0, 0, 300);\n\n\n //if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION))\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n\n\n buildGoogleApiClient();\n\n mMap.setMyLocationEnabled(true);\n //mMap.getUiSettings().setZoomControlsEnabled(true);\n }\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n\n if (marker != null) {\n marker.remove();\n }\n marker = mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))\n .title(\"My Current Click\"));\n\n\n }\n });\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n mHeart.setVisibility(View.VISIBLE);\n manualEnter.setVisibility(View.VISIBLE);\n\n latitude = marker.getPosition().latitude;\n longitude = marker.getPosition().longitude;\n name = marker.getTitle();\n placeID = marker.getId();\n address = marker.getSnippet();\n\n time = DateFormat.getDateTimeInstance().format(new Date());\n //long miliTime = time.getTime\n\n\n\n //getMarkerInfo();\n\n //Toast.makeText(NearbyLocations.this, name, Toast.LENGTH_SHORT).show();\n return false;\n\n\n }\n });\n\n\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n\n LinearLayout info = new LinearLayout(NearbyLocations.this);\n info.setOrientation(LinearLayout.VERTICAL);\n\n TextView title = new TextView(NearbyLocations.this);\n title.setTextColor(Color.BLACK);\n title.setGravity(Gravity.CENTER);\n title.setTypeface(null, Typeface.BOLD);\n title.setText(marker.getTitle());\n\n TextView snippet = new TextView(NearbyLocations.this);\n snippet.setTextColor(Color.GRAY);\n snippet.setText(marker.getSnippet());\n\n info.addView(title);\n info.addView(snippet);\n\n return info;\n }\n });\n\n\n\n\n\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "public void fetchNearbyLocations(final float latitude, final float longitude,\n final OperationCallback<Location[]> callback) {\n \n new Thread() {\n @Override\n public void run() {\n Log.i(TAG, \"Getting access token\");\n try {\n // Prepare request.\n String getParams = String.format(LOCATIONS_ENDPOINT_FORMAT, latitude, longitude, mAccessToken);\n String url = API_URL + getParams;\n String response = getRequest(url);\n \n Log.i(TAG, \"response \" + response);\n \n // Parse JSON answer and notify caller.\n Gson gson = new Gson();\n JSONObject responseJson = (JSONObject) new JSONTokener(response).nextValue();\n List<Location> locations = new ArrayList<Location>(3);\n JSONArray locationsJson = responseJson.getJSONArray(\"data\");\n for (int i = 0; i < locationsJson.length(); i++) {\n locations.add(gson.fromJson(locationsJson.get(i).toString(), Location.class));\n }\n \n callback.notifyCompleted(locations.toArray(new Location[locations.size()]));\n } catch (Exception ex) {\n callback.notifyError(ex);\n Log.e(TAG, \"Error getting access token\", ex);\n }\n \n }\n }.start();\n }", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "@ApiModelProperty(value = \"A list of places available to the user (for multimedia only users). Effect: The list is written to the current CfgPerson's \\\"htcc\\\" annex. e.g. CfgPerson/userProperties/htcc/place = p1, p2, p3 \")\n public List<String> getPlaceNames() {\n return placeNames;\n }", "private void getPlace(String _id) {\n this.binding.main.setVisibility(View.GONE);\n this.binding.loading.setVisibility(View.VISIBLE);\n\n ParseQuery<Place> query = ParseQuery.getQuery(Place.class);\n query.whereEqualTo(Place.KEY_OBJECT_ID, _id);\n query.include(Place.KEY_CATEGORY);\n query.include(Place.KEY_USER);\n query.getFirstInBackground(new GetCallback<Place>() {\n @Override\n public void done(Place object, ParseException e) {\n if(e == null) {\n place = object;\n bindInformation();\n enterReveal();\n } else {\n Toast.makeText(PlaceDetailActivity.this, \"Place not found\", Toast.LENGTH_LONG).show();\n finish();\n }\n }\n });\n\n // Set up elements visibility\n binding.fabCall.setVisibility(View.INVISIBLE);\n binding.fabLike.setVisibility(View.INVISIBLE);\n binding.main.setVisibility(View.VISIBLE);\n binding.loading.setVisibility(View.GONE);\n }", "public List<String> getPlaces() {\n\t\treturn places;\n\t}", "public void getNearByPlaces(Location location, String searchQuery, boolean type){\n /**\n * If subscription is already active, then Un subscribe it.\n */\n if(nbpListSubscription != null && !nbpListSubscription.isUnsubscribed())\n nbpListSubscription.unsubscribe();\n\n nbpListSubscription = Observable.concat(\n fetchNearByPlaceFromRealm(),\n fetchNearByPlaceFromServer(location, searchQuery, type))\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n /**\n * TakeFirst will emit only when the condition is satisfied.\n * In this case, emit item from the source observable only when\n * the list is not null or when it has at least one element.\n */\n .takeFirst(new Func1<NearByPlaces, Boolean>() {\n @Override\n public Boolean call(NearByPlaces nearByPlaces) {\n return (nearByPlaces != null);\n }\n }).subscribe(new Action1<NearByPlaces>() {\n @Override\n public void call(NearByPlaces nearByPlaces) {\n NearByPlacesDS.this.nbpListPublishSubject.onNext(nearByPlaces);\n }\n },new Action1<Throwable>() {\n @Override\n public void call(Throwable error) {\n NearByPlacesDS.this.nbpListPublishSubject.onError(error);\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n for(int i=0;i<list.size();i++){\n LatLng pos = new LatLng(list.get(i).getLatitude(),list.get(i).getLongitude());\n mMap.addMarker(new MarkerOptions().position(pos).title(list.get(i).getTitle()).snippet(list.get(i).getDescription()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pos));\n }\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(final LatLng latLng) {\n final AlertDialog.Builder mBuilder = new AlertDialog.Builder(MapsActivity.this);\n final View mView =getLayoutInflater().inflate(R.layout.dialog_place,null);\n final EditText location_name =mView.findViewById(R.id.dialog_name);\n final EditText location_description = mView.findViewById(R.id.dialog_description);\n final String loc = location_name.getText().toString();\n final String desc = location_description.getText().toString();\n Button yes = mView.findViewById(R.id.yes);\n Button no = mView.findViewById(R.id.no);\n\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Sydney\").snippet(\"sdsdwdw\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n no.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.cancel();\n }\n });\n yes.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mMap.addMarker(new MarkerOptions().position(latLng).title(loc).snippet(desc));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n Places places = new Places(location_name.getText().toString(),location_description.getText().toString(),latLng.latitude,latLng.longitude);\n //list.add(0,new Places(location_name.getText().toString(),location_description.getText().toString(),latLng.latitude,latLng.longitude));\n myDB.insertNote(places);\n list = myDB.getNotes();\n customAdapter.setContents(list);\n dialog.cancel();\n }\n });\n mBuilder.setView(mView);\n dialog = mBuilder.create();\n dialog.show();\n }\n });\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n LatLng pos = new LatLng(list.get(position).getLatitude(),list.get(position).getLongitude());\n map_layout.setVisibility(View.VISIBLE);\n list_layout.setVisibility(View.GONE);\n //map.moveCamera(CameraUpdateFactory.newLatLng(pos));\n mMap.animateCamera(CameraUpdateFactory.newLatLng(pos));\n }\n });\n }", "LocationsClient getLocations();", "Place getPlace();", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setOnMapLongClickListener(this);\n\n// if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n// return;\n// } //generated automatically by bool setMyLocationEnabled()\n// mMap.setMyLocationEnabled(true);\n\n Intent intent = getIntent();\n int id = intent.getIntExtra(\"placeID\", 0);\n if (id == 0) {\n //zoom in on user location\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n locationListener = new LocationListener() {\n @Override\n public void onLocationChanged(Location location) {\n locateOnMap(location, \"Here you are!\");\n if (ActivityCompat.checkSelfPermission(MapsActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(MapsActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n } //generated automatically by bool setMyLocationEnabled()\n mMap.setMyLocationEnabled(true);\n }\n\n @Override\n public void onStatusChanged(String provider, int status, Bundle extras) {\n\n }\n\n @Override\n public void onProviderEnabled(String provider) {\n\n }\n\n @Override\n public void onProviderDisabled(String provider) {\n\n }\n };\n if (ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 5, locationListener);\n Location lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n locateOnMap(lastKnownLocation, \"Here you are!\");\n }\n }\n\n else {\n Log.i(\"Hello\", \"Searching place!\");\n LatLng xy = MainActivity.coordinates.get(id);\n Location mem_place = new Location(LocationManager.GPS_PROVIDER);\n mem_place.setLatitude(xy.latitude);\n mem_place.setLongitude(xy.longitude);\n\n locateOnMap(mem_place, MainActivity.places.get(id));\n }\n\n }", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "List<Place> findUnboundLocationPlaceholders();", "private void displayLocation() {\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (mLastLocation != null) {\n double latitude = mLastLocation.getLatitude();\n double longitude = mLastLocation.getLongitude();\n\n\n String add = getAddressString(latitude, longitude);\n\n //Check in\n student_checkin chkIn = new student_checkin(getActivity(), sessionId, \"Lat: \" + latitude + \" Long: \" + longitude);\n chkIn.execute();\n lblLocation.setText(latitude + \", \" + longitude);\n cords.setText(add);\n\n\n\n } else {\n\n lblLocation\n .setText(\"(Couldn't get the location. Make sure location is enabled on the device)\");\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMyLocationEnabled(true);\n // Get LocationManager object from System Service LOCATION_SERVICE\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n\n // Create a criteria object to retrieve provider\n Criteria criteria = new Criteria();\n\n // Get the name of the best provider\n String provider = locationManager.getBestProvider(criteria, true);\n\n // Get Current Location\n if (this.checkCallingOrSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n Location myLocation = locationManager.getLastKnownLocation(provider);\n // set map type\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n // Get latitude of the current location\n double latitude = myLocation.getLatitude();\n\n // Get longitude of the current location\n double longitude = myLocation.getLongitude();\n\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(latitude, longitude);\n\n // Show the current location in Google Map\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Zoom in the Google Map\n mMap.animateCamera(CameraUpdateFactory.zoomTo(14));\n\n for (int i = restoList.size(); i >= 1; i--) {\n Restaurant current = restoList.get(i-1);\n LatLng curPos = new LatLng(current.getLatitude(),current.getLongitude());\n mMap.addMarker(new MarkerOptions().position(curPos).title(current.getName()));\n }\n\n } else {\n //TODO this stuff here\n }\n\n }", "private void zoomToLocationSearchResult(List<Place> places) {\n\n if(places.size()>1)\n {\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for(Place place:places)\n {\n LatLng latLng = new LatLng(Double.parseDouble(place.getLat()), Double.parseDouble(place.getLng()));\n builder.include(latLng);\n }\n LatLngBounds bounds = builder.build();\n\n // note need to set device screen size if not the application will crash before google map is layed out\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngBounds(bounds,deviceWidth,deviceHeight,0);\n googleMap.animateCamera(cameraUpdate);\n }\n else if (places.size()==1)\n {\n LatLng latLng = new LatLng(Double.parseDouble(places.get(0).getLat()),Double.parseDouble(places.get(0).getLng()));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 18);\n googleMap.animateCamera(cameraUpdate);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LatLng sydney = new LatLng(40.362552, -94.767392);\n\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Joseph Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.362552,-94.767392), 12.0f));\n\n LatLng publicUser1 = new LatLng(40.332692, -94.870458);\n mMap.addMarker(new MarkerOptions().position(publicUser1).title(\"David Location\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.332692,-94.870458), 12.0f));\n\n LatLng publicUser2 = new LatLng(40.350650, -94.886080);\n mMap.addMarker(new MarkerOptions().position(publicUser2).title(\"Alex Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.350650,-94.886080), 12.0f));\n\n LatLng publicUser3 = new LatLng(40.357818, -94.890868);\n mMap.addMarker(new MarkerOptions().position(publicUser3).title(\"Johnson Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.357818,-94.890868), 12.0f));\n\n LatLng publicUser4 = new LatLng(40.348272, -94.871527);\n mMap.addMarker(new MarkerOptions().position(publicUser4).title(\"Mike Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.348272,-94.871527), 12.0f));\n }", "private void performPlaceDetailSearch(String placeId)\n {\n GenerateGoogleMapApiUrl urlGenerator = new GenerateGoogleMapApiUrl();\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(placeId,GenerateGoogleMapApiUrl.PLACE_DETAIL,mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n final JsonObjectRequest placeDetailReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n // Parsing json\n //for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = result.getJSONObject(\"result\");\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"price_level\"))\n {\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n }\n if(!obj.isNull(\"international_phone_number\"))\n {\n newPlace.setPhone_number(obj.getString(\"international_phone_number\"));\n }\n if(!obj.isNull(\"formatted_address\"))\n {\n newPlace.setAddress(obj.getString(\"formatted_address\"));\n }\n if(!obj.isNull(\"website\"))\n {\n newPlace.setWebsite(obj.getString(\"website\"));\n }\n\n\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n\n\n\n newPlacesList.add(newPlace);\n\n //currentPlaceDetail = newPlace; // set currentPlaceDetail\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceDetail = newPlacesList;\n generateWorld(mWorld,mPlaceDetail,viewSetting,true);//rerender\n zoomToLocationSearchResult(newPlacesList);\n\n if(currentDisplayMode==DISPLAY_PLACE_LIST)\n {\n placeListBottomSheetBehavior.setHideable(true);\n placeListBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_DETAIL;\n\n\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n extendButton.setVisibility(View.VISIBLE);\n //region for putting the result into place details\n\n placeNameTextView.setText(newPlacesList.get(0).getName()); // set place name\n ratingBar.setRating(newPlacesList.get(0).getRating()); // set Rating\n\n if(!newPlacesList.get(0).getPrice_level().equals(\"\"))\n {\n String priceString=\"\";\n int price = Integer.parseInt(newPlacesList.get(0).getPrice_level()); // set price\n for(int i=0;i<=price;i++)\n {\n priceString = priceString+\"£\";\n }\n priceTextView.setText(priceString);\n /*priceTextView.requestLayout();\n priceTextView.invalidate();*/\n }\n else\n {\n priceTextView.setText(\"\");\n }\n\n if(!newPlacesList.get(0).getPhone_number().equals(\"\"))\n {\n\n phoneTextView.setText(newPlacesList.get(0).getPhone_number()); // set phone number\n /*phoneTextView.requestLayout();\n phoneTextView.invalidate();*/\n phone_row.setVisibility(View.VISIBLE);\n }\n else\n {\n phone_row.setVisibility(View.GONE);\n }\n\n if(!newPlacesList.get(0).getAddress().equals(\"\"))\n {\n\n addressTextView.setText(newPlacesList.get(0).getAddress()); // set address\n /*addressTextView.requestLayout();\n addressTextView.invalidate();*/\n address_row.setVisibility(View.VISIBLE);\n\n }\n else\n {\n phone_row.setVisibility(View.GONE);\n }\n\n if(!newPlacesList.get(0).getWebsite().equals(\"\"))\n {\n websiteTextView.setText(newPlacesList.get(0).getWebsite()); // set website\n /*websiteTextView.requestLayout();\n websiteTextView.invalidate();*/\n website_row.setVisibility(View.VISIBLE);\n\n }\n else\n {\n website_row.setVisibility(View.GONE);\n }\n //endregion\n bottomSheetCOntentLayout.requestLayout();\n bottomSheetCOntentLayout.invalidate();\n\n layoutUpdater.wrapContentAgain(bottomSheetCOntentLayout,true);\n imgPlaceDetail.requestLayout();\n imgPlaceDetail.invalidate();\n placePhotosTask(newPlacesList.get(0).getPlace_id());\n //bottomSheetPlaceDetails.requestLayout();\n\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(placeDetailReq);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n\n if (ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n Location currentLocation = (Location) task.getResult();\n //CameraUpdateFactory.newLatLngZoom(\n LatLng check = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(check,DEFAULT_ZOOM));\n\n } else {\n Toast.makeText(MapsActivity2.this, \"unable to get current location\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n Toast.makeText(MapsActivity2.this,\"Getting Restaurants\",Toast.LENGTH_LONG).show();\n mMap.setMyLocationEnabled(true);\n }\n else{\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\n protected ArrayList<PlaceNearby> doInBackground(String... jsonData) {\n ArrayList<PlaceNearby> places = null;\n PlaceJSONParser placeJsonParser = new PlaceJSONParser();\n\n try {\n jObject = new JSONObject(jsonData[0]);\n\n /** Getting the parsed data as a List construct **/\n places = placeJsonParser.parse(jObject);\n\n } catch (Exception e) {\n Log.d(\"Exception\", e.toString());\n }\n return places;\n }", "public final native PlaceResult getPlace() /*-{\n return this.getPlace();\n }-*/;", "@Override\r\n\tpublic List<Place> getFavoritePlaces(String userId) {\n\t\tif(conn == null) {\r\n\t\t\treturn new ArrayList<>();\r\n\t\t}\r\n\r\n\t\tList<Place> favoritePlaces = new ArrayList<>();\r\n\t\tList<String> placeIds = getFavoritePlaceIds(userId);\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM places WHERE place_id = ?\";\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\r\n\t\t\tfor(String placeId : placeIds) {\r\n\t\t\t\tps.setString(1, placeId);\r\n\t\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t\tPlaceBuilder builder = new PlaceBuilder();\r\n\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\tbuilder.setPlaceId(rs.getString(\"place_id\"));\r\n\t\t\t\t\tbuilder.setName(rs.getString(\"name\"));\r\n\t\t\t\t\tbuilder.setRating(rs.getDouble(\"Rating\"));\r\n\t\t\t\t\tbuilder.setAddress(rs.getString(\"address\"));\r\n\t\t\t\t\tbuilder.setIcon(rs.getString(\"icon\"));\r\n\t\t\t\t\tbuilder.setLat(rs.getDouble(\"latitude\"));\r\n\t\t\t\t\tbuilder.setLon(rs.getDouble(\"longitude\"));\r\n\t\t\t\t\tbuilder.setTypes(getTypes(rs.getString(\"place_id\")));\r\n\t\t\t\t\tbuilder.setPhotos(getPhotos(rs.getString(\"place_id\")));\r\n\t\t\t\t\tbuilder.setCity(rs.getString(\"city\"));\r\n\r\n\t\t\t\t\tfavoritePlaces.add(builder.build());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn favoritePlaces;\r\n\t}", "private void openPreferredLocationMap()\n\t{\n\n\t\tif (_forecastAdapter != null)\n\t\t{\n\t\t\tCursor cursor = _forecastAdapter.getCursor();\n\n\t\t\tif (cursor != null)\n\t\t\t{\n\t\t\t\tcursor.moveToPosition(0);\n\n\t\t\t\tString posLat = cursor.getString(COL_COORD_LAT);\n\t\t\t\tString posLong = cursor.getString(COL_COORD_LONG);\n\n\t\t\t\tUri geoLocation = Uri.parse(\"geo:\" + posLat + \",\" + posLong);\n\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tintent.setData(geoLocation);\n\n\t\t\t\tif (intent.resolveActivity(getActivity().getPackageManager()) != null)\n\t\t\t\t{\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tTraceUtil.logD(CLASS_NAME, \"openPreferredLocationMap\",\n\t\t\t\t\t\t\t\"Couldn't call \" + geoLocation.toString() +\n\t\t\t\t\t\t\t\t\t\", no receiving apps installed!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onPlaceSelected(Place place) {\n latLng = place.getLatLng();\n locationName = place.getName().toString();\n locationAddress = place.getAddress().toString();\n Log.i(TAG, \"Location:latitude: \" + place.getLatLng().latitude);\n Log.i(TAG, \"Location:Address: \" + place.getAddress());\n Log.i(TAG, \"Location:Web: \" + place.getWebsiteUri());\n Log.i(TAG, \"Location:Place: \" + place.getName());\n mMap.addMarker(new MarkerOptions().position(latLng).title(locationName).snippet(locationAddress)).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "Map<UUID, Optional<Location>> getAllCurrentLocations();", "private void loadMap() {\n mEditSearch.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\n if (count == 0 || s.toString().trim().length() == 0) {\n locationFound = false;\n resetSearchAheadList();\n resetDoctorsList();\n }\n\n if (!locationFound && s.length() > 2) {\n searchQuery(mEditSearch.getText().toString());\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n //gets the asynchronous map\n mMapView.getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(MapboxMap mapboxMap) {\n mMapboxMap = mapboxMap;\n mMapView.setStreetMode();\n\n //set a on map click listener to hide the\n mMapboxMap.addOnMapClickListener(new MapboxMap.OnMapClickListener() {\n @Override\n public void onMapClick(@NonNull com.mapbox.mapboxsdk.geometry.LatLng point) {\n if (locationFound && mListViewDoctors.getVisibility() == View.GONE) {\n mListViewSearch.setVisibility(View.VISIBLE);\n mListViewDoctors.setVisibility(View.VISIBLE);\n } else if (locationFound) {\n mListViewSearch.setVisibility(View.GONE);\n mListViewDoctors.setVisibility(View.GONE);\n }\n }\n });\n }\n });\n\n //create and set on click listener that will move the map position to the selected address marker\n mListViewSearch.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n TextView displayAddress = view.findViewById(R.id.text_result_address);\n TextView latitude = view.findViewById(R.id.hidden_location_lat);\n TextView longitude = view.findViewById(R.id.hidden_location_long);\n\n //hide keyboard\n hideKeyboard(mEditSearch);\n\n selectedLat = latitude.getText().toString();\n selectedLong = longitude.getText().toString();\n locationFound = true;\n\n mEditSearch.setText(displayAddress.getText().toString());\n mEditSearch.setSelection(displayAddress.getText().length());\n\n resetSearchAheadList();\n mMapboxMap.clear();\n mMapboxMap.setCameraPosition(new CameraPosition.Builder()\n .target(new com.mapbox.mapboxsdk.geometry.LatLng(Double.parseDouble(selectedLat) - 0.08, Double.parseDouble(selectedLong))) // Sets the new camera position\n .zoom(10)\n .tilt(20)\n .build());\n addMarker(mMapboxMap);\n //make api call\n distanceMatrixNetworkCall();\n }\n });\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public void onSuccess(FetchPlaceResponse task) {\n\n\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getName());\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getId());\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getAddress());\n\n// getValuesFromCityID(task.getPlace().getId());\n// cityGoogleId = task.getPlace().getId();\n\n\n placeId = null;\n\n// final Place place = task.getPlace();\n\n try{\n mPlace = new PlaceInfo();\n mPlace.setName( task.getPlace().getName().toString());\n// Log.d(TAG, \"onResult: name: \" + place.getName());\n placeName = task.getPlace().getName().toString();\n mPlace.setAddress( task.getPlace().getAddress().toString());\n placeAddress = task.getPlace().getAddress().toString();\n// Log.d(TAG, \"onResult: address: \" + place.getAddress());\n mPlace.setAttributions( task.getPlace().getAttributions().toString());\n//// Log.d(TAG, \"onResult: attributions: \" + place.getAttributions());\n mPlace.setId( task.getPlace().getId());\n placeId = task.getPlace().getId();\n// Log.d(TAG, \"onResult: id:\" + place.getId());\n mPlace.setLatlng( task.getPlace().getLatLng());\n// Log.d(TAG, \"onResult: latlng: \" + place.getLatLng());\n// mPlace.setRating( task.getPlace().getRating());\n// Log.d(TAG, \"onResult: rating: \" + place.getRating());\n mPlace.setPhoneNumber( task.getPlace().getPhoneNumber().toString());\n// Log.d(TAG, \"onResult: phone number: \" + place.getPhoneNumber());\n mPlace.setWebsiteUri( task.getPlace().getWebsiteUri());\n// Log.d(TAG, \"onResult: website uri: \" + place.getWebsiteUri());\n//\n// Log.d(TAG, \"onResult: place: \" + mPlace.toString());\n }catch (NullPointerException e){\n Log.e(TAG, \"onResult: NullPointerException: \" + e.getMessage() );\n }\n\n\n mPlace.setId(task.getPlace().getId());\n moveCamera(task.getPlace().getLatLng(), DEFAULT_ZOOM, task.getPlace().getName());\n\n// places.release();\n\n\n }", "void getPlacements() {\n previousTotalPlacement = 0;\n loadingPlacement = true;\n page_to_call_placement = 1;\n isFirstRunPlacement = true;\n isLastPageLoadedPlacement = false;\n lastPageFlagPlacement = 0;\n Log.d(\"PlacmentTesting\", \"previousTotalPlacement: \" + previousTotalPlacement);\n Log.d(\"PlacmentTesting\", \"page_to_call_placement: \" + page_to_call_placement);\n Log.d(\"PlacmentTesting\", \"lastPageFlagPlacement: \" + lastPageFlagPlacement);\n\n GetPlacementsByAdminMetadata();\n\n }", "public ArrayList<NewLocation> getMyPlaces_ra() {\n return myPlaces_ra;\n }", "@Override\r\n public void fetchPlaceData(MenuItem item) {\r\n if (mGoogleMap != null && mCurrentLocation != null) {\r\n if (mApiClass == null) {\r\n mApiClass = new ApiClass(this);\r\n }\r\n if (Utils.checkConnectivity(this) && mPlaceType != null) {\r\n showLoading();\r\n clearMarkers();\r\n mPreviousPlaceType = mPlaceType;\r\n Map map = new HashMap<String, String>();\r\n map.put(Constants.KEY, getString(R.string.google_api_key));\r\n map.put(Constants.TYPE, mPlaceType);\r\n map.put(Constants.LOCATION, mCurrentLocation.getLatitude() + \",\" + mCurrentLocation.getLongitude());\r\n map.put(Constants.RADIUS, String.valueOf(mRadius));\r\n mApiClass.getPlace(map);\r\n } else {\r\n mPreviousPlaceType = \"\";\r\n if (mPlaceType == null) {\r\n Utils.showToast(this, \"Please select place from drawer\");\r\n return;\r\n }\r\n if(item!=null){\r\n item.setChecked(false);\r\n }\r\n Utils.showToast(this, getString(R.string.network_error));\r\n }\r\n }\r\n else{\r\n if(item!=null){\r\n item.setChecked(false);\r\n }\r\n\r\n }\r\n }", "private void showCurrentLocation() {\n if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationRequest locationRequest = LocationRequest.create();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(5000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n LocationCallback mLocationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n if (locationResult == null) {\n return;\n }\n for (Location location : locationResult.getLocations()) {\n if (location != null) {\n LatLng current = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(current, 18));\n if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n\n }\n }\n }\n };\n\n LocationServices.getFusedLocationProviderClient(this).requestLocationUpdates(locationRequest, mLocationCallback, null);\n\n } else { // Show default location\n requestLocationPermission();\n\n LatLng current = new LatLng(34.180972800611016, -117.32337489724159);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(current, 18));\n }\n }", "@Override\r\n\tpublic List<Place> searchPlaces(String placeName, String city) {\n\t\tGoogleMapsSearchPlaceAPI googleMapsSearchPlaceAPI = new GoogleMapsSearchPlaceAPI();\r\n\t\tList<Place> places = googleMapsSearchPlaceAPI.search(placeName, city);\r\n\r\n\t\tfor (Place place : places) {\r\n\t\t\tsavePlace(place);\r\n\t\t}\r\n\r\n\t\treturn places;\r\n\t}", "private void searchForLocation() {\n foundLocation = false;\n FusedLocationProviderClient mFusedLocationProviderClient = LocationServices\n .getFusedLocationProviderClient(getActivity());\n //Ignore the red line - we check for permissions before this function is called\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n Task<Location> lastLocation = mFusedLocationProviderClient.getLastLocation();\n lastLocation.addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n Location location = task.getResult();\n if (location != null) {\n LatLng currentLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(currentLatLng,\n DEFAULT_ZOOM);\n googleMap.moveCamera(update);\n foundLocation = true;\n }\n }\n }\n });\n }", "public Observable<NearByPlaces> fetchNearByPlaceFromRealm() {\n return Observable.empty();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"TEST\", \"MAP READY\");\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n LatLng curLocation = new LatLng(latitude,longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(curLocation,15.0f);\n setPin(latitude,longitude, null);\n mMap.moveCamera(cameraUpdate);\n for(int i = 0; i < restaurantList.size(); i++){\n double lat = restaurantList.get(i).getLatitude();\n double lng = restaurantList.get(i).getLongitude();\n setPin(lat, lng, restaurantList.get(i));\n }\n //Check we have the users permission to access their location\n // if we dont have it, we have to request it\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n\n } else {\n //we dont have permission, so we have to ask for it\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_LOCATION_REQUEST_CODE);\n //run asychronously.. show an alert dialog\n //user can choose allow or deny\n }\n }", "public Iterable<Place> places(){\n return places;\n }", "@Override\n\tprotected Cursor loadCursor() {\n\t\treturn DataManager.get().queryLocations();\n\t}", "public List<FavoriteLocation> queryAllLocations() {\n\t\tArrayList<FavoriteLocation> fls = new ArrayList<FavoriteLocation>(); \n\t\tCursor c = queryTheCursorLocation(); \n\t\twhile(c.moveToNext()){\n\t\t\tFavoriteLocation fl = new FavoriteLocation();\n\t\t\tfl._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tfl.description = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_DES));\n\t\t\tfl.latitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LAT));\n\t\t\tfl.longitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LON));\n\t\t\tfl.street_info = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_STREET));\n\t\t\tfl.type = c.getInt(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_CATEGORY));\n\t\t\tbyte[] image_byte = c.getBlob(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_PIC)); \n\t\t\tfl.image = BitmapArrayConverter.convertByteArrayToBitmap(image_byte);\n\t\t\tfl.title = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_TITLE));\n\t\t\tfls.add(fl);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn fls;\n\t}", "private void loadMarkers(){\n if (partnerLocs){\n latLngs = dataStorage.getPartnerLatLngList();\n locationNames = dataStorage.getPartnerLocNameList();\n }else{\n String favLatLngFromJson = dataStorage.getLatLngList();\n String favNamesFromJson = dataStorage.getLocNameList();\n\n if(favNamesFromJson != null && favLatLngFromJson != null){\n String[] favNames = new Gson().fromJson(favNamesFromJson, String[].class);\n LatLng[] favLatLng = new Gson().fromJson(favLatLngFromJson, LatLng[].class);\n\n //Convert json to the actual ArrayLists\n latLngs = Arrays.asList(favLatLng);\n latLngs = new ArrayList<LatLng>(latLngs);\n locationNames = Arrays.asList(favNames);\n locationNames = new ArrayList<String>(locationNames);\n }\n }\n\n\n\n\n //Add the markers back onto the map\n for (int i = 0; i < latLngs.size(); i++) {\n LatLng point = latLngs.get(i);\n String name = locationNames.get(i);\n Marker addedMarker = mMap.addMarker(new MarkerOptions().position(new LatLng\n (point.latitude, point.longitude)).title(name));\n if(partnerLocs){\n addedMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n\n if(name.equals(locClicked)){\n markerClicked = addedMarker;\n }\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.list_layout, container, false);\n\n //the array list that will be presented on the screen\n final ArrayList<Place> placesToVisit = new ArrayList<Place>();\n placesToVisit.add(new Place(\"Yunque Rain Forest\",\"Lagerst Rainforest in the Caribbean\",\n R.drawable.yunque9, \"geo:18.352236, -65.800307\"));\n placesToVisit.add(new Place(\"Bioluminicent Lagoon\",\"One of the 5 bioluminescent places in the world.\",\n R.drawable.bioluminesent_bay, \"geo:18.376533, -65.623541\"));\n placesToVisit.add(new Place(\"Dry Forest\",\"Small forest filled with succulent plant and trees.\",\n R.drawable.bosque_seco, \"geo:17.983777, -66.869323\"));\n placesToVisit.add(new Place(\"Flamenco Beach\",\"The 3rd most beutifull beach in the world,\",\n R.drawable.flamenco_beach, \"geo:18.328684, -65.318981\"));\n placesToVisit.add(new Place(\"Window Cave\",\"Scenic natural cave on a limestone cliff\",\n R.drawable.cuevaentana,\"geo:18.374817, -66.692269\"));\n placesToVisit.add(new Place(\"Tamarindo Beach\",\"Crystal clear water beach great for snorkeling.\",\n R.drawable.tamarindo,\"geo:18.318457, -65.317815\"));\n\n\n\n PlaceAdapter adapter = new PlaceAdapter(getActivity(), placesToVisit, R.color.secret_color);\n ListView listView = (ListView) rootView.findViewById(R.id.list);\n\n listView.setAdapter(adapter);\n //this method will receive the position of the item the user selected and open maps showing the coordinates from the place\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Place myPlace = placesToVisit.get(i);\n Uri getPlaceLocation = Uri.parse(myPlace.getLocation());\n Intent locationIntent = new Intent(Intent.ACTION_VIEW, getPlaceLocation);\n startActivity(locationIntent);\n }\n\n });\n\n return rootView;\n }", "@Override\n\tpublic void onMapReady(GoogleMap map) {\n\t\t// TODO Auto-generated method stub\n\t\thashmap = new HashMap<Marker, Integer>();\n\t\tdouble latitude, longitude;\n\t\tmap.setMyLocationEnabled(true);\n\t\tLatLng myCoordinates = new LatLng(42.733883, 25.48583);\n\t\tCameraUpdate location = CameraUpdateFactory.newLatLngZoom(\n\t\t\t\tmyCoordinates, 6);\n\t\tmap.animateCamera(location);\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tlatitude = Double.parseDouble(list.get(i).getmLatitude());\n\t\t\tlongitude = Double.parseDouble(list.get(i).getmLongitude());\n\t\t\tMarker marker = map.addMarker(new MarkerOptions().title(\n\t\t\t\t\tlist.get(i).getmName()).position(\n\t\t\t\t\tnew LatLng(latitude, longitude)));\n\t\t\thashmap.put(marker, list.get(i).getmId());\n\t\t}\n\n\t\t// When the user click on marker information will be open new activity\n\t\tmap.setOnInfoWindowClickListener(new OnInfoWindowClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tint id = hashmap.get(marker)-1;\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDataBase.Object object = new Object();\n\t\t\t\tobject = list.get(id);\n\n\t\t\t\tbundle.putSerializable(\"ob\", object);\n\n\t\t\t\tIntent intent = new Intent(getActivity(), Places.class);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\n\t}", "private List<Restaurant> getNearRestaurants() {\n\t\tLog.v(LOG_TAG, \"Getting near restaurants offline by the last known position \");\n\t\tList<Restaurant> restaurantsList = new ArrayList<Restaurant>();\n\t\tif (lastPositionKnown == null) {\n\t\t\tLog.e(LOG_TAG, \"Error trying to get the list of near restaurants when the user's position is null\");\n\t\t\treturn restaurantsList;\n\t\t}\n\t\t\n\t\tLog.v(LOG_TAG, \"My position is \" + lastPositionKnown.latitude + \" ,\" + lastPositionKnown.longitude);\n\n\t\tLocation myLocation = new Location(\"\");\n\t\tmyLocation.setLatitude(lastPositionKnown.latitude);\n\t\tmyLocation.setLongitude(lastPositionKnown.longitude);\n\n\t\tSet<String> ids = restaurants.keySet();\n\t\tfor (String id: ids) {\n\t\t\tRestaurant restaurant = restaurants.get(id);\n\t\t\tLatLng restaurantPosition = restaurant.getPosition();\n\t\t\tLocation restaurantLocation = new Location(\"\");\n\t\t\t\n\t\t\trestaurantLocation.setLatitude(restaurantPosition.latitude);\n\t\t\trestaurantLocation.setLongitude(restaurantPosition.longitude);\n\t\t\t\n\t\t\tint distance = (int)restaurantLocation.distanceTo(myLocation);\n\t\t\tLog.v(LOG_TAG, \"The distance to my location is \" + distance + \" \" + restaurant.getName());\n\t\t\tif (distance <= DEFAULT_RANGE ) {\n\t\t\t\trestaurantsList.add(restaurant);\n\t\t\t}\n\t\t}\n\n\t\treturn restaurantsList;\n\t}", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "@Override\n public void onMapReady( GoogleMap googleMap ) {\n this.googleMap = googleMap;\n SharedPreferences sp = Objects.requireNonNull( getActivity() )\n .getSharedPreferences( Weather_Preference, 0 );\n String lat = sp.getString( MAP_LAT_KEY, \"47.24515\" ); // val 0 if none\n String lon = sp.getString( MAP_LON_KEY, \"-122.437456\" );\n LatLng CurrentLocation;\n\n try {\n /*Attempt to retrieve shared preferences*/\n assert lat != null;\n assert lon != null;\n if ( !lat.equals( \"47.24515\" ) && !lon.equals( \"-122.437456\" ) ) {\n /*If the user had previously set the location preference, display a circle and pin correspondingly*/\n CurrentLocation = new LatLng( Float.valueOf( lat), Float.valueOf( lon ));\n mCircle = new CircleOptions()\n .center( CurrentLocation )\n .radius( 30000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) );\n currentMarker = new MarkerOptions().position( CurrentLocation ).title( \"Current Location\" );\n } else {\n /*No shared preferences? then get their gps coordinates and display that instead*/\n CurrentLocation = new LatLng( mMaster.getCurrentLat(), mMaster.getCurrentLon() );\n mCircle = new CircleOptions()\n .center( CurrentLocation )\n .radius( 30000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) );\n currentMarker = new MarkerOptions().position( CurrentLocation ).title( \"Current Location\" );\n }\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( CurrentLocation, 5.0f ) );\n googleMap.addCircle( mCircle );\n } catch ( Exception e ) {\n /*If we are unable to find the users current location nor the stored location then set the view\n to an over view of America*/\n CurrentLocation = new LatLng( AMERICA_CENTER_LAT, AMERICA_CENTER_LON );\n Toast.makeText( mMaster, \"Error Retrieving your current location! \" +\n \"\\nCheck your Settings and Notifications\", Toast.LENGTH_LONG ).show();\n currentMarker = new MarkerOptions().position( CurrentLocation ).title( \"Anerica\" );\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( CurrentLocation, 1.0f ) );\n } finally {\n googleMap.setOnMapClickListener( this );\n googleMap.addMarker( currentMarker );\n }\n googleMap.setOnMapClickListener( this );\n }", "public void setPlaces(int places) {\r\n this.places = places;\r\n }", "private void populateView(){\n\n //Display image without blocking, and cache it\n ImageView imageView = (ImageView) findViewById(R.id.activity_location_image);\n Picasso.with(this)\n .load(location.getImageURL()).fit().centerCrop().into(imageView);\n\n //Display description\n TextView description = (TextView) findViewById(R.id.activity_location_description);\n description.setText(location.getDescription());\n\n //Display hours\n TextView hours = (TextView) findViewById(R.id.activity_location_hours);\n hours.setText(location.getStringOpenHours());\n\n //Display google maps, map IF address can be found\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.activity_location_map);\n if (canFindLocationAddress()){\n\n //Set width and height of map\n mapFragment.getView().getLayoutParams().height = getMapHeight();\n mapFragment.getView().offsetLeftAndRight(50);\n mapFragment.getMapAsync(this);\n }\n\n //Hide the map otherwise\n else{\n mapFragment.getView().setVisibility(View.INVISIBLE);\n }\n }", "public void searchPlace(String value)\n\t\t{ \n\t\t Geocoder geoCoder = new Geocoder(getBaseContext(), Locale.getDefault()); \n\t\t try {\n\t\t List<Address> addresses = geoCoder.getFromLocationName(\n\t\t value, 5);\t\t \n\t\t if (addresses.size() > 0) {\n\t\t \t\n\t\t \tdouble latitude= 0.0, longtitude= 0.0;\n\t\t \tGeoPoint p = new GeoPoint(\n\t\t (int) (addresses.get(0).getLatitude() * 1E6), \n\t\t (int) (addresses.get(0).getLongitude() * 1E6));\n\t\t \tlatitude=p.getLatitudeE6()/1E6;\n\t\t\t\t\t\tlongtitude=p.getLongitudeE6()/1E6;\t \n\t\t\t\t\t\tlat = String.valueOf(latitude);\n\t\t\t\t\t\tlongi = String.valueOf(longtitude);\n\t\t\t\t\t\torigin = new LatLng(latitude,longtitude);\n\t\t \tmap.moveCamera( CameraUpdateFactory.newLatLngZoom(origin, (float) 14.0) ); \n\t\t } \n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\n\n\n\t\t \n\n\t\t}", "public ArrayList<LocationDetail> getLocations() throws LocationException;", "@RequestMapping(value = \"/current_location/all\", method = RequestMethod.GET)\n public ResponseEntity<List<CurrentLocation>> getAllFavoriteZones() {\n\n List<CurrentLocation> currentLocationList = currentLocationService.findAllCurrentLocation();\n\n if(currentLocationList.isEmpty()){\n return new ResponseEntity<List<CurrentLocation>>(HttpStatus.NO_CONTENT);\n }\n\n return new ResponseEntity<List<CurrentLocation>>(currentLocationList, HttpStatus.OK);\n }", "private void performPlaceSearch(String userQuery)\n {\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(userQuery,GenerateGoogleMapApiUrl.TEXT_SEARCH, mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n JsonObjectRequest movieReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n JSONArray response = null;\n try {\n response = result.getJSONArray(\"results\");\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n // Parsing json\n for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = response.getJSONObject(i);\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"photos\"))\n newPlace.setPhoto_reference(obj.getJSONArray(\"photos\").getJSONObject(0).getString(\"photo_reference\"));\n\n if(!obj.isNull(\"price_level\"))\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n newPlacesList.add(newPlace);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceListMain = newPlacesList;\n //List<Place> filteredList = filterPlaceResult(mPlaceListMain);\n\n generateWorld(mWorld,mPlaceListMain,viewSetting,true);\n zoomToLocationSearchResult(newPlacesList);\n if(newPlacesList.size()==1)\n {\n performPlaceDetailSearch(newPlacesList.get(0).getPlace_id());\n }\n else if(newPlacesList.size()>1)\n {\n\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n {\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_LIST;\n createPlacesListBottomSheet(newPlacesList);\n }\n\n // set radar renderer to furthestPlace\n radarPlugin.setMaxDistance(furthestPlace+200.0f);\n distanceSeekBar.setProgress((int)(furthestPlace+200));\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(movieReq);\n }", "public void run() {\n\t\t\t\t\t\tString status = nearPlaces.status;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check for all possible status\n\t\t\t\t\t\tif(status.equals(\"OK\")){\n\t\t\t\t\t\t\t// Successfully got places details\n\t\t\t\t\t\t\tif (nearPlaces.results != null) {\n\t\t\t\t\t\t\t\t// loop through each place\n\t\t\t\t\t\t\t\tfor (Place p : nearPlaces.results) {\n\t\t\t\t\t\t\t\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Place reference won't display in listview - it will be hidden\n\t\t\t\t\t\t\t\t\t// Place reference is used to get \"place full details\"\n\t\t\t\t\t\t\t\t\tmap.put(KEY_REFERENCE, p.reference);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Place name\n\t\t\t\t\t\t\t\t\tmap.put(KEY_NAME, p.name);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// adding HashMap to ArrayList\n\t\t\t\t\t\t\t\t\tplacesListItems.add(map);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// list adapter\n\t\t\t\t\t\t\t\tListAdapter adapter = new SimpleAdapter(GetPlace.this, placesListItems,\n\t\t\t\t\t\t R.layout.list_item,\n\t\t\t\t\t\t new String[] { KEY_REFERENCE, KEY_NAME}, new int[] {\n\t\t\t\t\t\t R.id.reference, R.id.name });\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Adding data into listview\n\t\t\t\t\t\t\t\tlv.setAdapter(adapter);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast.makeText(GetPlace.this,\"no values found\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public Cursor getAllLocations()\n\t{\n\t\treturn db.query(DATABASE_TABLE, new String[] {\n\t\t\t\tKEY_DATE,KEY_LAT,KEY_LNG},\n\t\t\t\tnull,null,null,null,null);\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n // Add a marker in Sydney and move the camera\n if (loc != -1 && loc != 0) {\n locationManager.removeUpdates(this);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(MainActivity.locations.get(loc), 10));\n\n mMap.addMarker(new MarkerOptions().position(MainActivity.locations.get(loc)).title(MainActivity.places.get(loc)));\n } else {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationManager.requestLocationUpdates(provider, 400, 1, this);\n\n }\n mMap.setOnMapLongClickListener(this);\n }", "public void printList(ETPlace place) {\n place.getName();\n\n\n }", "static Place getRandomPlace()\r\n\t{\r\n\t\tPlace randomPlace = knownPlaces.get( new Random().nextInt ( knownPlaces.size()));\r\n\t\treturn randomPlace;\r\n\t}", "com.google.ads.googleads.v6.resources.UserLocationView getUserLocationView();", "public static void showPlacesPicker(LatLngBounds bounds)\n {\n Activity activity = PlacesController.getInstance().getMainActivity();\n Context context = activity.getApplicationContext();\n PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();\n builder.setLatLngBounds(bounds); //LatLngBounds.builder().include(point).build()\n try {\n activity.startActivityForResult(builder.build(context), PLACE_PICKER_REQUEST);\n } catch (GooglePlayServicesRepairableException e) {\n e.printStackTrace();\n } catch (GooglePlayServicesNotAvailableException e) {\n e.printStackTrace();\n }\n }", "public PlaceList() {\n\t\tthis.places = new ArrayList<Place>();\n\t}", "public List<String> getAllPlaces(){\n List<String> places = new ArrayList<String>();\n\n // Select place Query\n String selectQuery = \"SELECT place FROM \" + TBL_locations + \";\";\n Log.d(\"1\",\"test\");\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n Log.d(\"2\",\"test\");\n // looping through all rows and adding to list\n if (cursor.moveToFirst())\n {\n Log.d(\"3\",\"test\");\n do {\n places.add(cursor.getString(0));\n Log.d(\"4\",\"test\");\n\n } while (cursor.moveToNext());\n Log.d(\"5\",\"test\");\n }\n else\n {\n Log.d(\"something happened?\",\"test\");\n }\n // closing connection\n cursor.close();\n Log.d(\"6\",\"test\");\n db.close();\n Log.d(\"7\",\"test\");\n Log.d(\"testreturn\", places.toString());\n // returning Places\n return places;\n }", "public abstract List<LocationDto> viewAll();", "public String Get_place() \n {\n\n return place;\n }", "@Override\n protected String doInBackground(String... place) {\n String data = \"\";\n\n // Obtain browser key from https://code.google.com/apis/console\n String key = \"key=AIzaSyCFGvOeMTe7h9ukQYAzMIDBmDs52SnuPb4\";\n\n String input = \"\";\n\n try {\n input = \"input=\" + URLEncoder.encode(place[0], \"utf-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n // place type to be searched\n String types = \"types=geocode\";\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = input + \"&\" + types + \"&\" + sensor + \"&\" + key;\n\n // Output format\n String output = \"json\";\n\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/place/autocomplete/\" + output + \"?\" + parameters;\n\n try {\n // Fetching the data from we service\n data = downloadUrl(url);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "private void showPlaceAutoComplete(int typeLocation) {\n REQUEST_CODE = typeLocation;\n\n // Filter hanya tmpat yg ada di Indonesia\n AutocompleteFilter typeFilter = new AutocompleteFilter.Builder().setCountry(\"ID\").build();\n try {\n // Intent untuk mengirim Implisit Intent\n Intent mIntent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY)\n .setFilter(typeFilter)\n .build(getActivity());\n // jalankan intent impilist\n startActivityForResult(mIntent, REQUEST_CODE);\n } catch (GooglePlayServicesRepairableException e) {\n e.printStackTrace(); // cetak error\n } catch (GooglePlayServicesNotAvailableException e) {\n e.printStackTrace(); // cetak error\n // Display Toast\n Toast.makeText(getContext(), \"Layanan Play Services Tidak Tersedia\", Toast.LENGTH_SHORT).show();\n }\n\n }", "public static void listGeolocations()\n {\n {\n JSONArray listGeolocations = new JSONArray();\n List<User> users = User.findAll();\n for (User user : users)\n {\n listGeolocations.add(Arrays.asList(user.firstName, user.latitude, user.longitude));\n }\n renderJSON(listGeolocations);\n }\n }" ]
[ "0.7803867", "0.77337605", "0.69753635", "0.6559342", "0.6184021", "0.61500907", "0.6089947", "0.60850763", "0.6055276", "0.60520667", "0.60470754", "0.6037825", "0.6036743", "0.59917974", "0.5956302", "0.5949057", "0.5937809", "0.59293234", "0.59282154", "0.5923711", "0.5892153", "0.58863825", "0.58836067", "0.5879946", "0.58635837", "0.5853116", "0.58397895", "0.58286816", "0.5827089", "0.5823708", "0.58186215", "0.58029985", "0.5799848", "0.5783038", "0.5777975", "0.57549775", "0.5742764", "0.5723828", "0.5697486", "0.56901807", "0.5675573", "0.5674367", "0.56705034", "0.5647951", "0.56373066", "0.5627499", "0.56136996", "0.5610775", "0.5606672", "0.55104315", "0.5507303", "0.5498239", "0.54939574", "0.5491607", "0.5481244", "0.54779506", "0.54547113", "0.5452876", "0.5452499", "0.5447686", "0.54418147", "0.5428985", "0.5426442", "0.54202414", "0.5418472", "0.54046804", "0.53992665", "0.53840023", "0.53806317", "0.5378432", "0.53661644", "0.535774", "0.53536224", "0.5350538", "0.5337005", "0.53344184", "0.53187597", "0.5317994", "0.53172094", "0.5310223", "0.53078383", "0.5304034", "0.53025496", "0.5297449", "0.52864677", "0.5282997", "0.52618116", "0.52604175", "0.5260159", "0.52558017", "0.52546763", "0.5252081", "0.5250881", "0.52467126", "0.5245729", "0.52426004", "0.5242567", "0.5239171", "0.5235785", "0.52287877" ]
0.6183314
5
position will give us the index of which place was selected in the array
public void onItemClick(AdapterView parent, View v, int position, long id) { LatLng markerLatLng = mLikelyPlaceLatLngs[position]; String markerSnippet = mLikelyPlaceAddresses[position]; if (mLikelyPlaceAttributions[position] != null) { markerSnippet = markerSnippet + "\n" + mLikelyPlaceAttributions[position]; } // Add a marker for the selected place, with an info window // showing information about that place. mMap.addMarker(new MarkerOptions() .title(mLikelyPlaceNames[position]) .position(markerLatLng) .snippet(markerSnippet)); // Position the map's camera at the location of the marker. mMap.moveCamera(CameraUpdateFactory.newLatLng(markerLatLng)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPosition(int index);", "public int getIndex(int position);", "public int[] get_position()\r\n\t{\r\n\t\treturn this.position;\r\n\t}", "public int getPosition();", "protected int getPositionIndex(int position) {\n return (position - startPosition);\n }", "int getGroupIndex(int position);", "@Override\n public int getPosition() {\n return position;\n }", "@Override\n\tpublic int index(final int position) {\n\t\treturn 0;\n\t}", "public int[] getPosition(){\n return position;\n }", "public Integer getPosition();", "void selectpos()\n {\n \n }", "public int getPos(int index) {\r\n return pos[index];\r\n }", "private int convertSpinnerToValuesIndex(int position)\n {\n int adjustedPosition;\n\n if(mSelectedArrayIndex== -1 && mHasEmptyPlaceholder) {\n adjustedPosition=position-1;\n }\n else if(mSelectedArrayIndex==-1) {\n adjustedPosition=position;\n }\n else {\n if (position == 0) {\n adjustedPosition = mSelectedArrayIndex;\n }\n else if (position <= mSelectedArrayIndex) {\n adjustedPosition = position - 1;\n }\n else //if(position> mSelectedArrayIndex)\n {\n adjustedPosition = position;\n }\n }\n\n return adjustedPosition;\n }", "@Override\n public void setSelectedPosition(int selectedPosition, int savedPosition)\n {\n Log.i(Constant.TAG, \"setSelectedPosition - Selected Position : \" + selectedPosition);\n Log.i(Constant.TAG, \"setSelectedPosition - Saved Position : \" + savedPosition);\n selectedPosArray[savedPosition] = selectedPosition;\n }", "public int getPosition(){\n return -1;\n }", "public int getPosition()\r\n {\r\n return position;\r\n }", "int getPosition();", "public int getPosition()\n\t{\n\t\treturn position;\n\t}", "Object getPosition();", "public int position() {\n return pos;\n }", "public int getPos();", "public int getPos();", "public int getPosition() {\r\n return position;\r\n }", "public int getPosition() {\r\n\t\treturn position;\r\n\t}", "void locate(int pos, int [] ind)\n\t{\n\t\tind[0] = (int) pos / dimy; // x\n\t\tind[1] = pos % dimy; // y\t\n\t}", "public int getPosition() {\n return position;\n }", "public abstract Vector getPosition(Rectangle selectionBox);", "public int getPosition() {\n return position;\n }", "public int getPosition() {\n return position;\n }", "public int getPosition() {\n return position;\n }", "public int getX(){\n return this.position[0];\n }", "public int getSelectedPosition() {\n return mLayoutManager.getSelection();\n }", "int toIndex(Position pos);", "public int[] select(int[] array, int[] position) {\n int L = array.length;\n int R = position.length;\n int[] r_vector = new int[R];\n\n // \"-3\" dient der Fehler-Erkennung\n for (int i = 0; i < R; i++)\n r_vector[i] = -3;\n\n if (L >= R) {\n for (int j = 0; j < R; j++)\n r_vector[j] = array[position[j] - 1];\n }\n return r_vector;\n }", "private void set_position(int pos[])\r\n\t{\r\n\t\tthis.position = pos;\r\n\t}", "public int getPosition(E item) {\n\t\treturn data.indexOf(item);\n\t}", "public int getArrayIndex(){\n return squareIndex * 9 + position;\n }", "private int searchPosition(int num, int index){\n\n\t\tif(getBoxs().get(index).getNumBoxInt() == num){\n return getBoxs().indexOf(getBoxs().get(index));\n\n }else{\n return searchPosition(num, index + 1);\n\n }\n\t\t\t\n\t\t\n\t}", "public int getPositionIndex()\n {\n return positionIndex;\n }", "public final int getPosition() {\n return position;\n }", "public int[] getSlicePosition();", "void locate(int pos, int[] ind) {\r\n\t\tind[0] = (int) pos / (dimx * dimy); // t\r\n\t\tind[1] = (pos % (dimx * dimy)) / dimy; // x\r\n\t\tind[2] = pos % (dimy); // y\r\n\t}", "public final int getPos() { return i; }", "public int getPosition() {\n\treturn (_current);\n }", "public abstract int [] getPressPosition();", "public Integer getPosition()\n {\n return position;\n }", "Position getPosition();", "Position getPosition();", "static int getIndexSelected() {\n return indexSelected;\n }", "int getPosition() {\n\n for (int i = 0; i < numbers.length; i++) {\n\n if (numbers[i] == \"0\") {\n\n Toast.makeText(getApplicationContext(), (CharSequence) (\"Position: \" + new Integer(i).toString()), Toast.LENGTH_SHORT).show();\n return i;\n }\n }\n return 0;\n }", "private void selectPosition(int i, View view) {\n if (i >= 0) {\n this.mAccessibilityMoving = false;\n List<TileQueryHelper.TileInfo> list = this.mTiles;\n int i2 = this.mEditIndex - 1;\n this.mEditIndex = i2;\n list.remove(i2);\n notifyItemRemoved(this.mEditIndex);\n if (i == this.mEditIndex) {\n i--;\n }\n move(this.mAccessibilityFromIndex, i, view);\n notifyDataSetChanged();\n }\n }", "private int getPosition(int row, int col) {\n\t\treturn (side * (row - 1)) + (col - 1);\n\t}", "public long getPosition();", "public int[] getSelectedPosArray()\n {\n return selectedPosArray;\n }", "@Override\n\t\t\tpublic long getItemId(int position) {\n\t\t\t\treturn position;\n\t\t\t}", "public int getX() { return position.x; }", "public java.lang.Integer getPosition() {\n return position;\n }", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\t\tpublic long getItemId(int position){\n\t\t\t\treturn position;\n\t\t\t}", "@Override\n\t\t\tpublic long getItemId(int position){\n\t\t\t\treturn position;\n\t\t\t}", "Pair<Integer, Integer> getPosition();", "public int[][] place(){\r\n\t\treturn coords(pos);\r\n\t}", "@Override\r\n public long getItemId(int position) {\r\n\treturn position;\r\n }", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic long getItemId(int position) {\n\t\treturn position;\r\n\t}" ]
[ "0.74758095", "0.714808", "0.6894332", "0.6846766", "0.6811246", "0.6776964", "0.67157745", "0.66948986", "0.66364634", "0.6632233", "0.66302097", "0.6621456", "0.65773636", "0.65740085", "0.65597147", "0.6523137", "0.65159893", "0.64906466", "0.6485725", "0.64761984", "0.64611536", "0.64611536", "0.6434979", "0.6424416", "0.6383419", "0.6372615", "0.636668", "0.63614184", "0.63614184", "0.63614184", "0.63319117", "0.6299101", "0.6291577", "0.62869984", "0.627523", "0.62672645", "0.6263546", "0.6255946", "0.62557006", "0.6255266", "0.6240324", "0.6224183", "0.6167824", "0.61327446", "0.6109833", "0.61002773", "0.6091336", "0.6091336", "0.60785717", "0.6073729", "0.60640943", "0.606007", "0.60570323", "0.6054092", "0.605381", "0.6052532", "0.6046701", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039956", "0.6039197", "0.6039197", "0.60380965", "0.6033609", "0.6025961", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344", "0.6019344" ]
0.0
-1
Display a list allowing the user to select a place from a list of likely places.
private void fillPlacesList() { // Set up an ArrayAdapter to convert likely places into TextViews to populate the ListView ArrayAdapter<String> placesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mLikelyPlaceNames); lstPlaces.setAdapter(placesAdapter); lstPlaces.setOnItemClickListener(listClickedHandler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void displayFragmentPlaceTypeList(Location location);", "public void printList(ETPlace place) {\n place.getName();\n\n\n }", "private void openPlacesDialog() {\n // Ask the user to choose the place where they are now.\n DialogInterface.OnClickListener listener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "@Override\n public void onPlaceSelected(Place place) {\n\n place_str[0] = place.getName() + \",\" + place.getId();\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "private void setListPlaces(View view, String places) {\n String[] name = new String[]{\"\"};\n String[] id = new String[]{\"\"};\n String[] desc = new String[]{\"\"};\n switch (places){\n case \"Family Walk\" :\n name = new String[]{data.get(4).getName(), data.get(5).getName(),data.get(6).getName()};\n id = new String[]{String.valueOf(data.get(4).getID()), String.valueOf(data.get(5).getID()), String.valueOf(data.get(6).getID())};\n desc = new String[]{data.get(4).getDescription(), data.get(5).getDescription(),data.get(6).getDescription()};\n break;\n\n case \"Retro Tour\":\n name = new String[]{data.get(7).getName(), data.get(8).getName(), data.get(9).getName()};\n id = new String[]{String.valueOf(data.get(7).getID()), String.valueOf(data.get(8).getID()), String.valueOf(data.get(9).getID())};\n desc = new String[]{data.get(7).getDescription(), data.get(8).getDescription(),data.get(9).getDescription()};\n break;\n case \"Sports Tour\":\n name = new String[]{data.get(9).getName(), data.get(8).getName(), data.get(11).getName()};\n id = new String[]{String.valueOf(data.get(9).getID()), String.valueOf(data.get(8).getID()), String.valueOf(data.get(11).getID())};\n desc = new String[]{data.get(9).getDescription(), data.get(8).getDescription(),data.get(11).getDescription()};\n break;\n case \"custom\":\n List<String> names = getActivity().getIntent().getStringArrayListExtra(\"name\");\n name = names.toArray(new String[0]);\n List<String> ID = getActivity().getIntent().getStringArrayListExtra(\"ID\");\n id = ID.toArray(new String[0]);\n List<String> Desc = getActivity().getIntent().getStringArrayListExtra(\"desc\");\n desc = Desc.toArray(new String[0]);\n break;\n }\n cardAdapter2 = new CardAdapter2(getContext(), name, id, desc, imageListener);\n recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(cardAdapter2);\n }", "private void displayListings() {\r\n\r\n //Lists all current listings\r\n System.out.println(\"Current Listings: \\n\" + cars.getListings());\r\n placeBid();\r\n }", "public void givePlaceInList() {\r\n\t\tmyPlaceInList = allyTracker.getPlaceInList();\r\n\t}", "public void Print_place()\n {\n\n System.out.println(\"Place: \" + place);\n }", "public void printList(List<Coord> choices){\n\n int counter = 1;\n System.out.println(\"Default actions:\");\n for (Coord c : choices) {\n System.out.print(counter+\") \");\n System.out.print(c.toString()+\"\\t\");\n counter++;\n if((counter-1)%5 == 0){\n System.out.print(\"\\n\");\n }\n }\n if((counter-1)%5 != 0){\n System.out.print(\"\\n\");\n }\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "@Override\n public void placesUpdate(List<Venue> newList) {\n mVHelper.setVenueList(newList);\n mVenueSelectedNumber = -1;\n if (null != mPlacesRefreshHeadersProcessor)\n mPlacesRefreshHeadersProcessor.placesRefreshHeaders();\n if (null != mPlacesMarkProcessor)\n mPlacesMarkProcessor.placesShow(mVHelper.getVenueList());\n\n /// show up suggestion\n Toast toast = Toast.makeText(this, getString(R.string.tstMoveSuggestion),\n Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n }", "@ApiModelProperty(value = \"A list of places available to the user (for multimedia only users). Effect: The list is written to the current CfgPerson's \\\"htcc\\\" annex. e.g. CfgPerson/userProperties/htcc/place = p1, p2, p3 \")\n public List<String> getPlaceNames() {\n return placeNames;\n }", "public PlaceList() {\n\t\tthis.places = new ArrayList<Place>();\n\t}", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "@Override\n\tpublic void showCities() {\n\t\tArrayList<City> cities = Singleton.CityRegistDao().findAll();\n\t\tcityOptions = \"\";\n\t\tfor (City city : cities) {\n\t\t\tcityOptions += String.format(\"<li role=\\\"presentation\\\"> <a role=\\\"menuitem\\\" tabindex=\\\"-1\\\" href=javascript:void(0)>%s</a> </li>\\n\", city.getName(), city.getName());\n\t\t}\n\t\tSystem.out.println(cityOptions);\n\t}", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "public ArrayList<String> showCity();", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "public static void showPlacesPicker(LatLngBounds bounds)\n {\n Activity activity = PlacesController.getInstance().getMainActivity();\n Context context = activity.getApplicationContext();\n PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();\n builder.setLatLngBounds(bounds); //LatLngBounds.builder().include(point).build()\n try {\n activity.startActivityForResult(builder.build(context), PLACE_PICKER_REQUEST);\n } catch (GooglePlayServicesRepairableException e) {\n e.printStackTrace();\n } catch (GooglePlayServicesNotAvailableException e) {\n e.printStackTrace();\n }\n }", "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "private void searchDisplay()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------ Search Menu ----------------\");\r\n System.out.println(\"(1) By Registration Number\");\r\n System.out.println(\"(2) By Car Make and Car Model\");\r\n System.out.println(\"(3) By Age\");\r\n System.out.println(\"(4) By Price (range)\");\r\n System.out.println(\"(5) Back to Main Menu\");\r\n }", "private void ShowNearbyPlaces(List<HashMap<String, String>> nearbyPlacesList) {\n for (int i = 0; i < nearbyPlacesList.size(); i++) {\n Log.d(\"onPostExecute\",\"Entered into showing locations\");\n MarkerOptions markerOptions = new MarkerOptions();\n HashMap<String, String> googlePlace = nearbyPlacesList.get(i);\n double lat = Double.parseDouble(googlePlace.get(\"lat\"));\n double lng = Double.parseDouble(googlePlace.get(\"lng\"));\n String placeName = googlePlace.get(\"place_name\");\n String vicinity = googlePlace.get(\"vicinity\");\n LatLng latLng = new LatLng(lat, lng);\n markerOptions.position(latLng);\n markerOptions.title(placeName);\n markerOptions.snippet(vicinity);\n\n if (this.mKind == \"police\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n else if (this.mKind == \"hospital\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n\n mMap.addMarker(markerOptions);\n }\n mMap.animateCamera(CameraUpdateFactory.zoomTo(12));\n }", "private void viewList() {\n ToDoList highPriority = new ToDoList(\"high priority\");\n ToDoList midPriority = new ToDoList(\"mid priority\");\n ToDoList lowPriority = new ToDoList(\"high priority\");\n\n for (int i = 0; i < toDoList.getSize(); i++) {\n if (toDoList.getItemAtIndex(i + 1).getCategory().equals(Categories.HIGHPRIORITY)) {\n highPriority.insert(toDoList.getItemAtIndex(i + 1));\n }\n\n if (toDoList.getItemAtIndex(i + 1).getCategory().equals(Categories.MIDPRIORITY)) {\n midPriority.insert(toDoList.getItemAtIndex(i + 1));\n }\n\n if (toDoList.getItemAtIndex(i + 1).getCategory().equals(Categories.LOWPRIORITY)) {\n lowPriority.insert(toDoList.getItemAtIndex(i + 1));\n }\n }\n\n System.out.println(\"HIGH PRIORITY: \");\n display(highPriority);\n System.out.println(\"MID PRIORITY: \");\n display(midPriority);\n System.out.println(\"LOW PRIORITY: \");\n display(lowPriority);\n displayUrgent(toDoList);\n }", "public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\n }", "void getDrivableLocations() {\n\t\t\tSystem.out.print(\"\\nPlaces you can drive to: \");\n\t\t\tfor (int i = 0; i < places.length; i++)\n\t\t\t\tif (places[i].drivable) //looks to see if you can drive there \n\t\t\t\t\tif ((places[i] != this)) //if it's not you're current location.\n\t\t\t\t\t\tSystem.out.print(places[i].locationName + \", \");\t//prints the name of the location\t\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}", "public void diplayAvailableFood() {\n\t\tfor (int i = 0; i < food.size(); i++) {\n\t\t\tSystem.out.print(food.get(i).name + \" \");\n\t\t}\n\t}", "@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn mPlaceList.size();\r\n\t\t}", "public void viewBoatListOptions(int selection, Console console) {\n\t\tif (selection == 1) {\n\t\t\tconsole.viewBoatWindow();\n\t\t} else if (selection == 2) {\n\t\t\tconsole.addOrEditBoatWindow(2);\n\t\t} else if (selection == 3) {\n\t\t\tconsole.viewMemberWindow();\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid choice! Try again \");\n\t\t\tconsole.viewBoatListWindow();\n\t\t}\n\t}", "@Override\n public void onPlaceSelected(Place place) {\n initiateSearch(place.getLatLng());\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void showSupplierList(){\n\t\tfor(int i = 0; i<supplierList.size();i++) {\n\t\t\tSystem.out.println(supplierList.get(i).getSupID()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getCompanyName()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getAddress()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getSaleRep());\n\t\t}\n\t}", "private static void displayQuestList(String[] questList){\r\n for(int i = 0; i < questList.length; i++){\r\n switch(questList[i]){\r\n case \"Kill Skeletons\":\r\n System.out.println((i + 1) + \") \" + questList[i]);\r\n break;\r\n }\r\n }\r\n }", "private void displayListView() {\n\t\tArrayList<FillterItem> fillterList = new ArrayList<FillterItem>();\n\n\t\tfor (int i = 0; i < province.length; i++) {\n\t\t\tLog.i(\"\", \"province[i]: \" + province[i]);\n\t\t\tFillterItem fillter = new FillterItem();\n\t\t\tfillter.setStrContent(province[i]);\n\t\t\tfillter.setSelected(valueList[i]);\n\t\t\t// add data\n\t\t\tfillterList.add(fillter);\n\t\t}\n\n\t\t// create an ArrayAdaptar from the String Array\n\t\tdataAdapter = new MyCustomAdapter(getContext(),\n\t\t\t\tR.layout.item_fillter_header, fillterList);\n\n\t\t// Assign adapter to ListView\n\t\tlistView.setAdapter(dataAdapter);\n\n\t}", "public List<Place> getPlaces(){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\tQuery<Place> theQuery = currentSession.createQuery(\"FROM Place\", Place.class);\r\n\t\t\r\n\t\tList<Place> resultList = theQuery.getResultList();\r\n\t\t\t\r\n\t\treturn resultList;\r\n\t}", "public void printSecondList(List<Coord> choices, int index) {\n\n if (choices.size() > 0) {\n\n System.out.println(\"God Action:\");\n for (Coord c : choices) {\n index++;\n System.out.print(index + \") \");\n System.out.print(c.toString() + \"\\t\");\n if ((index) % 5 == 0) {\n System.out.print(\"\\n\");\n }\n }\n if ((index - 1) % 5 != 0) {\n System.out.print(\"\\n\");\n }\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.list_layout, container, false);\n\n //the array list that will be presented on the screen\n final ArrayList<Place> placesToVisit = new ArrayList<Place>();\n placesToVisit.add(new Place(\"Yunque Rain Forest\",\"Lagerst Rainforest in the Caribbean\",\n R.drawable.yunque9, \"geo:18.352236, -65.800307\"));\n placesToVisit.add(new Place(\"Bioluminicent Lagoon\",\"One of the 5 bioluminescent places in the world.\",\n R.drawable.bioluminesent_bay, \"geo:18.376533, -65.623541\"));\n placesToVisit.add(new Place(\"Dry Forest\",\"Small forest filled with succulent plant and trees.\",\n R.drawable.bosque_seco, \"geo:17.983777, -66.869323\"));\n placesToVisit.add(new Place(\"Flamenco Beach\",\"The 3rd most beutifull beach in the world,\",\n R.drawable.flamenco_beach, \"geo:18.328684, -65.318981\"));\n placesToVisit.add(new Place(\"Window Cave\",\"Scenic natural cave on a limestone cliff\",\n R.drawable.cuevaentana,\"geo:18.374817, -66.692269\"));\n placesToVisit.add(new Place(\"Tamarindo Beach\",\"Crystal clear water beach great for snorkeling.\",\n R.drawable.tamarindo,\"geo:18.318457, -65.317815\"));\n\n\n\n PlaceAdapter adapter = new PlaceAdapter(getActivity(), placesToVisit, R.color.secret_color);\n ListView listView = (ListView) rootView.findViewById(R.id.list);\n\n listView.setAdapter(adapter);\n //this method will receive the position of the item the user selected and open maps showing the coordinates from the place\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Place myPlace = placesToVisit.get(i);\n Uri getPlaceLocation = Uri.parse(myPlace.getLocation());\n Intent locationIntent = new Intent(Intent.ACTION_VIEW, getPlaceLocation);\n startActivity(locationIntent);\n }\n\n });\n\n return rootView;\n }", "private void searchSuggestionListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchSuggestionListMouseClicked\n String selectedWord = this.getSearchSuggestionList().getSelectedValue();\n \n // find the definiiton of the word\n for(int i = 0 ; i < queryResult.size() ; i++)\n {\n if(queryResult.get(i).getWord().equals(selectedWord))\n {\n String definition = queryResult.get(i).getDefinition();\n definitionTextArea.setText(definition);\n i = queryResult.size();\n }\n }\n \n // select the same word in the all word list \n ListModel<String> modelList = getAllWordsList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getAllWordsList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n }", "public void displayParks(ArrayList<Park> parks){\n\n\n //display 1st park\n TextView r1No = findViewById(R.id.r1No);\n r1No.setText(\"1\");\n TextView r1Name = findViewById(R.id.r1Name);\n r1Name.setText(parks.get(0).getName());\n TextView r1Distance = findViewById(R.id.r1Distance);\n r1Distance.setText(String.format(\"%.2f km\",parks.get(0).getDistance()));\n TextView r1Rating = findViewById(R.id.r1Rating);\n r1Rating.setText(String.format(\"%.1f\",parks.get(0).getOverallRating()));\n\n\n //display 2nd park, if available\n if (parks.size() > 1) {\n TextView r2No = findViewById(R.id.r2No);\n r2No.setText(\"2\");\n TextView r2Name = findViewById(R.id.r2Name);\n r2Name.setText(parks.get(1).getName());\n TextView r2Distance = findViewById(R.id.r2Distance);\n r2Distance.setText(String.format(\"%.2f km\",parks.get(1).getDistance()));\n TextView r2Rating = findViewById(R.id.r2Rating);\n r2Rating.setText(String.format(\"%.1f\",parks.get(1).getOverallRating()));\n }\n\n //display 3rd park, if available\n if (parks.size() > 2) {\n TextView r3No = findViewById(R.id.r3No);\n r3No.setText(\"3\");\n TextView r3Name = findViewById(R.id.r3Name);\n r3Name.setText(parks.get(2).getName());\n TextView r3Distance = findViewById(R.id.r3Distance);\n r3Distance.setText(String.format(\"%.2f km\",parks.get(2).getDistance()));\n TextView r3Rating = findViewById(R.id.r3Rating);\n r3Rating.setText(String.format(\"%.1f\",parks.get(2).getOverallRating()));\n }\n\n //display 4th park, if available\n if (parks.size() > 3) {\n TextView r4No = findViewById(R.id.r4No);\n r4No.setText(\"4\");\n TextView r4Name = findViewById(R.id.r4Name);\n r4Name.setText(parks.get(3).getName());\n TextView r4Distance = findViewById(R.id.r4Distance);\n r4Distance.setText(String.format(\"%.2f km\",parks.get(3).getDistance()));\n TextView r4Rating = findViewById(R.id.r4Rating);\n r4Rating.setText(String.format(\"%.1f\",parks.get(3).getOverallRating()));\n }\n\n\n //display 5th park, if available\n if (parks.size() > 4) {\n TextView r5No = findViewById(R.id.r5No);\n r5No.setText(\"5\");\n TextView r5Name = findViewById(R.id.r5Name);\n r5Name.setText(parks.get(4).getName());\n TextView r5Distance = findViewById(R.id.r5Distance);\n r5Distance.setText(String.format(\"%.2f km\",parks.get(4).getDistance()));\n TextView r5Rating = findViewById(R.id.r5Rating);\n r5Rating.setText(String.format(\"%.1f\",parks.get(4).getOverallRating()));\n }\n\n //display 6th park, if available\n if (parks.size() > 5) {\n TextView r6No = findViewById(R.id.r6No);\n r6No.setText(\"6\");\n TextView r6Name = findViewById(R.id.r6Name);\n r6Name.setText(parks.get(5).getName());\n TextView r6Distance = findViewById(R.id.r6Distance);\n r6Distance.setText(String.format(\"%.2f km\",parks.get(5).getDistance()));\n TextView r6Rating = findViewById(R.id.r6Rating);\n r6Rating.setText(String.format(\"%.1f\",parks.get(5).getOverallRating()));\n }\n\n //display 7th park, if available\n if (parks.size() > 6) {\n TextView r7No = findViewById(R.id.r7No);\n r7No.setText(\"7\");\n TextView r7Name = findViewById(R.id.r7Name);\n r7Name.setText(parks.get(6).getName());\n TextView r7Distance = findViewById(R.id.r7Distance);\n r7Distance.setText(String.format(\"%.2f km\",parks.get(6).getDistance()));\n TextView r7Rating = findViewById(R.id.r7Rating);\n r7Rating.setText(String.format(\"%.1f\",parks.get(6).getOverallRating()));\n }\n\n //display 8th park, if available\n if (parks.size() > 7) {\n TextView r8No = findViewById(R.id.r8No);\n r8No.setText(\"8\");\n TextView r8Name = findViewById(R.id.r8Name);\n r8Name.setText(parks.get(7).getName());\n TextView r8Distance = findViewById(R.id.r8Distance);\n r8Distance.setText(String.format(\"%.2f km\",parks.get(7).getDistance()));\n TextView r8Rating = findViewById(R.id.r8Rating);\n r8Rating.setText(String.format(\"%.1f\",parks.get(7).getOverallRating()));\n }\n }", "public void setListPlaceType(String s) {\n editor.putString(Constans.KeyPreference.LIST_PLACE_TYPE, s);\n editor.commit();\n }", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "void showFacts(List<Fact> facts);", "public void scanCurrentPlace()\r\n\t{\r\n\t\tSystem.out.println(this.getCurrentPlace().toString());\r\n\t\tSystem.out.println(\"The place contains these objects: \");\r\n\t\tSystem.out.println(this.getCurrentPlace().getItems().toString());\r\n\t}", "@ApiOperation(\"查询会场列表(分页)\")\n @GetMapping(\"/selectListPlace\")\n public ResultResponse selectListPlace(@ApiParam(value = \"当前页\")Integer currentPage,\n @ApiParam(value = \"每页记录数\")Integer pageSize){\n VoList<VoPlace> voList = placeService.selectListPlace(currentPage, pageSize);\n return new ResultResponse()\n .setData(voList)\n .setMessage(\"查询会场列表\");\n }", "public void selectTDList(ActionEvent actionEvent) {\n // we will have to update the viewer so that it is displaying the list that was just selected\n // it will go something like...\n // grab the list that was clicked by the button (again, using the relationship between buttons and lists)\n // and then displayTODOs(list)\n }", "private void commandList(String city, String item)\n {\n input.list(city, item);\n \n askUser();\n }", "public void printAvailableIslands(ArrayList<Island> islands) \n\t{\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose island that you want to have a look:\");\n\t\t\tint num = 1;\n\t\t\tfor (int i = 0; i < islands.size(); i++) {\n\t\t\t\tIsland otherIsland = islands.get(i);\n\t\t\t\tString nameIsland = otherIsland.getIslandName();\n\t\t\t\tSystem.out.println(\"(\"+num+\") \"+ nameIsland);\n\t\t\t\tnum++;\t\n\t\t\t}\n\t\t\tint selectedAction = scanner.nextInt();\n\t\t\ttry {\n\t\t\t\tif (selectedAction <= islands.size() && selectedAction >0){\n\t\t\t\t\tgame.chooseOtherIsland(selectedAction-1);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose island between 1 and 4!\");\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}\n\t}", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "private void addToList(Place place) {\n if(!checkDuplicates(place.placeid))\n restaurantsList.add(place);\n\n\n Collections.sort(restaurantsList, new Comparator<Place>() {\n @Override\n public int compare(Place lhs, Place rhs) {\n return lhs.distance.compareTo(rhs.distance);\n }\n });\n HomepageAdapter adapterStores = new HomepageAdapter(activity, restaurantsList, mAddressOutput);\n adapterStores.setOnClickListener(new HomepageAdapter.onClickListener() {\n @Override\n public void OnClick(int position) {\n Bundle args = new Bundle();\n args.putString(\"placeid\", restaurantsList.get(position).placeid);\n activity.replaceFragments(RestaurantDetailsFragment.class, args);\n }\n });\n shimmerRecycler.setAdapter(adapterStores);\n }", "private void createPlacesListBottomSheet(final List<Place> mPlaceList)\n {\n GooglePlacesDisplayAdapterCustom adapter = new GooglePlacesDisplayAdapterCustom(mPlaceList);\n adapter.setOnItemClickListener(new GooglePlacesDisplayAdapterCustom.OnItemClickListener() {\n @Override\n public void onItemClick(GooglePlacesDisplayAdapterCustom.ItemHolder item, int position) {\n //dismissDialog();\n Toast.makeText(ARExploreActivity.this, mPlaceList.get(position).getName(), Toast.LENGTH_LONG).show();\n performPlaceDetailSearch(mPlaceList.get(position).getPlace_id());\n }\n });\n RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);\n recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setAdapter(adapter);\n\n placeListBottomSheetBehavior.setHideable(true); // so that the list can be hideded\n //placeListBottomSheetBehavior.setPeekHeight(peekHeight);\n extendButton.setVisibility(View.VISIBLE); //show extendbutton\n placeListBottomSheetBehavior.setState(placeListBottomSheetBehavior.STATE_EXPANDED);\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n {\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_LIST;\n }", "public void setPlaces(int places) {\r\n this.places = places;\r\n }", "public static void showResults(List<Candidate> candidates) {\n\t\tif (candidates.isEmpty()) {\r\n\t\t\tSystem.out.println(\"No autocomplete candidates found\\n\");\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tfor (int i = 0; i < candidates.size(); i++) {\r\n\t\t\t\tSystem.out.println(String.format(\"WORD: %s\\nCONFIDENCE: %d\\n\", candidates.get(i).getWord(), candidates.get(i).getConfidence()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "public void showSuggestionList() {\n \t\tif (isAttached()) {\n \t\t\tcurrentText = null;\n \t\t\trefreshSuggestions();\n \t\t}\n \t}", "public static void displayOneCharacter (List<Character> listCP){\n System.out.println(\"enter the index of your character : \");\n int ch = getUserChoice();\n System.out.println(listCP.get(ch));\n }", "private void showPlaceAutoComplete(int typeLocation) {\n REQUEST_CODE = typeLocation;\n\n // Filter hanya tmpat yg ada di Indonesia\n AutocompleteFilter typeFilter = new AutocompleteFilter.Builder().setCountry(\"ID\").build();\n try {\n // Intent untuk mengirim Implisit Intent\n Intent mIntent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY)\n .setFilter(typeFilter)\n .build(getActivity());\n // jalankan intent impilist\n startActivityForResult(mIntent, REQUEST_CODE);\n } catch (GooglePlayServicesRepairableException e) {\n e.printStackTrace(); // cetak error\n } catch (GooglePlayServicesNotAvailableException e) {\n e.printStackTrace(); // cetak error\n // Display Toast\n Toast.makeText(getContext(), \"Layanan Play Services Tidak Tersedia\", Toast.LENGTH_SHORT).show();\n }\n\n }", "public void printList() {\n userListCtrl.showAll();\n }", "public List<String> getPlaces() {\n\t\treturn places;\n\t}", "List<Place> findUnboundLocationPlaceholders();", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "public void display(List<String> c )\n\t{\n\t\tSystem.out.println();\n\t}", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "void displayCards(List<Card> cards, String title);", "@Override\r\n\tpublic void showlist() {\n int studentid = 0;\r\n System.out.println(\"请输入学生学号:\");\r\n studentid = input.nextInt();\r\n StudentDAO dao = new StudentDAOimpl();\r\n List<Course> list = dao.showlist(studentid);\r\n System.out.println(\"课程编号\\t课程名称\\t教师编号\\t课程课时\");\r\n for(Course c : list) {\r\n System.out.println(c.getCourseid()+\"\\t\"+c.getCoursename()+\"\\t\"+c.getTeacherid()+\"\\t\"+c.getCoursetime());\r\n }\r\n \r\n\t}", "@Override\r\n\tpublic void goToShowList() {\n\t\t\r\n\t}", "public void generateList(SearchAutoCompleteListener searchAutoCompleteListener) {\n RequestQueue queue= RequestQueueSingleton.getInstance(this.context).getRequestQueue();\n queue.cancelAll(\"search\");\n if (this.nameOrCode.length() > 0) {\n StringRequest request = new StringRequest(Request.Method.GET,\n Api.autoCompleteString +\"?q=\"+this.nameOrCode,\n (String response) -> {\n try {\n JSONObject data = new JSONObject(response);\n JSONArray placearray = data.getJSONArray(\"places\");\n\n if (placearray.length() == 0) {\n Log.d(TAG,\"Place Not Found\");\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n } else {\n ArrayList<Place> searchPlaces = JsonUtils.getPlaces(placearray);\n searchAutoCompleteListener.onPlaceListReceived(searchPlaces);\n }\n } catch (JSONException e) {\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n }\n },\n error ->{\n Log.d(TAG,JsonUtils.handleResponse(error));\n searchAutoCompleteListener.onFailure(JsonUtils.handleResponse(error));\n }){\n };\n request.setTag(\"search\");\n queue.add(request);\n }\n }", "private void showListSelectCheckBox(){\n DisplayListWithCheckBox();\n //wordList.setSelection(FirstVisiblePosition);\n\n FloatingActionButton fab_plus = findViewById(R.id.fab_plus);\n fab_plus.setVisibility(View.INVISIBLE);\n FloatingActionButton fab_play = findViewById(R.id.fab_play);\n fab_play.setVisibility(View.INVISIBLE);\n FloatingActionButton fab_delete = findViewById(R.id.fab_delete);\n fab_delete.setVisibility(View.VISIBLE);\n }", "public ArrayList<Place> getPlaceList() {\n\t\treturn this.places;\n\t}", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }", "public void showLiaisonByClick()\t{\r\n \tSystem.out.print(\"Cliquez votre route: \");\r\n \tif (dessin.waitClick()) {\r\n \t float lon = dessin.getClickLon() ;\r\n \t float lat = dessin.getClickLat() ;\r\n \t \r\n \t float minDist = Float.MAX_VALUE ;\r\n \t Liaison chosen = null;\r\n \t \r\n \t for(Liaison liaison: this.routes)\t{\r\n \t \tfloat londiff = liaison.getLongitude() - lon;\r\n \t \tfloat latdiff = liaison.getLatitude() - lat;\r\n \t \tfloat dist = londiff*londiff + latdiff*latdiff ;\r\n \t \tif(dist < minDist)\t{\r\n \t \t\tchosen = liaison;\r\n \t \t\tminDist = dist;\r\n \t \t}\r\n \t }\r\n \t \r\n\t \tchosen.dessiner(dessin, this.numzone, Color.red);\r\n\t \tthis.dessin.putText(chosen.getLongitude(), chosen.getLatitude(), chosen.toString());\r\n\t \tSystem.out.println(chosen);\r\n\r\n \t}\r\n }", "@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName());\n editTextBusinessName.setText(place.getName());\n editTextLocation.setText(place.getAddress());\n editTextPhone.setText(place.getPhoneNumber());\n barCoordinates = place.getLatLng();\n //editTextBusinessDescription.setText(place.getAttributions());\n\n }", "public static void displayInfoForTakeOff(ListArrayBasedGeneric<Runway> runwayList) // Option # 6\r\n\t{\r\n\t\tint size = runwayList.size();\r\n\t\tint sizeOfRunway = 0;\r\n\t\tString runwayName = \"\", flightNumber = \"\", destination = \"\";\r\n\r\n\t\tfor(int i = 1; i < size; i++) // We want to display all run ways, except Purgatory\r\n\t\t{\r\n\t\t\t// Get the run way name and the size of that run way\r\n\t\t\tsizeOfRunway = runwayList.get(i).getListOfPlanes().size();\r\n\t\t\trunwayName = runwayList.get(i).getRunwayName();\r\n\r\n\r\n\t\t\tif(sizeOfRunway > 0) // If the runway has planes on it, display them\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\tThese planes are waiting for takeoff on runway \" + runwayName);\r\n\r\n\t\t\t\tfor(int j = 0; j < sizeOfRunway; j++) // Go through the runway and print out planes and their destination\r\n\t\t\t\t{\r\n\t\t\t\t\tflightNumber = runwayList.get(i).getListOfPlanes().get(j).getFlightNumber();\r\n\t\t\t\t\tdestination = runwayList.get(i).getListOfPlanes().get(j).getDestination();\r\n\r\n\t\t\t\t\tSystem.out.println(\"\\t\\tFlight \" + flightNumber + \" to \" + destination);\r\n\t\t\t\t} // END FOR\r\n\t\t\t}\r\n\t\t\telse // Else, display that no planes are waiting for take off\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\tNo planes are waiting for takeoff on runway \" + runwayName + \"!\");\r\n\t\t\t} // END IF/ELSE\r\n\t\t} // END FOR\r\n\r\n\t\tSystem.out.println();\r\n\t}", "public void showStreets() {\n\t\tMonopolyClient.getStreets();\n\t}", "@Override\n public void onClick(View v) {\n String position=(String) v.getTag();\n Toast.makeText(this, \"Click\" + position, Toast.LENGTH_SHORT).show();\n //get the places that are collided in this section\n List<BeyondarObject> list = listOfCollision.get(position);\n //create new places list to store\n List<Place> placeList = new ArrayList<Place>();\n for(int i=0;i<list.size();i++)\n {\n int positionId = (int) list.get(i).getId();\n Place newPlace = mPlaceListMain.get(positionId);\n placeList.add(newPlace);\n }\n createPlacesListBottomSheet(placeList);\n }", "static void displayOrders() {\n\n String customerSearch;\n boolean customerFound = false;\n\n while(!customerFound){\n customerSearch = Validate.readString(ASK_CST_ORDER); // ask for customer to locate their order\n\n Customer temp; // new customer object\n\n for (Customer aCustomerList : customerList) { // loops through the customer list\n\n if (customerSearch.toUpperCase().equals(aCustomerList.getName().toUpperCase())) { // Scenario 1: name is found in the customer list\n\n customerFound = true; // set to true to stop loop\n\n temp = aCustomerList; // sets temp customer object to found object\n\n System.out.println(\"The orders for \" + temp.getName() + \" are: \\n\"); // prints out the name of customer\n\n temp.viewAll(); // prints all orders for that customer\n } else { // Scenario 2: name is not found in the customer list\n\n System.out.println(CST_NAME_ERROR); // print error saying cannot find customer\n }\n }\n }\n }", "public void setPlace(String place){\n this.place = place;\n }", "private static void showList(List<String> list, int offsetX, int offsetY) {\r\n\t\tfor (int i = 1; i <= list.size(); i++) {\r\n\t\t\tGAME.drawTextScreen(offsetX, offsetY + (LINE_HEIGHT * i), list.get(i - 1));\r\n\t\t}\r\n\t}", "public String showList(TreeMap<String, Word> wordBank, String order) {\n String returnedString = \"Here are your words:\\n\";\n if (order.equals(\"asc\") || order.equals(\"\")) {\n for (Map.Entry<String, Word> entry : wordBank.entrySet()) {\n returnedString += entry.getValue() + \"\\n\";\n }\n } else {\n for (String description : wordBank.descendingKeySet()) {\n returnedString += wordBank.get(description) + \"\\n\";\n }\n }\n return returnedString;\n }", "public void showParking(List<Parking> parkings) {\n\t\tint size = parkings.size();\n\t\tif (size == 0)\n\t\t\treturn;\n\t\tif (size == 1) {\n\t\t\tshowParking(parkings.get(0), true);\n\t\t\treturn;\n\t\t}\n\n\t\tclearMap();\n\t\tLatLngBounds.Builder positions = new LatLngBounds.Builder();\n\t\tfor (Parking parking : parkings) {\n\t\t\tshowParking(parking, false);\n\t\t\tpositions.include(parking.getLocation());\n\t\t}\n\t\tMapCamera.moveCamera(map, positions.build());\n\t}", "public void update_all_places_add_edit_tour(ArrayList<entities.PlaceOfInterest> placesofcity) {\n\n\t\tRunnable runn = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (entities.PlaceOfInterest place : placesofcity) {\n\n\t\t\t\t\tPlaceBase sp = new PlaceBase(place);\n\n\t\t\t\t\tsp.setOnMouseEntered(event -> {\n\t\t\t\t\t\tsp.setStyle(\"-fx-background-color : #BDBBC3\");\n\n\t\t\t\t\t});\n\t\t\t\t\tsp.setOnMouseExited(event -> {\n\t\t\t\t\t\tsp.setStyle(\"-fx-background-color : #EBE8F9\");\n\n\t\t\t\t\t});\n\n\t\t\t\t\tPlatform.runLater(() -> {\n\t\t\t\t\t\tboolean found = false;\n\n\t\t\t\t\t\tfor (Node n : pnItems.getChildren()) {\n\t\t\t\t\t\t\tif (n instanceof PlaceofInterestItem) {\n\t\t\t\t\t\t\t\tPlaceofInterestItem spp = (PlaceofInterestItem) n;\n\t\t\t\t\t\t\t\tSystem.out.println(spp.getplacetour().getName());\n\t\t\t\t\t\t\t\tif (spp.getplacetour().getName().equals(place.getName()))\n\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!found)\n\t\t\t\t\t\t\tpnItems2.getChildren().add(sp);\n\t\t\t\t\t\tnew SlideInUp(sp).play();\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tFadeOutUp animate = new FadeOutUp(n[0]);\n\t\t\t\tanimate.play();\n\t\t\t\tanimate.setOnFinished(event1 -> {\n\t\t\t\t\tPlatform.runLater(() -> {\n\t\t\t\t\t\tpnItems.getChildren().remove(n[0]);\n\t\t\t\t\t});\n\n\t\t\t\t});\n\t\t\t\n\n\t\t\t}\n\t\t};\n\t\tThread thread = new Thread(runn);\n\t\tthread.start();\n\n\t}", "private void searchShow() {\n ArrayList<Show> searchShows = new ArrayList<>();\n for (Show show : clientController.getUser().getShows()) {\n if (show.getName().toLowerCase().contains(getText().toLowerCase())) {\n searchShows.add(show);\n }\n// else {\n// JOptionPane.showMessageDialog(null, \"The search gave no result!\");\n// }\n\n }\n pnlShowList.removeAll();\n pnlShowList.setBackground(Color.decode(\"#6A86AA\"));\n draw(searchShows);\n }", "public void listAll(List<Address> AddressList) {\n for (Address a : AddressList) {\n console.promptForPrintPrompt(a.toString());\n }\n }", "@Override\n public List<SpriteDefinition> getChosen () {\n return mySelected.getListView().getItems();\n }", "@Override\n\tpublic List<Land> displayLand() {\n\t\treturn dao.displayLand();\n\t}", "@Override\n public void onClick(View v) {\n displayCitylist();\n }", "public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n System.out.println(\"(4) List all tasks.\");\n System.out.println(\"(0) Exit\");\n }", "private void searchBoxUsed(String txt){\n\t\t\tJFrame frame = new JFrame();\n\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\tif (simLoc == null) JOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\telse if (simLoc.size() == 1){\n\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\trefreshPanels();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\n\t\t\t\tif (response != null) {\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\tString[] temp = response.split(\" \");\n\t\t\t\t\t\tint length = app.getMyLocations().length;\n\t\t\t\t\t\tboolean add = true;\n\t\t\t\t\t\tfor (int i = 0; i < length; i ++){\n\t\t\t\t\t\t\tlocation checkLoc = app.getMyLocations()[i];\n\t\t\t\t\t\t\tif (checkLoc.getCityID() == searchedLoc.getCityID())\n\t\t\t\t\t\t\t\tadd = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (add) {\n\t\t\t\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\trefreshPanels();\n\t\t\t\t }\n\t\t\t}\n\t\t}", "@Override\n\tpublic List selectList2(Object map) {\n\t\t\n\t\tList list= session.selectList(\"party.party_show_list\",map);\n\t\t\n\t\treturn list;\n\t}", "public void add_one_place_to_tour(entities.PlaceOfInterestTour place) {\n\t\tPlaceofInterestItem sp = new PlaceofInterestItem(place);\n\t\t// delete buttons from list of item (place)\n\t\tsp.add_edit_layout();\n\n\t\tsp.setOnDragOver(event -> {\n\t\t\tfinal Dragboard dragboard = event.getDragboard();\n\t\t\tif (dragboard.hasString() && TAB_DRAG_KEY.equals(dragboard.getString()) && draggingTab.get() != null) {\n\t\t\t\tevent.acceptTransferModes(TransferMode.MOVE);\n\t\t\t\tevent.consume();\n\t\t\t}\n\t\t});\n\t\tsp.setOnDragDetected(event -> {\n\t\t\tDragboard dragboard = sp.startDragAndDrop(TransferMode.MOVE);\n\t\t\tClipboardContent clipboardContent = new ClipboardContent();\n\t\t\tclipboardContent.putString(TAB_DRAG_KEY);\n\t\t\tdragboard.setContent(clipboardContent);\n\t\t\tSnapshotParameters spp = new SnapshotParameters();\n\t\t\tspp.setFill(Color.WHITE);\n\t\t\tdragboard.setDragView(sp.snapshot(spp, null), event.getX(), event.getY());\n\t\t\tdraggingTab.set(sp);\n\t\t\tevent.consume();\n\t\t});\n\t\tsp.setOnDragDropped(event -> {\n\n\t\t\tDragboard db = event.getDragboard();\n\t\t\tboolean success = false;\n\t\t\tif (db.hasString()) {\n\t\t\t\tVBox parent = (VBox) sp.getParent();\n\t\t\t\tPlaceofInterestItem source = (PlaceofInterestItem) event.getGestureSource();\n\t\t\t\tint sourceIndex = parent.getChildren().indexOf(source);\n\t\t\t\tint targetIndex = parent.getChildren().indexOf(sp);\n\t\t\t\tList<Node> nodes = new ArrayList<Node>(parent.getChildren());\n\t\t\t\tif (sourceIndex < targetIndex) {\n\t\t\t\t\tCollections.rotate(nodes.subList(sourceIndex, targetIndex + 1), -1);\n\t\t\t\t} else {\n\t\t\t\t\tCollections.rotate(nodes.subList(targetIndex, sourceIndex + 1), 1);\n\t\t\t\t}\n\t\t\t\tparent.getChildren().clear();\n\t\t\t\tparent.getChildren().addAll(nodes);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t\tevent.setDropCompleted(success);\n\t\t\tevent.consume();\n\n\t\t});\n\n\t\tsp.setOnMouseEntered(event -> {\n\t\t\tsp.setStyle(\"-fx-background-color : #BDBBC3\");\n\t\t});\n\t\tsp.setOnMouseExited(event -> {\n\t\t\tsp.setStyle(\"-fx-background-color : #EBE8F9\");\n\t\t});\n\n\t\tPlatform.runLater(() -> {\n\t\t\tpnItems.getChildren().add(sp);\n\t\t\tnew SlideInUp(sp).play();\n\t\t});\n\n\t}", "@NonNull\n @Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(R.layout.list_item, parent, false);\n }\n\n // Get the Place object located at this position in the list\n Place currentPlace = getItem(position);\n\n // Get the name of the place from the currentPlace object\n String name = currentPlace.getmPlaceName();\n // Get the name of the address from the currentPlace object\n String address = currentPlace.getmPlaceAddress();\n // Get the description from the currentPlace object\n String description = currentPlace.getmPlaceDescription();\n // Get the current image\n int imageID = currentPlace.getmPlaceImageResourceID();\n\n // Find the ImageView in list_item.xml with ID list_image\n ImageView imageView = (ImageView) listItemView.findViewById(R.id.list_image);\n // Set the current image\n imageView.setImageResource(imageID);\n\n // Find the TextView in list_item.xml with ID place_name\n TextView placeName = (TextView) listItemView.findViewById(R.id.place_name);\n // Set the current name\n placeName.setText(name);\n\n // Find the TextView in list_item.xml with ID place_address\n TextView placeAddress = (TextView) listItemView.findViewById(R.id.place_address);\n // Set the current address\n placeAddress.setText(address);\n\n // Find the TextView in list_item.xml with ID place_description\n TextView placeDescription = (TextView) listItemView.findViewById(R.id.place_description);\n // Set the current description\n placeDescription.setText(description);\n\n /*\n * Return the whole list item layout (containing 1 ImageView and 3 TextViews so that\n * it can be shown in ListView.\n */\n return listItemView;\n }", "public void getPlacesList(final ApiPlacesResult<List<Place>> callback) {\n Call<List<Place>> call = this.mPlaceCall.getPlaces();\n call.enqueue(new Callback<List<Place>>() {\n @Override\n public void onResponse(Call<List<Place>> call, Response<List<Place>> response) {\n int statusCode = response.code();\n if (statusCode == HTTP_200) {\n initRetrofitClient();\n List<Place> places = response.body();\n callback.success(places);\n } else {\n callback.error(statusCode, response.message());\n }\n }\n\n @Override\n public void onFailure(Call<List<Place>> call, Throwable t) {\n Log.e(TAG, \"Error while calling the 'getPlacesList' method!\", t);\n callback.error(-1, t.getLocalizedMessage());\n }\n });\n }", "@Override\n public void onClickBeyondarObject(ArrayList<BeyondarObject> beyondarObjects) {\n if (beyondarObjects.size() > 0) {\n Toast.makeText(this, \"Clicked on: \" + beyondarObjects.get(0).getId(), Toast.LENGTH_LONG).show();\n if(mPlaceDetail!=null)\n {\n if(currentDisplayMode!=DISPLAY_PLACE_DETAIL)\n {\n if(!mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getName().equals(mPlaceDetail.get(0).getName()))\n {\n performPlaceDetailSearch(mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getPlace_id());\n }\n else\n {\n generateWorld(mWorld,mPlaceDetail,viewSetting,true);\n previousDisplayMode=currentDisplayMode;\n currentDisplayMode=DISPLAY_PLACE_DETAIL;\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n }\n }\n else\n {\n\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n }\n }\n else\n {\n performPlaceDetailSearch(mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getPlace_id());\n\n }\n }\n }", "private void retrieveListings(GoogleMap googleMap) {\n Projection projection = googleMap.getProjection();\n VisibleRegion visibleRegion = projection.getVisibleRegion();\n LatLng sw = visibleRegion.latLngBounds.southwest;\n LatLng ne = visibleRegion.latLngBounds.northeast;\n double left = sw.longitude;\n double bottom = sw.latitude;\n double right = ne.longitude;\n double top = ne.latitude;\n\n // Find listings on the visible region of the map\n queryListings(left, right, top, bottom);\n }", "public PlaceList(ArrayList<Place> placeList) {\n\t\tthis.places = new ArrayList<Place>(placeList);\n\t}" ]
[ "0.6917044", "0.6783875", "0.6392589", "0.6304931", "0.5982719", "0.59651166", "0.5955394", "0.5931074", "0.5928443", "0.58922374", "0.5847737", "0.58025616", "0.57927656", "0.57615227", "0.5716362", "0.57027304", "0.56522197", "0.5593643", "0.5570935", "0.5569791", "0.5561841", "0.5546969", "0.5541515", "0.5524173", "0.5506527", "0.5495971", "0.54883593", "0.54764205", "0.54635924", "0.5463509", "0.545872", "0.5453721", "0.5447214", "0.54447806", "0.5412023", "0.5409224", "0.53907365", "0.53846747", "0.5382945", "0.53775483", "0.53705364", "0.5369903", "0.5369671", "0.53554195", "0.5344498", "0.53382325", "0.5330918", "0.5328369", "0.53239244", "0.5323617", "0.5322863", "0.53162956", "0.5304169", "0.53009915", "0.5279895", "0.5276037", "0.52547705", "0.52538484", "0.52460444", "0.52441895", "0.52396315", "0.52346104", "0.5231717", "0.5230086", "0.52297", "0.522879", "0.52223015", "0.52178556", "0.52099967", "0.520967", "0.51999825", "0.51972115", "0.51919204", "0.5175033", "0.5169628", "0.5168653", "0.51534593", "0.5143417", "0.51417893", "0.51358545", "0.5134458", "0.5132033", "0.5126347", "0.5124624", "0.5121839", "0.5118551", "0.51183665", "0.5118349", "0.51152647", "0.51028275", "0.50972927", "0.50969243", "0.5094723", "0.50926375", "0.5088552", "0.5082355", "0.5082354", "0.50810224", "0.5080426", "0.50713366" ]
0.68092144
1
Created by Administrator on 2017/7/21.
public interface PreFragHomeI { void queryUserSwayBillList(String museId, String museOnlineTag, String musePwd, String currentPage, int pageSize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void memoria() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\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}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\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 static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "Petunia() {\r\n\t\t}", "public void create() {\n\t\t\n\t}", "private TMCourse() {\n\t}", "public contrustor(){\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo4359a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void create() {\n\n\t}", "public Pitonyak_09_02() {\r\n }", "public void autoDetails() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void create() {\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\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "private static void oneUserExample()\t{\n\t}", "@Override\n public void init() {\n\n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "private UsineJoueur() {}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void getExras() {\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "protected Doodler() {\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public void mo6081a() {\n }", "public void verarbeite() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n void init() {\n }", "private Singletion3() {}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo12930a() {\n }", "@Override\n public void init() {\n }", "private void init() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private void getStatus() {\n\t\t\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 nghe() {\n\n\t}", "public static void created() {\n\t\t// TODO\n\t}", "protected void onFirstUse() {}", "Consumable() {\n\t}", "private MApi() {}", "@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}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private SingleTon() {\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n protected void startUp() {\n }", "@Override\n public void init() {\n\n }" ]
[ "0.63245016", "0.6116907", "0.5834398", "0.5830839", "0.5810228", "0.5804827", "0.5749858", "0.572005", "0.5717348", "0.5715923", "0.5698115", "0.5697847", "0.56754726", "0.5673042", "0.56683165", "0.56683165", "0.5663652", "0.56555945", "0.56459606", "0.5645716", "0.5641503", "0.5641503", "0.56365544", "0.563229", "0.56279147", "0.5624297", "0.56201476", "0.5617451", "0.5616152", "0.5605424", "0.56021273", "0.5594745", "0.5594448", "0.55889314", "0.55685085", "0.5548306", "0.554651", "0.5539368", "0.5536404", "0.5536404", "0.5536404", "0.5536404", "0.5536404", "0.5536404", "0.5536404", "0.553519", "0.55216944", "0.551961", "0.5515392", "0.5504823", "0.5498892", "0.54916865", "0.5482143", "0.5478072", "0.5473615", "0.5473615", "0.5473615", "0.5473615", "0.5473615", "0.5473615", "0.54569745", "0.54474396", "0.5444355", "0.5430132", "0.5423058", "0.5414848", "0.5411264", "0.5407257", "0.53960025", "0.53932947", "0.5381014", "0.5373104", "0.53597313", "0.53579754", "0.5353046", "0.53521305", "0.5346049", "0.53439415", "0.53423566", "0.5334414", "0.5333861", "0.5333861", "0.5329702", "0.5324606", "0.53212774", "0.53211725", "0.5320279", "0.5317551", "0.5317176", "0.5316906", "0.53168225", "0.53135943", "0.5309", "0.52953094", "0.5294624", "0.5294624", "0.5294624", "0.5294624", "0.5294624", "0.5290792", "0.5289767" ]
0.0
-1
static method to create instance of Singleton class
public static DataController getInstance() { if (single_instance == null) single_instance = new DataController(); return single_instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton(){}", "private Singleton() { }", "private SingletonSample() {}", "private Singleton() {\n\t}", "private Singleton(){\n }", "private Singleton()\n\t\t{\n\t\t}", "private SingletonSigar(){}", "private SingletonObject() {\n\n\t}", "private LazySingleton(){}", "private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }", "public static Singleton getInstance( ) {\n return singleton;\n }", "private SingletonDoubleCheck() {}", "public static Singleton getInstance( ) {\n return singleton;\n }", "public static synchronized Singleton getInstance(){\n if(instance == null){\n instance = new Singleton();\n }\n return instance;\n }", "public static Singleton getInstance() {\t\t//getInstance nam omogucava da instanciramo klasu jedinstveno ako vec nismo!\r\n\t\tif (instance == null) {\t\t\t\t\t// inace nam vraca instancu ako je vec napravljena!\r\n\t\t\tinstance = new Singleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "T getInstance();", "private SingletonEager(){\n \n }", "private J2_Singleton() {}", "Instance createInstance();", "public static LazyInitializedSingleton getInstance(){ // method for create/return Object\n if(instance == null){//if instance null?\n instance = new LazyInitializedSingleton();//create new Object\n }\n return instance; // return early created object\n }", "private SingletonAR() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonAR\");\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public static synchronized Singleton getInstanceTS() {\n\t\tif (_instance == null) {\n\t\t\t_instance = new Singleton();\n\t\t}\n\t\treturn _instance;\n\t}", "public static synchronized Singleton getInstance() {\n\t\tif(instance ==null) {\n\t\t\tinstance= new Singleton();\n\t\t\t\n\t\t}\n\t\treturn instance;\n\t}", "public static Singleton getInstance(){\n if(instance == null)\n {\n synchronized (Singleton.class) {\n if (instance == null) {\n instance = new Singleton();\n Log.d(\"***\", \"made new Singleton\");\n }\n }\n }\n return instance;\n }", "private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }", "public static SingletonEager get_instance(){\n }", "public static SingletonClass getInstance() {\n\t\tif(singletonObj == null){\n\t\t\tsingletonObj = new SingletonClass();\n\t\t}\n\t\treturn singletonObj;\n\t}", "public static Singleton getInstance() {\n return SingletonHolder.SINGLETON_INSTANCE;\n }", "public static Singleton print(String param)\n {\n return new Singleton();\n}", "private LoggerSingleton() {\n\n }", "public static synchronized Singleton getInstance() {\n\t\tif (mContext == null) {\n\t\t\tthrow new IllegalArgumentException(\"Impossible to get the instance. This class must be initialized before\");\n\t\t}\n\n\t\tif (instance == null) {\n\t\t\tinstance = new Singleton();\n\t\t}\n\n\t\treturn instance;\n\t}", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "private SingletonH() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonH\");\n }", "public static Singleton getInstance()\r\n\t{\r\n\t\t// check if the instance is already created or not, required only for lazy init\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new Singleton();\r\n\t\treturn instance;\r\n\t}", "private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}", "public static synchronized MultiThreadedSingleton getInstance() {\n\t\t//Lazy instantiation using double locking mechanism.\n\t\tif (singleton == null) {\n\t\t\tsynchronized (MultiThreadedSingleton.class) {\n\t\t\t\tif (singleton == null) {\n\t\t\t\t\tsimulateRandomActivity();\n\t\t\t\t\tsingleton = new MultiThreadedSingleton();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"created singleton: \" + singleton);\n\t\treturn singleton;\n\t}", "public SingletonVerifier() {\n }", "public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\n Class objectClass = LazyMethodSingleton.class;\n\n Constructor constructor = objectClass.getDeclaredConstructor();\n constructor.setAccessible(true);\n\n LazyMethodSingleton instance = LazyMethodSingleton.getInstance();\n LazyMethodSingleton newInstance = (LazyMethodSingleton) constructor.newInstance();\n\n// HungrySingleton instance = HungrySingleton.getInstance();\n// HungrySingleton newInstance = (HungrySingleton) constructor.newInstance();\n\n// LazyStaticInnerClassSingleton instance = LazyStaticInnerClassSingleton.getInstance();\n// LazyStaticInnerClassSingleton newInstance = (LazyStaticInnerClassSingleton) constructor.newInstance();\n\n System.out.println(instance);\n System.out.println(newInstance);\n System.out.println(instance == newInstance);\n\n\n\n\n }", "private static void createSingletonObject() {\n\t\tSingleton s1 = Singleton.getInstance();\n\t\tSingleton s2 = Singleton.getInstance();\n\n\t\tprint(\"S1\", s1);\n\t\tprint(\"S2\", s2);\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public static Singleton getInstance() {\n\t\tif (_instance == null) {\n\t\t\t_instance = new Singleton();\n\t\t}\n\t\treturn _instance;\n\t}", "public static StaticFactoryInsteadOfConstructors getInstance(Object optionalParameters){\n return new StaticFactoryInsteadOfConstructors();\n }", "public static Singleton getInstance() {\n\t //Je-li promenna instance null, tak se vytvori objekt\n\t if (instance == null) {\n\t instance = new Singleton();\n\t }\n\t //Vratime jedinacka\n\t return instance;\n\t }", "@SuppressWarnings(\"unchecked\")\n public static <T> Singleton<T> instance() {\n // Return the singleton instance from the SingletonHolder.\n return (Singleton<T>) SingletonHolder.INSTANCE;\n }", "synchronized public static SampletypeManager getInstance()\n {\n return singleton;\n }", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "public static utilitys getInstance(){\n\r\n\t\treturn instance;\r\n\t}", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "private SparkeyServiceSingleton(){}", "public static Singleton getInstance() {\n if (instance == null) {\n synchronized (Singleton.class){\n if (instance == null) {\n instance = new Singleton();\n }\n }\n }\n return instance;\n }", "public static SingletonClass getInstance() {\n if (instance == null) {\n instance = new SingletonClass();\n }\n return instance;\n }", "private static LogUtil getInstance() {\r\n if (instance == null) {\r\n final LogUtil l = new LogUtil();\r\n l.init();\r\n if (isShutdown) {\r\n // should not be possible :\r\n if (l.log.isErrorEnabled()) {\r\n l.log.error(\"LogUtil.getInstance : shutdown detected : \", new Throwable());\r\n }\r\n return l;\r\n }\r\n instance = l;\r\n\r\n if (instance.logBase.isInfoEnabled()) {\r\n instance.logBase.info(\"LogUtil.getInstance : new singleton : \" + instance);\r\n }\r\n }\r\n\r\n return instance;\r\n }", "private InnerClassSingleton(){}", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "public static Replica1Singleton getInstance() {\r\n\t\tif (instance==null){\r\n\t\t/*System.err.println(\"Istanza creata\");*/\r\n\t\tinstance = new Replica1Singleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t\r\n\t}", "public static AccountVerificationSingleton getInstance()\n {\n if (uniqueInstance == null)\n {\n uniqueInstance = new AccountVerificationSingleton();\n }\n \n return uniqueInstance;\n }", "public static ThreadSafeSingleton getInstanceWithDoubleCheck() {\n\t\tif (instance == null) {\n\t\t\tsynchronized (ThreadSafeSingleton.class) {\n\t\t\t\tif (instance == null) {\n\t\t\t\t\tinstance = new ThreadSafeSingleton();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "public static MySingleton getInstance() {\r\n\t\tif(instance==null){\r\n\t\t\tinstance= new MySingleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "static void useSingleton(){\n\t\tSingleton singleton = Singleton.getInstance();\n\t\tprint(\"singleton\", singleton);\n\t}", "private Singleton()\r\n\t{\r\n\t\tSystem.out.println(\"1st instance of class Singleton created\");\r\n\t\tstr = \"Constructor init\";\r\n\t}", "public static Singleton getInstance() {\n\n if (_instance == null) {\n synchronized (Singleton.class) {\n if (_instance == null)\n _instance = new Singleton();\n }\n }\n return _instance;\n }", "public DPSingletonLazyLoading getInstance(){ //not synchronize whole method. Instance oluşmuş olsa bile sürekli burada bekleme olur.\r\n\t\tif (instance == null){//check\r\n\t\t\tsynchronized(DPSingletonLazyLoading.class){ //critical section code NOT SYNCRONIZED(this) !!\r\n\t\t\t\tif (instance == null){ //double check\r\n\t\t\t\t\tinstance = new DPSingletonLazyLoading();//We are creating instance lazily at the time of the first request comes.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn instance;\r\n\t}", "public static synchronized N_ThreadSafeSingalton getInstance() throws InterruptedException{\n\t\t\n\t\tif (uniqueInstance == null){\n\t\t\tThread.sleep(1000);// just to show multithreading issue.\n\t\t\tuniqueInstance=new N_ThreadSafeSingalton();\n\t\t}\t\t\n\t\t\n\t\treturn uniqueInstance;\n\t}", "@SuppressWarnings(\"unchecked\")\n public static <T> Singleton<T> instance() {\n // Atomically set the reference's value to a new singleton iff\n // the current value is null. This constructor will most likely\n // be called more than once if instance() is called from\n // multiple threads, but only the first one is used.\n sSingletonAR\n .updateAndGet(u ->\n u != null ? u : new SingletonAR<T>());\n\n // Return the singleton's current value.\n return (Singleton<T>) sSingletonAR.get();\n }", "public static LazySingleton getInstance()\n {\n // Check null\n if (instance == null)\n instance = new LazySingleton();\n return instance;\n\n }", "private InstanceUtil() {\n }", "public static FacadeMiniBank getInstance(){\r\n\r\n\t\tif(singleton==null){\r\n\t\t\ttry {\r\n\t\t\t\t//premier essai : implementation locale\r\n\t\t\t\tsingleton=(FacadeMiniBank) Class.forName(implFacadePackage + \".\" + localeFacadeClassName).newInstance();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(e.getMessage() + \" not found or not created\");\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t}\r\n\t\tif(singleton==null){\r\n\t\t\t//deuxieme essai : business delegate \r\n\t\t singleton=getRemoteInstance();\r\n\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\treturn singleton;\r\n\t}", "public static Singleton getInstance() {\n return mSing;\n }", "public static synchronized SingletonImpl getSingleton() {\n\t\t\n\t\tif(mySingleton == null){\n\t\t\tmySingleton = new SingletonImpl();\n\t\t}\n\t\treturn mySingleton;\n\t}", "public static synchronized SingletonThreadSave getInstance(){\n if(uniqueThreadSaveInstance == null){\n uniqueThreadSaveInstance = new SingletonThreadSave();\n }\n return uniqueThreadSaveInstance;\n }", "public static SingleObject getInstance(){\n return instance;\n }", "public static Singleton instance() {\n return Holder.instance;\n }", "public static ThreadSafe getInstaceDoubleChecking(){\n if(instance==null){\n synchronized (ThreadSafe.class) {\n if (instance==null) {\n instance = new ThreadSafe();\n }\n }\n }\n return instance;\n }", "@Override\n public T getInstance() {\n return instance;\n }", "public static MySingleTon getInstance(){\n if(myObj == null){\n myObj = new MySingleTon();\n }\n return myObj;\n }", "public static synchronized ThreadSafeSingleton getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new ThreadSafeSingleton();\n\t\t}\n\t\treturn instance;\n\t}", "public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }", "private SingletonClass() {\n x = 10;\n }", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "private Instantiation(){}", "public static SingletonDoubleCheck getInstance() {\n\t\tif (_instance == null) {\n\t\t\tsynchronized (SingletonDoubleCheck.class) {\n\t\t\t\tif (_instance == null) {\n\t\t\t\t\t_instance = new SingletonDoubleCheck();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn _instance;\n\t}", "public static synchronized ThreadSafeSingleton getInstance() {\n\t\tif (null == instance) {\n\t\t\tinstance = new ThreadSafeSingleton();\n\t\t}\n\n\t\treturn instance;\n\t}", "public static SingletonClass getInstance() {\n if (instance == null) {\n synchronized (SingletonClass.class) {\n if (instance == null) {\n instance = new SingletonClass();\n }\n }\n }\n return instance;\n }", "public static Main getInstance() {\r\n return instance;\r\n }", "public static SingletonTextureFactory getInstance(){\n\t\treturn instance;\n\t}", "public static class_config getinstance(){\n\t\tif (instance==null){\n\t\t\tinstance = new class_config();\n\t\t\t\n singleton.mongo=new Mongo_DB();\n singleton.nom_bd=singleton.mongo.getNom_bd();\n singleton.nom_table=singleton.mongo.getNom_table();\n singleton.client = Mongo_DB.connect();\n if (singleton.client != null) {\n singleton.db = singleton.mongo.getDb();\n singleton.collection = singleton.mongo.getCollection();\n }\n \n\t\t\tsingleton_admin.admin= new ArrayList<admin_class>();\n\t\t\tsingleton_client.client= new ArrayList<client_class>();\n\t\t\tsingleton_reg.reg= new ArrayList<reg_user_class>();\n\t\t\t\n// A_auto_json.auto_openjson_admin();\n// C_auto_json.auto_openjson_client();\n R_auto_json.auto_openjson_reg();\n //funtions_files.auto_open();\n\t\t\tauto_config.auto_openconfig();\n //class_language.getinstance();\n\t\t\tsingleton_config.lang=new class_language();\n \n connectionDB.init_BasicDataSourceFactory();\n \n\t\t}\n\t\treturn instance;\n\t}", "public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "public synchronized static SynchronizedMethodSingleton getInstance()\n\t{\n\t\tif ( instance == null )\n\t\t{\n\t\t\tinstance = new SynchronizedMethodSingleton();\n\t\t}\n\t\treturn instance;\n\t}", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "Reproducible newInstance();", "public static Main getInstance() {\n return instance;\n }", "public /* synchronized */ static LazyInitClass getInstanceThreadSafe() {\r\n\t\t//first if is for perfrroamce betterment\r\n\t\t//once object got created no need to synchronize and stop other threads to read\r\n\t\tif(instance == null) {\r\n\t\t\tsynchronized (LazyInitClass.class) {\r\n\t\t\t\tif(instance == null) {\r\n\t\t\t\t\tinstance = new LazyInitClass();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "private EagerInitializedSingleton() {\n\t}", "private EagerInitializedSingleton() {\n\t}", "public static SingleObject getInstance(){\n\t\treturn instance;\n\t}", "public static void main(String[] args) throws Exception {\n\n Singleton3 ins = Singleton3.getInstance();\n Constructor constructor = Singleton3.class.getDeclaredConstructor();\n constructor.setAccessible(true);\n Singleton3 ins1 = (Singleton3)constructor.newInstance();\n System.out.println(ins == ins1);\n }", "public static HierarchyFactory getSingleton ()\n {\n return HierarchyFactorySingleton._singleton;\n }", "private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}", "public static J2_Singleton getInstance() {\n\t\tif(singletonInstance == null ) {\n\t\t\tsynchronized(J2_Singleton.class) {\n\t\t\t\tif(singletonInstance == null) {\n\t\t\t\t\tsingletonInstance = new J2_Singleton();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn singletonInstance;\n\t}" ]
[ "0.8354055", "0.8101599", "0.7955176", "0.7903364", "0.7891584", "0.78692836", "0.7778135", "0.765638", "0.76129925", "0.75883126", "0.75095165", "0.74999946", "0.7464005", "0.74014896", "0.73950255", "0.7391344", "0.73908514", "0.7364851", "0.73357207", "0.7323278", "0.7268697", "0.72104305", "0.7203281", "0.72029567", "0.7191493", "0.7187203", "0.7174602", "0.7155235", "0.7150798", "0.71446604", "0.7138158", "0.71337956", "0.71298087", "0.71186507", "0.7106519", "0.7104909", "0.7061944", "0.7059991", "0.70515394", "0.7050747", "0.70408", "0.7032849", "0.70273036", "0.70121825", "0.7002657", "0.699735", "0.6980221", "0.6978978", "0.6973766", "0.69657767", "0.6961058", "0.6959907", "0.6923468", "0.691972", "0.6890537", "0.68879217", "0.6887892", "0.6881665", "0.68671095", "0.6843161", "0.68340695", "0.68327445", "0.6823373", "0.68195975", "0.6813539", "0.68104786", "0.6805062", "0.678746", "0.6777673", "0.6772463", "0.67337936", "0.67230934", "0.67173266", "0.6690567", "0.66795367", "0.66738623", "0.6670755", "0.66535324", "0.66496885", "0.6639596", "0.66340286", "0.6633363", "0.66300476", "0.6626805", "0.66229373", "0.6618036", "0.66145396", "0.66114324", "0.65915847", "0.65813744", "0.65782243", "0.657153", "0.65687037", "0.65625083", "0.65527904", "0.65527904", "0.6552083", "0.65510476", "0.654743", "0.65374166", "0.65198004" ]
0.0
-1
select from ef_user where status = 0 or 1
public static List<user> getAll() throws SQLException { try { userExample example = new userExample(); List<Integer> values = new ArrayList<Integer>(); values.add(0); values.add(1); example.or().andStatusIn(values); return mapper.selectByExample(example); } finally { sqlSession.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Query(\"SELECT u FROM Usuario u WHERE u.estado > 0\")\n List<Usuario> obtenerUsuariosActivos();", "List<User> findUserByActive(Integer active);", "UserStatus getStatus();", "@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.userName = :userName\")\n User findByUsername(@Param(\"userName\") String userName);", "List<StatusByUser> selectByExample(StatusByUserExample example);", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic List<UserDTO> findByStatus(String s) {\n\t\treturn null;\n\t}", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "@Modifying\n\t@Query(\"\tSELECT \tstatus \t\t\" + \"\tFROM \tUser \t\t\" + \" WHERE \temail = :email\")\n\n\tpublic UserStatus findStatusByEmail(String email);", "@Override\r\n\tpublic List<User_Detail> list(String status) {\n\t\treturn null;\r\n\t}", "public List<User> getActiveUsers(boolean active);", "@Override\n\tpublic User getAdminMessage(int status) {\n\t\tString sql = \"select * from user where status=?\";\n\t\tObject[] obj = { status };\n\t\tUser user = new User();\n\t\ttry {\n\t\t\tResultSet res = dbc.execSqlWithResultset(sql, obj);\t\t\t\n\t\t\tif (res.next()) {\n\t\t\t\tuser.setUserId(res.getInt(\"user_id\"));\n\t\t\t\tuser.setPhone(res.getString(\"phone\"));\n\t\t\t\tuser.setAddress(res.getString(\"address\"));\n\t\t\t\tuser.setEmail(res.getString(\"email\"));\n\t\t\t\tuser.setName(res.getString(\"name\"));\n\t\t\t\tuser.setQq(res.getString(\"qq\"));\n\t\t\t\tuser.setRemark(res.getString(\"remark\"));\n\t\t\t\tuser.setState(res.getInt(\"state\"));\n\t\t\t\tuser.setStatus(res.getInt(\"status\"));\n\t\t\t\tuser.setPassword(res.getString(\"password\"));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn user;\n\t}", "public int getEntitystatus();", "@Query(\"SELECT id FROM Users t WHERE t.email =:email AND t.password =:password\")\n @Transactional(readOnly = true)\n Integer viewUser(@Param(\"email\") String email, @Param(\"password\") String password);", "public List<Active> findByUser_UserID(String userID);", "private char getStatus(long userId) throws Exception {\n return new UserDAOHibernate().find(new Long(userId)).getStatus().charValue();\n\n }", "@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "List<SysUser> selectAll();", "@Override\n\tpublic User CheckUser(String username,String password,String administra) {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\t//String sqlString =\"select*from user where username= '\"+username+\"' and password= '\"+password+\"' \";\n\t\tString sqlString=\"select * from user where username = '\"+username+\"' and password = '\"+password+\"' and administra = '0' \";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\",FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\tif (list.size()==0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn list.get(0);\n\t}", "public ResultSet Retuser() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from login where usertype='user'\");\r\n\treturn rs;\r\n\t\r\n}", "public boolean checkUser(String username){\n String hql = \"SELECT c.id from Customer c where c.username = :username\";\n Query query = entityManager.createQuery(hql);\n query.setParameter(\"username\", username);\n try {\n query.getSingleResult();\n }catch(NoResultException e){\n return true;\n }\n return false;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Tseguser> getUsers(String username, String name, String lastName, Boolean status) throws Exception {\r\n\r\n\t\tList<Tseguser> users = null;\r\n\t\tString preQuery = \"SELECT u FROM Tseguser as u \" + \"WHERE u.deleted= false and u.status= :status \";\r\n\r\n\t\tif (!username.isEmpty()) {\r\n\r\n\t\t\tpreQuery = preQuery.concat(\"and u.username like :userName \");\r\n\t\t}\r\n\t\tif (!name.isEmpty()) {\r\n\t\t\tpreQuery = preQuery.concat(\"and u.names like :name \");\r\n\t\t}\r\n\t\tif (!lastName.isEmpty()) {\r\n\t\t\tpreQuery = preQuery.concat(\"and u.lastnames like :lastName \");\r\n\t\t}\r\n\r\n\t\tQuery query = entityManager.createQuery(preQuery);\r\n\t\tquery.setParameter(\"status\", status);\r\n\r\n\t\tif (!username.isEmpty()) {\r\n\t\t\tquery.setParameter(\"userName\", \"%\" + username + \"%\");\r\n\t\t}\r\n\t\tif (!name.isEmpty()) {\r\n\t\t\tquery.setParameter(\"name\", \"%\" + name + \"%\");\r\n\t\t}\r\n\t\tif (!lastName.isEmpty()) {\r\n\t\t\tquery.setParameter(\"lastName\", \"%\" + lastName + \"%\");\r\n\t\t}\r\n\r\n\t\tusers = query.getResultList();\r\n\r\n\t\treturn users;\r\n\t}", "SysRoleUser selectByPrimaryKey(Long id);", "BizUserWhiteList selectByPrimaryKey(Long id);", "@Override\n public boolean isUser(User entity) {\n \tboolean result = false;\n \tUser user = (User) getCurrentSession()\n \t\t.createQuery(\"select u from User u where email = :email and password = :password\")\n \t\t.setParameter(\"email\", entity.getEmail())\n \t\t.setParameter(\"password\", entity.getPassword()).uniqueResult();\n if(user != null) {\n \tresult = true;\n }\n \treturn result;\n }", "public java.util.List<Todo> findByU_S(long userId, int status);", "@Query(value = \"SELECT user FROM User user WHERE user.active = :active\")\n Page<User> findByUserIsActive(Pageable pageable, @Param(\"active\") Integer active);", "protected OrdersEntity findOrders_ByIdUsers_andStatusIsPending() {\n log.info(\"OrdersBean : findOrders_ByIdUsers_andStatusIsPending!\");\n return ordersServices.findByIdUsersAndStatusIsPending(usersBean.getUsersEntity().getId());\n }", "boolean hasUserType();", "@Query(\"SELECT firstName FROM Users t WHERE t.password =:currentPassword AND t.id =:currentUser\")\n @Transactional(readOnly = true)\n String checkPassword(@Param(\"currentPassword\") String currentPassword, @Param(\"currentUser\") Integer currentUser);", "public boolean login(String Usuario, String Password)\n {\n try\n {\n PreparedStatement pstm = null; \n ResultSet rs = null;\n String query = \"SELECT ID_User FROM Usuario WHERE username = ? AND password = ? AND status = ?\";\n pstm = con.prepareStatement(query);\n pstm.setString(1, Usuario);//convertir a String el parametro Usuario\n pstm.setString(2, Password);//convertir a String el parametro Password\n pstm.setBoolean(3, true);//convertir a boolean \n rs = pstm.executeQuery();//ejecutar el query \n if(rs.next())\n {\n return true;\n }else{\n return false;\n }\n }catch(Exception ex)\n {\n ex.printStackTrace();\n return false;\n }\n }", "public TxStatus queryTxStatus(String userId, String name, String statusId) {\n\t\treturn null;\r\n\t}", "@Query(\"select u from User u where u.role = 'PM'\")\n List<User> getAllManagers();", "@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n\n User findByMobileNumber(String mobileNumber);\n User findByMobileNumberAndActiveIsTrue(String mobileNumber);\n}", "SysUser selectByPrimaryKey(Long userId);", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "List<StatusEntity> findByUserId(String userId, Integer limit);", "public List<Status> GetAll() throws SQLException {\n\t\ttry {\n\n\t\t\tthis.TryConnect();\n\n\t\t\tthis.m_objData.SetStoreName(\"sys_status_getAll()\");\n\n\t\t\tResultSetMapper util = new ResultSetMapper<User>();\n\n\t\t\tResultSet lstResult = this.m_objData.ExecToResultSet();\n\n\t\t\tList<Status> lstUser = util.mapRersultSetToObject(lstResult,\n\t\t\t\t\tStatus.class);\n\n\t\t\tif (lstUser == null)\n\t\t\t\treturn null;\n\n\t\t\tif (lstUser.size() > 0)\n\t\t\t\treturn lstUser;\n\t\t\treturn null;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tthis.TryDisconnect();\n\t\t}\n\n\t\treturn null;\n\t}", "boolean hasSelectedUser();", "@Query(\"select u from User u where u.project is null and u.role = 'EMPLOYEE'\")\n List<User> getFreeEmployees();", "Trueorfalse selectByPrimaryKey(Integer tfId);", "List<Student> findAllByStatus(Student.Status status);", "public Boolean isActive(){return status;}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface PendingRepository extends JpaRepository<Pending, Long> {\n\n @Query(\"select pending from Pending pending where pending.user.login = ?#{principal.username}\")\n List<Pending> findByUserIsCurrentUser();\n\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "public int checkUserCredentials(User user) {\n\t\tString username1 = user.getUsername();\n\t\tString password1 = user.getPassword();\n\t\tEntityManager entityManager = factory.createEntityManager();\n\n\t\tString query = \"select u from User u where u.username=?1 and u.password=?2\";\n\t\t// query.setString(\"value\", \"Some value with : in it\");\n\t\tTypedQuery<User> q = entityManager.createQuery(query, User.class);\n\t\tq.setParameter(1, username1);\n\t\tq.setParameter(2, password1);\n\t\tSystem.out.println(\"here i was\");\n\n\t\tif (q.getResultList().size() > 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tquery = \"select u from User u where u.username =?1\";\n\t\tq = entityManager.createQuery(query, User.class);\n\t\tq.setParameter(1, username1);\n\t\t// q.setParameter(2, password1);\n\t\tif (q.getResultList().size() > 0) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 2;\n\t}", "List<BaseUser> selectAll();", "@RequestMapping(value=\"/user/isActive/{isActive}\",method=RequestMethod.GET)\n\t\t\tpublic @ResponseBody ResponseEntity<List<User>> getAllIsActiveUsers(@PathVariable boolean isActive)throws Exception{\n\t\t\t\tList<User> user=null;\n\t\t\t\tuser=userDAO.findByIsActive(isActive);\n\t\t\t\t\treturn new ResponseEntity<List<User>>(user,HttpStatus.OK);\n\t\t\t}", "BaseUser selectByPrimaryKey(String userId);", "boolean hasUserId();", "boolean hasUserId();", "boolean hasUserId();", "RegsatUser selectByPrimaryKey(Long userId);", "public int countByU_S(long userId, int status);", "public int userValidation(Validation v) {\r\n\t\tint a=0;\r\n\t\tString query=\"select * from user_registration where user_name='\"+v.getUsername() +\"' and password='\"+v.getPassword()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\t v.setPassword(rs.getString(\"password\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t\r\n\t\t a=list.size()>0?1:0;\r\n\t\treturn a;\r\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "private static ArrayList<Boolean> retrieveUserPermissionsFromDb(String username) throws IOException, SQLException {\n ArrayList<Boolean> userPermissions = new ArrayList<>();\n ArrayList<String> retrievedUser = retrieveUser(username);\n userPermissions.add(0, stringToBoolean(retrievedUser.get(3))); // Create billboard\n userPermissions.add(1, stringToBoolean(retrievedUser.get(4))); // Edit billboard\n userPermissions.add(2, stringToBoolean(retrievedUser.get(5))); // Edit schedule\n userPermissions.add(3, stringToBoolean(retrievedUser.get(6))); // Edit User\n return userPermissions;\n }", "@Override\n\tpublic long getStatusByUserId();", "public String checkrole() \n { \n \ttry\n {\n String sql =\"select * from user where login='true'\";\n \n Cursor mCur = mDb.rawQuery(sql, null);\n Log.d(\"LEE\",\"hi2\");\n if(mCur.getCount()>0)\n {\n \tmCur.moveToFirst();\n \treturn mCur.getString(mCur.getColumnIndex(\"role\"));\n } \n else\n {\n \treturn \"logout\";\n }\n }\n catch (SQLException mSQLException) \n {\n Log.e(TAG, \"getTestData >>\"+ mSQLException.toString());\n throw mSQLException;\n }\n }", "@Override\n\tpublic List<User> findUserByCondition(UserQuery query) throws Exception {\n\t\treturn userDao.findUserByCondition(query);\n\t}", "WbUser selectByPrimaryKey(Integer userId);", "public java.util.List<Todo> findByTodoBooleanStat(boolean todoBooleanStat);", "boolean loginUser(String email,String password){\n boolean checkUserDetails = checkLoginDetails(email,password);\n boolean userExists = false;\n if(checkUserDetails){\n try{\n userExists =true;\n stmt = con.prepareStatement(\"UPDATE users SET userStatus = ? WHERE email = ?\");\n stmt.setBoolean(1,true);\n stmt.setString(2,email);\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n return userExists;\n }", "public interface UserRepository extends CrudRepository<UserModel, Long> {\n List<UserModel> findByGmtSendGreaterThanEqualAndActiveTrue(long timestamp);\n}", "public ResultSet Retcomp() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company c,login l where l.login_id=c.login_id and l.status='approved'\");\r\n\treturn rs;\r\n}", "List<UUserRole> selectByExample(UUserRoleExample example);", "List<Servico> findByClienteAndStatus(Usuario cliente, StatusServico statusServico);", "public UserEntity containsUserAndValid(long id) {\n Query query = manager.createQuery(\"select e from UserEntity e where e.id=:id\");\n List<UserEntity> list = query.setParameter(\"id\", id).getResultList();\n if (list.size() > 0) {\n UserEntity entity = list.get(0);\n FindIterable<Document> users = database.getCollection(\"users\").find(Filters.and(\n Filters.eq(UserMongo.objectId, new ObjectId(entity.getMongoId())),\n Filters.eq(UserMongo.isAccept, true),\n Filters.eq(UserMongo.isActive, true),\n Filters.or(\n Filters.eq(UserMongo.role, Role.manager),\n Filters.eq(UserMongo.role, Role.teacher)\n )\n ));\n if (users.iterator().hasNext()) {\n return entity;\n }\n }\n return null;\n }", "boolean hasUserManaged();", "@Query(\"select u from User u where u.role = 'EMPLOYEE'\")\n List<User> getAllEmployees();", "List<User> loadActiveUsers(User user);", "boolean isSystemUser() throws RepositoryException;", "public List<Empresatb09EmpresaRegraRenegociacao> buscarPorPessoaStatus(Empresatb01Empresa vo, boolean status) {\n \n StringBuilder query = new StringBuilder();\n Object[] elements = new Object[2];\n\n query.append(\" select c from Empresatb09EmpresaRegraRenegociacao c where c.empresatb01Empresa = ?1 and c.ativo = ?2 \");\n\n elements[0] = vo;\n elements[1] = status;\n\n return super.getListEntity(query.toString(), elements);\n }", "@PreAuthorize(\"permitAll()\")\n @GetMapping(\"/users/deleted/{status}\")\n public ResponseEntity<List<UserDTO>> getUsersByStatus(@PathVariable Boolean status, Pageable pageable)\n throws URISyntaxException {\n\n // If User is not ADMIN and want to get DELETED users\n if (!userSecurityUtil.checkAuthType(AuthorityRoles.ADMIN) && status)\n return new ResponseEntity<>(HttpStatus.METHOD_NOT_ALLOWED);\n\n Page<UserDTO> page = userService.findAllByStatus(status, pageable)\n .map(user -> user.convertToDTO());\n\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/users/deleted\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "@Query(\"select u from User u where u.managedProject is null and u.role = 'PM'\")\n List<User> getFreeManagers();", "StatusReplies selectByPrimaryKey(Integer id);", "@Override\n public List<User> getAccountStatusList(){\n List<User> userList = null;\n userList = adminMapper.getAccountStatusList();\n return userList;\n }", "RoleUser selectByPrimaryKey(String id);", "@Query(\"SELECT * FROM tabUsers WHERE username=:username AND password=:password \")\n User getUserLogin(String username, String password);", "public List<User> getDisabledUsers();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();" ]
[ "0.64240867", "0.6343457", "0.62860465", "0.61192524", "0.6112619", "0.60776085", "0.58867073", "0.5846856", "0.5807052", "0.57976747", "0.5780918", "0.57775223", "0.57586527", "0.5749431", "0.571018", "0.5696207", "0.5693538", "0.5686607", "0.56810135", "0.56586295", "0.56446934", "0.5642797", "0.56031215", "0.56022066", "0.5590624", "0.5582777", "0.55743253", "0.55728257", "0.5568421", "0.55641264", "0.5548636", "0.5547487", "0.553052", "0.5525654", "0.5525653", "0.5524515", "0.5520601", "0.5515658", "0.5515658", "0.5515658", "0.5515658", "0.5515658", "0.5515658", "0.5515658", "0.55100226", "0.54848003", "0.5475046", "0.5470992", "0.54328585", "0.5429279", "0.5420983", "0.54191726", "0.54144734", "0.5409918", "0.54061395", "0.540309", "0.54006624", "0.53990394", "0.53990394", "0.53990394", "0.5388962", "0.53889185", "0.53701144", "0.5365266", "0.5362499", "0.5359349", "0.53556424", "0.5355305", "0.5353126", "0.5345204", "0.5343344", "0.5339418", "0.53381336", "0.5336683", "0.53348476", "0.5333885", "0.53328335", "0.53311336", "0.5316646", "0.5316519", "0.5314849", "0.5313876", "0.5312725", "0.5311674", "0.5310411", "0.5303859", "0.5303371", "0.5299662", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256", "0.5299256" ]
0.646677
0
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
long countByExample(UserCourseHistoryExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "int updateByPrimaryKey(UserCourseHistory record);", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public String getHistory () {\n\t\treturn history;\n\t}", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }" ]
[ "0.6665315", "0.5748959", "0.5640391", "0.5490801", "0.5372556", "0.5327376", "0.5291225", "0.5244358", "0.5226652", "0.5214865", "0.51868296", "0.5138679", "0.51077086", "0.5082593", "0.5076489", "0.50601465", "0.50598073", "0.5050413", "0.504367", "0.50371337", "0.5001896", "0.49972996", "0.4966438", "0.49586493", "0.49496523", "0.49477825", "0.4940045", "0.4936554", "0.4934011", "0.4933056", "0.4921682", "0.49069977", "0.4895252", "0.48836207", "0.48804983", "0.48804194", "0.48771617", "0.48770434", "0.48733237", "0.48713994", "0.48637387", "0.48494363", "0.48470747", "0.48447484", "0.48321798", "0.4828884", "0.482855", "0.48172763", "0.4816756", "0.48119473", "0.48065472", "0.48033124", "0.47889763", "0.4786791", "0.47814107", "0.47635117", "0.4761112", "0.4757242", "0.4754807", "0.474263", "0.47327167", "0.47258955", "0.47258955", "0.4724453", "0.47233856", "0.47226304", "0.47136062", "0.47128826", "0.46995765", "0.46975023", "0.4692325", "0.4688502", "0.46851507", "0.4681838", "0.46772984", "0.4676331", "0.46663675", "0.46607053", "0.46598652", "0.46509564", "0.46473145", "0.4647006", "0.46410656", "0.46369308", "0.46365088", "0.4635844", "0.4635567", "0.4635328", "0.4633163", "0.46228826", "0.4617458", "0.46161965", "0.46157622", "0.46123868", "0.46075532", "0.46033174", "0.45982793", "0.45958918", "0.45925897", "0.45924157" ]
0.47344294
60
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int deleteByExample(UserCourseHistoryExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.6665005", "0.5750093", "0.56398803", "0.54896873", "0.53728217", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50598925", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int deleteByPrimaryKey(String id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.6665005", "0.5750093", "0.56398803", "0.54896873", "0.53728217", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50598925", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int insert(UserCourseHistory record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.6665005", "0.5750093", "0.56398803", "0.54896873", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50598925", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.53728217
4
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int insertSelective(UserCourseHistory record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "int updateByPrimaryKey(UserCourseHistory record);", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public String getHistory () {\n\t\treturn history;\n\t}", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }" ]
[ "0.6665315", "0.5748959", "0.5640391", "0.5490801", "0.5372556", "0.5327376", "0.5291225", "0.5244358", "0.5226652", "0.5214865", "0.51868296", "0.5138679", "0.51077086", "0.5082593", "0.5076489", "0.50601465", "0.50598073", "0.5050413", "0.504367", "0.50371337", "0.5001896", "0.49972996", "0.4966438", "0.49496523", "0.49477825", "0.4940045", "0.4936554", "0.4934011", "0.4933056", "0.4921682", "0.49069977", "0.4895252", "0.48836207", "0.48804983", "0.48804194", "0.48771617", "0.48770434", "0.48733237", "0.48713994", "0.48637387", "0.48494363", "0.48470747", "0.48447484", "0.48321798", "0.4828884", "0.482855", "0.48172763", "0.4816756", "0.48119473", "0.48065472", "0.48033124", "0.47889763", "0.4786791", "0.47814107", "0.47635117", "0.4761112", "0.4757242", "0.4754807", "0.474263", "0.47344294", "0.47327167", "0.47258955", "0.47258955", "0.4724453", "0.47233856", "0.47226304", "0.47136062", "0.47128826", "0.46995765", "0.46975023", "0.4692325", "0.4688502", "0.46851507", "0.4681838", "0.46772984", "0.4676331", "0.46663675", "0.46607053", "0.46598652", "0.46509564", "0.46473145", "0.4647006", "0.46410656", "0.46369308", "0.46365088", "0.4635844", "0.4635567", "0.4635328", "0.4633163", "0.46228826", "0.4617458", "0.46161965", "0.46157622", "0.46123868", "0.46075532", "0.46033174", "0.45982793", "0.45958918", "0.45925897", "0.45924157" ]
0.49586493
23
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.6665005", "0.5750093", "0.54896873", "0.53728217", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50598925", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.56398803
2
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
UserCourseHistory selectByPrimaryKey(String id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.5750093", "0.56398803", "0.54896873", "0.53728217", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50598925", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.6665005
0
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int updateByExampleSelective(@Param("record") UserCourseHistory record, @Param("example") UserCourseHistoryExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.6665005", "0.5750093", "0.56398803", "0.54896873", "0.53728217", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50598925", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int updateByExample(@Param("record") UserCourseHistory record, @Param("example") UserCourseHistoryExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "int updateByPrimaryKey(UserCourseHistory record);", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public String getHistory () {\n\t\treturn history;\n\t}", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }" ]
[ "0.6665315", "0.5748959", "0.5640391", "0.5490801", "0.5372556", "0.5327376", "0.5291225", "0.5244358", "0.5226652", "0.5214865", "0.51868296", "0.5138679", "0.51077086", "0.5082593", "0.5076489", "0.50601465", "0.50598073", "0.5050413", "0.504367", "0.50371337", "0.5001896", "0.49972996", "0.4966438", "0.49586493", "0.49496523", "0.49477825", "0.4940045", "0.4936554", "0.4934011", "0.4933056", "0.4921682", "0.49069977", "0.4895252", "0.48836207", "0.48804983", "0.48804194", "0.48771617", "0.48770434", "0.48733237", "0.48713994", "0.48637387", "0.48494363", "0.48470747", "0.48447484", "0.48321798", "0.4828884", "0.482855", "0.48172763", "0.4816756", "0.48119473", "0.48065472", "0.48033124", "0.47889763", "0.4786791", "0.47814107", "0.47635117", "0.4761112", "0.4757242", "0.4754807", "0.474263", "0.47344294", "0.47327167", "0.47258955", "0.47258955", "0.4724453", "0.47233856", "0.47226304", "0.47136062", "0.47128826", "0.46995765", "0.46975023", "0.4692325", "0.4688502", "0.46851507", "0.4681838", "0.46772984", "0.4676331", "0.46663675", "0.46607053", "0.46598652", "0.46509564", "0.46473145", "0.4647006", "0.46410656", "0.46369308", "0.46365088", "0.4635844", "0.4635567", "0.4635328", "0.4633163", "0.46228826", "0.4617458", "0.46161965", "0.46157622", "0.46123868", "0.46075532", "0.46033174", "0.45982793", "0.45958918", "0.45925897", "0.45924157" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int updateByPrimaryKeySelective(UserCourseHistory record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.6665005", "0.5750093", "0.56398803", "0.54896873", "0.53728217", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50598925", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table user_course_history
int updateByPrimaryKey(UserCourseHistory record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCourseHistory selectByPrimaryKey(String id);", "public Courses getCourseTable();", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "int insert(UserCourseHistory record);", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> getAllCreditHistory() throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory\");\n\n\t\t\t// 列:id; change; date\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempUserID;\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempUserID = result.getString(1);\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(Integer.parseInt(tempUserID), Integer.parseInt(tempChange),\n\t\t\t\t\t\tDate.valueOf(tempDate), CreditMovement.valueOf(tempCreditMovement),\n\t\t\t\t\t\tInteger.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "private EventHistoryTable() {}", "private void LogPurchaseHistoryTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PURCHASEHISTORY, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of PurchaseHistory Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_ID))) +\n \", pid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PID))) +\n \", sid:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_SID))) +\n \", price:\" + String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.PURCHASEHISTORY_PRICE))) +\n \", quality:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PURCHASEHISTORY_QUALITY))) +\n \", timestamp:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PURCHASEHISTORY_DATE))) );\n c.moveToNext();\n }\n\n db.close();\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "org.naru.park.ParkController.CommonAction getGetUserHistory();", "public void setCourseTable(Courses value);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public List<Loginhistory> getLoginHistoryList() throws Exception {\n\r\n List<Loginhistory> userRoleList = new ArrayList<Loginhistory>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Loginhistory u order by u.historyid asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ArrayList<HistoryItemCS> getAllHistoryCSes() {\n\n ArrayList<HistoryItemCS> historyCSes = new ArrayList<HistoryItemCS>();\n\n // 1. build the query\n String query = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. get reference to writable DB\n Cursor cursor = db.rawQuery(query, null);\n\n // 3. go over each row, build cs and add it to list\n HistoryItemCS historyCS;\n if (cursor.moveToFirst()) {\n do {\n historyCS = new HistoryItemCS();\n historyCS.setId(cursor.getInt(0));\n historyCS.setAddress(cursor.getString(1));\n historyCS.setDistrict(cursor.getString(2));\n historyCS.setDescription(cursor.getString(3));\n historyCS.setType(cursor.getString(4));\n historyCS.setSocket(cursor.getString(5));\n historyCS.setQuantity(cursor.getInt(6));\n historyCS.setLatitude(cursor.getString(7));\n historyCS.setLongitude(cursor.getString(8));\n historyCS.setMatching_index(cursor.getInt(9));\n\n // Add cs to list of cs\n historyCSes.add(historyCS);\n } while (cursor.moveToNext());\n }\n\n if (cursor != null)\n cursor.close();\n\n Log.d(\"getAllHistoryCSes\", historyCSes.toString());\n\n // 4. return list of cs\n return historyCSes;\n }", "@Query(\"SELECT * FROM course ORDER BY startDate DESC\")\n LiveData<List<CourseEntity>> getAllCourses();", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "@Override\r\n\tpublic List<Course> fetchNotEnrolledCourses(User user) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Courses\\\" where \\\"Registration DB\\\".\\\"Courses\\\".\\\"isActive\\\"=true\\r\\n\"\r\n\t\t\t\t+ \"and \\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" NOT IN(select \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\" from \\\"Registration DB\\\".\\\"Enrollments\\\"\\r\\n\"\r\n\t\t\t\t+ \"where \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"id\\\"=?)\";\r\n\t\tObject[] args = { user.getId() };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\n\tpublic List<Map> boardHistoryList(int cPage, int numPerPage, int usid) {\n\t\treturn dao.boardHistoryList(session, cPage, numPerPage, usid);\n\t}", "public History(\n Long historyId,\n @JsonProperty(\"inspector_id\") Long inspectorId,\n @JsonProperty(\"estate_id\") Long estateId,\n @JsonProperty(\"view_date\") Timestamp viewDate\n ) {\n this.historyId = historyId;\n this.inspectorId = inspectorId;\n this.estateId = estateId;\n this.viewDate = viewDate;\n }", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "int insertSelective(UserCourseHistory record);", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic Map<String, List<FacebookUser>> userdetailwithhistoryservice() throws FacebookException {\n\t\treturn id.userdetailwithhistorydao();\n\t}", "@GetMapping(\"/testhistory/{std}/{rollNo}\")\n\tpublic List<AttemptedTest> getTestHistory(@PathVariable(\"std\") Long std, @PathVariable(\"rollNo\") Long rollNo) {\n\t\tString methodName = \"getTestHistory() inside StudentController class\";\n\t\tlogger.info(methodName + \"called\");\n\t\treturn studentService.getHistory(std, rollNo);\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Course> fetchEnrolledCourses(User user) {\r\n\t\tString sql = \"select * from \\\"Registration DB\\\".\\\"Enrollments\\\" JOIN \\\"Registration DB\\\".\\\"Courses\\\" ON \\\"Registration DB\\\".\\\"Enrollments\\\".\\\"courseId\\\"=\\\"Registration DB\\\".\\\"Courses\\\".\\\"courseId\\\" where \\\"Registration DB\\\".\\\"Enrollments\\\".id=? and \\\"Registration DB\\\".\\\"Enrollments\\\".semester=? and \\\"Registration DB\\\".\\\"Enrollments\\\".year=?\";\r\n\t\tObject[] args = { user.getId(), this.getCurrentSemester(), Calendar.getInstance().get(Calendar.YEAR) };\r\n\t\treturn jdbcTemplate.query(sql, args, new BeanPropertyRowMapper<Course>(Course.class));\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public List getUserTravelHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Travel\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private History() {}", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public void showIncrementHistory(EmpCredit empCredit, HttpServletRequest request, String query) {\r\n\t\ttry {\r\n\t\t\tObject salHeaderObj[][] = getSqlModel().getSingleResult(query);\r\n\t\t\tdouble monthAMT = 0.0;\r\n\t\t\tdouble annualSum = 0.0;\r\n\t\t\tif(salHeaderObj!=null && salHeaderObj.length >0){\r\n\t\t\t\tArrayList innerList= new ArrayList();\r\n\t\t\t\tfor (int i = 0; i < salHeaderObj.length; i++) {\r\n\t\t\t\t\tEmpCredit bean = new EmpCredit();\r\n\t\t\t\t\tbean.setCreditNameItt(String.valueOf(salHeaderObj[i][0]).toUpperCase());\r\n\t\t\t\t\tbean.setCreditPeriodItt(String.valueOf(salHeaderObj[i][1]));\r\n\t\t\t\t\tbean.setCreditAmountItt(Utility.twoDecimals(String.valueOf(salHeaderObj[i][2])));\r\n\t\t\t\t\tbean.setCredCode(String.valueOf(salHeaderObj[i][4]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(String.valueOf(salHeaderObj[i][1]).equals(\"Monthly\")){\r\n\t\t\t\t\t\tmonthAMT += Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*12));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Quarterly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*4));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Half Yearly\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))*2));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(String.valueOf(salHeaderObj[i][1]).equals(\"Annually\")){\r\n\t\t\t\t\t\tannualSum+=Double.parseDouble(formatter.format(Double.parseDouble(String.valueOf(salHeaderObj[i][2]))));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinnerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\tempCredit.setSalHeaderList(innerList);\r\n\t\t\t\tempCredit.setTotalamt(formatter.format(Double.parseDouble(String.valueOf(monthAMT))));\r\n\t\t\t\tempCredit.setAnnualAmt(formatter.format(Double.parseDouble(String.valueOf(annualSum))));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }", "public RolesHistory rolesHistory() {\n return this.rolesHistory;\n }", "@Override\n\tpublic UserHistory getLatestUserHistory(User user) {\n\t\tUserHistory userHistory = new UserHistory();\n\t\tlog.info(\"User id:\" + user.getId());\n\t\ttry{userHistory = (UserHistory) em.createQuery(\n\t\t\t\t\"select uh from UserHistory uh where uh.userId is :userId order by cartId desc\")\n\t\t\t\t.setParameter(\"userId\", user.getId()).getSingleResult();\n\t\t//return userHistoryList.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn userHistory;\n\t}", "public String history(){\n return this.inventoryHistory.toString();\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\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}\n\t\t\n\t\treturn list;\n\t}", "public static String getHistoryTableName(int nLocation) {\r\n switch (nLocation) {\r\n case 0:\r\n return \"NCHistory\";\r\n case 1:\r\n return \"Call_History\";\r\n default:\r\n return null;\r\n }\r\n }", "@Generated(hash = 465397896)\n public List<SearchHistoryTable> getListSearchHistory() {\n if (listSearchHistory == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SearchHistoryTableDao targetDao = daoSession.getSearchHistoryTableDao();\n List<SearchHistoryTable> listSearchHistoryNew = targetDao._queryUserTable_ListSearchHistory(id);\n synchronized (this) {\n if (listSearchHistory == null) {\n listSearchHistory = listSearchHistoryNew;\n }\n }\n }\n return listSearchHistory;\n }", "@Select(\"select course.id_course,\"\n\t\t\t+ \"course.name, \"\n\t\t\t+ \"course.credits \" \n\t\t\t+ \"from studentcourse \"\n\t\t\t+ \"join course on studentcourse.id_course= course.id_course \" \n\t\t\t+ \"join student on studentcourse.npm= student.npm\")\n\tList<CourseModel> selectCourses2(@Param(\"npm\") String npm);", "public List getUserSickHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Sick\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "@Override\n\tpublic List<TCourse> getCourses(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TCourse> courses=new ArrayList<TCourse>();\n\t\tcourses=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn courses;\n\t}", "public List<ApplicationUserHistory> listApplicationUserHistory(Long applicationUser)\n {\n List<ApplicationUserHistory> result = this.getApplicationUserDao().listApplicationUserHistory(applicationUser);\n\n return result;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public java.util.List<EncounterClassHistory> classHistory() {\n return getList(EncounterClassHistory.class, FhirPropertyNames.PROPERTY_CLASS_HISTORY);\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void setLastCourse(Course lastCourse) {\n this.lastCourse = lastCourse;\n }", "long countByExample(UserCourseHistoryExample example);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Course> getCoursesAreActiveIn(LocalDate date){\n ArrayList<Course> allCourses = new ArrayList();\n String statement = GET_COURSES_ARE_ACTIVE_IN;\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object) date,(Object) date});\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getCoursesAreActiveIn()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return allCourses;\n }", "private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }", "private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Order> getOrderHistory();", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic ArrayList<UserCreditHistoryPO> findCreditHistory(int userId) throws RemoteException {\n\t\tArrayList<UserCreditHistoryPO> list = new ArrayList<UserCreditHistoryPO>();\n\n\t\ttry {\n\t\t\tstatement = connect.prepareStatement(\"select * from usercredithistory where id = ?\");\n\n\t\t\t// 列:id; change; date\n\t\t\tstatement.setString(1, String.valueOf(userId));\n\n\t\t\tresult = statement.executeQuery();\n\t\t\tString tempChange;\n\t\t\tString tempDate;\n\t\t\tString tempCreditMovement;\n\t\t\tString tempRemain;\n\n\t\t\t// 遍历result\n\t\t\twhile (result.next()) {\n\t\t\t\ttempChange = result.getString(2);\n\t\t\t\ttempDate = result.getString(3);\n\t\t\t\ttempCreditMovement = result.getString(4);\n\t\t\t\ttempRemain = result.getString(5);\n\t\t\t\tlist.add(new UserCreditHistoryPO(userId, Integer.parseInt(tempChange), Date.valueOf(tempDate),\n\t\t\t\t\t\tCreditMovement.valueOf(tempCreditMovement), Integer.parseInt(tempRemain)));\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}\n\t\treturn list;\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }", "@Override\n\tpublic void updateHistory(int userID, int change, Date date, CreditMovement creditMovement, int remain)\n\t\t\tthrows RemoteException {\n\t\ttry {\n\t\t\t// 列:id; change; date\n\t\t\tstatement = connect.prepareStatement(\"insert into usercredithistory values(?, ?, ?,?,?)\");\n\n\t\t\tstatement.setString(1, String.valueOf(userID + \"\"));\n\t\t\tstatement.setString(2, String.valueOf(change + \"\"));\n\t\t\tstatement.setString(3, String.valueOf(date));\n\t\t\tstatement.setString(4, String.valueOf(creditMovement));\n\t\t\tstatement.setString(5, String.valueOf(remain + \"\"));\n\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public String toString ()\r\n\t{\r\n\t\treturn history + \" \";\r\n\t}", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List getUserUnpaidHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Unpaid\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public SubscriberNumberMgmtHistory getHistory()\r\n {\r\n return history_;\r\n }", "public Cursor fetchAllCourses() {\r\nreturn database.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null);\r\n}", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public org.naru.park.ParkController.CommonAction getGetUserHistory() {\n if (getUserHistoryBuilder_ == null) {\n return getUserHistory_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getUserHistory_;\n } else {\n return getUserHistoryBuilder_.getMessage();\n }\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public void insertHistory(RecordDTO recordDTO);", "@Override\n\tpublic List<SimpleObject> getTransactionDatesForShiftsHistory(ShiftsVo shiftsVo) {\n\t\tList<SimpleObject> objects = new ArrayList<SimpleObject>();\n\t\ttry{\n\t\t\t\n\t\t\tList tempList = sessionFactory.getCurrentSession().createSQLQuery(\"SELECT `Shift_id` , CONCAT(DATE_FORMAT(Transaction_Date,'%d/%m/%Y'),' - ', Sequence_Id) AS tname FROM `shifts` WHERE `Customer_Id`=\"+shiftsVo.getCustomerDetailsId()+\" and `Company_id`=\"+shiftsVo.getCompanyDetailsId()+\" and `Country_Id`=\"+shiftsVo.getCountryId()).list();\n\t\t\tfor(Object object : tempList){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tobjects.add(new SimpleObject((Integer)obj[0],obj[1]+\"\"));\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tlog.error(\"Error Occured \",e);\n\t\t}\n\t\treturn objects;\n\t}", "public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }", "public static String addAccountHistory(String account, String billAmount, String dueDate, String paidDate, String wasLate){\n return \"insert into account_history(ah_accountnum,ah_billamount,ah_billdate,ah_paydate,ah_waslate) values\" +\n \"('\"+account+\"'\"+\",'\"+billAmount+\"'\"+\",'\"+dueDate+\"'\"+\",'\"+paidDate+\"'\"+\",'\"+wasLate+\"')\";\n }" ]
[ "0.6665005", "0.5750093", "0.56398803", "0.54896873", "0.53728217", "0.5326284", "0.52917105", "0.52445734", "0.52257955", "0.5214775", "0.5185996", "0.513987", "0.51073", "0.50823224", "0.5076907", "0.50584495", "0.5051544", "0.5043173", "0.50390035", "0.5000504", "0.4995881", "0.4964351", "0.49589634", "0.4950719", "0.49469504", "0.49405682", "0.4937095", "0.49344897", "0.4933949", "0.4920198", "0.4907171", "0.48940533", "0.48825", "0.48803923", "0.48796046", "0.48781413", "0.48753905", "0.48728997", "0.4870505", "0.4864464", "0.4850194", "0.48468673", "0.4843748", "0.48327154", "0.4828857", "0.4827587", "0.48176637", "0.481638", "0.481146", "0.4804439", "0.48022592", "0.47891244", "0.4785733", "0.47806224", "0.47638148", "0.4763368", "0.4755576", "0.47555274", "0.4743238", "0.47344548", "0.4731954", "0.47245476", "0.47245476", "0.47244954", "0.47240758", "0.47227985", "0.47156695", "0.47136298", "0.4697468", "0.4696232", "0.46924338", "0.4687079", "0.46846515", "0.46829018", "0.46783817", "0.46767274", "0.46676874", "0.4661462", "0.4658578", "0.46516263", "0.4649228", "0.4645969", "0.46411702", "0.46370456", "0.46365047", "0.46364236", "0.46353522", "0.4634233", "0.46339306", "0.46214008", "0.4617574", "0.46167842", "0.46156645", "0.46118766", "0.46095952", "0.46025124", "0.4597542", "0.45955032", "0.45948273", "0.45929354" ]
0.50598925
15
Initializes the confabulator for usage. Please note that calling this method will clear the link data.
public void initialize(int maxLinkDistance,int maxLinkCount,List<Link> links) { lockMe(this); if (maxLinkDistance<2) { maxLinkDistance=2; } else if (maxLinkDistance>32) { maxLinkDistance=32; } if (maxLinkCount<100) { maxLinkCount=100; } this.maxLinkDistance = maxLinkDistance; this.maxLinkCount = maxLinkCount; this.links.clear(); this.linksFromDistance.clear(); this.linksToDistance.clear(); if (links!=null) { for (Link link: links) { addLinkNoLock(link); } } unlockMe(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void _initLinks() {\n\tpeopleLink = null;\n\tchangeLogDetailsesLink = null;\n}", "protected void _initLinks() {\n\t\tleaseTaskStartsLink = null;\n\t\tleaseRulesLink = null;\n\t}", "public void initialize(ConfabulatorObject original) {\n\t\tinitialize(original.getMaxLinkDistance(),original.getMaxLinkCount(),original.getLinks());\n\t}", "private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}", "public void postInitAfterConfiguration() {\n\t\t// each configuration are only supporting one log handler\n\t\tcrawlerRecordHandler = new CrawlerRecord(this);\n\t\t// TODO: other configurations needs to be added after all configurations are set\n\t}", "public void initializeConnections(){\n cc = new ConnectorContainer();\n cc.setLayout(null);\n cc.setAutoscrolls(true);\n connections = new LinkedList<JConnector>();\n agents = new LinkedList<JConnector>();\n }", "public CrawlerConfiguration() {\n\t\tinitConfiguration();\n\t}", "public static void initialize() {\r\n\t\tgraph = null;\r\n\t\tmseeObjectNames = new HashMap<String, String>();\r\n\t\tmseeEventTypes = new HashMap<String, String>();\r\n\t\tmodifiedIdentifiers = new HashMap<String, String>();\r\n\t}", "private static void init() throws AggregatorException {Populator Configuration\n\n// //ASIN Populator\n// PopulatorData asinPopulator = new PopulatorData(ASINPopulator.class.getName(),\n// new ArrayList<String>());\n// configuration.put(\"ASINPopulator\", asinPopulator);\n//\n// //Title Populator\n// ArrayList<String> titlePopulatorDependencies = new ArrayList<String>();\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// PopulatorData titlePopulator = new PopulatorData(TitlePopulator.class.getName(),\n// titlePopulatorDependencies);\n// configuration.put(\"TitlePopulator\", titlePopulator);\n//\n// \n }", "private void init() {\n clearCaches();\n }", "@Override\n public void initialize() {\n if(prefix == null)\n prefix = getToolkit().getArguments().referenceFile.getAbsolutePath();\n BWTFiles bwtFiles = new BWTFiles(prefix);\n BWAConfiguration configuration = new BWAConfiguration();\n aligner = new BWACAligner(bwtFiles,configuration);\n }", "private static synchronized void init() {\n if (CONFIG_VALUES != null) {\n return;\n }\n\n CONFIG_VALUES = new Properties();\n processLocalConfig();\n processIncludedConfig();\n }", "public LinkBuilder() {\n }", "private void initialize() {\n\t\tcacheableImpl = new CacheableImpl();\n\t\tsetToolTipText(\"\");\n\t}", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "public synchronized static void initConfig() {\n\t\tMap<CatPawConfigProperty, String> initialValues = new HashMap<CatPawConfigProperty, String>();\n\t\tinitConfig(initialValues);\n\t}", "public static void init() {\r\n\t\tsetPolicy(BPF.getInstance().getConfig().routes_setting()\r\n\t\t\t\t.getQueuing_policy());\r\n\t}", "private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelper.exit(\"Cannot load the configuations from the configuration file please check the channelConfig.xml\");\r\n }\r\n }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}", "private void init() {\n\t\thead = -1;\n\t\tnumElements = 0;\n\t}", "private ConfigurationModel() {\r\n\tloadConfiguration();\r\n }", "public Conf() {\n createIfNotExists = false;\n deleteInputOnSuccess = false;\n }", "private void init() {\n\t\tMobclickAgent.onError(this);\n\t\tMobclickAgent.setUpdateOnlyWifi(false);\n\t\tMobclickAgent.update(this);\n\t\tUMFeedbackService.enableNewReplyNotification(this,\n\t\t\t\tNotificationType.AlertDialog);\n\t\tMobclickAgent.updateOnlineConfig(this);\n\n\t\tString header = MobclickAgent.getConfigParams(this, \"header\");\n\t\tif (\"\".equals(header)) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tif (header.equals(\"on\")) {\n\t\t\t\turl = MobclickAgent.getConfigParams(this, \"url\");\n\t\t\t\tshowHeader = true;\n\t\t\t} else {\n\t\t\t\tshowHeader = false;\n\t\t\t}\n\n\t\t}\n\n\t\tString footer = MobclickAgent.getConfigParams(this, \"footer\");\n\t\tif (\"\".equals(footer)) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tif (footer.equals(\"on\")) {\n\t\t\t\turl = MobclickAgent.getConfigParams(this, \"url\");\n\t\t\t\tshowFooter = true;\n\t\t\t} else {\n\t\t\t\tshowFooter = false;\n\t\t\t}\n\t\t}\n\t}", "private void init() throws Exception{\n mapper = new ObjectMapper();\n\n // Create the linkRequest\n attribute = AttributeFixture.standardAttribute();\n\n\n }", "public RuleConfiguration() {\n\t\trule = new Rule();\n\t}", "public void initialize() {\n this.loadDownloadList();\n }", "private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }", "private void init() {\r\n head = new DLList.Node<T>(null);\r\n head.setNext(tail);\r\n tail = new DLList.Node<T>(null);\r\n tail.setPrevious(head);\r\n size = 0;\r\n }", "public void initialize() {\n // empty for now\n }", "public void init() {\n\t\t}", "@Override\n\tpublic void initUserCreditHistoryDataService() throws RemoteException {\n\t\tconnect = configure.init();\n\t}", "protected void initialize() {\n \t\n }", "default void init() {\n System.out.println(\"Init connector object...\");\n }", "public void init() {\n if (getConfig().isEnabled()) {\n super.init();\n }\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "public void initialize() {\n if (!BungeeBan.getInstance().getDataFolder().exists()) {\n BungeeBan.getInstance().getDataFolder().mkdirs();\n }\n File file = this.getConfigurationFile();\n if (!file.exists()) {\n try {\n file.createNewFile();\n if (this.defaultConfig != null) {\n try (InputStream is = BungeeBan.getInstance().getResourceAsStream(this.defaultConfig);\n OutputStream os = new FileOutputStream(file)) {\n ByteStreams.copy(is, os);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.reload();\n }", "public void initialize()\n {\n }", "public void init() {\n cupDataChangeListener = new CupDataChangeListener(dataBroker);\n }", "public void initialize() {\n this.loadBidDetails();\n }", "@Override\n public void init() throws Exception {\n config = new Config();\n }", "public BindingConfigurationPanel() {\n initComponents();\n initGUI();\n }", "public BlobParserConfig() {\n\t\tthis.libraryPath = null;\n\t\tthis.parserClass = null;\n\t}", "@Override\n public void init(DsConfiguration conf, DsMetaData metaData) {\n logger.info(\"PilosaHandler initialized.\");\n this.pilosaClient = PilosaClient.withAddress(this.address, this.address);\n createSchema();\n super.init(conf, metaData);\n }", "private void setupDefaultAsPerProperties()\n {\n /// Do the minimum of what App.init() would do to allow to run.\n Gui.mainFrame = new MainFrame();\n App.p = new Properties();\n App.loadConfig();\n System.out.println(App.getConfigString());\n Gui.progressBar = Gui.mainFrame.getProgressBar(); //must be set or get Nullptr\n\n // configure the embedded DB in .jDiskMark\n System.setProperty(\"derby.system.home\", App.APP_CACHE_DIR);\n\n // code from startBenchmark\n //4. create data dir reference\n App.dataDir = new File(App.locationDir.getAbsolutePath()+File.separator+App.DATADIRNAME);\n\n //5. remove existing test data if exist\n if (App.dataDir.exists()) {\n if (App.dataDir.delete()) {\n App.msg(\"removed existing data dir\");\n } else {\n App.msg(\"unable to remove existing data dir\");\n }\n }\n else\n {\n App.dataDir.mkdirs(); // create data dir if not already present\n }\n }", "private void init() {\r\n\r\n analyticsManager = new xxxxAnalytics(getApplicationContext());\r\n\r\n analyticsSender = new AnalyticsSender(this);\r\n\r\n provider = FeedProviderImpl.getInstance(this);\r\n\r\n feedId = getIntent().getExtras().getInt(Constants.FEED_ID);\r\n if (provider != null) {\r\n friendFeed = provider.getFeed(feedId);\r\n }\r\n\r\n unifiedSocialWindowView = findViewById(R.id.linearLayoutForUnifiedSocialWindow);\r\n\r\n\r\n // Get member contacts.\r\n memberContacts = provider.getContacts(feedId);\r\n\r\n lastDiffs = new LinkedBlockingDeque<Integer>();\r\n }", "public void initialConfig() {\n }", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }", "protected abstract void _init(DynMap config);", "@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 final void initialize() {\n initialize(0);\n }", "public void init() {\r\n\r\n\t}", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "private Config() {\n }", "private void initialise() {\n \thashFamily = new Hash[this.r];\n for(int i= 0; i < this.r;i++)\n {\n \tthis.hashFamily[i] = new Hash(this.s * 2);\n }\n this.net = new OneSparseRec[this.r][this.s *2];\n for(int i = 0 ; i < this.r; i++)\n \tfor(int j =0 ; j< this.s * 2 ; j++)\n \t\tthis.net[i][j] = new OneSparseRec();\n \n }", "private void initData() {\n\t}", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "private void init() {\n\n\t}", "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}", "public static void initialize() {\n \tinitialize(new Configuration().configure());\n }", "public void reset() {\n noIndex= false;\n noFollow= false;\n noCache= false;\n baseHref= null;\n }", "private void initPerRequestState() {\n if (this.trendValueDao == null) {\n this.trendValueDao = new MetricTrendValueDataSource();\n }\n }", "protected void onInit() {\n super.onInit();\n ruleManager = getBean(RuleManager.BEAN_NAME);\n }", "private void init() {\n sensorEnabled = false;\n contextEventHistory = new ArrayList<ContextEvent>(CONTEXT_EVENT_HISTORY_SIZE);\n }", "public void initialize() {\n\t\tDynamoConfig config = new DynamoConfig();\n\t\tthis.setup(config);\n\t}", "protected void initialize() {\n\t\tsquaredInputs = false;\n\t\t// SmartDashboard.putString(\"DB/LED 0\", \"TeleOpDrive is init\");\n\t}", "protected void init() {\n super.init();\n uriExpr = null;\n uri = null;\n nameExpr = null;\n name = null;\n qname = null;\n attrExpr = null;\n attr = null;\n emptyExpr = null;\n empty = false;\n }", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "private void clearLinks() {\n links_ = emptyProtobufList();\n }", "public void init() {\n\r\n\t\ttry {\r\n\r\n\t\t\t//// 등록한 bean 에 있는 datasource를 가져와서 Connection을 받아온다\r\n\t\t\tcon = ds.getConnection();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void initialise() {\n addHeaderSetting(new HeaderSettingInteger(Setting.VERSION.toString(),0,4,0x6));\n addHeaderSetting(new HeaderSettingInteger(Setting.TRAFFIC_CLASS.toString(),4,8,0));\n addHeaderSetting(new HeaderSettingLong(Setting.FLOW_LABEL.toString(),12,20,0));\n addHeaderSetting(new HeaderSettingLong(Setting.PAYLOAD_LENGTH.toString(),32,16,20));\n addHeaderSetting(new HeaderSettingInteger(Setting.NEXT_HEADER.toString(),48,8,253));\n addHeaderSetting(new HeaderSettingInteger(Setting.HOP_LIMIT.toString(),56,8,255));\n addHeaderSetting(new HeaderSettingHexString(Setting.SOURCE_ADDRESS.toString(),64,128,\"\"));\n addHeaderSetting(new HeaderSettingHexString(Setting.DESTINATION_ADDRESS.toString(),192,128,\"\"));\n }", "public void init() {\n \t\tif (initLock.start()) {\n \t\t\ttry {\n \t\t\t\tthis._init(this.config);\n \t\t\t} finally {\n \t\t\t\tinitLock.end();\n \t\t\t}\n \t\t}\n \t}", "@PostConstruct\n\tprivate void init() {\n\t\tdigester.setAlgorithm(\"SHA-512\");\n\t\tdigester.setIterations(100000);\n\t\tdigester.setSaltSizeBytes(16);\n\t\tdigester.initialize();\n\t}", "public void initialize()\r\n\t{\r\n\t\tdatabaseHandler = DatabaseHandler.getInstance();\r\n\t\tfillPatientsTable();\r\n\t}", "private void initData() {\n }", "private static void _reset() {\n // clear metrics\n HystrixCommandMetrics.reset();\n HystrixThreadPoolMetrics.reset();\n HystrixCollapserMetrics.reset();\n // clear collapsers\n HystrixCollapser.reset();\n // clear circuit breakers\n HystrixCircuitBreaker.Factory.reset();\n HystrixPlugins.reset();\n HystrixPropertiesFactory.reset();\n currentCommand.set(new LinkedList<HystrixCommandKey>());\n }", "private void init() throws UnknownHostException, RemoteException {\n\n FileApp.setMapper(this);\n predKey = 0;\n toDistribute = readNodeEntries();\n //System.out.println(\"Mapper.init() :: toDistribute=\"+toDistribute);\n }", "protected void initialize() {\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.chassisrearRight.set(0);\n\t\tRobotMap.climberclimbMotor.set(0);\n\t\tRobotMap.floorfloorLift.set(0);\n\t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\n\t\t\n\t\t}", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "public void init() {\r\n \tconnection = Connect.initConnexion();\r\n \tSystem.out.println(\"connexion :\"+connection);\r\n }", "public static void init() {\n //Reset Flywheel Falcons to factory default\n flywheelMaster.configFactoryDefault();\n flywheelSlave.configFactoryDefault();\n\n //Master settings\n flywheelMaster.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n flywheelMaster.configSelectedFeedbackSensor(FeedbackDevice.IntegratedSensor); //Use Falcon 500 Integrated Encoder\n flywheelMaster.setSelectedSensorPosition(0,0,10); //Reset encoder position\n\n //Slave settings\n flywheelSlave.follow(flywheelMaster); //Follow master mode\n flywheelSlave.setInverted(true); //Invert motor to go along with master controller\n flywheelSlave.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n }", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void init(Element element) throws ConfigurationException {\r\n\r\n \tthis.infobusUrl = DOMUtils.getAttribute(element, \"infobusUrl\", true);\r\n\r\n\t}", "private void InitData() {\n\t}", "private void initializeConnections() {\n connectionsCB.getItems().clear();\n connectionsCB.valueProperty().addListener(this);\n ConnectionsWrapper connection = (ConnectionsWrapper) XMLFileManager.loadXML(\"connections.xml\", ConnectionsWrapper.class);\n if (connection != null && connection.getConnectionList() != null) {\n fillConnectionItem(connection.getConnectionList());\n }\n }", "public void initConfigurations() {\r\n for (int configId = 0; configId < savedConfigurations.length; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n int value = savedConfigurations[configId];\r\n if (value != 0) {\r\n set(configId, value, false);\r\n }\r\n }\r\n }", "private void initialize() {\n\t\t\n\t}", "public void init() {\n \n }", "protected void initialize() {\n this.locals = Common.calculateSegmentSize(Common.NUM_CORES);\n this.drvrs = Common.calculateSegmentSize(Common.NUM_CORES);\n reports = new ArrayList<>();\n }", "private void initialize() {\n\t}", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "public void Initialse() {\n\t\tappSettings = ctx.getSharedPreferences(APP_SETTINGS, 0);\n\t\tSharedPreferences.Editor prefEditor = appSettings.edit();\n\t\tprefEditor.putBoolean(BLOCK, true); // master switch\n\t\tprefEditor.putBoolean(NOTIFY, true); // controls whether a notification appears in status bar ans notifications lit\n\t\tprefEditor.putBoolean(REMOVE_CALLS, false); // determines whether calls are removed form the call log\n\t\t// add INIT to prevent this code from being called again\n\t\tprefEditor.putBoolean(INIT, true); // flag to allow subsequent loads to recognise that defaults are set\n\t\tprefEditor.putString(TEST, ctx.getString(R.string.test_number));\n\t\tprefEditor.putBoolean(RULES_EXIST, false); // added to control whether app kicks off commshandler\n\t\t\n\t\tprefEditor.commit();\n \n\t}", "private void config() {\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}", "protected void init() {\n init(null);\n }", "private void init(){\n if(!initializing) {\n Initializer init = new Initializer();\n InitializationDetails initializationDetails = new InitializationDetails(url, download, reset, deviceID, this);\n init.execute(initializationDetails);\n initializing = true;\n }\n }", "public void initialize() {\n // add direct connections to routing table\n for (Bunker neighbour : neighbours) {\n routing.put(neighbour.getId(), neighbour);\n }\n // add yourself\n routing.put(id, this);\n bunkerIdToCount.put(id, count);\n // kick off the algo\n initiate();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n bdbState.setFeedbackBox(FeedbackBox);\n bdbState.clearButtons();\n bdbState.clearTabs();\n }", "void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }", "public void init() {\n\n\t}" ]
[ "0.67677295", "0.6559613", "0.62014455", "0.59576935", "0.59335965", "0.5866067", "0.5828717", "0.57413065", "0.57082886", "0.5702242", "0.56615174", "0.562555", "0.5620733", "0.56143373", "0.5595327", "0.559027", "0.55852693", "0.55807084", "0.5571048", "0.55535233", "0.5551758", "0.5544156", "0.5525368", "0.55020714", "0.55013514", "0.5464913", "0.54587096", "0.5458429", "0.54551923", "0.5451303", "0.5443627", "0.5440081", "0.5427987", "0.54220927", "0.54057556", "0.54057443", "0.54034895", "0.5398602", "0.5392966", "0.53894234", "0.5378836", "0.53678375", "0.5366618", "0.53602195", "0.5351206", "0.5345641", "0.5339418", "0.5338499", "0.5330488", "0.5330077", "0.5330077", "0.53279364", "0.5325524", "0.5324673", "0.53213954", "0.5320859", "0.5318459", "0.53161836", "0.5313421", "0.5298476", "0.52974933", "0.5293868", "0.5292493", "0.5289809", "0.52891713", "0.5286637", "0.5286467", "0.52847505", "0.52814066", "0.5280851", "0.52800953", "0.5279868", "0.5276081", "0.5275336", "0.52743155", "0.52712446", "0.5270531", "0.526524", "0.52596974", "0.52574575", "0.52568245", "0.5255609", "0.5254801", "0.5251034", "0.5245491", "0.5243018", "0.52427083", "0.5242106", "0.5240491", "0.52404094", "0.52370965", "0.52275413", "0.52245766", "0.52242696", "0.52238077", "0.5216059", "0.5215194", "0.52138436", "0.5210782", "0.52103287", "0.5207278" ]
0.0
-1
Initializes the confabulator for usage.
public void initialize(ConfabulatorObject original) { initialize(original.getMaxLinkDistance(),original.getMaxLinkCount(),original.getLinks()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void initialize() {\n \tinitialize(new Configuration().configure());\n }", "private static synchronized void init() {\n if (CONFIG_VALUES != null) {\n return;\n }\n\n CONFIG_VALUES = new Properties();\n processLocalConfig();\n processIncludedConfig();\n }", "public synchronized static void initConfig() {\n\t\tMap<CatPawConfigProperty, String> initialValues = new HashMap<CatPawConfigProperty, String>();\n\t\tinitConfig(initialValues);\n\t}", "private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}", "public void initialConfig() {\n }", "public void initialize() {\n final ConfigurationManager config = ConfigurationManager.getInstance();\n boolean overrideLog = System.getProperty(\"azureus.overridelog\") != null;\n\n for (int i = 0; i < ignoredComponents.length; i++) {\n ignoredComponents[i] = new ArrayList();\n }\n\n if (!overrideLog) {\n config.addListener(new COConfigurationListener() {\n public void configurationSaved() {\n checkLoggingConfig();\n }\n });\n }\n\n checkLoggingConfig();\n config.addParameterListener(CFG_ENABLELOGTOFILE, new ParameterListener() {\n public void parameterChanged(String parameterName) {\n FileLogging.this.reloadLogToFileParam();\n }\n });\n }", "@Override\n public void init()\n throws InitializationException\n {\n // Create a default configuration.\n String[] def = new String[]\n {\n DEFAULT_RUN_DATA,\n DEFAULT_PARAMETER_PARSER,\n DEFAULT_COOKIE_PARSER\n };\n configurations.put(DEFAULT_CONFIG, def.clone());\n\n // Check other configurations.\n Configuration conf = getConfiguration();\n if (conf != null)\n {\n String key,value;\n String[] config;\n String[] plist = new String[]\n {\n RUN_DATA_KEY,\n PARAMETER_PARSER_KEY,\n COOKIE_PARSER_KEY\n };\n for (Iterator<String> i = conf.getKeys(); i.hasNext();)\n {\n key = i.next();\n value = conf.getString(key);\n int j = 0;\n for (String plistKey : plist)\n {\n if (key.endsWith(plistKey) && key.length() > plistKey.length() + 1)\n {\n key = key.substring(0, key.length() - plistKey.length() - 1);\n config = (String[]) configurations.get(key);\n if (config == null)\n {\n config = def.clone();\n configurations.put(key, config);\n }\n config[j] = value;\n break;\n }\n j++;\n }\n }\n }\n\n\t\tpool = (PoolService)TurbineServices.getInstance().getService(PoolService.ROLE);\n\n if (pool == null)\n {\n throw new InitializationException(\"RunData Service requires\"\n + \" configured Pool Service!\");\n }\n\n parserService = (ParserService)TurbineServices.getInstance().getService(ParserService.ROLE);\n\n if (parserService == null)\n {\n throw new InitializationException(\"RunData Service requires\"\n + \" configured Parser Service!\");\n }\n\n setInit(true);\n }", "public void init() {\n if (getConfig().isEnabled()) {\n super.init();\n }\n }", "protected abstract void _init(DynMap config);", "private Config() {\n }", "public void init() {\n\t\t}", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }", "public void init() {\n \t\tif (initLock.start()) {\n \t\t\ttry {\n \t\t\t\tthis._init(this.config);\n \t\t\t} finally {\n \t\t\t\tinitLock.end();\n \t\t\t}\n \t\t}\n \t}", "private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelper.exit(\"Cannot load the configuations from the configuration file please check the channelConfig.xml\");\r\n }\r\n }", "private static void init() throws AggregatorException {Populator Configuration\n\n// //ASIN Populator\n// PopulatorData asinPopulator = new PopulatorData(ASINPopulator.class.getName(),\n// new ArrayList<String>());\n// configuration.put(\"ASINPopulator\", asinPopulator);\n//\n// //Title Populator\n// ArrayList<String> titlePopulatorDependencies = new ArrayList<String>();\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// PopulatorData titlePopulator = new PopulatorData(TitlePopulator.class.getName(),\n// titlePopulatorDependencies);\n// configuration.put(\"TitlePopulator\", titlePopulator);\n//\n// \n }", "private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}", "void init (Map<String, String> conf) throws ConfigException;", "protected void initialize() {\n \t\n }", "public void init() {\r\n\r\n\t}", "public void init() {\n \n }", "private void init() {\n\n\t}", "public void init() {\n log.info(\"initialization\");\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public config() {\n initComponents();\n }", "public void initialize()\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 }", "public Kalkulator() {\n initComponents();\n }", "public void initialize() {\n // empty for now\n }", "private Conf() {\n // empty hidden constructor\n }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "protected void initialise() {\r\n loadDefaultConfig();\r\n loadCustomConfig();\r\n loadSystemConfig();\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"--- Scope properties ---\");\r\n for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {\r\n String key = (String) i.next();\r\n Object value = properties.get(key);\r\n LOG.debug(key + \" = \" + value);\r\n }\r\n LOG.debug(\"------------------------\");\r\n }\r\n }", "@Override\n public void setConf(final Configuration conf) {\n this.conf = conf;\n if (!isInit) {\n try {\n initInternal();\n isInit = true;\n } catch (AccumuloException | AccumuloSecurityException | TableNotFoundException | TableExistsException e) {\n logger.warn(\"Unable to initialize index. Throwing Runtime Exception. \", e);\n throw new RuntimeException(e);\n }\n }\n }", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "@Override\n public void init() throws Exception {\n config = new Config();\n }", "public void init() {\n\t\t\n\t}", "public void init() {\n\t\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "protected Configuration() {\r\n }", "protected void init() {\n\t}", "protected void init() {\n\t}", "private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }", "@Override public void init()\n\t\t{\n\t\t}", "public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\n\t}", "private void config() {\n\t}", "public MecBasicsConfig()\n {\n\n }", "public void initialize() {\n\t\tDynamoConfig config = new DynamoConfig();\n\t\tthis.setup(config);\n\t}", "public void autonomousInit() {\n \n }", "protected void init() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected void initialize()\n\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}", "void init(Config config);", "private void initialize() {\n }", "public ConfigManager() {\n // Nobody here.\n }", "private void initialize() {\n\t}", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "private void initialize() {\n\t\t\n\t}", "@Override\n public void initialize() {\n if(prefix == null)\n prefix = getToolkit().getArguments().referenceFile.getAbsolutePath();\n BWTFiles bwtFiles = new BWTFiles(prefix);\n BWAConfiguration configuration = new BWAConfiguration();\n aligner = new BWACAligner(bwtFiles,configuration);\n }", "private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "protected void initialize() {\n\n\t}", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "public static void init() {\n\t\t\n\t}", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}", "public void initialize() {\n if (!BungeeBan.getInstance().getDataFolder().exists()) {\n BungeeBan.getInstance().getDataFolder().mkdirs();\n }\n File file = this.getConfigurationFile();\n if (!file.exists()) {\n try {\n file.createNewFile();\n if (this.defaultConfig != null) {\n try (InputStream is = BungeeBan.getInstance().getResourceAsStream(this.defaultConfig);\n OutputStream os = new FileOutputStream(file)) {\n ByteStreams.copy(is, os);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.reload();\n }", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void initialize() {\n // TODO\n }", "public static void init() {\n }", "public static void init() {\n }", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "protected void initialize() {}", "protected void initialize() {}", "public void init() {\n cupDataChangeListener = new CupDataChangeListener(dataBroker);\n }", "public static void init() {\n //Reset Flywheel Falcons to factory default\n flywheelMaster.configFactoryDefault();\n flywheelSlave.configFactoryDefault();\n\n //Master settings\n flywheelMaster.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n flywheelMaster.configSelectedFeedbackSensor(FeedbackDevice.IntegratedSensor); //Use Falcon 500 Integrated Encoder\n flywheelMaster.setSelectedSensorPosition(0,0,10); //Reset encoder position\n\n //Slave settings\n flywheelSlave.follow(flywheelMaster); //Follow master mode\n flywheelSlave.setInverted(true); //Invert motor to go along with master controller\n flywheelSlave.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n }", "public void initialize() {\r\n }", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "public ConfigurationMaintainer() {\n\t}", "public void initialize() {\n\t}", "public void initialize() {\n\t}", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "private void init() {\n String METHOD = Thread.currentThread().getStackTrace()[1].getMethodName();\n String msg = null;\n String type = ConstantsIF.RESOURCE;\n ConfigurationIF config = null;\n JSONObject json = null;\n Map<String, String> map = null;\n\n _logger.entering(CLASS, METHOD);\n\n /*\n * Get JSON data from the Config object via the Config Manager\n */\n config = _configMgr.getConfiguration(type);\n\n if (config != null) {\n json = config.getJSON();\n if (json == null) {\n msg = CLASS + \": \" + METHOD + \": JSON data for '\" + type + \"' is null\";\n this.setError(true);\n }\n } else {\n msg = CLASS + \": \" + METHOD + \": Configuration for '\" + type + \"' is null\";\n this.setError(true);\n }\n\n /*\n * setup the Mongo Data Access Object\n */\n if (_MongoDAO == null) {\n map = JSON.convertToParams(JSON.getObject(json, ConfigIF.RS_NOSQL));\n\n try {\n _MongoDAO = MongoFactory.getInstance(map);\n } catch (Exception ex) {\n msg = CLASS + \": \" + METHOD + \": Mongo DAO:\" + ex.getMessage();\n this.setError(true);\n }\n }\n\n if (!this.isError()) {\n this.setState(STATE.READY);\n } else {\n this.setState(STATE.ERROR);\n this.setStatus(msg);\n _logger.log(Level.SEVERE, msg);\n }\n\n _logger.exiting(CLASS, METHOD);\n\n return;\n }", "public Conf() {\n createIfNotExists = false;\n deleteInputOnSuccess = false;\n }", "public void init(){\n \n }", "void initialize(C config);", "protected void initialize() {\n }" ]
[ "0.6779911", "0.6680184", "0.66213435", "0.66187096", "0.65793955", "0.6522256", "0.648716", "0.64372844", "0.6434331", "0.6426129", "0.6420832", "0.6418373", "0.63918066", "0.63868797", "0.6330837", "0.6307288", "0.6295652", "0.62826425", "0.6264329", "0.62626976", "0.62436163", "0.6237223", "0.6221026", "0.6221026", "0.6221026", "0.62111956", "0.61940026", "0.6191023", "0.61826134", "0.6182324", "0.61762995", "0.6172494", "0.61591476", "0.61591476", "0.61591476", "0.61591476", "0.61558837", "0.6152878", "0.6144644", "0.613325", "0.6116635", "0.6105462", "0.6104692", "0.6084464", "0.6084464", "0.6084464", "0.6080592", "0.60777956", "0.60777956", "0.6076353", "0.6074294", "0.6073144", "0.60700184", "0.6067158", "0.6066062", "0.6064787", "0.6060481", "0.60579556", "0.60492617", "0.6045782", "0.6044158", "0.60414404", "0.60404325", "0.6035072", "0.60250026", "0.6024155", "0.60240376", "0.6023518", "0.6019766", "0.6018937", "0.60161394", "0.6012115", "0.6009956", "0.6009956", "0.6009325", "0.6008008", "0.6003231", "0.6003231", "0.6003231", "0.6003231", "0.5997713", "0.59956366", "0.59956366", "0.5992994", "0.5992994", "0.5986304", "0.5986304", "0.59813416", "0.5971175", "0.59673715", "0.596719", "0.596719", "0.59668404", "0.5965148", "0.5965148", "0.5962929", "0.5962464", "0.5959103", "0.5955664", "0.5953052", "0.59470516" ]
0.0
-1
Creates a copy of the confabulator which can then be used to initialize other confabulators.
public ConfabulatorObject getCopy() { ConfabulatorObject copy = new ConfabulatorObject(getMessenger()); lockMe(this); int maxD = maxLinkDistance; int maxC = maxLinkCount; List<Link> linksCopy = new ArrayList<Link>(); for (Link lnk: links) { linksCopy.add(lnk.getCopy()); } unlockMe(this); copy.initialize(maxD,maxC,linksCopy); return copy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LogFramework copy() {\r\n\t\tLogFramework copy = new LogFramework();\r\n\t\tcopy.importSettings(this);\r\n\t\treturn copy;\r\n\t}", "public MinaConfiguration copy() {\n try {\n return (MinaConfiguration) clone();\n } catch (CloneNotSupportedException e) {\n throw new RuntimeCamelException(e);\n }\n }", "private Conf() {\n // empty hidden constructor\n }", "private ReducedCFGBuilder() {\n\t}", "public SparqlParserConfig clone() {\n SparqlParserConfig result = new SparqlParserConfig(syntax, prologue.copy(), baseURI, sharedPrefixes);\n return result;\n }", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "public ComplexConfigDTO flatCopy() {\n \t\tfinal ComplexConfigDTO config = new ComplexConfigDTO();\n \t\tconfig.setPropertyType(getPropertyType());\n \t\tconfig.setPropertyName(getPropertyName());\n \t\tconfig.setDefiningScopePath(getDefiningScopePath());\n \t\tconfig.setPolymorph(isPolymorph());\n \t\tconfig.setVersion(getVersion());\n \t\tconfig.setParentVersion(getParentVersion());\n \t\tconfig.setParentScopeName(getParentScopeName());\n \t\tconfig.setClassVersion(getClassVersion());\n \t\tconfig.setNulled(isNulled());\n \t\treturn config;\n \t}", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "@Override\n public Object clone()\n {\n try\n {\n DefaultConfigurationNode copy = (DefaultConfigurationNode) super\n .clone();\n copy.initSubNodes();\n return copy;\n }\n catch (CloneNotSupportedException cex)\n {\n // should not happen\n throw new ConfigurationRuntimeException(\"Cannot clone \" + getClass());\n }\n }", "public ModuleDescriptorAdapter copy() {\n ModuleDescriptorAdapter copy = new ModuleDescriptorAdapter(getId(), getDescriptor(), getComponentId());\n copyTo(copy);\n copy.metaDataOnly = metaDataOnly;\n return copy;\n }", "private DataSourceConfig(DataSourceConfig parent, Map<String, String> conf) {\n $.copy(parent).to(this);\n init(parent.id, conf, true);\n readOnly = true;\n }", "public Conf() {\n createIfNotExists = false;\n deleteInputOnSuccess = false;\n }", "public static ColorPaletteBuilder getInstance()\n {\n return SingletonHolder.instance;\n }", "public RetryPolicyConfig copy() {\n final RetryPolicyConfig copy = new RetryPolicyConfig();\n copy.maxAttempts = this.maxAttempts;\n copy.initialBackoff = this.initialBackoff;\n copy.maxBackoff = this.maxBackoff;\n copy.backoffMultiplier = this.backoffMultiplier;\n copy.retryableStatusCodes =\n new LinkedHashSet<>(requireNonNull(this.retryableStatusCodes, \"retryableStatusCodes\"));\n return copy;\n }", "public static RunConfig cloneRunConfig(RunConfig original) {\n return new BeanRunConfig(original);\n }", "public com.google.protobuf.Any.Builder getConfigurationBuilder() {\n \n onChanged();\n return getConfigurationFieldBuilder().getBuilder();\n }", "public static WaterfallConfig wconf() {\n\t\treturn uniqueInstance;\n\t}", "public DatabaseEditorConfig clone(){\n\t\t\n\t\tDatabaseEditorConfig clonedObject = new DatabaseEditorConfig();\n\t\tRGB bg = null;\n\t\tif (backGround != null) {\n\t\t\tbg = new RGB(backGround.red, backGround.green, backGround.blue);\n\t\t}\n\t\tclonedObject.setBackGround(bg);\n\t\tclonedObject.setDatabaseComment(databaseComment);\n\t\t\n\t\treturn clonedObject;\n\t}", "private AccessorFactory() {\n\n\t\tCoreConfig cc = CoreConfig.getInstance();\n\t\tString defaultName = cc.getString(\"builder.default\",CoreConstants.BUILDER_HBASE);\n\t\tdefaultBuilder = defaultName;\n\n\t\tfor (int i = 0; i < 20; i++) {\n\n\t\t\tString builderClass = cc.getString(BUILDER_PREFIX + i);\n\t\t\t\n\t\t\tif(StringUtils.isBlank(builderClass))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tClass<?> builderClazz = getClass().getClassLoader().loadClass(builderClass);\n\n\t\t\t\tAccessorBuilder hbaseBuilder = (AccessorBuilder) builderClazz.newInstance();\n\n\t\t\t\tbuilderMap.put(hbaseBuilder.getBuilderName(), hbaseBuilder);\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tLOGGER.error(\"class:{} is not found.\", builderClass);\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tLOGGER.error(\"class:{} error in instantiation.\", builderClass);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tLOGGER.error(\"class:{} be illegal accessed.\", builderClass);\n\t\t\t}\n\n\t\t}\n\n\t\tappendMapping(CoreConstants.BUILDER_HBASE, \"com/obal/meta/AccessorMap.hbase.properties\");\n\n\t}", "@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);", "public abstract CONFIG build();", "protected JobConf createJobConf() \n {\n return new JobConf();\n }", "public C build() {\n if (configs.isEmpty()) {\n throw new RuntimeException(\"There should be at least one configuration provided\");\n }\n\n // Handling config files\n ConfigSource firstConfigSource = configs.get(0);\n Config firstConfigOrig = getConfigSupplier(firstConfigSource).getConfig();\n if (!(supportedConfig.isInstance(firstConfigOrig))) {\n throw new RuntimeException(\n String.format(\n \"Config is not of parameterized type %s, got instead %s\",\n supportedConfig.getName(), firstConfigOrig.getClass().getName()));\n }\n C firstConfig = (C) firstConfigOrig;\n for (int i = 1; i < configs.size(); ++i) {\n ConfigSource nextConfigSource = configs.get(i);\n Config nextConfig = getConfigSupplier(nextConfigSource).getConfig();\n try {\n firstConfig = copyProperties(firstConfig, nextConfig);\n } catch (Exception ex) {\n throw new RuntimeException(\n String.format(\"Failed to merge config %s into main config\", nextConfigSource), ex);\n }\n }\n\n // Handling string pathValue pairs config overrides\n for (Pair<String, Object> pathValue : pathValueOverrides) {\n try {\n PropertyUtils.setNestedProperty(firstConfig, pathValue.getValue0(), pathValue.getValue1());\n } catch (Exception e) {\n throw new RuntimeException(\n String.format(\n \"Cannot override property %s with value %s\",\n pathValue.getValue0(), pathValue.getValue1()),\n e);\n }\n }\n\n return firstConfig;\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: */ }", "private static void init() throws AggregatorException {Populator Configuration\n\n// //ASIN Populator\n// PopulatorData asinPopulator = new PopulatorData(ASINPopulator.class.getName(),\n// new ArrayList<String>());\n// configuration.put(\"ASINPopulator\", asinPopulator);\n//\n// //Title Populator\n// ArrayList<String> titlePopulatorDependencies = new ArrayList<String>();\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// PopulatorData titlePopulator = new PopulatorData(TitlePopulator.class.getName(),\n// titlePopulatorDependencies);\n// configuration.put(\"TitlePopulator\", titlePopulator);\n//\n// \n }", "private PlexusConfiguration copyConfiguration( Xpp3Dom src, String iteratorName, String value )\n {\n\n XmlPlexusConfiguration dom = new XmlPlexusConfiguration( src.getName() );\n\n if ( src.getValue() == null )\n {\n dom.setValue( src.getValue() );\n }\n else\n {\n if ( src.getValue().contains( iteratorName ) )\n {\n dom.setValue( src.getValue().replaceAll( iteratorName, value ) );\n }\n else\n {\n dom.setValue( src.getValue() );\n }\n }\n\n for ( String attributeName : src.getAttributeNames() )\n {\n dom.setAttribute( attributeName, src.getAttribute( attributeName ) );\n }\n\n for ( Xpp3Dom child : src.getChildren() )\n {\n dom.addChild( copyConfiguration( child, iteratorName, value ) );\n }\n\n return dom;\n }", "private Config() {\n }", "@Override\n public void setConf(Configuration conf) {\n }", "public DerivedFeatureConfig.Builder getConfigBuilder() {\n \n onChanged();\n return getConfigFieldBuilder().getBuilder();\n }", "private Builder(export.serializers.avro.DeviceInfo other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.site)) {\n this.site = data().deepCopy(fields()[0].schema(), other.site);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.service)) {\n this.service = data().deepCopy(fields()[1].schema(), other.service);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.sector)) {\n this.sector = data().deepCopy(fields()[2].schema(), other.sector);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.room)) {\n this.room = data().deepCopy(fields()[3].schema(), other.room);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.alias)) {\n this.alias = data().deepCopy(fields()[4].schema(), other.alias);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.serialPort)) {\n this.serialPort = data().deepCopy(fields()[5].schema(), other.serialPort);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.driver)) {\n this.driver = data().deepCopy(fields()[6].schema(), other.driver);\n fieldSetFlags()[6] = true;\n }\n }", "public static RestructuringSettings.Builder builder() {\n return new RestructuringSettings.Builder();\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public DescriptiveFramework clone();", "private Builder(export.serializers.avro.DeviceInfo.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.site)) {\n this.site = data().deepCopy(fields()[0].schema(), other.site);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.service)) {\n this.service = data().deepCopy(fields()[1].schema(), other.service);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.sector)) {\n this.sector = data().deepCopy(fields()[2].schema(), other.sector);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.room)) {\n this.room = data().deepCopy(fields()[3].schema(), other.room);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.alias)) {\n this.alias = data().deepCopy(fields()[4].schema(), other.alias);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.serialPort)) {\n this.serialPort = data().deepCopy(fields()[5].schema(), other.serialPort);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.driver)) {\n this.driver = data().deepCopy(fields()[6].schema(), other.driver);\n fieldSetFlags()[6] = true;\n }\n }", "@Override\n public Object clone() {\n // next statement gives us a clone JGraph but not a cloned Toolbar\n TabDiagram newPanel = new TabDiagram();\n if (target != null) {\n newPanel.setTarget(target);\n }\n ToolBarFactory factory = new ToolBarFactory(target.getActions());\n factory.setRollover(true);\n factory.setFloatable(false);\n\n newPanel.setToolBar(factory.createToolBar());\n setToolBar(factory.createToolBar());\n return newPanel;\n }", "public Gateway copyChanges() {\n Gateway copy = new Gateway();\n copy.mergeChanges(this);\n copy.resetChangeLog();\n return copy;\n }", "public ConfigurationMaintainer() {\n\t}", "public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }", "public void initialize(ConfabulatorObject original) {\n\t\tinitialize(original.getMaxLinkDistance(),original.getMaxLinkCount(),original.getLinks());\n\t}", "@Test\n public void testConfigurationBuilderProvider()\n throws ConfigurationException\n {\n factory.addProperty(\"override.configuration[@fileName]\", TEST_FILE\n .getAbsolutePath());\n CombinedConfiguration cc = factory.getConfiguration(false);\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n checkProperties(cc);\n }", "public void createMiniKdcConf() {\n\t\tconf = MiniKdc.createConf();\n\t}", "public static TerminalPropertiesBuilder getNewBuilder() {\n return new TerminalPropertiesBuilder();\n }", "private void setupDefaultAsPerProperties()\n {\n /// Do the minimum of what App.init() would do to allow to run.\n Gui.mainFrame = new MainFrame();\n App.p = new Properties();\n App.loadConfig();\n System.out.println(App.getConfigString());\n Gui.progressBar = Gui.mainFrame.getProgressBar(); //must be set or get Nullptr\n\n // configure the embedded DB in .jDiskMark\n System.setProperty(\"derby.system.home\", App.APP_CACHE_DIR);\n\n // code from startBenchmark\n //4. create data dir reference\n App.dataDir = new File(App.locationDir.getAbsolutePath()+File.separator+App.DATADIRNAME);\n\n //5. remove existing test data if exist\n if (App.dataDir.exists()) {\n if (App.dataDir.delete()) {\n App.msg(\"removed existing data dir\");\n } else {\n App.msg(\"unable to remove existing data dir\");\n }\n }\n else\n {\n App.dataDir.mkdirs(); // create data dir if not already present\n }\n }", "@Test\n public void testConfigurationBuilderProviderInheritProperties()\n throws Exception\n {\n factory.addProperty(\"override.configuration[@fileName]\",\n TEST_FILE.getAbsolutePath());\n factory.setBasePath(\"conf\");\n factory.setAttributeSplittingDisabled(true);\n factory.setDelimiterParsingDisabled(true);\n factory.setListDelimiter('/');\n factory.setThrowExceptionOnMissing(true);\n Log log = LogFactory.getLog(getClass());\n factory.setLogger(log);\n factory.clearErrorListeners();\n factory.clearConfigurationListeners();\n ConfigurationListenerTestImpl l =\n new ConfigurationListenerTestImpl(factory);\n factory.addConfigurationListener(l);\n DefaultConfigurationBuilder.ConfigurationDeclaration decl =\n new DefaultConfigurationBuilder.ConfigurationDeclaration(\n factory,\n factory.configurationAt(\"override.configuration\"));\n DefaultConfigurationBuilder.ConfigurationBuilderProvider provider =\n new DefaultConfigurationBuilder.ConfigurationBuilderProvider();\n DefaultConfigurationBuilder child =\n (DefaultConfigurationBuilder) provider.createBean(\n provider.fetchConfigurationClass(), decl, null);\n assertEquals(\"Wrong base path\", factory.getBasePath(),\n child.getBasePath());\n assertEquals(\"Wrong attribute splitting flag\",\n factory.isAttributeSplittingDisabled(),\n child.isAttributeSplittingDisabled());\n assertEquals(\"Wrong delimiter parsing flag\",\n factory.isDelimiterParsingDisabled(),\n child.isDelimiterParsingDisabled());\n assertEquals(\"Wrong list delimiter\", factory.getListDelimiter(),\n child.getListDelimiter());\n assertEquals(\"Wrong exception flag\",\n factory.isThrowExceptionOnMissing(),\n child.isThrowExceptionOnMissing());\n assertSame(\"Wrong logger\", log, child.getLogger());\n assertTrue(\"Got error listeners\", child.getErrorListeners().isEmpty());\n assertEquals(\"Wrong number of listeners\", 1, child\n .getConfigurationListeners().size());\n assertEquals(\"Wrong listener\", l, child.getConfigurationListeners()\n .iterator().next());\n }", "private Builder(Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.accountID)) {\n this.accountID = data().deepCopy(fields()[0].schema(), other.accountID);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.createDate)) {\n this.createDate = data().deepCopy(fields()[2].schema(), other.createDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.TransferSerials)) {\n this.TransferSerials = data().deepCopy(fields()[3].schema(), other.TransferSerials);\n fieldSetFlags()[3] = true;\n }\n }", "@Test\n public void testCombinedConfigurationAttributes() throws ConfigurationException\n {\n factory.setFile(INIT_FILE);\n CombinedConfiguration cc = (CombinedConfiguration) factory\n .getConfiguration();\n checkCombinedConfigAttrs(cc);\n CombinedConfiguration cc2 = (CombinedConfiguration) cc\n .getConfiguration(DefaultConfigurationBuilder.ADDITIONAL_NAME);\n checkCombinedConfigAttrs(cc2);\n }", "public void selfRegister() {\n builder.factory(Configuration.class, MockConfiguration.class, Scope.SINGLETON);\n LocatableProperties props = new LocatableProperties();\n new StrutsDefaultConfigurationProvider().register(builder, props);\n builder.constant(StrutsConstants.STRUTS_DEVMODE, \"false\");\n builder.constant(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, \"true\");\n builder.constant(StrutsConstants.STRUTS_OGNL_ENABLE_EXPRESSION_CACHE, \"true\");\n builder.constant(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION, \"false\");\n container = builder.create(true);\n }", "public LcpConfigMap(LcpPacketFactory parent) {\n this.parent = parent;\n this.configFactories = new HashMap<Integer, ConfigFactory>();\n }", "public static FFMPRunConfigurationManager getInstance() {\n return instance;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public static NodeConfigBuilder builder() {\n\t\treturn new NodeConfigBuilder();\n\t}", "private ConfigurationModel() {\r\n\tloadConfiguration();\r\n }", "@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }", "public static export.serializers.avro.DeviceInfo.Builder newBuilder(export.serializers.avro.DeviceInfo.Builder other) {\n return new export.serializers.avro.DeviceInfo.Builder(other);\n }", "public static Construtor construtor() {\n return new Construtor();\n }", "public ConfigurationReader getCrInstance() throws IOException {\n\tConfigurationReader cr = new ConfigurationReader();\n\treturn cr;\n\n\t}", "public void reConfigure();", "protected IotdmSimpleConfigBuilder(PluginSimpleConfig config) {\n this.builder = new PluginSimpleConfigBuilder();\n List<KeyValList> copy = new LinkedList<>();\n for (KeyValList kv : config.getKeyValList()) {\n KeyValListBuilder builder = new KeyValListBuilder();\n builder.setCfgKey(kv.getCfgKey());\n builder.setCfgVal(kv.getCfgVal());\n copy.add(builder.build());\n }\n\n this.builder.setKeyValList(copy);\n }", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "PackageBuilder() {\n\t\tweightMap = new HashMap<>();\n\t\tcostMap = new HashMap<>();\n\t\tcombinations = new ArrayList<>();\n\t}", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "public static void decorateMasterConfiguration(Configuration conf) {\n if (!isBackupEnabled(conf)) {\n return;\n }\n // Add WAL archive cleaner plug-in\n String plugins = conf.get(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS);\n String cleanerClass = BackupLogCleaner.class.getCanonicalName();\n if (!plugins.contains(cleanerClass)) {\n conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + \",\" + cleanerClass);\n }\n\n String classes = conf.get(ProcedureManagerHost.MASTER_PROCEDURE_CONF_KEY);\n String masterProcedureClass = LogRollMasterProcedureManager.class.getName();\n if (classes == null) {\n conf.set(ProcedureManagerHost.MASTER_PROCEDURE_CONF_KEY, masterProcedureClass);\n } else if (!classes.contains(masterProcedureClass)) {\n conf.set(ProcedureManagerHost.MASTER_PROCEDURE_CONF_KEY,\n classes + \",\" + masterProcedureClass);\n }\n\n plugins = conf.get(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS);\n conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS,\n (plugins == null ? \"\" : plugins + \",\") + BackupHFileCleaner.class.getName());\n if (LOG.isDebugEnabled()) {\n LOG.debug(\n \"Added log cleaner: {}. Added master procedure manager: {}.\"\n + \"Added master procedure manager: {}\",\n cleanerClass, masterProcedureClass, BackupHFileCleaner.class.getName());\n }\n }", "@Test\n public void testCombinedConfigurationStructure() throws ConfigurationException\n {\n factory.setFile(INIT_FILE);\n CombinedConfiguration cc = (CombinedConfiguration) factory\n .getConfiguration();\n assertNotNull(\"Properties configuration not found\", cc\n .getConfiguration(\"properties\"));\n assertNotNull(\"XML configuration not found\", cc.getConfiguration(\"xml\"));\n assertEquals(\"Wrong number of contained configs\", 4, cc\n .getNumberOfConfigurations());\n\n CombinedConfiguration cc2 = (CombinedConfiguration) cc\n .getConfiguration(DefaultConfigurationBuilder.ADDITIONAL_NAME);\n assertNotNull(\"No additional configuration found\", cc2);\n Set<String> names = cc2.getConfigurationNames();\n assertEquals(\"Wrong number of contained additional configs\", 2, names\n .size());\n assertTrue(\"Config 1 not contained\", names.contains(\"combiner1\"));\n assertTrue(\"Config 2 not contained\", names.contains(\"combiner2\"));\n }", "private PSConfigDeNormalizer()\n {\n\n }", "private static synchronized void init() {\n if (CONFIG_VALUES != null) {\n return;\n }\n\n CONFIG_VALUES = new Properties();\n processLocalConfig();\n processIncludedConfig();\n }", "public static Configurable configure() {\n return new SqlVirtualMachineManager.ConfigurableImpl();\n }", "private StrategyChainBuilder() {\n\t}", "public RandomNetworkGenerator copy()\n\t{\n\t\t\n\t\treturn new DegreePreservingNetworkRandomizer(mOriginal, mDirected, mIterations); \n\t}", "static SchemaBuilder newInstance() {\n return new SchemaBuilderImpl();\n }", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "private OptimoveConfig() {\n }", "ConfigGenerator(Path copy, Path paste)\n\t{\n\t\tcopyPath = copy;\n\t\tpastePath = paste;\n\t}", "public Provider1Builder() {\r\n provider1 = new Provider1();\r\n }", "public JsonFactory copy()\n/* */ {\n/* 324 */ _checkInvalidCopy(JsonFactory.class);\n/* */ \n/* 326 */ return new JsonFactory(this, null);\n/* */ }", "public static Configurable configure() {\n return new RedisManager.ConfigurableImpl();\n }", "@Override\n\tpublic Automaton clone() {\n\t\tAutomaton a;\n\t\t// Try to create a new object.\n\t\ttry {\n\t\t\ta = getClass().newInstance();\n\t\t} catch (final Throwable e) {\n\t\t\t// Well golly, we're sure screwed now!\n\t\t\tlogger.error(\"Warning: clone of automaton failed: {}\", e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\ta.setEnvironmentFrame(getEnvironmentFrame());\n\n\t\t// Copy over the states.\n\t\tfinal HashMap<State, State> map = new HashMap<>(); // Old states to new\n\t\t// states.\n\t\tstates.forEach(state -> {\n\t\t\tfinal State newState = new State(state.getID(), new Point(state.getPoint()), a);\n\t\t\tnewState.setLabel(state.getLabel());\n\t\t\tnewState.setName(state.getName());\n\t\t\tmap.put(state, newState);\n\t\t\ta.addState(newState);\n\t\t\tif (this instanceof MooreMachine) {\n\t\t\t\t((MooreMachine) a).setOutput(newState, ((MooreMachine) this).getOutput(state));\n\t\t\t}\n\t\t});\n\n\t\tfinalStates.forEach(state -> {\n\t\t\ta.addFinalState(map.get(state));\n\t\t});\n\n\t\ta.setInitialState(map.get(getInitialState()));\n\n\t\t// Copy over the transitions.\n\n\t\tstates.forEach(state -> {\n\t\t\tfinal State from = map.get(state);\n\t\t\tgetTransitionsFromState(state).forEach(transition -> {\n\t\t\t\tfinal State to = map.get(transition.getToState());\n\t\t\t\tSystem.err.println(\"Transition name: \" + transition.toString());\n\t\t\t\tfinal Transition toBeAdded = transition.clone();\n\t\t\t\ttoBeAdded.setFromState(from);\n\t\t\t\ttoBeAdded.setToState(to);\n\t\t\t\tSystem.err.println(\"toBeAdded is null: \" + (toBeAdded == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.from is null: \" + (toBeAdded.getFromState() == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.to is null: \" + (toBeAdded.getToState() == null));\n\t\t\t\ta.addTransition(toBeAdded);\n\t\t\t});\n\t\t});\n\n\t\tfinal List<Note> notes = getNotes();\n\t\tfinal List<Note> copyNotes = a.getNotes();\n\t\tcheckArgument(notes.size() == copyNotes.size());\n\n\t\tIntStream.range(0, notes.size()).forEach(i -> {\n\t\t\ta.addNote(new Note(notes.get(i).getAutoPoint(), notes.get(i).getText()));\n\t\t\tcopyNotes.get(i).setView(notes.get(i).getView());\n\t\t});\n\t\t// Should be done now!\n\t\treturn a;\n\t}", "private Builder(edu.pa.Rat other) {\n super(edu.pa.Rat.SCHEMA$);\n if (isValidValue(fields()[0], other.time)) {\n this.time = data().deepCopy(fields()[0].schema(), other.time);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.frequency)) {\n this.frequency = data().deepCopy(fields()[1].schema(), other.frequency);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.convolution)) {\n this.convolution = data().deepCopy(fields()[2].schema(), other.convolution);\n fieldSetFlags()[2] = true;\n }\n }", "public WstxOutputFactory() {\n mConfig = WriterConfig.createFullDefaults();\n }", "private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }", "public RuleConfiguration() {\n\t\trule = new Rule();\n\t}", "public ConfigurationPane(final Automaton automaton) {\n\t}", "private void config() {\n\t}", "com.google.protobuf.Any getNewConfig();", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "DataSource clone();", "@Override \n public Object clone() {\n try {\n Resource2Builder result = (Resource2Builder)super.clone();\n result.self = result;\n return result;\n } catch (CloneNotSupportedException e) {\n throw new InternalError(e.getMessage());\n }\n }", "private void updateConfig(){\n try {\n BeanUtils.copyProperties(config_,newConfig_);//copy the properties of newConfig_ into config_\n } catch (IllegalAccessException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n } catch (InvocationTargetException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n }\n }", "public synchronized static void initConfig() {\n\t\tMap<CatPawConfigProperty, String> initialValues = new HashMap<CatPawConfigProperty, String>();\n\t\tinitConfig(initialValues);\n\t}", "protected Configuration() {\r\n }", "private RecipeBuilder() {\n Comparator<PreparedProduct> comparator =\n Comparator.comparing(component -> component.getProduct().getCalorificValue());\n components = new TreeMap<>(comparator);\n }", "public void testCloning() {\n StandardXYBarPainter p1 = new StandardXYBarPainter();\n }", "public ShBuilderApply () {\n\t\tsuper();\n\t}", "public Object getConf() {\n return this.conf;\n }", "public SimulationConfig() {\r\n\t}", "public Mapper newInstance() {\n Mapper mapper;\n\n mapper = new Mapper(name, parser.newInstance(), oag.newInstance());\n mapper.setLogging(logParsing, logAttribution);\n return mapper;\n }", "private void _resetObsComponents() {\n // First handle the observation components. For each observation\n // component with a configuration builder user object, reset the\n // builder and place it in a list (_obsCompBuilders).\n\n List<ISPObsComponent> obsCompList = _obs.getObsComponents();\n if (obsCompList != null) {\n _obsCompBuilders = new ArrayList<>(obsCompList.size());\n\n for (ISPObsComponent obsComp : obsCompList) {\n IConfigBuilder cb = (IConfigBuilder) obsComp.getClientData(IConfigBuilder.USER_OBJ_KEY);\n if (cb != null) {\n cb.reset(_options);\n _obsCompBuilders.add(cb);\n }\n }\n\n _obsCompBuilders.trimToSize();\n }\n }", "public static SortBuilder getInstance() {\n \t\treturn singleton;\n \t}", "public ConfigProfile buildProfileOne() {\n this.topics = \"kafka-data\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = true;\n this.ack = false;\n this.indexes = \"index-1\";\n this.sourcetypes = \"kafka-data\";\n this.sources = \"kafka-connect\";\n this.httpKeepAlive = true;\n this.validateCertificates = true;\n this.hasTrustStorePath = true;\n this.trustStorePath = \"./src/test/resources/keystoretest.p12\";\n this.trustStoreType = \"PKCS12\";\n this.trustStorePassword = \"Notchangeme\";\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = false;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n return this;\n }", "@Override\n\tpublic void setConf(Configuration conf) {\n\t\tthis.Conf = conf;\n\t}", "public StoreFactoryOptions createOptionsInstance() {\n\t\treturn new AccumuloRequiredOptions();\n\t}" ]
[ "0.5428258", "0.53889585", "0.5345244", "0.5318098", "0.5299729", "0.5275549", "0.5170559", "0.5167672", "0.51596165", "0.5110133", "0.5069238", "0.5048648", "0.5037412", "0.5036019", "0.50240624", "0.5003089", "0.50016063", "0.49987158", "0.49955046", "0.49493763", "0.49481094", "0.4942354", "0.49176723", "0.4905207", "0.48840603", "0.48650572", "0.48522294", "0.48512632", "0.48355588", "0.4816554", "0.47953236", "0.47930157", "0.47927675", "0.47902727", "0.47814983", "0.47736165", "0.47438508", "0.47397804", "0.47367445", "0.47353557", "0.47312585", "0.47306523", "0.47265097", "0.4699707", "0.46931326", "0.46930712", "0.468058", "0.46699685", "0.46688974", "0.46663502", "0.4662621", "0.46597275", "0.46550056", "0.4653944", "0.46537584", "0.46475837", "0.4644836", "0.46442384", "0.46427712", "0.46421295", "0.46339732", "0.46310535", "0.46162683", "0.46050322", "0.45994335", "0.4594851", "0.4594541", "0.45922998", "0.4588801", "0.45854285", "0.45816112", "0.45743605", "0.45679665", "0.45678958", "0.45625982", "0.45502818", "0.4541507", "0.45410073", "0.4537602", "0.45363474", "0.45299256", "0.4529178", "0.45282206", "0.45229244", "0.45179614", "0.4516124", "0.4515792", "0.4514736", "0.45145062", "0.45138866", "0.4513316", "0.45113826", "0.45026577", "0.44960982", "0.44910702", "0.44824946", "0.44824016", "0.44813275", "0.4480199", "0.44775993" ]
0.5447398
0
Returns the maximum sequence link distance used to limit symbol link learning.
public final int getMaxLinkDistance() { int r = 0; lockMe(this); r = maxLinkDistance; unlockMe(this); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getMaxSourceDistance();", "public double getMaximumDistance() {\n double l = 0;\n int stop = getDistanceEnd();\n\n calculateDistances();\n\n for (int i = 0; i < stop; i++) {\n l = Math.max(l, distances[i]);\n }\n\n return l;\n }", "public final int getMaxLinkCount() {\n\t\tint r = 0;\n\t\tlockMe(this);\n\t\tr = maxLinkCount;\n\t\tunlockMe(this);\n\t\treturn r;\n\t}", "public double getMaxDistance()\n\t{\n\t // Make sure it went some distance\n\t\tif(xPosList.size() > 0)\n\t\t{\n\t\t\treturn this.xPosList.get(xPosList.size() - 1);\n\t\t}\n\n\t\treturn 0;\n\t}", "public Long getMax_latency() {\n return max_latency;\n }", "public int getMaxChainLength(){\r\n return maxChainLength;\r\n }", "public double getFurthermostDistance(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMax = 0.0;\n\t\t\tPoint centroid = centroid();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance > distanceMax){\n\t\t\t\t\tdistanceMax = distance;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn distanceMax;\n\t\t}", "public double getLinkBandwidth() {\n\t\treturn ((getLinkMaxProb() - getLinkMinProb()) / 2D);\n\t}", "public String getMax_latency() {\n return max_latency;\n }", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public float getMaxLinearSpeed() {\n\t\treturn MaxLinearSpeed;\n\t}", "public Float getNextInstructionDistance(){\n\t\treturn getFloat(KEY_NEXT_INSTRUCTION_DISTANCE);\n\t}", "public long getMax() {\n return m_Max;\n }", "int getAbsoluteMaximumDelay();", "public int getMaxAdvance() {\n return -1;\n }", "public final int getMaximumMovementAllowance () {\n return this.details.getMaxMovementAllowance();\n }", "public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }", "public static int offset_max() {\n return (64 / 8);\n }", "public int getMaxJump() {return 2;}", "public int maxDistinction() {\n\n int distinctTiles = this.distincts().size(); // # of unique Scrabble tiles\n int maxDistinction = distinctTiles; // maximum # of distinct possibilities\n\n // If there are wildcards...\n int wilds = this.count(WILDCARD);\n if (wilds > 0) {\n int uniqueHardLetters = distinctTiles - 1; // # of unique letters (w/o wildcards)\n maxDistinction = uniqueHardLetters + wilds; // REVISED MAXIMUM DISTINCTION\n }\n\n return maxDistinction;\n }", "public int getDMAX() {\n\t\t\treturn DMAX;\r\n\t\t}", "public int getMaxSpeed() {\n return MaxSpeed;\n }", "private int getDistanceEnd() {\n int lastPoint = getNumPoints() - 1;\n return getDistanceIndex(lastPoint) + lastPoint;\n }", "public Long getMaxLatency() {\n return maxLatency;\n }", "int getMaximumDelay();", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "public double getMaxSpeed() {\r\n return maxSpeed;\r\n }", "public int getMaxRedirects() {\n\t\treturn maxRedirects.get();\n\t}", "public String getMax() {\n return max;\n }", "protected final int getMax() {\n\treturn(this.max);\n }", "com.google.protobuf.Duration getSequenceMaximumDuration();", "private long getAbsMax() {\n return Math.max(Math.abs(Visualizer.getLowerBound().get()),\n Visualizer.getUpperBound().get());\n }", "public int getMaxLength() {\r\n return _maxLength;\r\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMaxSpeed() {\n\t\treturn this.maxSpeed;\n\t}", "public int maxSentenceOffset();", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getLongest(int[] sequence) {\n\t\treturn sequence.length;\n\t}", "public Long linkSpeed() {\n return this.linkSpeed;\n }", "public double getMaxTransfer() {\n\t\treturn maxTransfer;\n\t}", "public int getMaxPos() {\n return nextPos - 1;\n }", "public long getMaxIfShift() {\n return localMaxIfShift;\n }", "int findLongestPositiveSequenceLength() {\n\t\tint counter = 0;\n\t\tint max_count = 0;\n\t\tNode curr = head;\n\t\n\t\twhile (curr != null) {\n\t\t\t\t\n\t\t\tif (curr.data > 0){\n\t\t\t\tcounter++;\n\t\t\t\tif (max_count < counter)\n\t\t\t\t\tmax_count = counter;\n\t\t\t} else {\n\t\t\t\tcounter = 0;\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn max_count;\n\t}", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public int getMaxLength() {\n return maxLength;\n }", "public int getMaxAdsPerIteration() {\n return this.mMaxAdsPerIteration;\n }", "public LinkSize getLinkSize() {\n String str = findSelected(link_sizes);\n if (str.equals(LINK_SZ_INVISIBLE)) { return LinkSize.INVISIBLE;\n } else if (str.equals(LINK_SZ_THIN)) { return LinkSize.THIN;\n } else if (str.equals(LINK_SZ_NORMAL)) { return LinkSize.NORMAL;\n } else if (str.equals(LINK_SZ_THICK)) { return LinkSize.THICK;\n } else if (str.equals(LINK_SZ_VARY)) { return LinkSize.VARY;\n } else if (str.equals(LINK_SZ_CONDUCT)) { return LinkSize.CONDUCT;\n } else if (str.equals(LINK_SZ_CLUSTERP)) { return LinkSize.CLUSTERP;\n } else return LinkSize.NORMAL;\n }", "public static byte getMaxMoves() {\n return MAX_MOVES;\n }", "public int findMax(){\n return nilaiMaks(this.root);\n }", "public String getMaxKey() {\n return dll.tail.prev == dll.head ? \"\" : (String) dll.tail.prev.keySet.iterator().next();\n }", "public int getMaxLength(){\n return this.maxLength;\n }", "public float maxSpeed();", "public int getChromNum()\r\n {\r\n return max;\r\n }", "public double getMaxS() {\n return u[nr_of_segments - 1];\n }", "public int getMaxTrapDestinations() {\n return maxTrapDestinations;\n }", "public int getMaximum() {\r\n return max;\r\n }", "public double getMaxWidth() throws PDFNetException {\n/* 657 */ return GetMaxWidth(this.a);\n/* */ }", "public int getMaxAliasLength() {\n \t\treturn 10;\n \t}", "public int getMax(){\n return tab[rangMax()];\n }", "public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}", "public Integer getMaxAccess(Rule rule) {\n Constraint constraint = rule.getConstraint().get(0);\n\n int value = Integer.parseInt(constraint.getRightOperand().getValue());\n switch (constraint.getOperator()) {\n case EQ:\n case LTEQ:\n return value;\n case LT:\n return value - 1;\n default:\n return 0;\n }\n }", "abstract float linkSize(String link);", "public int getMax() {\n\t\treturn mMax;\n\t}", "double getMax();", "double getMax();", "public int maxAlignmentCount() {\n return mMaxAlignmentCount;\n }", "public Float getNextInstructionDistanceScale(){\n\t\treturn getFloat(KEY_NEXT_INSTRUCTION_DISTANCE_SCALE);\n\t}", "public int getLinkCapacity() {\n return LinkCapacity;\n }", "public int getMaxCommunityLength() {\n return maxCommunityLength;\n }", "public static float getMAX_SPEED_static() {\n \t\treturn Set.FISH_MaxSpeed;\n \t}", "@Override\r\n\tpublic String getReferenceKey() {\n\t\treturn \"max\";\r\n\t}", "public BigInteger getMaxUses() {\r\n return maxUses;\r\n }", "BigInteger getMax_freq();", "public double getAltMax() {\n\t\treturn altMax;\n\t}", "public float getMaxAlturaCM();", "public double getSymbolBandwidth() {\n\t\treturn ((getSymbolMaxProb() - getSymbolMaxProb()) / 2D);\n\t}", "public float getMax()\n {\n parse_text();\n return max;\n }", "public double getMaxSpeedValue() {\n return maxSpeedValue;\n }", "public float getMaxForce() {\n return jniGetMaxForce(addr);\n }", "public int getMax()\n {\n return 0;\n }", "public int getAbsoluteDistance() {\r\n\t\t\treturn Math.abs(distance);\r\n\t\t}", "public long getLinkCost() {\n return LinkCost;\n }", "public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}", "public int getMaximumNumber() {\n\t\treturn 99999;\n\t}", "public double getFinalDistance(){\n return valori.get(end_node);\n }", "public static double GetMaxPassengers() \r\n {\r\n return maxPassengers;\r\n }", "public void setMaxSourceDistance(double distance);", "public byte get_max() {\n return (byte)getSIntBEElement(offsetBits_max(), 8);\n }", "public double getMaximum() {\n return (max);\n }", "public long getMaxHeight(){\r\n\t\treturn world.getHeight();\r\n\t}", "public double maxDifference()\n {\n double maxD = 0.0;\n double testD = 0.0;\n \n for (int i=0; i < data.length -1; i++) // stopping 1 early because reading ahead\n {\n testD = Math.abs(data[i]-data[i+1]);\n if (testD > maxD)\n {\n maxD = testD;\n }\n }\n \n return maxD;\n }", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();" ]
[ "0.7247192", "0.70820045", "0.66698486", "0.660011", "0.6139274", "0.6118572", "0.6053051", "0.60504913", "0.5966709", "0.5962117", "0.59502995", "0.590419", "0.58982635", "0.5864662", "0.583967", "0.58218056", "0.58192533", "0.5782888", "0.577599", "0.57589173", "0.5733614", "0.57259", "0.5719414", "0.5716753", "0.5691705", "0.5690454", "0.5689236", "0.568506", "0.56718653", "0.5664144", "0.5661346", "0.5659921", "0.5652404", "0.56504595", "0.56504595", "0.56504595", "0.5643278", "0.5640321", "0.56364554", "0.5631148", "0.5631148", "0.5615603", "0.56116134", "0.5610021", "0.559939", "0.55976486", "0.5594183", "0.5587683", "0.5582553", "0.5582168", "0.557987", "0.55744976", "0.5559038", "0.5557448", "0.55567414", "0.5554054", "0.5553277", "0.5551737", "0.5551173", "0.55464584", "0.5543593", "0.5542318", "0.5539771", "0.5537982", "0.55358267", "0.5535008", "0.5534931", "0.55191356", "0.55191356", "0.55179024", "0.5515273", "0.5506902", "0.5503696", "0.5503279", "0.5500967", "0.5500238", "0.54929996", "0.54920936", "0.5488913", "0.5485855", "0.5483974", "0.5483207", "0.5478379", "0.5472384", "0.5471317", "0.5470123", "0.54640824", "0.5460284", "0.5459651", "0.54525167", "0.54455924", "0.5445054", "0.54421103", "0.5434621", "0.54346", "0.54333466", "0.54333466", "0.54333466", "0.54333466", "0.54333466" ]
0.82286876
0
Returns the maximum link count used when learning symbol links.
public final int getMaxLinkCount() { int r = 0; lockMe(this); r = maxLinkCount; unlockMe(this); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final int getMaxLinkDistance() {\n\t\tint r = 0;\n\t\tlockMe(this);\n\t\tr = maxLinkDistance;\n\t\tunlockMe(this);\n\t\treturn r;\n\t}", "public int getMaxCount() {\n return maxCount_;\n }", "public int getMaxCount() {\n return maxCount_;\n }", "public int countLink() {\n\t\tint count = 0;\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT count(*) from links\");\n\t\t stmt.execute();\n\t\t ResultSet rs = stmt.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tcount = rs.getInt(1);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn count;\n\t}", "public int getLinkCapacity() {\n return LinkCapacity;\n }", "int getLinksCount();", "default int getMaximumCount(int slot) {\n\t\treturn 64;\n\t}", "public int getMaxConnections() {\n return maxConnections;\n }", "public long size() {\n return links.length * links.length;\n }", "public int getMaxRedirects() {\n\t\treturn maxRedirects.get();\n\t}", "abstract float linkSize(String link);", "public int getMaxConnections()\n {\n return _maxConnections;\n }", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }", "public Integer getWebLinkSize() {\r\n\t\treturn webLinks.size();\t\t\r\n\t}", "public int getMaxChainLength(){\r\n return maxChainLength;\r\n }", "int getMaxCount();", "int getMaxCount();", "public BigInteger getMaxUses() {\r\n return maxUses;\r\n }", "public Integer getNodeLabelMaxChar() {\n return nodeLabelMaxChar;\n }", "public int getMaxAttemptCount() {\n return maxAttemptCount;\n }", "public int getMaxFrequency() {\n\t\t\n\t\tif(firstNode!=null){\n\t\t\tNode currentNode = firstNode;\n\t\t\tNode maxNode = firstNode;\n\t\t\twhile(currentNode!=null){\n\t\t\t\tif(currentNode.getFrequencyOfNode()>=maxNode.getFrequencyOfNode()){\n\t\t\t\t\tmaxNode = currentNode;\n\t\t\t\t}\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t\treturn maxNode.getFrequencyOfNode();\n\t\t}\n\t\t\t\n\t\treturn 0;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "@java.lang.Override\n public int getLinksCount() {\n return instance.getLinksCount();\n }", "public final Integer getMaxLayerId() {\n return getNextNumberInList(getActiveScene().getLayers().toArray());\n }", "public int getMaxRequestUrlsReported() {\n return maxRequestUrlsReported;\n }", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "public LinkSize getLinkSize() {\n String str = findSelected(link_sizes);\n if (str.equals(LINK_SZ_INVISIBLE)) { return LinkSize.INVISIBLE;\n } else if (str.equals(LINK_SZ_THIN)) { return LinkSize.THIN;\n } else if (str.equals(LINK_SZ_NORMAL)) { return LinkSize.NORMAL;\n } else if (str.equals(LINK_SZ_THICK)) { return LinkSize.THICK;\n } else if (str.equals(LINK_SZ_VARY)) { return LinkSize.VARY;\n } else if (str.equals(LINK_SZ_CONDUCT)) { return LinkSize.CONDUCT;\n } else if (str.equals(LINK_SZ_CLUSTERP)) { return LinkSize.CLUSTERP;\n } else return LinkSize.NORMAL;\n }", "public int getMaximumCategoryCount() { return this.maximumCategoryCount; }", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public double getLinkBandwidth() {\n\t\treturn ((getLinkMaxProb() - getLinkMinProb()) / 2D);\n\t}", "public String getMaxKey() {\n return dll.tail.prev == dll.head ? \"\" : (String) dll.tail.prev.keySet.iterator().next();\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getNumOfMaxActions() {\n return numOfMaxActions;\n }", "public int getMaximumNumber() {\n\t\treturn 99999;\n\t}", "public int getMax() {\n\t\treturn mMax;\n\t}", "public static int getMaxSessionCount() {\n\t\treturn (maxSessionCount);\n\t}", "public int getMaxMappings() {\n\t\treturn maxMappings;\n\t}", "public int maxAlignmentCount() {\n return mMaxAlignmentCount;\n }", "public int getMaxAdsPerIteration() {\n return this.mMaxAdsPerIteration;\n }", "public int getMaximum() {\r\n return max;\r\n }", "public int getMaxRedirects()\n {\n return _maxRedirects;\n }", "public int length() {\n return links.length;\n }", "public int max() {\n\t\treturn 0;\n\t}", "public int discoverMaximumLayerDepth() {\n\t\tif (this.layers.size() > 0) {\n\t\t\tint layerDepth;\n\t\t\t\n\t\t\tfor (int i = 0; i < this.layers.size(); i++) {\n\t\t\t\tlayerDepth = this.layers.get(i).getDepth();\n\t\t\t\tthis.maximumLayerDepth = layerDepth > this.maximumLayerDepth ? layerDepth : this.maximumLayerDepth;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this.maximumLayerDepth;\n\t}", "BigInteger getMax_freq();", "public final int getMaxForKernels()\r\n\t{\r\n\t\treturn maxForKernels;\r\n\t}", "@java.lang.Override\n public int getLinksCount() {\n return links_.size();\n }", "public String getDatabaseConnectionPoolMaxNumberConnections(){\n \t\treturn getProperty(\"org.sagebionetworks.pool.max.number.connections\");\n \t}", "public int getMaxTrapDestinations() {\n return maxTrapDestinations;\n }", "public int getMaxCalls();", "public int getMaxConns() {\n return maxConns;\n }", "public int getMaxOverhaulCount () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_MaxOverhaulCount);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}", "@PrivateAPI\n\tpublic int getReferenceCount() {\n\t\treturn this.referencesFromCapacityMap.get();\n\t}", "public String getApplyCntMax( ) {\n\t\treturn this.applyCntMax;\n\t}", "public int getMaximumVertexCount()\r\n {\r\n return theMaximumVertexCount;\r\n }", "public int getMaxVisibleCount() {\n return this.mData.getEntryCount();\n }", "public Long getMax_latency() {\n return max_latency;\n }", "protected final int getMax() {\n\treturn(this.max);\n }", "public org.apache.axis.types.UnsignedInt getMaxconn() {\n return maxconn;\n }", "public static native int getMaxCache();", "public int\ngetNodeIndexMax();", "public long getMax() {\n return m_Max;\n }", "public static int getLinksCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().getLinksCount();\n\t}", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "public double getSymbolBandwidth() {\n\t\treturn ((getSymbolMaxProb() - getSymbolMaxProb()) / 2D);\n\t}", "public int getMaxCommunityLength() {\n return maxCommunityLength;\n }", "public int getMaxIterations() {\n return mMaxIterations;\n }", "public int getMaxIterations() {\n return mMaxIterations;\n }", "public int getMaximum() {\n return this.iMaximum;\n }", "@Override\n public int size()\n {\n int numLinks = 0;\n Node currNode = this.head.next; \n while(currNode.next != null)\n {\n numLinks++;\n currNode = currNode.next;\n }\n return numLinks;\n }", "public int getMaxFrequency() {\n\t\t\tif (mMaxFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MAX_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmMaxFrequency = value / 1000;\n\t\t\t}\n\t\t\treturn mMaxFrequency;\n\t\t}", "public final int getMaxNumClusters() {\n return maxNumClusters;\n }", "public int getMaxExternalMutations() {\n return mMaxExternalMutations;\n }", "public int ListLength(){\n int j = 0;\n // Get index of the first element with value\n int i = StaticLinkList[MAXSIZE-1].cur;\n while (i!=0)\n {\n i = StaticLinkList[i].cur;\n j++;\n }\n return j;\n }", "@Override\r\n\tpublic int getNumberOfSymmetricLinks()\r\n\t{\r\n\t\tCollection<Entity> vertices = directedGraph.getVertices();\r\n\t\tint symLinksSum = 0;\r\n\r\n\t\t// this can be done still more efficiently if i put the nodes in a list\r\n\t\t// and remove from the\r\n\t\t// list current node as well as its children after each loop\r\n\t\t// int progress = 0;\r\n\t\t// int max = vertices.size();\r\n\r\n\t\tfor (Entity source : vertices) {\r\n\t\t\t// ApiUtilities.printProgressInfo(progress, max, 100,\r\n\t\t\t// ApiUtilities.ProgressInfoMode.TEXT, \"Counting symmetric links\");\r\n\t\t\tfor (Entity target : getChildren(source)) {\r\n\t\t\t\t// progress++;\r\n\r\n\t\t\t\tif (isSymmetricLink(source, target)) {\r\n\t\t\t\t\tsymLinksSum++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn symLinksSum / 2;\r\n\t}", "public String getMaxKey() {\n\t\tif(map.isEmpty()){\n\t\t\treturn \"\";\n\t\t}\n\t\treturn head.next.key;\n\t}", "int getMaximalIterationCount();", "@Override\n public int getMaxConnections() throws ResourceException {\n return Integer.MAX_VALUE;\n }", "public int getMaxGenerations() { return maxGenerations; }", "public int getMaxListLength();", "@SuppressWarnings(\"unused\")\n public String getMaxTab() {\n return max_tab.get();\n }", "public int getAttemptCount() {\n return maxAttemptCount;\n }", "@Override\r\n\tpublic String getReferenceKey() {\n\t\treturn \"max\";\r\n\t}", "public String getVerifyCountRangeMax( ) {\n\t\treturn this.verifyCountRangeMax;\n\t}", "public int getMaxAliasLength() {\n \t\treturn 10;\n \t}", "public final int getMaxIterations()\r\n\t{\r\n\t\treturn maxIterations;\r\n\t}", "public int getMaxLength() {\r\n return _maxLength;\r\n }", "public long getLinkCost() {\n return LinkCost;\n }", "public Integer getMaxTokenLength() {\n return this.maxTokenLength;\n }", "public int getNetSize() {\n return graph.size();\n }", "public int length(){\r\n int counter = 0;\r\n ListNode c = head;\r\n while(c != null){\r\n c = c.getLink();\r\n counter++;\r\n }\r\n return counter;\r\n }", "public Integer getMaxLength() { \n\t\treturn getMaxLengthElement().getValue();\n\t}", "public int getLinks() {\n\t\treturn links;\n\t}", "public int getMax()\n {\n return 0;\n }", "public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}", "public int getMaxRPMRefDataSet () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_MaxRPMRefDataSet);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}" ]
[ "0.74987394", "0.6643194", "0.6596093", "0.6577533", "0.65195245", "0.64277864", "0.64153075", "0.6387218", "0.6336308", "0.63339573", "0.6332172", "0.629213", "0.6277425", "0.6248071", "0.6187125", "0.6185195", "0.6185195", "0.6136515", "0.6053832", "0.6020093", "0.6007796", "0.60065997", "0.60065997", "0.60047966", "0.59956354", "0.5992214", "0.5978754", "0.5973939", "0.5967816", "0.5955663", "0.5952617", "0.59489906", "0.5930949", "0.59149677", "0.59149677", "0.59149677", "0.5902657", "0.58926636", "0.5891074", "0.5883587", "0.5861717", "0.586108", "0.58589786", "0.58501166", "0.5846013", "0.5843092", "0.5825947", "0.5820771", "0.58199346", "0.5810767", "0.58052164", "0.58045924", "0.5789046", "0.5782761", "0.5764605", "0.5758344", "0.57544357", "0.57484263", "0.5741469", "0.57346743", "0.5724324", "0.5722621", "0.57097006", "0.5700837", "0.569943", "0.5689661", "0.5689629", "0.5688854", "0.56797725", "0.56699735", "0.56638396", "0.56638396", "0.5658765", "0.565448", "0.56485146", "0.5646302", "0.5644451", "0.56351966", "0.5634971", "0.56279045", "0.5619601", "0.56195205", "0.5616144", "0.5616024", "0.5614932", "0.56140727", "0.5608305", "0.560603", "0.5605838", "0.559788", "0.55922097", "0.55881995", "0.5586562", "0.5584951", "0.55785215", "0.55626065", "0.556212", "0.5560139", "0.555893", "0.55557585" ]
0.8312564
0
Returns a copy of the list of links.
public final List<Link> getLinks() { List<Link> r = new ArrayList<Link>(); lockMe(this); for (Link lnk: links) { r.add(lnk.getCopy()); } unlockMe(this); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Link> getLinks()\t{return Collections.unmodifiableList(allLinks);}", "public List<Link> getLinks() {\n\t return Collections.unmodifiableList(links);\n\t}", "List<Link> getLinks();", "public List<URI> getLinks() {\n return links; // this is already unmodifiable\n }", "public List<Link> links() {\n\t\t\treturn new NonNullList<>(_links);\n\t\t}", "public List<String> getLinks();", "public List<Link> getLinks()\n {\n return links;\n }", "java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> \n getLinksList();", "@java.lang.Override\n public java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> getLinksList() {\n return java.util.Collections.unmodifiableList(\n instance.getLinksList());\n }", "public List<Link> getLinks() {\n\t\treturn _links;\n\t}", "protected java.util.Vector _getLinks() {\n\tjava.util.Vector links = new java.util.Vector();\n\tlinks.addElement(getPeopleLink());\n\tlinks.addElement(getChangeLogDetailsesLink());\n\treturn links;\n}", "List<ProductLink> links();", "public List<String> getLinks() {\r\n\t\treturn this.links;\r\n\t}", "public List<Link> links() {\n return this.links;\n }", "ObservableList<Link> getUnfilteredLinkList();", "public Set<L> getLinks() {\n return links;\n }", "public ArrayList<Link> getLinks() {\n\t\treturn getPageObjects(Link.class);\n\t}", "List<? extends Link> getLinks();", "public List getLinks() {\r\n List links = getElements(\"a\");\r\n ArrayList result = new ArrayList();\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"href\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n links = getElements(\"FRAME\");\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"src\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n return result;\r\n }", "@java.lang.Override\n public java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> getLinksList() {\n return links_;\n }", "public Set<String> getLinks() {\n return links;\n }", "@NonNull List<SaldoLink> getLinks() {\n return links;\n }", "public Set<Link> links() {\n return links;\n }", "public Collection<Map<String, String>> getLinks();", "public ConfabulatorObject getCopy() {\n\t\tConfabulatorObject copy = new ConfabulatorObject(getMessenger());\n\t\tlockMe(this);\n\t\tint maxD = maxLinkDistance;\n\t\tint maxC = maxLinkCount;\n\t\tList<Link> linksCopy = new ArrayList<Link>();\n\t\tfor (Link lnk: links) {\n\t\t\tlinksCopy.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\tcopy.initialize(maxD,maxC,linksCopy);\n\t\treturn copy;\n\t}", "ObservableList<Link> getFilteredLinkList();", "public List<ResourceLink> links() {\n return links;\n }", "public List<URL> newURLs() {\r\n // TODO: Implement this!\r\n return new LinkedList<URL>();\r\n }", "public ObservableList<Connect> getLinks() {\n return this.links;\n }", "public List<TparselinksEntity> getAllLinks();", "@Override\n\tpublic ArrayList<String> getLinks() {\n\t\treturn this.description.getLinks();\n\t}", "public ArrayList<String> getWebLink(){\r\n\t\treturn webLinks;\t\t\r\n\t}", "public void setLinks(List<Link> links)\n {\n this.links = links;\n }", "protected java.util.Vector _getLinks() {\n\t\tjava.util.Vector links = new java.util.Vector();\n\t\tlinks.add(getLeaseTaskStartsLink());\n\t\tlinks.add(getLeaseRulesLink());\n\t\treturn links;\n\t}", "@java.lang.Override\n public org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto getLinks(int index) {\n return links_.get(index);\n }", "@java.lang.Override\n public org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto getLinks(int index) {\n return instance.getLinks(index);\n }", "public java.util.List<? extends org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProtoOrBuilder> \n getLinksOrBuilderList() {\n return links_;\n }", "org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto getLinks(int index);", "public static List<String> getURLs(List<WebElement> links) {\n\t\t List<String> ListHref = new ArrayList<String>();\n\t\t \n\t\t //loops through all links\n\t\t for(WebElement Webhref:links) {\n\t\t\t \n\t\t\t //if element isn't null\n\t\t\t if (Webhref.getAttribute(\"href\") != null) {\n\t\t\t\t String StringHref = (Webhref.getAttribute(\"href\")).toString();\n\n\t\t\t\t //if page isn't part of domain, ignore\n\t\t\t\t if (StringHref.startsWith(variables.domain)) {\n\t\t\t\t\t //System.out.println(StringHref);\n\t\t\t\t\t \n\t\t\t\t\t //if page doesn't have an octothorpe\n\t\t\t\t\t if (!StringHref.contains(\"#\")) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if page doesn't ends with one of the file extensions to not use\n\t\t\t\t\t\t String extension = getExtension(StringHref);//gets TLD from URL\n\t\t\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t//if value isn't already part of this array or the already crawled array\n\t\t\t\t\t\t\t if(!ListHref.contains(StringHref) && !variables.crawled.contains(StringHref)) {\n\t\t\t\t\t\t\t\t ListHref.add(StringHref);\n\t\t\t\t\t\t\t\t //System.out.println(StringHref);\n\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\treturn ListHref;\n\t}", "@Override\n\tpublic SecuredRDFList copy();", "public List<ExternalLinkItem> getExternalLinksExternal() {\n List<ExternalLinkItem> sortedList = new ArrayList<ExternalLinkItem>(getExternalLinks());\n Collections.sort(sortedList);\n return Collections.unmodifiableList(sortedList);\n }", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\n return new ArrayList<ELEMENT>();\n }", "public List<Link> getTargetConnections() {\n\t\treturn inputLinks;\n\t}", "public ArrayList<URI> getList() { return new ArrayList<URI>(); }", "public java.util.ArrayList getClones();", "protected <ELEMENT> List<ELEMENT> newReferrerList() {\n return new ArrayList<ELEMENT>();\n }", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\r\n return new ArrayList<ELEMENT>();\r\n }", "protected <ELEMENT> List<ELEMENT> newReferrerList() {\r\n return new ArrayList<ELEMENT>();\r\n }", "public byte[] getLinksDirty()\n {\n if (true)\n throw new UnsupportedOperationException(\"FIXME\");\n return (byte[]) getProperty(PropertyIDMap.PID_LINKSDIRTY);\n }", "public List<Link> getOutLinks() {\r\n return outLinks;\r\n }", "public SinglyLinkedList<E> copy() {\n SinglyLinkedList<E> copy = new SinglyLinkedList<>();\n for(Node<E> cur = head; cur != null; cur = cur.next) {\n copy.addLast(cur.item);\n }\n return copy;\n }", "public void setLinks(List<Link> links) {\n\t\tthis.links = links;\n\t}", "@Override\n public synchronized WebBackForwardList clone() {\n return new WebBackForwardListImpl(this);\n }", "public Set<String> getLinks() throws SearchResultException;", "public void setOutLinks(List<Link> links) {\r\n outLinks = links;\r\n }", "private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }", "Set<Link> extractLinks(CrawlDoc doc, ParseState parseState)\n throws IOException;", "private void clearLinks() {\n links_ = emptyProtobufList();\n }", "List<Link> findLinkByCache();", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "private Object[] deepCopy()\n {\n Object[] newList = new Object[size];\n\n int newListPosition = 0;\n for (int i =0; i < size; i++)\n {\n if (list[i] != null)\n {\n newList[newListPosition++] = list[i];\n }\n }\n\n return newList;\n }", "public void setLinks(List<ALink> link) {\n this.link = link;\n }", "public URL[] getUrls() {\n\t\treturn urls.toArray(new URL[urls.size()]);\n\t}", "@Override\n\tpublic Object clone() {\n\t\tRemoteInfoList list = new RemoteInfoList();\n\t\tfor (RemoteInfo rInfo : rInfoList) {\n\t\t\tlist.add((RemoteInfo)rInfo.clone());\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public int getLinks() {\n\t\treturn links;\n\t}", "public void removeAllLinks() {\n\t\tfor (int i=0; i<links.size(); i++){\n\t\t\tlinks.remove(i);\n\t\t}\n\t}", "@RequestMapping(path = \"/newLinks\", method = RequestMethod.GET)\n public ArrayList<Link> getNewYadas() {\n\n return links.findTop10ByOrderByTimeOfCreationDesc();\n }", "synchronized void toCrawlList_addAll(LinkedHashSet _toCrawlList, ArrayList _links)\n {\n _toCrawlList.addAll(_links);\n }", "private Set<String> findNewUrls(Document doc) {\n Set<String> newUrlSet = new HashSet<>();\n\n for (Element ah : doc.select(\"a[href]\")) {\n String href = ah.attr(\"abs:href\");\n\n if (!urlSet.contains(href) // Check if this is a new URL\n && href.contains(domain) // Check if the URL is from the same domain\n && isValidExtension(href) // Check that the file extension is not in the list of excluded extensions\n && !href.contains(\"mailto:\") // Check that the href is not an email address\n ) {\n newUrlSet.add(href);\n }\n\n }\n\n processNewUrls(newUrlSet);\n return newUrlSet;\n }", "public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}", "public ArrayList<ExternalLink> getExternalLinks() {\n\t\treturn getPageObjects(ExternalLink.class);\n\t}", "public Results copy()\n {\n Results copy = new Results();\n for(Object object : results) {\n copy.add( object );\n }\n return copy;\n }", "@Override\r\n public List<Link> getLinks(Turn inTurn, Player inPlayer) throws Exception\r\n {\r\n return getGameState().getLinkList();\r\n }", "public ArrayList<String> getInlinks() {\r\n\t\treturn inlinks;\r\n\t}", "public HashSet<String> getNetworkCopies() {\n return networkCopies;\n }", "public DSALinkedList getAdjacent()\n\t\t{\n\t\t\treturn links;\n\t\t}", "public List<String> getUrls() {\n\t\treturn urls;\n\t}", "public AstNode[] links() {\n\t\treturn new AstNode[]{loopLink};\n\t}", "public List<Map<String,Object>> getURLs() {\n return urls;\n }", "private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// Log.v(\"DLasync.cleanCollected\", \" from CollectedLinks, just cleaned: \" + thisURL);\n// Log.v(\".cleanCollected\", \" collected set is now:\" + collectedLinks.toString());\n }\n }\n\n }", "public List<E> clone();", "public ArrayList<Link> getLinksFromConf(Configuration configuration) {\n\n ArrayList<Link> links = new ArrayList<>();\n ArrayList<Screen> screens = this.getScreensFromConf(configuration);\n\n for(Screen s : screens)\n links.addAll(s.getLinks());\n\n return links;\n\n }", "public List<Person> copyPersons() {\n\t\tList<Person> copyPersons = new ArrayList<Person>(personsOrig.size());\t// NOTE this is still an empty List with initial capacity of personsOrig size\r\n\t\t// unfortunately there isn't a clone or factory method in Collections. So have to create \"target\" collection with some garbage\r\n\t\tPerson p;\r\n\t\tfor (int i = 0; i < personsOrig.size(); i++) {\r\n\t\t\tp = new Person(\"\", 0);\r\n\t\t\tcopyPersons.add(p);\r\n\t\t}\r\n\t\tCollections.copy(copyPersons, personsOrig);\r\n\t\tSystem.out.println(\"persons copy:\" + copyPersons);\r\n\r\n\t\tCollections.sort(copyPersons);\r\n\t\tSystem.out.println(\"Sorted copy:\" + copyPersons);\r\n\r\n\t\tSystem.out.println(\"Original persons:\" + personsOrig);\r\n\t\treturn copyPersons;\r\n\t}", "public List<SingleLinkConfiguration> getLinkers() {\n return linkers;\n }", "public List getList(List oldList) {\n List newList = new ArrayList();\n Collections.copy(newList, oldList);\n return newList;\n }", "public static <T> List<T> clone(List<T> a) {\n\t\tList<T> newList = new ArrayList<T>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tnewList.add(elt);\n\t\t\n\t\treturn newList;\n\t}", "private boolean getLinks() {\n return false;\n }", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "public LinkedList<Integer> getCopyOfNextColorList() {\n\t\tLinkedList<Integer> copyList = new LinkedList<Integer>();\n\t\tfor (Integer i : nextColorList) {\n\t\t\tcopyList.add(i);\n\t\t}\n\t\treturn copyList;\n\t}", "void clearLinks();", "public void getPhotoLinks() {\n try {\n image = Jsoup.connect(link + \"/+images/\").get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Elements elements = image.getElementsByClass(\"image-list-item\");\n photosLinks = new String[elements.size()];\n for (int i = 0; i < elements.size(); i++) {\n String element = elements.get(i).attr(\"href\");\n photosLinks[i] = element;\n }\n }", "public ArrayList<Book> getBookList()\r\n {\r\n ArrayList<Book> bookCopy = new ArrayList<Book>();\r\n //Add code here to copy the bookList ArrayList elements into the local variable bookCopy and return bookCopy\r\n //Hint: You will use the 2-arg Book constructor and the getters or you can add a copy constructor to the Book\r\n //Class\r\n for(Book book: bookList){\r\n Book bk = new Book(book.getTitle(), book.getPrice());\r\n bookCopy.add(bk);\r\n }\r\n return bookCopy;\r\n }", "public List<AnnotatedLinkWrapper> getItemsUnfiltered() {\n return getDelegate().getExtendedItems().stream()\n .map(AnnotatedLinkWrapper::new)\n .filter(al -> al.getTarget() != null)\n .filter(al -> al.getTarget().isInProduction())\n .collect(Collectors.toList());\n }", "void storeLinks();", "private ArrayList<Integer> getPageLinks() {\n int numberOfPages = sqlData.getNumberOfPages();\n\n int n = (pageNumInt / numberOfPages);\n Integer startPage = n * numberOfPages;\n\n ArrayList<Integer> pageLinks = new ArrayList<Integer>();\n\n // iterate and add to the array\n for(int i=0; i < numberOfPages; i++) {\n pageLinks.add(++startPage); \n }\n\n return pageLinks;\n \n }", "public Builder clearLinks() {\n copyOnWrite();\n instance.clearLinks();\n return this;\n }", "@Test\n\tpublic void testGetLinksMultipleLinks() {\n\t\tList<String> results = helper.getLinks(\n\t\t\t\t\"drop tables; <A HREF=\\\"test.com\\\"> <a href=\\\"nexttest.org\\\". junk junk\", null);\n\t\tassertEquals(2, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t\tassertEquals(\"nexttest.org\", results.get(1));\n\t}", "public org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProtoOrBuilder getLinksOrBuilder(\n int index) {\n return links_.get(index);\n }", "public static void AddUrls (List<String> links) {\n\t for(String LoopedLinks:links) { \n\t\n\t\t//if page isn't part of domain, ignore\n\t\t if (LoopedLinks.startsWith(variables.domain)) {\n\t\n\t\t\t //if page doesn't have an octothorpe\n\t\t\t if (!LoopedLinks.contains(\"#\")) {\n\t\t\t\t \n\t\t\t\t //if page doesn't ends with one of the file extensions to not use\n\t\t\t\t String extension = getExtension(LoopedLinks);//gets file extension from URL\n\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\n\t\t\t\t\t //if link isn't already part of master list, add it.\n\t\t\t\t\t if(!variables.master.contains(LoopedLinks)) {\n\t\t\t\t\t\t Reporter.log(\"Adding to master list \"+LoopedLinks, variables.verboseReport);\n\t\t\t\t\t\t variables.master.add(LoopedLinks);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t}" ]
[ "0.7780428", "0.7583857", "0.7541669", "0.7485309", "0.7332544", "0.7161708", "0.70864546", "0.69844455", "0.6956084", "0.68690383", "0.68667835", "0.6857572", "0.68356884", "0.679682", "0.6790669", "0.6789872", "0.67814577", "0.6779891", "0.6723521", "0.66973764", "0.6679788", "0.6672362", "0.6604099", "0.65843725", "0.6555785", "0.6555685", "0.6490936", "0.6440236", "0.6423191", "0.6388348", "0.6316589", "0.6301717", "0.62864125", "0.6230106", "0.62217396", "0.62035394", "0.619158", "0.6165792", "0.60991746", "0.6069003", "0.6023242", "0.59949064", "0.5979097", "0.59726125", "0.5970103", "0.59666985", "0.5960941", "0.5946315", "0.5940674", "0.59353155", "0.59132695", "0.5908345", "0.588939", "0.58660334", "0.58420897", "0.5799668", "0.57954204", "0.5786346", "0.57714903", "0.5740101", "0.5734541", "0.57155615", "0.5714213", "0.5700011", "0.5682924", "0.5662212", "0.56397766", "0.5630542", "0.56170017", "0.5612693", "0.55323607", "0.5527761", "0.55120105", "0.55061567", "0.5505304", "0.55029064", "0.54976934", "0.54891133", "0.54865247", "0.5486418", "0.54798764", "0.5478682", "0.54731846", "0.5455978", "0.5455206", "0.5450552", "0.5443604", "0.54408133", "0.54212326", "0.54209214", "0.5420353", "0.541133", "0.540639", "0.5403975", "0.5403069", "0.54017806", "0.5398213", "0.53954935", "0.5392898", "0.5390151" ]
0.74987054
3
Clears the list of links.
public final void clearLinks() { lockMe(this); links.clear(); linksFromDistance.clear(); linksToDistance.clear(); unlockMe(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clearLinks();", "private void clearLinks() {\n links_ = emptyProtobufList();\n }", "public void removeAllLinks() {\n\t\tfor (int i=0; i<links.size(); i++){\n\t\t\tlinks.remove(i);\n\t\t}\n\t}", "public void clear()\t{nodes.clear(); allLinks.clear();}", "public void clearLinkRemovalTags() {\n\tfor (Link l : allLinks)\n\t l.clearRemovalTag();\n }", "public void clearList() {\n\t\thead = null;\n\t\tlength = 0;\n\t}", "public void clear() {\n\t\tlists.clear();\n\t}", "public Builder clearLinks() {\n copyOnWrite();\n instance.clearLinks();\n return this;\n }", "public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }", "public void clearList() {\n\t\tthis.head = null;\n\t\tthis.tail = null;\n\t\tlength = 0;\n\t}", "public void clearLists() {\r\n\t\ttweets.clear();\r\n\t}", "private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// Log.v(\"DLasync.cleanCollected\", \" from CollectedLinks, just cleaned: \" + thisURL);\n// Log.v(\".cleanCollected\", \" collected set is now:\" + collectedLinks.toString());\n }\n }\n\n }", "@Override\n public void clear() {\n wordsLinkedList.clear();\n }", "public void clear() {\n\n\t\thead = null;\n\t\ttail = null;\n\t\telements = 0;\n\t}", "void clear() {\n\t\tfor (int list = getFirstList(); list != -1;) {\n\t\t\tlist = deleteList(list);\n\t\t}\n\t}", "public void reset() {\n this.list.clear();\n }", "public void clear()\n {\n int llSize = ll.getSize();\n for(int i=0; i<llSize; i++){\n ll.remove(0);\n }\n }", "public void clear ()\n {\n headNode.next = null;\n currentNode = headNode;\n size = 0;\n }", "public void clear() {\n \n /**\n * -------------------------------------------\n * TODO: You fully implement this method\n * \n */\n \n headNode = null;\n tailNode = null;\n size=0;\n \n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (LinkGroup linkGroup : findAll()) {\n\t\t\tremove(linkGroup);\n\t\t}\n\t}", "public void clear() {\n\t\thead = null;\n\t\tsize = 0;\n\n\t}", "public void clearList()\n\t{\n\t\tnodeManager.clearList();\n\t}", "public void deleteAll(){\r\n\t\thead = null;\r\n\t}", "public void clear() {\n head = null;\n tail = null;\n size = 0;\n\n }", "public void clear()\n {\n\thead = null;\n\ttail = null;\n }", "public void clear() {\n\t\thead.setNext(null);\n\t\tmodcount++;\n\t\tnodeCount = 0;\n\t}", "public void clear() {\n size = 0;\n head = new DoublyLinkedNode<E>(null);\n tail = new DoublyLinkedNode<E>(null);\n head.linkWith(tail);\n }", "public void clear() {\n\t\tthis.count = (emptyItem ? 1 : 0);\n\t\tpages.clear();\n\t}", "public void clearLinkedList()\r\n {\r\n \tfirstNode = null;\r\n \tlength = 0;\r\n }", "@Override\n\tpublic void clear() {\n\t\thead = null;\n\t\tsize = 0;\n\t}", "public void clear() {\n\t\tnodeList.clear();\n\t}", "public void clear() {\n\t\tstringList = null;\n\t}", "public void clear() {\n head = tail = null;\n size = 0;\n }", "void clear() {\n\t\t// Initialize new empty list, clearing out old data\n\t\tmNewsList = new ArrayList<>();\n\t}", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "public void clearLinkage(boolean cascade) {\n\t if (links.isEmpty())\n\t\treturn;\n\t ArrayList<Link> p = links;\n\t links = new ArrayList<>();\n\t if (cascade)\n\t\tfor (Link n : p)\n\t\t n.opposite(this).clearLinkage(true);\n\t}", "public void clear() {\n this.next = null;\n this.mList.clear();\n this.notifyDataSetChanged();\n }", "public void clear ()\n {\n\n while (head != null) {\n head.data = null;\n head = head.next;\n }\n size = 0;\n }", "@Override\n public void clear() {\n head = null;\n size = 0;\n }", "public void clear() {\n\t\tvisited = false;\n\t}", "public void clear() {\n\t\thead = null;\n\t}", "public void clear() {\n head = null;\n numElement = 0;\n }", "public void clear() {\n\t\tmSize = 0;\n\t\tmHead = new Node(null, null);\n\t\tmTail = new Node(null, null);\n\t\tmHead.next = mTail;\n\t\tmodCount++;\n\t}", "@Override\n public void clear() {\n this.head.setData(null);\n this.head.next = this.head;\n this.head.prev = this.head;\n this.tail = this.head;\n size = 0;\n }", "protected void clear() {\n\n\t\tthis.myRRList.clear();\n\t}", "public void clear() {\n used = 0;\n head = -1;\n }", "public void clear()\r\n {\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }", "public void clearAll();", "public void clearAll();", "public void clear() {\n\t\thead = tail = null;\n\t}", "public void clear()\n\t{\n\t\t// resets the list to empty: O(1).\n\t\thead = null;\n\t\ttail = null;\n\t}", "public void clear() {\n size = 0;\n Arrays.fill(items, null);\n }", "public void Reset()\n {\n this.list1.clear();\n }", "public void reset() {\n noIndex= false;\n noFollow= false;\n noCache= false;\n baseHref= null;\n }", "public void clear()\r\n {\r\n phoneList = new ArrayList<String>();\r\n }", "public void clearList() {\n\t\tdeletedList.clear();\n\t}", "private void clearDownloadListStatus() {\r\n /* reset ip waittimes only for local ips */\r\n ProxyController.getInstance().removeIPBlockTimeout(null, true);\r\n /* reset temp unavailble times for all ips */\r\n ProxyController.getInstance().removeHostBlockedTimeout(null, false);\r\n for (final DownloadLink link : DownloadController.getInstance().getAllDownloadLinks()) {\r\n /*\r\n * do not reset if link is offline, finished , already exist or pluginerror (because only plugin updates can fix this)\r\n */\r\n link.getLinkStatus().resetStatus(LinkStatus.ERROR_FATAL | LinkStatus.ERROR_PLUGIN_DEFECT | LinkStatus.ERROR_ALREADYEXISTS, LinkStatus.ERROR_FILE_NOT_FOUND, LinkStatus.FINISHED);\r\n }\r\n }", "public void clear(){\r\n NotesList.clear();\r\n }", "protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {\n\t\tjava.util.List links = _getLinks();\n\t\tfor (int i = 0; i < links.size(); i++) {\n\t\t\ttry {\n\t\t\t\t((com.ibm.ivj.ejb.associations.interfaces.Link) links.get(i)).remove();\n\t\t\t} catch (javax.ejb.FinderException e) {\n\t\t\t} //Consume Finder error since I am going away\n\t\t}\n\t}", "public void clear()\n {\n pages.stream().forEach((page) -> {\n page.clearCache();\n });\n\n pages.clear();\n listeners.clear();\n occupiedEntries.clear();\n }", "public void clear()\n {\n nodes.clear();\n }", "public void removeAll() {\n\t\thead = new DoublyNode(null);\r\n\t\thead.setPrev(head);\r\n\t\thead.setNext(head);\r\n\t\tnumItems = 0;\r\n\t}", "public void clear() {\n\t\tlist = new ArrayList<String>();\n\t\tword = \"\";\n\t}", "public void clear(){\n firstNode = null;\n lastNode = null;\n }", "public void clear() {\n lists = new TernarySearchTree<>();\n }", "public void clear()\n {\n\tsize = 0;\n\thead = new SkipListNode<K>();\n }", "protected void _initLinks() {\n\tpeopleLink = null;\n\tchangeLogDetailsesLink = null;\n}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "public void clear() {\n\t\tif(size == 0) return;\r\n\t\telse {\r\n\t\t\thead.clear();\r\n\t\t\ttail.clear();\r\n\t\t}\r\n\t\tsize = 0;\r\n\t}", "public void removeAllItems()\r\n {\r\n head = tail = null;\r\n nItems = 0;\r\n }", "public void clear() {\r\n\t\titems.clear();\r\n\t}", "@Override\n public void clear() {\n elements.clear();\n indexByElement.clear();\n }", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();" ]
[ "0.8802291", "0.8441252", "0.8135441", "0.753204", "0.7409046", "0.7054476", "0.7048473", "0.70355415", "0.6978891", "0.69118905", "0.6892563", "0.68817425", "0.6798448", "0.67570174", "0.67208016", "0.6680483", "0.6673988", "0.6631629", "0.6625299", "0.6617129", "0.65939873", "0.6576948", "0.65748787", "0.6571286", "0.6569153", "0.65663767", "0.65641826", "0.6545261", "0.6530614", "0.65214884", "0.6516033", "0.65140843", "0.6511157", "0.64881414", "0.6483103", "0.64732194", "0.6472632", "0.6463573", "0.64515144", "0.6450288", "0.64463747", "0.6444465", "0.64280385", "0.6426065", "0.63944757", "0.6390855", "0.638868", "0.6383167", "0.6383167", "0.63628656", "0.63590217", "0.63572276", "0.6335044", "0.6330619", "0.6321984", "0.6317878", "0.6308759", "0.63076186", "0.6305641", "0.629474", "0.6284189", "0.628275", "0.62767774", "0.6276643", "0.62617874", "0.6253933", "0.6242193", "0.62396234", "0.62396234", "0.62381375", "0.6233321", "0.62319124", "0.62216985", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436", "0.62176436" ]
0.8138785
2
Makes the thread for proccessConnection And sets the connection information and who is hosting and the type iof lobby to be created
public GameHandler(int serverPort, String ip, int caseNr, String hostName) { this.serverPort = serverPort; this.hostName = hostName; this.caseNr = caseNr; this.ip = ip; executorService = Executors.newFixedThreadPool(1); // Lager et pool av threads for bruk connect(); createNewLobby(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }", "public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }", "private void makeBackgroundConnection() {\n connectionPending = true;\n try {\n Thread connectThread = new Thread(this);\n connectThread.start();\n } catch (OutOfMemoryError oome) {\n // Give up on new connection\n }\n }", "private void makeBackgroundConnection() {\n connectionPending = true;\n try {\n Thread connectThread = new Thread(this);\n connectThread.start();\n } catch (OutOfMemoryError oome) {\n // Give up on new connection\n }\n }", "public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void initConnection(Socket cli) {\t\n\tConnection conn = new Connection(this, cli);\n conn.setConnlist(connlist);\n\tThread t = new Thread(conn);\n\tt.start();\n\t\n\tconnlist.add(conn);\n\t\t\n\tsetConnectedStatus(true);\n }", "public synchronized void startConnection ()\r\n\t{\r\n \t\tsynchronized (this)\r\n \t\t{\r\n \t\t\tif (_roboCOM!=null) return;\r\n\t\t\t\r\n\t\t\tuitoken++;\r\n\t\t\t_roboCOM = new TCPClient (MsgQueue,cm,uitoken);\r\n\r\n\t\t\t// debug parameters\r\n\t\t\t_roboCOM.msgHello=\"Start Connection ACCE\";\r\n\t\t\t\t\t\t\t\r\n\t \t \tnew Thread (_roboCOM).start();\r\n \t\t}\r\n\t}", "public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\t\t\t\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\t\t\t\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\t\t\t\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE); \r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\n\t}", "public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(getDbDirectory() + FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE);\r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\n\t}", "private void launchPongManagerThread() {\n \t\tPongManager pongManager = new PongManager(this, listenAddress);\n \t\tfinal Thread t = this.listenChannel.getThreadFactory().newThread(pongManager);\n \t\tt.setName(\"Pong Server Manager\");\n \t\tt.start();\n \t}", "public void run()\n\t{\n\t\tint state = 1;\n\t\t\n\t\ttry \n\t\t{\n\t\t\t_socket = new Socket(_hostname, Integer.parseInt(_portnum));\n\t\t\t\t\t\t\n\t\t\t_sendBuf = new byte[_socket.getSendBufferSize()];\n\t\t\t_recBuf = new byte[_socket.getReceiveBufferSize()];\n\t\t\t\n\t\t\t_address = _socket.getInetAddress();\n\t\t\t_port = _socket.getPort();\n\t\t\t_user = new User(_myName, _address, _port);\n\t\t\t\n\t\t\t_sendBuf = toByteArray(_user);\n\t\t\t_socket.getOutputStream().write(Message.USER);\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t\t\n\t\t\tstate = _socket.getInputStream().read();\n\t\t\t\n\t\t\twhile (state == 200)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Username already is use!\");\n\t\t\t\tbuildRelog();\n\t\t\t\tstate = _socket.getInputStream().read();\n\t\t\t\tSystem.out.println(state);\n\t\t\t\t_relogFrame.dispose();\n\t\t\t\t\n\t\t\t\tif (state != 200)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tClient._mainFrame.setTitle(\"Cr@p Talk: \" + _myName);\n\t\t\tClient._mainFrame.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tMessage rec = new Message();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tstate = _socket.getInputStream().read();\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif (state == Message.HASHSET)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing hashset\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\tObject[] online = (Object[]) toObject(_recBuf);\n\t\t\t\t\t\tString[] onlineList = new String[online.length];\n\t\t\t\t\t\tfor (int i = 0; i < online.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tonlineList[i] = (String) online[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tClient._userList.setListData(onlineList);\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.LOBBY)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing lobby\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tClient._chatLog.append(\"[\" + rec.getOrigin() +\"]: \" + rec.getMessage() + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.WHISPER)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing whisper\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tClient._chatLog.append(\"[\" + rec.getOrigin() +\"(whisp)]: \" + rec.getMessage() + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.SHARED)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing shared\");\n\t\t\t\t\t\tArrayList<String> files = new ArrayList<String>();\n\t\t\t\t\t\tScanner file = new Scanner(new File(\"shared.txt\"));\n\t\t\t\t\t\t\n\t\t\t\t while(file.hasNextLine()) \n\t\t\t\t {\n\t\t\t\t String line = file.nextLine();\n\t\t\t\t files.add(line);\n\t\t\t\t }\n\t\t\t\t _sendBuf = toByteArray(files.toArray());\n\t\t\t\t _socket.getOutputStream().write(Message.TEXT);\n\t\t\t\t _socket.getOutputStream().write(_sendBuf);\n\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t\t\tSystem.out.println(\"sent data\");\n\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.RESULTS)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing results\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t \t\t\tObject[] lines = (Object[]) toObject(_recBuf);\n\t \t\t\t\n\t \t\t\tString[] mal = new String[lines.length];\n\t \t\t\t\n\t \t\t\tfor (int i = 0; i < lines.length; i++)\n\t \t\t\t{\n\t \t\t\t\tmal[i] = (String) lines[i];\n\t \t\t\t}\n\t \t\t\tbuildResultGUI(mal);\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.TEST)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing test\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tString[] data = rec.getMessage().split(\"\\\\&\\\\&\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t_person = data[0];\n\t\t\t\t\t\t_fileName = data[1];\n\t\t\t\t\t\t_filePath = data[2];\n\t\t\t\t\t\t_comPort = Integer.parseInt(data[3]);\n\t\t\t\t\t\tSystem.out.println(\"*******SENDER PORT: \" + _comPort);\n\t\t\t\t\t\t_fileKey = data[4];\n\n\t\t\t\t\t\tString prompt = \"Upload \" + _fileName + \" to \" + _person + \"?\";\n\t\t\t\t\t\tint reply = JOptionPane.showConfirmDialog(null, prompt, \"Upload confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t \n\t\t\t\t\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t\t\t {\t\t\t\t \n\t\t\t\t\t\t\tFile file = new File(_filePath);\n\t\t\t\t\t\t\tlong fileSize = file.length();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<String> metaData = new ArrayList<String>();\n\t\t\t\t\t\t\tmetaData.add(\"\" + _comPort);\n\t\t\t\t\t\t\tmetaData.add(\"\" + fileSize);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t_sendBuf = toByteArray(metaData.toArray());\n\t\t\t\t\t\t\t\n\t\t\t\t \tSystem.out.println(\"accepted\");\n\t\t\t\t \t_socket.getOutputStream().write(Message.ACCEPT);\n\t\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t\t\t\t\n\t\t\t\t \t_socket.getOutputStream().write(_sendBuf);\n\t\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tClient._sending = new SenderThread(_fileName, _filePath, _comPort, _fileKey);\n\t\t\t\t\t\t\tClient._sending.start();\n\t\t\t\t }\n\t\t\t\t else \n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"declined\");\n\t\t\t\t \t_socket.getOutputStream().write(Message.DECLINE);\n\t\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.ACCEPT)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing accept\");\n\t\t\t\t\t\tlong fileSize = 0;\n\t\t\t\t\t\tint port = -1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t_fileKey = Client._key;\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t \t\t\tObject[] data = (Object[]) toObject(_recBuf);\n\t \t\t\t\n\t \t\t\tport = Integer.parseInt((String) data[0]);\n\t \t\t\tfileSize = Long.parseLong((String) data[1]);\n\t \t\t\t\n\t \t\t\tSystem.out.println(\"*******RECV PORT: \" + port);\n\t \t\t\t\n\t \t\t\tClient._receiving = new ReceiverThread(_fileName, _hostname, port, _fileKey, fileSize);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tThread.sleep(300);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tClient._receiving.start();\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.DECLINE)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing decline\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File transfer denied.\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.DC)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing dc\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tClient._chatLog.append(rec.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.SERVERDOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing serverdown\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Server has gone down...\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.ERROR)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing error\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"It's bad to talk to yourself...\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.REMOVED)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing doing removed\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (SocketException e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Server is not responding\");\n\t\t\tSystem.exit(0);\n\t\t} \n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t\tcatch (ClassNotFoundException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\r\n\tpublic void run() {\n\t\tthis.setName(\"后台线程\");\r\n\t\tshutdownFlag = false;\r\n\t\tconnection = new Connection(this);\r\n\t\tconnection.connect(ip, port, user, pwd);\r\n\t\twhile (!shutdownFlag) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(30000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tif (connection.getConnState() == Connection.CONNSTATE_NOT_CONNECTED) {\r\n\t\t\t\tconnection.connect(ip, port, user, pwd);\r\n\t\t\t} else if (connection.getConnState() == Connection.CONNSTATE_NOT_LOGIN) {\r\n\t\t\t\tconnection.login(user, pwd);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tconnection.stop();\r\n\t\tshutdownFlag = true;\r\n\r\n\t}", "public void startThread() {\n\t\tif (this.serverConnectorUsed <= Byte.MAX_VALUE) {\n\t\t\tthis.serverConnectorUsed++;\n\t\t\tLOG.info(\"Running new thread. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}", "public int launch() {\n for( BluetoothConnectionThread bct: bluetoothConnectionThreads)\n if (!bct.isAlive()) {\n bct.start();\n }\n return Constants.SUCCESS;\n }", "public void prepareTheBill(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(3, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "public static void connect() {\n \t\tconnPool.start();\n \t}", "public void start() {\n\n // ask information\n String address = JOptionPane.showInputDialog(null, \"Connect to server:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n String ac = JOptionPane.showInputDialog(null, \"Username:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n String pw = JOptionPane.showInputDialog(null, \"Password:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n\n try {\n\n // connect to server\n Socket s = new Socket(address, 9000);\n\n ObjectOutputStream w = new ObjectOutputStream(s.getOutputStream());\n ObjectInputStream r = new ObjectInputStream(s.getInputStream());\n\n Hash h = new Hash(); // hash password\n w.writeObject(new Message(ac, \"Teacher\", \"LOGIN\", 0, h.getHashCode(pw), null)); // check login status\n w.flush();\n Message m = (Message) r.readObject();\n if (m.command.equals(\"LOGIN_FAILED\")) { // display message and exit if fail\n\n JOptionPane.showMessageDialog(null, \"Login fail\", \"Message\", JOptionPane.INFORMATION_MESSAGE);\n System.exit(1);\n\n }\n\n server = address;\n peerList = (PeerList) m.peerList;\n port = (int) m.data;\n\n new Thread(new GUI()).start();\n while (initialized == false){ // wait until setup all GUI components\n\n Thread.sleep(500);\n\n }\n\n new Thread(new upload()).start();\n new Thread(new updateList()).start();\n new Thread(new download(address, 9001)).start(); // try to connect server by port 9001, 9002, 9003...\n\n } catch (Exception e) {\n\n System.exit(1);\n\n }\n\n }", "@Override\n\tpublic void run()\n\t{\n\t\tSocket clientSocket;\n\t\tMemoryIO serverIO;\n\t\t// Detect whether the listener is shutdown. If not, it must be running all the time to wait for potential connections from clients. 11/27/2014, Bing Li\n\t\twhile (!super.isShutdown())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Wait and accept a connecting from a possible client residing on the coordinator. 11/27/2014, Bing Li\n\t\t\t\tclientSocket = super.accept();\n\t\t\t\t// Check whether the connected server IOs exceed the upper limit. 11/27/2014, Bing Li\n\t\t\t\tif (MemoryIORegistry.REGISTRY().getIOCount() >= ServerConfig.MAX_SERVER_IO_COUNT)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// If the upper limit is reached, the listener has to wait until an existing server IO is disposed. 11/27/2014, Bing Li\n\t\t\t\t\t\tsuper.holdOn();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the upper limit of IOs is not reached, a server IO is initialized. A common Collaborator and the socket are the initial parameters. The shared common collaborator guarantees all of the server IOs from a certain client could notify with each other with the same lock. Then, the upper limit of server IOs is under the control. 11/27/2014, Bing Li\n//\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator(), ServerConfig.COORDINATOR_PORT_FOR_MEMORY);\n\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator());\n\t\t\t\t// Add the new created server IO into the registry for further management. 11/27/2014, Bing Li\n\t\t\t\tMemoryIORegistry.REGISTRY().addIO(serverIO);\n\t\t\t\t// Execute the new created server IO concurrently to respond the client requests in an asynchronous manner. 11/27/2014, Bing Li\n\t\t\t\tsuper.execute(serverIO);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\r\n PooledConnection pConn;\r\n do {\r\n while (needAddConnSize.get() > 0) {\r\n needAddConnSize.decrementAndGet();\r\n if (!waitQueue.isEmpty()) {\r\n try {\r\n if ((pConn = createPooledConn(CONNECTION_USING)) != null)\r\n recycle(pConn);\r\n } catch (Throwable e) {\r\n if (e instanceof SQLException) {\r\n transferException((SQLException) e);\r\n } else {\r\n transferException(new SQLException(e));\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (needAddConnSize.get() == 0 && createConnThreadState.compareAndSet(THREAD_WORKING, THREAD_WAITING))\r\n park(this);\r\n if (createConnThreadState.get() == THREAD_DEAD) break;\r\n } while (true);\r\n }", "private void createAndStartConnectionThread() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n boolean success = webSocketConnection.createAndConnectTCPSocket();\n if (success) {\n webSocketConnection.startConnection();\n }\n } catch (Exception e) {\n synchronized (globalLock) {\n if (isRunning) {\n webSocketConnection.closeInternal();\n\n onException(e);\n\n if (e instanceof IOException && automaticReconnection) {\n createAndStartReconnectionThread();\n }\n }\n }\n }\n }\n }).start();\n }", "public void start() throws NotAvailableConnectionsException{\r\n \r\n ServerSocket server = null; \r\n Socket client = null; \r\n\t\t\r\n //Asks the IDAOFactory for a DAO object\r\n IDAO dao = IDAOFactory.getDAO();\r\n\t\ttry{ \r\n getData();\r\n server = new ServerSocket(port);\r\n //the server keeps waiting for connections \r\n while(true){\r\n \r\n LOGGER.info(\"Awaiting for client connection on port: \" + port);\r\n client = server.accept();\r\n LOGGER.info(\"Client connected to the application.\");\r\n \r\n //when a client connects, a thread is created and it \r\n //takes charge of the execution\r\n if(connections<maxThreads){\r\n Thread thread = new Thread(\r\n new LogicThread(client, (DAO) dao));\r\n threadsnum++;\r\n thread.start();\r\n threadsnum--;\r\n }else\r\n throw new NotAvailableConnectionsException();\r\n }\r\n \r\n \r\n \r\n \r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t} finally{\r\n try{\r\n \r\n if(client!=null){\r\n client.close();\r\n }\r\n if(server!=null){\r\n server.close();\r\n }\r\n } catch(IOException ex){\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "private void openConnection(){}", "private RRCPConnectionListener() {\n mainThread = new Thread(this);\n }", "NetThread(){}", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }", "public void start() {\n synchronized (initLock) {\n\n try {\n connectionPool = new ConnectionPool(driver, serverURL, username,\n password, minConnections, maxConnections, connectionTimeout,\n mysqlUseUnicode);\n }\n catch (IOException e) {\n Log.error(e);\n }\n }\n }", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public void connectLobbyServer()\n {\n try {\n LobbyServerConnection.getInstance().connect();\n\n lobbymanager = LobbyServerConnection.getInstance().getLobbyManager();\n\n //verkrijgt alle lobbys\n List<Lobby> lobbyList = LobbyServerConnection.getInstance().getAllLobbys();\n LobbyManager.getInstance().addLobbys(lobbyList);\n update();\n subscribeTry();\n }\n catch (Exception e)\n {\n\n btnCreateLobby.setDisable(true);\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Lobby server\");\n\n // Header Text: null\n alert.setHeaderText(\"connection error\");\n alert.setContentText(\"Couldn't connect to the lobbyserver. \\nGames cannot be played right now but you can still check your history\");\n\n alert.showAndWait();\n }\n }", "public void onStart() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tinitConnection();\n\t\t\t\treceive();\n\t\t\t}\n\t\t}.start();\n\t}", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "@SuppressWarnings(\"static-access\")\r\n\t\t@Override\r\n\t\tpublic void run() {\r\n\t\t\tsetName(C_THREAD);\r\n\t\t\tif(controller == MultiController.TCP) {\r\n\t\t\t\tnetworkHandling = new NetworkHandling(tcpHandler);\r\n\t\t\t\tnetworkHandling.establishConnection();\r\n\t\t\t\t\r\n\t\t\t\ttry { \r\n\t\t\t\t\t//Wait until the lock is released - wait for connection\r\n\t\t\t\t\tnetworkHandling.lock.acquire(); \r\n\t\t\t\t} catch (InterruptedException e) { }\r\n\t\t\r\n\t\t\t\tfinished(networkHandling.isConnected());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(controller == MultiController.BLUETOOTH) {\r\n\t\t\t\tbluetoothHandling = new BluetoothHandling(getApplicationContext(),bluetoothHandler);\r\n\t\t\t\tbluetoothHandling.start();\r\n\t\t\t\t\r\n\t\t\t\tIntent intent = new Intent(getApplicationContext(),DeviceListActivity.class);\r\n\t\t\t\tstartActivityForResult(intent, BluetoothHandler.REQUEST_ADDRESS);\r\n\t\t\t\t\r\n\t\t\t\tfinReq = true;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t//Wait until the lock is released - wait for connection\r\n\t\t\t\t\tbluetoothHandling.lock.acquire();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tfinished(bluetoothHandling.getState() == BluetoothHandling.STATE_CONNECTED);\r\n\t\t\t}\r\n\t\t}", "private void wczytajPlanszeZdalnie()\n\t{\n\t\tPobraniePlanszy pobranie = new PobraniePlanszy(pojazd.ktoryPoziom(), this, port, host);\n\t\tThread zadanie = new Thread(pobranie);\n\t\tzadanie.start();\t\n\t}", "public void run(){\n\t\t/*\n\t\ttry {\t\n\t\t\tclient_ip=parentIp;\n\t\t\tpingskt = new Socket(parentIp,TCP_Port);\n\t\t\tin = new BufferedReader(new InputStreamReader(pingskt.getInputStream()));\n\t\t\tout = new PrintWriter(pingskt.getOutputStream(),true);\n\t\t}catch(Exception e){ \n\t\t\tSystem.out.println(\"Error in Catch TCPSender.java line no 96 \");\t\n\t\t}\n\t\t(bufferReaderThread=new Thread(){\n \tpublic void run(){\n\t\t\t\tsynchronized(in){\n \twhile(!tcpsend_Flag){\n try{\n\t\t\t\t String str=\"\";\n if((str=in.readLine())!=null) {\n\t\t\t\t\t\t\t\tif((str!=null) && (!str.equals(\"\"))) {\n\t\t\t\t\t\t\t\t\tif(str.startsWith(\"BackupTreeCource_id\")){\n\t\t\t\t\t\t\t\t\t\tstr=str.replaceAll(\"BackupTreeCource_id\",\"\");\t\t\n\t\t\t\t\t\t\t\t\t\tString str1[]=str.split(\"@\");\n\t\t\t\t\t\t\t\t\t\tlog.setString(\"str1[1] TCPClient \"+str1[1]);\n\t\t\t\t\t\t\t\t\t\tTCPUtil.getController().getString(str1[0],str1[1]);\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}else if(str.startsWith(\"SetUserList=\")){\n\t\t\t\t\t\t\t\t\t\tString courseid=str.replaceAll(\"SetUserList=\",\"\");\n\t\t\t\t\t\t\t\t\t}else if(str.startsWith(\"UserList=\")){\n\t\t\t\t\t\t\t\t\t\tString courseid_data=str.replaceAll(\"UserList=\",\"\");\n\t\t\t\t\t\t\t\t\t\tString data[]=courseid_data.split(\"#\");\n\t\t\t\t\t\t\t\t\t\tUserListUtil.getContriller().addDataForVector(data[0],data[1]);\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tint temp=str.indexOf(\",\",0);\n\t\t\t\t\t\t\t\t\tString courseid=str.substring(0,temp);\n\t\t\t\t\t\t\t\t\ttemp=temp+1;\n \t\t\tstr=str.substring(temp,str.length());\n\t\t\t\t\t\t\t\t\tMyHashTable temp_ht=RuntimeDataObject.getController().getMyHashTable();\n\t\t\t\t\t\t\t\t\tif(temp_ht.getStatus(courseid)) {\n BufferMgt te=temp_ht.getValues(courseid);\n //te.putByte(str,client_ip,\"ch_wb\");\n } else if(!temp_ht.getStatus(courseid)) {\n BufferMgt bm= new BufferMgt();\n temp_ht.setValues(courseid,bm);\n //bm.putByte(str,client_ip,\"ch_wb\");\n }\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbufferReaderThread.yield();\n \tbufferReaderThread.sleep(100);\n }catch(Exception e){\n\t\t\t\t\t\t\tcleancourseID();\n\t\t\t\t\t\t\tfor (int l=0;l<course_id.size();l++) {\n\t\t\t\t\t\t\t\tString courseid=course_id.get(l).toString();\n\t\t\t\t\t\t\t\tTCPClient.getController().setcourseID(courseid);\n\t\t\t\t\t\t\t\tMyHashTable tempht=RuntimeDataObject.getController().getUserListMyHashTable();\n\t\t\t\t\t\t\t\tVectorClass vectorclass=tempht.getCourseIdUserListVector(courseid);\n\t\t\t\t\t\t\t\tVector v=vectorclass.getBackupTreeValue();\n \t\t\tlog.setString(\"Backup Tree value-------------\"+v.toString())\n; \t\t\tif((v.get(0).toString()).equals(\"#GParent\")){\n \t\t\tString str=v.get(0).toString();\n str=str.replaceAll(\"#GParent\",\"\");\n\t\t\t\t\t\t\t\t\tsetparentIp(str);\n }\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.gc();\t\t\t\n TCPClient.getController().start();\n\t\t\t\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\tlog.setString(\" inputStream \"+e.getMessage());\n\t\t\t\t\t\t\tlog.setString(\" TCPClient in inputStream \"+e.getMessage());\n\t\t\t\t\t\t\ttcpsend_Flag=true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tprintWriterThread.interrupt();\n \t printWriterThread.stop();\n\t\t\t\t\t\t\tbufferReaderThread.interrupt();\n bufferReaderThread.stop();\n\t \t \ttry { \n\t\t\t\t\t\t\t\tpingskt.close();\n\t\t\t\t\t\t\t\tpingskt=null;\n\t \t\t\t\t\t}catch(Exception ex ){\n\t\t\t\t\t\t\t\tlog.setString(\"Error in to catch in TCPClient!! \"+ex.getMessage());\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\tSystem.gc(); \t \n\t\t\t\t\t\t\tprintWriterThread=null;\n\t\t\t\t\t\t\tbufferReaderThread=null;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t}).start();\n\t\t\n\t\t(printWriterThread =new Thread(){\n \tpublic void run(){\n\t\t\t\tsynchronized(out){\n\t \twhile(!tcpsend_Flag){\n \t \ttry{\n\t\t\t\t\t\t\tif(ipnumber != course_id.size()){\n\t\t\t\t\t\t\t\tipnumber=course_id.size();\n\t\t\t\t\t\t\t\tout.println(\"Cource_id\"+course_id.get(ipnumber-1));\t\n\t\t\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tMyHashTable temp_ht=RuntimeDataObject.getController().getMyHashTable();\n\t\t\t\t\t\t\t\tfor(int i=0;i<course_id.size();i++) {\n\t\t\t\t\t\t\t\t\tTCPUtil.getController().getString(course_id.get(i).toString(),\"#Parent\"+client_ip);\n\t\t\t\t\t\t\t\t\tif(temp_ht.getStatus(course_id.get(i).toString())) {\n \t\tBufferMgt buffer_mgt=temp_ht.getValues(course_id.get(i).toString());\n \t \t\t\t\t\tString str=(buffer_mgt.sendData(client_ip,\"ch_wb\")).toString();\n \t \t\tif(str !=null ){\n\t\t\t\t\t\t\t\t\t\t\tstr=course_id.get(i)+\",\"+str;\n\t\t\t\t \t\tout.println(str);\n \t \t\t\tout.flush();\n \t \t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcountint++;\n \t\tout.flush();\t\n\t\t\t\t\t\t\tSystem.gc();\n\t\t\t\t\t\t\tprintWriterThread.yield();\n \t printWriterThread.sleep(100);\n\t\t\t\t\t\t}catch(Exception ex){\n\t\t\t\t\t\t\tSystem.gc();\t\n\t\t\t\t\t\t\tlog.setString(\"Error in TCPClient class in outputStream \");\n\t\t\t\t\t\t}\n \t\t}\n\t\t\t\t}\n \t}\n\t\t}).start();*/\n\t}", "public void run() {\n startConnectionToMSSQL();\n }", "private DataConnection() {\n \tperformConnection();\n }", "public static void initCommunicationServerThread(ProjectType project){\r\n try{\r\n serverSocket = new ServerSocket(Attributes.PROFILING_PORT, 2, InetAddress.getLocalHost());\r\n System.out.println(\"Server - ServerSocket created on port: \" + serverSocket.getLocalPort());\r\n }catch (UnknownHostException uhe){\r\n uhe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }\r\n new CommunicationServerThread(project);\r\n }", "@Override\n public void run() {\n pool = new JDBCConnectionPool(\n \"org.apache.hive.jdbc.HiveDriver\", \"jdbc:hive2://10.2.216.33:10000\",\n \"\", \"\");\n\n // Get a connection:\n Connection con = pool.checkOut();\n ResultSet set = null;\n try {\n set = con.createStatement().executeQuery(\"show tables\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println(Thread.currentThread().getName());\n\n // Use the connection\n\n // Return the connection:\n pool.checkIn(con);\n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "public void connexionServeur() {\r\n\r\n\t\tString serverIp = JOptionPane\r\n\t\t\t\t.showInputDialog(\"Entrez le nom du serveur.\");\r\n\t\ttry {\r\n\t\t\tsocket = new Socket(serverIp, 4456);\r\n\t\t\tlogger.info(\"Connexion au socket serveur.\");\r\n\r\n\t\t\tThread t = new Thread(new EnvoiPresence(socket));\r\n\t\t\tt.start();\r\n\r\n\t\t\tThread t2 = new Thread(new ReceptionListUser(socket, mainView));\r\n\t\t\tt2.start();\r\n\r\n\t\t} catch (ConnectException e) {\r\n\t\t\tJOptionPane.showMessageDialog(new Frame(),\r\n\t\t\t\t\t\"Le serveur Draw Me An Idea n'est pas lancé\", \"Erreur\", 1);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (UnknownHostException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n \n try {\n boolean useGUI = false;\n int i = -1;\n\n // Parse options. Add additional options here if you have to. Do not\n // forget to mention their usage in the help-string!\n while(args[++i].startsWith(\"-\")) {\n if(args[i].toLowerCase().equals(\"-help\")) {\n System.out.println(USAGE + String.format(\"%n%nwhere options include:\", args));\n System.out.println(\" -help Show this text.\");\n System.out.println(\" -gui Show a graphical user interface.\");\n System.exit(0);\n }\n else if(args[i].toLowerCase().equals(\"-gui\")) {\n useGUI = true;\n }\n }\n \n String mode = args[i++];\n String connectionType = args[i++];\n\n if(mode.toLowerCase().equals(\"server\"))\n {\n int port = Integer.parseInt(args[i++]);\n \n // Start server\n if(connectionType.toLowerCase().equals(\"tcp\"))\n {\n try\n {\n Player player = new Player();\n Server server = new ConnectionServerTCP(port, player);\n \n Thread cs = new Thread(server);\n cs.start();\n Log.log(\"Main: Starting Thread ConnectionServer (\"+cs.getName()+\")\");\n \n cs.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"udp\"))\n {\n try\n {\n Player player = new Player();\n Server server = new ConnectionServerTCP(port, player);\n \n Thread cs = new Thread(server);\n cs.start();\n Log.log(\"Main: Starting Thread ConnectionServer (\"+cs.getName()+\")\");\n \n cs.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"mc\"))\n {\n try\n {\n Player player = new Player();\n Server server = new ConnectionServerMC(port, player);\n \n Thread cs = new Thread(server);\n cs.start();\n Log.log(\"Main: Starting Thread ConnectionServer (\"+cs.getName()+\")\");\n \n cs.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n }\n else if(mode.toLowerCase().equals(\"client\"))\n {\n String host = args[i++];\n int port = Integer.parseInt(args[i++]);\n String username = args[i++];\n \n // Start client\n if(connectionType.toLowerCase().equals(\"tcp\"))\n {\n try\n {\n ClientGUI gui = new ClientGUI();\n RadioClientTCP client = new RadioClientTCP(gui);\n gui.setContext(client);\n \n Thread rc = new Thread(client);\n new Thread(gui).start();\n rc.start();\n Log.log(\"Main: Starting Thread RadioClient (\"+rc.getName()+\")\");\n \n //client.connect(new InetSocketAddress(host, port));\n \n rc.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"udp\"))\n {\n try\n {\n ClientGUI gui = new ClientGUI();\n RadioClientUDP client = new RadioClientUDP(gui);\n gui.setContext(client);\n \n Thread rc = new Thread(client);\n new Thread(gui).start();\n rc.start();\n Log.log(\"Main: Starting Thread RadioClient (\"+rc.getName()+\")\");\n \n //client.connect(new InetSocketAddress(host, port));\n \n rc.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"mc\"))\n {\n try\n {\n ClientGUI gui = new ClientGUI();\n RadioClientMC client = new RadioClientMC(gui);\n gui.setContext(client);\n \n Thread rc = new Thread(client);\n new Thread(gui).start();\n rc.start();\n Log.log(\"Main: Starting Thread RadioClient (\"+rc.getName()+\")\");\n \n //client.connect(new InetSocketAddress(host, port));\n \n rc.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n else\n throw new IllegalArgumentException(\"Illegal connection method\");\n }\n else\n throw new IllegalArgumentException(\"Illegal program mode\");\n }\n catch(ArrayIndexOutOfBoundsException e) {\n System.err.println(USAGE);\n }\n catch(NumberFormatException e) {\n System.err.println(USAGE);\n }\n catch(IllegalArgumentException e) {\n System.err.println(USAGE);\n }\n }", "protected void mainTask() {\n\ttry {\n\t socket = serverSocket.accept();\t\n\t spawnConnectionThread(socket);\n\t} catch (IOException e) {\n\t return;\n\t}\n }", "public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}", "@Override\r\n\tpublic void run() {\n\r\n\t\ttry {\r\n\t\t\twhile(read.ready()){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt = conn.createStatement();//set statement from DB connection\r\n\t\t\t\t\tcommand = read.readLine();\r\n\t\t\t\t} catch (IOException | SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}//read in the command\r\n\r\n\t\t\t\t//start command parse\r\n\t\t\t\tcommandList = Arrays.asList(command.split(\"\\\\s*,\\\\s*\"));//load text command into a list\t\t\r\n\t\t\t\tfor(String s: commandList){\r\n\t\t\t\t\tSystem.out.print(s + \" \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//switch to read command\r\n\t\t\t\tswitch(commandList.get(0)){\r\n\t\t\t\tcase \"kill\"://this is a method for shutting down the server\r\n\t\t\t\t\tQueeryServer.serverStatus = false;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"addUser\"://for adding a new user\r\n\t\t\t\t\taddUser();//calls method for adding a new user\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"login\"://client attempts to log in a user\r\n\t\t\t\t\tlogin();\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"setPSlider\"://called on registration\r\n\t\t\t\t\tsetPersonalSlider();//INSERT\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"updatePSlider\":\r\n\t\t\t\t\tupdatePersonalSlider();//UPDATE\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"setLocation\":\r\n\t\t\t\t\tsetLocation();//called on registration only, sets location \r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"setSSlider\":\r\n\t\t\t\t\tsetSeekingSlider();\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"updateSSlider\":\r\n\t\t\t\t\tupdateSeekingSlider();\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"updateLocation\":\r\n\t\t\t\t\tupdateLocation();//updates a user's location\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"getMatches\":\r\n\t\t\t\t\tgetMatches();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"testUserName\":\r\n\t\t\t\t\ttestUserName();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"echo\":\r\n\t\t\t\t\tout.println(\"echo command received\");\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tSystem.exit(2);//crash and burn\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\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\tout.println(e.getMessage());\r\n\t\t} //end try\r\n\t\ttry {\r\n\t\t\tread.close();//close buffers\r\n\t\t\tout.close();//close buffers\r\n\t\t\tif(!csocket.isClosed())\r\n\t\t\t\tcsocket.close();\r\n\t\t\tif(!stmt.isClosed())\r\n\t\t\t\tstmt.close();\r\n\t\t\tif(!conn.isClosed())\r\n\t\t\t\tconn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} 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 Maestro()\r\n\t{\r\n\t\tint i;\r\n\t\tint hora = 0;\r\n\t\tint minutos = 0;\r\n\t\tint segundos = 0;\r\n\t\tint milisegundos = 0;\r\n\t\tthis.reloj = new Reloj(\"Reloj Servidor\",hora,minutos,segundos,milisegundos);\r\n\t\tthis.reloj.start();\r\n\r\n\t\tthis.s_BD = new Sincronizador_BD(this.Conect);\r\n\t\tthis.s_BD.start();\r\n\t}", "@Override\n\tpublic void establishNeighborConn() throws Exception {\n\t\tList <Thread> tList = new ArrayList<Thread>();\n\t\tList<Integer> neighborPids = neighborMap.get(pid);\n\t\tnNeighbors = neighborPids.size();\n\t\tfor (int neighborPid : neighborPids) {\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString neighborHostname = pidToHostnameMap.get(neighborPid);\n\t\t\t\t\t\tConnection neighborConn = new ServerConnection();\n\t\t\t\t\t\tint port = 10000 + (100*pid) + neighborPid;\n\t\t\t\t\t\tneighborConn.connectRetry(coordinatorHostname, port);\n\t\t\t\t\t\tneighborPidToHostnameMap.put(neighborPid, neighborHostname);\n\t\t\t\t\t\tneighborPidToConnMap.put(neighborPid, neighborConn);\n\t\t\t\t\t\tsendQueues.put(neighborPid, new LinkedList<String>());\n\t\t\t\t\t\tsayHelloToNeighbor(neighborConn);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(neighborPidToHostnameMap);\n\t\tSystem.out.println(neighborPidToConnMap);\n\t}", "PooledThread()\n {\n setDaemon(true);\n\n start();\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "public void startCheckConnection(OperatorContext context) {\r\n\t\tcheckConnectionThread = context.getThreadFactory().newThread(new Runnable() {\r\n\t\t\t\r\n\t\t@Override\r\n\t\tpublic void run() {\r\n\t\t\tint i = 0;\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t// check the JDBC connection every 5 seconds \r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t Thread.sleep(5000);\r\n System.out.println(\"checkConnection \" + i++);\r\n\t\t\t\t} \r\n\t\t\t\tcatch(InterruptedException ex) \r\n\t\t\t\t{\r\n\t\t\t\t Thread.currentThread().interrupt();\r\n\t\t\t\t}\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\tif (!jdbcClientHelper.isValidConnection()) {\t\r\n System.out.println(\"JDBC connection is invalid \");\t\t\t\t\t\r\n\t\t\t\t\ttry \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// f connection files it tries to reset JDBC connection\r\n\t\t\t\t\t\t// it is depending to the reconnection policy parameters\r\n\t\t\t\t\t\tresetJDBCConnection();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e2) {\r\n\t\t\t\t\t\tif (!jdbcClientHelper.isValidConnection() && hasErrorPort){\r\n\t\t try \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// if connection files it sends a sqlcode = -1 to the error output port\r\n\t\t JDBCSqlStatus jSqlStatus = new JDBCSqlStatus();\r\n\t\t jSqlStatus.sqlCode = -1;\r\n\t\t jSqlStatus.sqlMessage = \"Invalid Connection\";\r\n\t\t\t\t\t\t\t\t// submit error message\r\n\t\t\t\t\t\t\t\tsubmitErrorTuple(errorOutputPort, null, jSqlStatus);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch (Exception e1) {\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t \r\n\t\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\t}\r\n\t\t\t\t} catch (SQLException e3) {\r\n\t\t\t\t}\t\r\n\t\t\t} // end while\r\n\t\t} // end of run()\r\n\t\t\r\n\t\t}); \r\n\t\t\r\n\t\t// start checkConnectionThread\r\n\t\tcheckConnectionThread.start();\r\n\t}", "@Override\n public void run() {\n new ConnectBT().execute();\n }", "@SuppressWarnings(\"resource\")\r\n public void run() {\r\n try {\r\n ServerSocket server = new ServerSocket(ConfigurationFile.getClientPort()[clientNumber-1]);\r\n while(true) {\r\n Socket socket =server.accept();\r\n Thread thread = new Thread(new Connection(socket,hashtable));\r\n thread.start();\r\n }\r\n }\r\n catch(IOException e) {\r\n System.out.println(\"Server socket could not be created. Check configuration file.\");\r\n }\r\n }", "public void run() {\n\t\tInputStream istream = null;\n\t\ttry {\n\t\t\tistream = (this.socket).getInputStream();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t DataInputStream dstream = new DataInputStream(istream);\n\t \n\t username = null;\n\t try {\n\t \tusername = dstream.readLine();\n\t \tSystem.out.println(username + \" on server side! (username)\");\n\t \tthis.masterServer.addUserName(username);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t // pause thread to read in from client.\n\t\tString friendUsername = null;\n\t try {\n\t \tfriendUsername = dstream.readLine();\n\t \tSystem.out.println(friendUsername + \" on server side!!!!! (friendUsername)\");\n\t \tfindFriendsThread(friendUsername);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t try {\n\t\t\tdstream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t try {\n\t\t\tistream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t //this.masterServer.addUserName(username);\n\t \n\t}", "protected void spawnConnectionThread(Socket socket) {\n\ttry {\n\t CAMPServerConnectionThread sct = new CAMPServerConnectionThread(socket);\n\t sct.start();\n\t} catch (IOException iox) {\n\t System.err.println(\"Error creating sct: \"+iox);\n\t}\n }", "private void execute() {\n\n\t\tPropertiesParser propertiesParser = new PropertiesParser();\n\t\t\n\t\tsetupServer(propertiesParser);\n\t\ttry {\n\t\t\t\n\t\t\tThread.sleep(SERVER_AFTER_RUN_DELAY);\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint i=0;\n\t\tfor( ; i < propertiesParser.getReadersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,true);\n\t\t\t\n\t\t}\n\t\tfor(; i < propertiesParser.getReadersNum()+ propertiesParser.getWritersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,false);\n\t\t\t\n\t\t}\n\t\t\n\t}", "void createConnection();", "public void runServer(){\n\t\tServer.pool = Executors.newFixedThreadPool(Server.user_limit );\n\t\t\n\t\ttry {\n\t server = new ServerSocket(Server.port, Server.user_limit); \n\t logger.logdate(\"Servidor habilitado: Esperando conexiones...\");\n\t \n\t while (Server.active) {\n\t \ttry {\n\t \tSocket serversocket = server.accept();\n\t \tServerThread connection = new ServerThread(serversocket);\n\t \tpool.execute(connection);\n\t \tServer.clients.addLast(connection);\n\t \tString hostname = connection.getConnection().getInetAddress().getHostName();\n\t \tlogger.logdate(hostname+\" entro al servidor\");\n\t \t} catch ( EOFException eofException ) {\n\t \t\tlogger.logdate( \"Error al aceptar la conexión\" );\n\t } catch(SocketException e){\n\t \n\t } \n\t \n\t }\n\t \n\t } catch ( IOException ioException ) {\n\t \tioException.printStackTrace();\n\t } \n\t \n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\tThread thisThread = currentThread();\n\t\t\ttry {\n\t\t\t\tLog.i(\"con\", \"worked3\");\n\t\t\t\tconnectToServer();\n\t\t\t\tif (connected) {\n\t\t\t\t\tsetUpStreams();\n\t\t\t\t\tsendProfile();\n\t\t\t\t\tLog.i(\"con\", \"worked8\");\n\t\t\t\t\twhile (blinker == thisThread) {\n\t\t\t\t\t\tstartListening();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found IO Exception!: \" + e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found class not found exception!: \" + e);\n\t\t\t}\n\n\t\t}", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "public void start() {\n // set player number\n playerNumber = clientTUI.getInt(\"set player number (2-4):\");\n while (true) {\n try {\n game = new Game();\n game.setPlayerNumber(playerNumber - 1);\n host = this.clientTUI.getString(\"server IP address:\");\n port = this.clientTUI.getInt(\"server port number:\");\n clientName = this.clientTUI.getString(\"your name:\");\n player = clientTUI.getBoolean(\"are you human (or AI): (true/false)\") ?\n new HumanPlayer(clientName) : new ComputerPlayer(clientName);\n game.join(player);\n // initialize the game\n game.init();\n while (clientName.indexOf(' ') >= 0) {\n clientName = this.clientTUI.getString(\"re-input your name without space:\");\n }\n this.createConnection();\n this.sendJoin(clientName);\n this.handleJoin();\n if (handshake) {\n run();\n } else {\n if (!this.clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n } catch (ServerUnavailableException e) {\n clientTUI.showMessage(\"A ServerUnavailableException error occurred: \" + e.getMessage());\n if (!clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n }\n clientTUI.showMessage(\"Exiting...\");\n }", "@Override\n // Methode run die bei Aufruf des Threads gestartet wird\n public void run() {\n //Endlosschleife zum abhören was der Server sedent. Neuen InputStream erzeugen und in Anzeigefenster ausgeben\n while(schleife == 1){\n \n try {\n // Methode online gibt die Nutzernamen der online-verfügabaren Usern zurück vom Server. Die eigene Methode schriebt diese in die UserListe. \n online(remote.online());\n in = new DataInputStream(s.getInputStream());\n\n String lesen = in.readUTF();\n \n\n // Trennt den Einkommenden String am \":\" um Username von der Nachricht zu trennen\n String [] nachrichten = lesen.split(\":\");\n \n //Überprüfen ob ein Header namens VERBINDUNG geschickt wird um entsprechend zu reagieren\n if(nachrichten[0].equals(\"VERBINDUNG\")){\n //Aufruf einer MessageBox, dass Verbindung aufgenommen werden möchte.\n int eingabe = JOptionPane.showConfirmDialog(null,\n \"Wollen sie eine Verbindung mit \" + nachrichten[1] +\" aufbauen?\",\n \"Verbindungsanfrage\",\n JOptionPane.YES_NO_CANCEL_OPTION);\n //Überprüfen der Eingabe in die Messagebox\n //Wenn 'Ja' gedrückt wurde\n if(eingabe == 0){\n //UserListe sperren\n UserListe.setEnabled(false);\n //Verbinden mit User- Button auf trennen stellen\n UserVerbinden.setText(\"Trennen von User\");\n //Offline Anzeigen um weitere Anfragen zu unterbinden\n remote.zeigeOff(UserName.getText());\n //Rückantwort,dass Verbindung aufgebaut werden soll!\n remote.verbindenUser(\"VERBINDEN\", UserName.getText(), nachrichten[1]);\n //Übergabe des Namens des Chat-Partners in die globale Variable \n ZielUser= nachrichten[1];\n \n }else{\n remote.verbindenUser(\"TRENNEN\", UserName.getText() ,nachrichten[1] );\n \n } \n //Wenn die Nachricht den Header 'TRENNEN' enthält, entweder bei beendigung oder bei ablehnen der Verbindung\n }else if(nachrichten[0].equals(\"TRENNEN\")){\n //Nachricht ausgeben, dass getrennt wird bzw. abgelehnt wurde\n Anzeigefeld.append(\"Verbindung von \"+ nachrichten[1]+ \" wurde getrennt/abgelehnt! \\n\");\n //UserListe entsperren\n UserListe.setEnabled(true);\n //Verbinden mit User- Button auf Verbinden stellen\n UserVerbinden.setText(\"Verbinden mit User\");\n //wieder als online Anzeigen \n remote.verbinden(UserName.getText());\n \n //wird aufgerufen wenn VERBINDEN als Header mitgegeben wird\n }else if(nachrichten[0].equals(\"VERBINDEN\")){\n //Ausgabe dass Schlüsselaustausch stattfinden kann\n Anzeigefeld.append(\"Schlüssel wird an \"+nachrichten[1]+ \" gesendet \\n\");\n\n //Den eigenen AES Schlüssel mit öffentlichem Schlüssel des Gegenübers verschlüsseln\n EncryptAES(nachrichten[1]);\n \n //Aufruf der Methode zum Schlüsselaustausch. Überträgt byte[] des Schlüssels\n AESanServer(nachrichten[1]); \n \n //wird aufgerufen wenn der Header KEY mitgegeben wird.\n }else if(nachrichten[0].equals(\"KEY\")){\n \n // Aufruf der Methode Decrypt AES mit der Methode vom Server holeAES\n DecryptAES(remote.schluesselTausch(UserName.getText(), nachrichten[1]));\n \n //Senden-Button freigeben\n Senden.setEnabled(true);\n \n // Anzeigen, das Schlüssel erhalten wurde und Kommunikation starten kann\n Anzeigefeld.append(\"Key von \"+ nachrichten[1] +\" erhalten. Kommunikation kann starten! \\n\");\n \n \n\n \n }\n \n \n // Gibt die Nachricht die verschlüsselt vom Server kommt, entschlüsselt aus!\n Anzeigefeld.append(nachrichten[0] + \": \"+ aes.entschlüsseln(aes.SchlüsselAusDatei(), nachrichten[1])+ \"\\n\");\n\n } catch (IOException ex) {\n Logger.getLogger(ClientGui.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(ClientGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n}", "private synchronized void openConnection() {\n\t\tsendData = new Thread(){\n\t\t\tpublic void run(){\n\t\t\t\tsynchronized(msgs){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmsgs.wait(1000);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(true){\n\t\t\t\t\tsynchronized(msgs){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tif(msgs.size() > 0){\n\t\t\t\t\t\t\t\tout = new PrintWriter(new PrintWriter(s.getOutputStream()));\n\t\t\t\t\t\t\t\tString temp = msgs.get(0);\n\t\t\t\t\t\t\t\tout.println(temp);\n\t\t\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\t\t\tSystem.out.println(temp);\n\t\t\t\t\t\t\t\tmsgs.remove(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}catch(IOException e){\n\t\t\t\t\t\t\te.printStackTrace();\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\treceiveData = new Thread(){\n\t\t\tpublic void run(){\n\t\t\t\tString received;\n\t\t\t\tdo{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tin = new BufferedReader(new InputStreamReader(s.getInputStream()));\n\t\t\t\t\t\treceived = in.readLine();\n\t\t\t\t\t\tparseMessageReceived(received);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}while(true);\n\t\t\t}\n\t\t};\n\t\tsendData.setDaemon(true);\n\t\treceiveData.setDaemon(true);\n\t\tsendData.start();\n\t\treceiveData.start();\n\t\tnew Thread()\n\t\t{\n\t\t\tpublic void run(){\n\t\t\t\twhile(true){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsendData.join();\n\t\t\t\t\t\treceiveData.join();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "public void prepareTheGame(){\n Thread t=new Thread( () -> {\n System.out.println(\"Preparing the game of lobby number \" + lobbyID);\n Collections.shuffle(nicknames);\n\n Controller controller = new Controller(nicknames, view);\n\n view.setController(controller);\n view.setClientConnectionToController();\n\n controller.play();\n }\n );\n\n t.start();\n }", "static void doThread() throws InterruptedException {\r\n\t\tthreadMessage(\"Starting MessageLoop thread\");\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\t// int nthreads=2;\r\n\t\tint nthreads = numnodes;\r\n\t\tThread[] tList;\r\n\r\n\t\ttList = new Thread[nthreads];\r\n\t\tString driver = null;\r\n\t\tString host = null;\r\n\t\tString user = null;\r\n\t\tString pass = null;\r\n\r\n\t\t// for (int i = 0; i < nthreads; i++) {\r\n\t\tfor (int i = 0; (i < nthreads) && (i < nodeAL.size()); i++) {\r\n\t\t\tdriver = (nodeAL.get(i)).getDriver();\r\n\t\t\thost = (nodeAL.get(i)).getHostName();\r\n\t\t\tuser = (nodeAL.get(i)).getUserName();\r\n\t\t\tpass = (nodeAL.get(i)).getPassword();\r\n\t\t\t// tList[i]= new Thread( new MessageLoop() );\r\n\t\t\t// System.out.println(\"HN is: \" + host + i);\r\n\t\t\ttList[i] = new Thread(new MessageLoop(driver, host, user, pass));\r\n\t\t\ttList[i].start();\r\n\t\t}\r\n\r\n\t\tthreadMessage(\"Waiting for all MessageLoop threads to finish\");\r\n\r\n\t\t// for (int i = 0; i < nthreads; i++) {\r\n\t\tfor (int i = 0; (i < nthreads) && (i < nodeAL.size()); i++) {\r\n\t\t\ttList[i].join();\r\n\t\t}\r\n\r\n\t\tthreadMessage(\"Finally all done!\");\r\n\r\n\t}", "@Override\r\n\tpublic void run() {\n\t boolean listen = true;\r\n\t while (listen) {\r\n\t\ttry {\r\n\t\t Socket socket = listeningSocket.accept();\r\n\t\t Thread ConnThread = new Thread (new Connection (socket, pid));\r\n\t\t ConnThread.start();\r\n\t\t connThreads.add(ConnThread);\r\n\t\t \r\n\t\t} catch (SocketException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t listen = false;\r\n\t\t} catch (Exception e) {\r\n\t\t System.err.println(\"Random exception\");\r\n\t\t}\r\n\t }\r\n\t}", "public void conectServer() {\n\n\t}", "public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void connectionEstablished() {}", "public void run() {\n\t\tboolean forever = true;\n\t\tStatement stmt=null;\n\t\tString currCatalog=null;\n\t\tlong maxCheckoutMillis = maxCheckoutSeconds * 1000;\n\n\n\t\twhile(forever) {\n\n\t\t\t// Make sure the log file is the one this instance opened\n\t\t\t// If not, clean it up!\n\t\t\ttry {\n\t\t\t\tBufferedReader in = new BufferedReader(new\n\t\t\t\t\t\tFileReader(logFileString + \"pid\"));\n\t\t\t\tString curr_pid = in.readLine();\n\t\t\t\tif(curr_pid.equals(pid)) {\n\t\t\t\t\t//log.println(\"They match = \" + curr_pid);\n\t\t\t\t} else {\n\t\t\t\t\t//log.println(\"No match = \" + curr_pid);\n\t\t\t\t\tlog.close();\n\n\t\t\t\t\t// Close all connections silently - they are definitely dead.\n\t\t\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconnPool[i].close();\n\t\t\t\t\t\t} catch (SQLException e1) {} // ignore\n\t\t\t\t\t}\n\t\t\t\t\t// Returning from the run() method kills the thread\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tin.close();\n\n\t\t\t} catch (IOException e1) {\n\t\t\t\tlog.println(\"Can't read the file for pid info: \" +\n\t\t\t\t\t\tlogFileString + \"pid\");\n\t\t\t}\n\n\n\t\t\t// Get any Warnings on connections and print to event file\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tcurrSQLWarning = connPool[i].getWarnings();\n\t\t\t\t\tif(currSQLWarning != null) {\n\t\t\t\t\t\tif(debugLevel > 1) {\n\t\t\t\t\t\t\tlog.println(\"Warnings on connection \" +\n\t\t\t\t\t\t\t\t\tString.valueOf(i) + \" \" + currSQLWarning);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconnPool[i].clearWarnings();\n\t\t\t\t\t}\n\t\t\t\t} catch(SQLException e) {\n\t\t\t\t\tif(debugLevel > 1) {\n\t\t\t\t\t\tlog.println(\"Cannot access Warnings: \" + e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor(int i=0; i < currConnections; i++) { // Do for each connection\n\t\t\t\tlong age = System.currentTimeMillis() - connCreateDate[i];\n\n\n\t\t\t\ttry { // Test the connection with createStatement call\n\t\t\t\t\tsynchronized(connStatus) {\n\t\t\t\t\t\tif(connStatus[i] > 0) { // In use, catch it next time!\n\n\t\t\t\t\t\t\t// Check the time it's been checked out and recycle\n\t\t\t\t\t\t\tlong timeInUse = System.currentTimeMillis() -\n\t\t\t\t\t\t\t\t\tconnLockTime[i];\n\t\t\t\t\t\t\tif(debugLevel > 2) {\n\t\t\t\t\t\t\t\tlog.println(\"Warning. Connection \" + i +\n\t\t\t\t\t\t\t\t\t\t\" in use for \" + timeInUse +\n\t\t\t\t\t\t\t\t\t\t\" ms\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(maxCheckoutMillis != 0) {\n\t\t\t\t\t\t\t\tif(timeInUse > maxCheckoutMillis) {\n\t\t\t\t\t\t\t\t\tif(debugLevel > 1) {\n\t\t\t\t\t\t\t\t\t\tlog.println(\"Warning. Connection \" +\n\t\t\t\t\t\t\t\t\t\t\t\ti + \" failed to be returned in time. Recycling...\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tthrow new SQLException();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconnStatus[i] = 2; // Take offline (2 indicates housekeeping lock)\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif(age > maxConnMSec) { // Force a reset at the max conn time\n\t\t\t\t\t\tthrow new SQLException();\n\t\t\t\t\t}\n\n\t\t\t\t\tstmt = connPool[i].createStatement();\n\t\t\t\t\tconnStatus[i] = 0; // Connection is O.K.\n\t\t\t\t\t//log.println(\"Connection confirmed for conn = \" +\n\t\t\t\t\t// String.valueOf(i));\n\n\t\t\t\t\t// Some DBs return an object even if DB is shut down\n\t\t\t\t\tif(connPool[i].isClosed()) {\n\t\t\t\t\t\tthrow new SQLException();\n\t\t\t\t\t}\n\n\n\t\t\t\t\t// Connection has a problem, restart it\n\t\t\t\t} catch(SQLException e) {\n\n\t\t\t\t\tif(debugLevel > 1) {\n\t\t\t\t\t\tlog.println(new Date().toString() +\n\t\t\t\t\t\t\t\t\" ***** Recycling connection \" +\n\t\t\t\t\t\t\t\tString.valueOf(i) + \":\");\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnPool[i].close();\n\t\t\t\t\t} catch(SQLException e0) {\n\t\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\t\tlog.println(\"Error! Can't close connection! Might have been closed already. Trying to recycle anyway... (\" + e0 + \")\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcreateConn(i);\n\t\t\t\t\t} catch(SQLException e1) {\n\t\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\t\tlog.println(\"Failed to create connection: \" + e1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconnStatus[i] = 0; // Can't open, try again next time\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\ttry{if(stmt != null) {stmt.close();}} catch(SQLException e1){};\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttry { Thread.sleep(20000); } // Wait 20 seconds for next cycle\n\n\t\t\tcatch(InterruptedException e) {\n\t\t\t\t// Returning from the run method sets the internal\n\t\t\t\t// flag referenced by Thread.isAlive() to false.\n\t\t\t\t// This is required because we don't use stop() to\n\t\t\t\t// shutdown this thread.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\n\t}", "public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public void StartMemberlistHB()\n\t{\n\t\tm_HBThread = new Thread(m_oHeartbeat);\n\t\tm_HBThread.start();\n\t}", "public void run(){\n\tThreadGroup objThreadGroupUser = null;\n\tThread thUserInfo, thUserLoginInfo, thMergeInfo;\n\tUserInfo objUserInfo = null;\n\tUserLoginInfo objUserLoginInfo = null;\n\tMergeInfo objMergeInfo = null;\n\n\t\ttry{\n\t\t\tobjThreadGroupUser = new ThreadGroup(\"UserInfo\");\n\t\t\tobjThreadGroupUser.setMaxPriority(10);\n\n\t\t\t//creating thread to access the userInfo\n\t\t\tobjUserInfo = new UserInfo();\n\t\t\tthUserInfo = new Thread(objThreadGroupUser, (Runnable) objUserInfo, \"UserInfo\");\n\t\t\tthUserInfo.setPriority(MAX_PRIORITY);\n\t\t\tthUserInfo.start();\n\n\t\t\t//creating thread to access the userLoginINfo\n\t\t\tobjUserLoginInfo = new UserLoginInfo();\n\t\t\tthUserLoginInfo = new Thread(objThreadGroupUser, (Runnable) objUserLoginInfo, \"UsrLogInInfo\");\n\t\t\tthUserLoginInfo.setPriority(MAX_PRIORITY);\n\t\t\tthUserLoginInfo.start();\n\n\t\t\t//creating the thread for merge info class\n\t\t\tobjMergeInfo = new MergeInfo();\n\t\t\tthMergeInfo = new Thread(objThreadGroupUser, (Runnable) objMergeInfo, \"MeargeData\");\n\t\t\tthMergeInfo.setPriority(MAX_PRIORITY);\n\t\t\tThread.sleep(1000);\n\t\t\tthMergeInfo.start();\n\n\t\t\t//joining the threads\n\t\t\tthUserInfo.join();\n\t\t\tthUserLoginInfo.join();\n\t\t\tthMergeInfo.join();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfinally{\n\t\t\tobjUserInfo = null;\n\t\t\tobjUserLoginInfo = null;\n\t\t\tobjMergeInfo = null;\n\t\t}\n\t}", "public void makeConnection(){\n\t\t\n\t\t\n\t\t\n\t\ttry{\n\t\t\tmySqlConn=new MySqlConnection(server,databaseName,userName,passWord);\n\t\t\tst=mySqlConn.conn.createStatement();\n\t\t }\n\t\tcatch(SQLException s){\n\t\t\tSystem.out.println(\"SQL not able to execute\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void launchRemote(Stage stage) throws Exception { \n\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\"); \n\t\t\n\t\t// thread of the server connecting to the game and of the game \n\t\tThread serverThread = new Thread(() -> { \n\t\t\tRemotePlayerServer server = new RemotePlayerServer(new GraphicalPlayerAdapter()); \n\t\t\tserver.run(); \n\t\t }); \n\t\tserverThread.setDaemon(true); \n\t\tserverThread.start(); \n\t }", "public void startConnectThread(String ipAddr) {\n \t\tThread thread = new Thread(new Connection(ipAddr));\n \t\tthread.start();\n \t\tthreads.add(thread);\n \t}", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\r\n\t\t\tbluetoothChat = new BluetoothChat(context);\r\n\t\t\tif (!BluetoothAdapter.checkBluetoothAddress(addr)) { // 检查蓝牙地址是否有效\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tBluetoothDevice device = bluetoothAdapter.getRemoteDevice(addr);\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (count == LONG_TIME_CONNECTED) {\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t\tif (device.getBondState() != BluetoothDevice.BOND_BONDED) {\r\n\t\t\t\t\t// 如果未匹配,则继续执行\r\n\t\t\t\t\t// handler.postDelayed(runnable, 5000);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tClsUtils.setPin(device.getClass(), device, pin); // 手机和蓝牙采集器配对\r\n\t\t\t\t\t\tClsUtils.createBond(device.getClass(), device);\r\n\t\t\t\t\t\tremoteDevice = device; // 配对完毕就把这个设备对象传给全局的remoteDevice\r\n\t\t\t\t\t\tThread.sleep(5000);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 赋值至全局\r\n\t\t\t\t\tremoteDevice = device;\r\n\t\t\t\t\t// 移除线程后立即连接\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbluetoothChat.goConnect(device);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "private void initThread(String user, String pass){\n AutomatedClient c = new AutomatedClient(user, pass);\n Thread t = new Thread(c);\n threads.put(user, t);\n clients.put(user, c);\n t.start();\n }", "@Override\n\tpublic void run() {\n\t\twhile(flag){\n\t\t\tConnPool conn=new ConnPool();\n\t\t\tResultSet rs;\n\t\t\tset=new HashSet<LEDUtils>();\n\t\t\ttry{\n\t\t\t\tString sql =\"select * from tb_LEDnotice\";\n\t\t\t\t rs =conn.select(sql);\n\t\t\t\t\n\t\t\t\t while(rs.next()){\n\t\t\t\t\t LEDUtils led=new LEDUtils();\n\t\t\t\t\tString roomID=rs.getString(\"rooimid\");\n\t\t\t\t\tString type=rs.getString(\"type\");\n\t\t\t\t\tString typehead=rs.getString(\"typehead\");\n\t\t\t\t\tled.setRoomid(roomID);\n\t\t\t\t\tled.setType(type);\n\t\t\t\t\tled.setTypehead(typehead);\n\t\t\t\t\tset.add(led);\n\t\t\t\t }\n\t\t\t\t conn.update(\"truncate table tb_LEDnotice \");\n\t\t\t\t if(setlength!=set.size()){\n\t\t\t\t\t setlength=set.size();\n\t\t\t\t\t for(LEDUtils s:set){\n\t\t\t\t\t\ttopic=s.getRoomid();\n\t\t\t\t\t\tpayload=s.getTypehead()+\"*\";\n\t\t\t\t\t\topenDoor(\"3401_dis\",payload);\n\t\t\t\t\t\topenDoor(\"3401_dis\",payload);\n\t\t\t\t\t\topenDoor(\"3401_dis\",payload);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\t\n\t\t\t}catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t}finally{\n\t\t\t\tConnPool.closeConnection();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "public void run() {\r\n try {\r\n while (true) {\r\n Socket serverClient = serverSocket.accept(); //server accept the contentServerId connection request\r\n ServerClientThread sct = new ServerClientThread(serverClient, lamportClock, feeds, timers); //send the request to a separate thread\r\n sct.start();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void connectToServerComp() {\n\n\t\ttry \n\t\t{\n\t\t\tSocket socket = new Socket(host, 8001);\n\t\t\tfromServer = new DataInputStream(socket.getInputStream());\n\t\t\ttoServer = new DataOutputStream(socket.getOutputStream());\n\n\t\t\ttoServer.writeInt(vsCOMPUTER);\n\n\t\t} catch (IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tThread thread = new Thread(new clientHandlingComputer(fromServer, toServer));\n\t\tthread.start();\n\n\t}", "public void startService() {\n\t\tListenThread listenThread = new ListenThread();\r\n\t\tlistenThread.start();\r\n\t\tSelfVideoThread selfVideoThread = new SelfVideoThread();\r\n\t\tselfVideoThread.start();\r\n\t\tif(remote!=\"\"){\r\n\t\t\tString[] remotes = remote.split(\",\");\r\n\t\t\tString[] remotePorts = remotePort.split(\",\");\r\n\t\t\tfor(int i = 0; i < remotes.length; i++){\r\n\t\t\t\tString currentRemote = remotes[i];\r\n\t\t\t\tint currentRemotePort = 6262;\r\n\t\t\t\tif(i<remotePorts.length){\r\n\t\t\t\t\tcurrentRemotePort = Integer.valueOf(remotePorts[i]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n//\t\t\t\tcreatTCPLink(currentRemote, currentRemotePort);\r\n\t\t\t\t\r\n\t\t\t\tSocket socket = null;\r\n\t\t\t\tJSONObject process = new JSONObject();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket = new Socket(currentRemote, currentRemotePort);\r\n\t\t\t\t\tThread sendVedio = new SendVideo(socket, width, height, rate);\r\n\t\t\t\t\tsendVedio.start();\r\n\t\t\t\t\tThread receiveVedio = new ReceiveVideo(socket);\r\n\t\t\t\t\treceiveVedio.start();\r\n\t\t\t\t\tsockets.add(socket);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void execute()\n\t {\n\t // espera a que se conecte cada cliente\n\t for ( int i = 0; i < jugadores.length; i++ ) //<-- dos por defecto o de 0 a 1\n\t {\n\t try // espera la conexión, crea el objeto Jugador, inicia objeto Runnable\n\t {\n\t \t//el metodo accept() es bloqueante hasta recibir una conexion\n\t jugadores[i] = new Jugador( servidor.accept(), i );\n\t //el constructor de jugador recibe un objeto socket crea los flujos E/S\n\t ejecutarJuego.execute(jugadores[i]); // ejecuta el objeto Runnable subproceso\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\t } // fin de for\n\n\t bloqueoJuego.lock(); // bloquea el juego para avisar al subproceso del jugador Uno\n\n\t try\n\t {\n\t jugadores[JUGADOR_1].establecerSuspendido(false); // continúa el jugador Uno\n\t otroJugadorConectado.signal(); // despierta el subproceso del jugador Uno\n\t } // fin de try\n\t finally\n\t {\n\t bloqueoJuego.unlock(); // desbloquea el juego después de avisar al jugador Uno\n\t } // fin de finally\n\t }", "public void initMultiPlayer() {\r\n\t\tnew ConnectThread().start();\r\n\t}", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "public NewConnectionWorkerThread(LocalService srv, Socket sock) {\n mSocket = sock;\n mIsPassive = true;\n mService = srv;\n }", "void startListening()\n {\n if (outstanding_accept != null || open_connection != null) {\n return;\n }\n \n outstanding_accept = new AcceptThread(bt_adapter, handler);\n outstanding_accept.start();\n }", "public ModemWorker (IConnection connection) {\n\t\tthis.connection = connection;\n\t}", "void init() throws ConnectionPoolException {\r\n\t\tfreeConnection = new ArrayBlockingQueue<Connection>(poolsize);\r\n\t\tbusyConnection = new ArrayBlockingQueue<Connection>(poolsize);\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\tfor(int i = 0; i < poolsize; i++){\r\n\t\t\t\tConnection connection = DriverManager.getConnection(url, user, password);\r\n\t\t\t\tfreeConnection.add(connection);\r\n\t\t\t}\r\n\t\t\tflag = true;\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tlogger.error(ErrorMessageDAO.ERROR_DB_DRIVER + e);\r\n\t\t\tthrow new ConnectionPoolException(ErrorMessageDAO.ERROR_DB_DRIVER);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(ErrorMessageDAO.ERROR_SQL + e);\r\n\t\t\tthrow new ConnectionPoolException(ErrorMessageDAO.ERROR_SQL);\r\n\t\t}\r\n\t}", "private void ejecutorDeServicio(){\r\n dbExeccutor = Executors.newFixedThreadPool(\r\n 1, \r\n new databaseThreadFactory()\r\n ); \r\n }", "@Override\n public void run() {\n P.print(\"Listening on port \"+P.port+\", waiting for incomming connection...\");\n try {\n ServerSocket serverSocket = new ServerSocket(P.port);\n while (P.choke_thread_running) { //read input forever.\n Receive receive_thread = new Receive();\n Socket s = serverSocket.accept();\n String addr = s.getInetAddress().toString();\n int p = s.getPort();\n int i;\n for(i = 0;i<P.peer_ip.length;i++){\n if(addr.equals(P.peer_ip[i])){\n P.sockets[i] = s;\n P.tcp_out_stream[i] = new ObjectOutputStream(s.getOutputStream());\n break;\n }\n }\n receive_thread.start(P,s,P.peer_id[--i]);\n P.print(\"Accepted incomming connection: ip = \"+addr.substring(1)+\", port = \"+p);\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void createThread() {\n }", "@Override\r\n\tpublic void doStart() {\n\t\tbootstrap.group(this.bossEventLoopGroup, this.workerEventLoopGroup)\r\n\t\t\t\t .channel(NioServerSocketChannel.class)\r\n\t\t\t\t //允许在同一端口上启动同一服务器的多个实例,只要每个实例捆绑一个不同的本地IP地址即可\r\n .option(ChannelOption.SO_REUSEADDR, true)\r\n //用于构造服务端套接字ServerSocket对象,标识当服务器请求处理线程全满时,用于临时存放已完成三次握手的请求的队列的最大长度\r\n// .option(ChannelOption.SO_BACKLOG, 1024) // determining the number of connections queued\r\n\r\n //禁用Nagle算法,即数据包立即发送出去 (在TCP_NODELAY模式下,假设有3个小包要发送,第一个小包发出后,接下来的小包需要等待之前的小包被ack,在这期间小包会合并,直到接收到之前包的ack后才会发生)\r\n .childOption(ChannelOption.TCP_NODELAY, true)\r\n //开启TCP/IP协议实现的心跳机制\r\n .childOption(ChannelOption.SO_KEEPALIVE, true)\r\n .childHandler(newInitializerChannelHandler());\r\n\t\ttry {\r\n\t\t\tInetSocketAddress serverAddress = new InetSocketAddress(InetAddress.getLoopbackAddress(),getPort());\r\n\t\t\tchannelFuture = bootstrap.bind(getPort());\r\n//\t\t\tchannelFuture = bootstrap.bind(serverAddress).sync();\r\n\t\t\tLOGGER.info(\"connector {} started at port {},protocal is {}\",getName(),getPort(),getSchema());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tLOGGER.error(\"error happen when connector {} starting\",getName());\r\n\t\t}\r\n\t}", "public void connect() {\n\n if (reader == null) {\n reader = new ReadFromGo(this);\n readerThread = new Thread(reader);\n readerThread.start();\n } else {\n System.out.println(\"stopGoProcess()\");\n if (readerThread != null) {\n reader.stop();\n readerThread.interrupt();\n reader = new ReadFromGo(this);\n readerThread = new Thread(reader);\n readerThread.start();\n System.out.println(\"Thread interrupted and started\");\n }\n }\n }", "private void doConnect() throws Exception {\n try {\n Registry reg = LocateRegistry.getRegistry(conf.getNameServiceHost(), conf.getNameServicePort());\n server = (IChatServer) reg.lookup(conf.getServerName());\n } catch (RemoteException e) {\n throw new Exception(\"rmiregistry not found at '\" + conf.getNameServiceHost() + \":\" +\n conf.getNameServicePort() + \"'\");\n } catch (NotBoundException e) {\n throw new Exception(\"Server '\" + conf.getServerName() + \"' not found.\");\n }\n\n //Unir al bot al canal com a usuari\n //el Hashcode li afig un valor unic al nom, per a que ningu\n //li copie el nom com a usuari\n user = new ChatUser(\"bot \" + this.hashCode(), this);\n if (!server.connectUser(user))\n throw new Exception(\"Nick already in use\");\n\n //Comprovar si hi ha canals en el servidor.\n IChatChannel[] channels = server.listChannels();\n if (channels == null || channels.length == 0)\n throw new Exception(\"Server has no channels\");\n \n //Unir el bot a cadascun dels canals\n for (IChatChannel channel : channels) {\n channel.join(user);\n }\n\n System.out.println(\"Bot unit als canals i preparat.\");\n }", "public void run() {\r\n\t\t\tthis.setName(\"Vista.CacheUploaderDaemon\");\r\n\t\t\tint frac = 0;\r\n\t\t\tint prog = 0; // Progreso de la cola\r\n\t\t\twhile (alive) {\r\n\t\t\t\tif (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tfrac = 100/colaEscritura.size();\r\n\t\t\t\t\tprog = 0;\r\n\t\t\t\t}\r\n\t\t\t\twhile (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tsetProgreso(\"Actualizando base de datos\", prog);\r\n\t\t\t\t\tprog+=frac;\r\n\t\t\t\t\tElementoCache e = colaEscritura.poll();\r\n\t\t\t\t\tif (e.i==INSERTAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Empleado\" ))\t\tinsertEmpleadoBD((Empleado) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Cuadrante\"))\t\tcontrolador.insertCuadrante((Cuadrante) e.o.get(0)); \t\t\t\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"TurnoContrato\"))\tcontrolador.insertTurnoPorContrato((Integer)e.o.get(0), (Integer)e.o.get(1));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Sugerencia\"))\t\tcontrolador.insertSugerencia((Sugerencia)e.o.get(0));\r\n//\t\t\t\t\t\telse if (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.insertContrato((Contrato) e.o.get(0));\r\n\t\t\t\t\t\t/*else if (e.tipo.equals(\"Departamento\"))\t\tcontrolador.insertDepartamento((Departamento)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"CrearDepartamento\")){ \tcontrolador.insertDepartamentoUsuario((Integer)e.o.get(2),e.o.get(0).toString()); //tabla DepartamentoUsuario\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertNumerosDepartamento((Integer)e.o.get(1),e.o.get(0).toString()); //tabla NumerosDEPARTAMENTOs\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertDepartamentoPruebas(e.o.get(0).toString(),(Integer)e.o.get(2)); //tabla DEPARTAMENTO\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Insertar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (e.i==ELIMINAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.eliminaContrato((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.eliminaTurno((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"ContratoConTurnos\"))\tcontrolador.eliminaContratoConTurnos((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.eliminaEmpleado((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"eliminaMesTrabaja\")) {\r\n\t\t\t\t\t\t\tArrayList<Object> ar = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaMesTrabaja((Integer)ar.get(0),(Integer)ar.get(1),(Integer)ar.get(2),ar.get(3).toString());\r\n\t\t\t\t\t\t}else if (e.tipo.equals(\"eliminaTurnoDeContrato\")){\r\n\t\t\t\t\t\t\tArrayList<Object> aux = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaTurnoDeContrato((Integer)aux.get(0),(Integer)aux.get(1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Eliminar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.i==MODIFICAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.modificarContrato(((Contrato)e.o.get(0)).getNumeroContrato(), ((Contrato)e.o.get(0)).getTurnoInicial(), ((Contrato)e.o.get(0)).getNombreContrato(), ((Contrato)e.o.get(0)).getPatron() , ((Contrato)e.o.get(0)).getDuracionCiclo(), ((Contrato)e.o.get(0)).getSalario(), ((Contrato)e.o.get(0)).getTipoContrato());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.modificarTurno(((Turno)e.o.get(0)).getIdTurno(), ((Turno)e.o.get(0)).getDescripcion(), ((Turno)e.o.get(0)).getHoraEntrada(), ((Turno)e.o.get(0)).getHoraSalida(), ((Turno)e.o.get(0)).getHoraDescanso(), ((Turno)e.o.get(0)).getTDescanso(),((Turno)e.o.get(0)).getColor());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.cambiarEmpleado(((Empleado)e.o.get(0)).getEmplId(), ((Empleado)e.o.get(0)).getNombre(), ((Empleado)e.o.get(0)).getApellido1(), ((Empleado)e.o.get(0)).getApellido2(), ((Empleado)e.o.get(0)).getFechaNac(), ((Empleado)e.o.get(0)).getSexo(), ((Empleado)e.o.get(0)).getEmail(), ((Empleado)e.o.get(0)).getPassword(), ((Empleado)e.o.get(0)).getGrupo(), ((Empleado)e.o.get(0)).getFcontrato(), ((Empleado)e.o.get(0)).getFAlta(), ((Empleado)e.o.get(0)).getFelicidad(), ((Empleado)e.o.get(0)).getIdioma(), ((Empleado)e.o.get(0)).getRango(), ((Empleado)e.o.get(0)).getTurnoFavorito(), ((Empleado)e.o.get(0)).getColor(),((Empleado)e.o.get(0)).getContratoId(), ((Empleado)e.o.get(0)).getPosicion());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Mensaje\"))\t\t\tcontrolador.marcarMensaje((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"MensajeLeido\"))\t\tcontrolador.setLeido((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\t//else if (e.tipo.equals(\"JefeDepartamento\"))\tcontrolador.modificaDpto(((Departamento)e.o.get(0)).getNombreDepartamento(), ((Departamento)e.o.get(0)).getJefeDepartamento().getEmplId()); \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"NombreDepartamento\")){controlador.cambiaNombreDpto(((ArrayList<String>)e.o.get(0)).get(0),((ArrayList<String>)e.o.get(0)).get(1));}//nombre antiguo,nombre nuevo\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreDepartamentoUsuario(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreNumerosDEPARTAMENTOs(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Trabaja\"))\t\t\tcontrolador.modificaTrabaja(((Trabaja)e.o.get(0)).getIdEmpl(), ((Trabaja)e.o.get(0)).getIdTurno(), (String)e.o.get(1));\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Modificar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetProgreso(\"Actualizando base de datos\", 100);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsleep(1000);\r\n\t\t\t\t} catch (Exception e) {};\r\n\t\t\t}\r\n\t\t}", "private void init() {\n DatabaseInitializer databaseInitializer = new DatabaseInitializer();\n try {\n for (int i = 0; i < DEFAULT_POOL_SIZE; i++) {\n ProxyConnection connection = new ProxyConnection(databaseInitializer.getConnection());\n connections.put(connection);\n }\n } catch (InterruptedException e) {\n logger.log(Level.ERROR, e);\n }\n }", "@Override\n public void run()\n {\n close(false);\n try\n {\n if (!isConnected())\n connectMS(msServer.getIp(), msServer.getPort());\n }\n catch (Exception e)\n {\n Log.e(\"Dudu_SDK\",\n \"getServer ...failed ...user default server... \");\n }\n }", "private void init() {\r\n\t\tif (cn == null) {\r\n\t\t\ttry {\r\n\t\t\t\tcn = new XGConnection(url,login,passwd); // Etape 2 : r�cup�ration de la connexion\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTimeUnit.MINUTES.sleep(1);\r\n\t\t\t\t} catch (InterruptedException e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcn.close();// lib�rer ressources de la m�moire.\r\n\t\t\t\t} catch (SQLException e1) {\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}", "public void run(){\r\n\r\n\t\tString message = new String();\r\n\t\t\r\n\t\t\r\n\t\twhile(escoltant){\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tsClient = sServer.accept();\r\n\t\t\t\t\r\n\t\t\t\tdataIn = new ObjectInputStream(sClient.getInputStream());\r\n\t\t\t\t\r\n\t\t\t\tdataOut = new ObjectOutputStream(sClient.getOutputStream());\r\n\t\t\t\t//objectOut = new ObjectOutputStream(sClient.getOutputStream());\r\n\t\t\t\t\r\n\t\t\t\tmessage = (String)dataIn.readObject();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (message.startsWith(\"ADD\")){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(Logica.addUser(message)){\r\n\t\t\t\t\t\tdataOut.writeObject(\"OK\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tdataOut.writeObject(\"KO\");\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (message.startsWith(\"LOG\")){\r\n\t\t\t\t\tdataOut.writeObject(Logica.checkUser(message));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.equals(\"MAPES\")){\r\n\t\t\t\r\n\t\t\t\t\tdataOut.writeObject(Logica.enviaEscenaris());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.startsWith(\"GUANYADA\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tConectorDB.insertPartidaGuanyada();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.startsWith(\"PERDUDA\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tConectorDB.insertPartidaPerduda();\r\n\t\t\t\t}\r\n\t\t\t\tdataIn.close();\r\n\t\t\t\tdataOut.close();\r\n\t\t\t\t\r\n\t\t\t\tsClient.close();\r\n\t\t\t}catch(IOException e){\r\n\t\t\t\t\r\n\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}", "private void apriConnessione() throws SQLException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {\n\t\tString password, user;\n\t\tDatabaseProps dbConf = config.getDb();\n\n\t\tClass.forName(dbConf.getDriver()).getDeclaredConstructor().newInstance();\n\n\t\tuser = dbConf.getUsername();\n\t\tpassword = dbConf.getPassword();\n\n\t\tString uri = String.format(\"jdbc:%s://%s:%d/%s\", dbConf.getDbms(), dbConf.getHost(), dbConf.getPort(), dbConf.getName());\n\n\t\tconnessioneDB = DriverManager.getConnection(uri, user, password);\n\t}", "public static void main(String[] args) {\n try {\r\n ServerSocket server=new ServerSocket(port);\r\n System.out.println(\"Waiting for a client...\");\r\n\r\n connections=new ArrayList<>();\r\n ExecutorService es = Executors.newFixedThreadPool(max_clients);\r\n\r\n Connection tmp;\r\n while(true) {\r\n\r\n\r\n Socket socket = server.accept();\r\n if(max_clients<=clients){\r\n OutputStream out = socket.getOutputStream();\r\n BufferedWriter rout= new BufferedWriter(new OutputStreamWriter(out));\r\n rout.write(\"Chat is full(\"+max_clients+\" users). You can't join. Try again later.\");\r\n rout.write(\"\\n\");\r\n rout.flush();\r\n socket.close();\r\n out.close();\r\n continue;\r\n }\r\n\r\n tmp=new Connection(socket);\r\n es.submit(tmp);\r\n clients++;\r\n System.out.println(\"New user has joined. Number of users - \"+clients);\r\n connections.add(tmp);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }" ]
[ "0.65271795", "0.6387651", "0.63682586", "0.63682586", "0.62101984", "0.6141969", "0.6036022", "0.6032963", "0.6031826", "0.602011", "0.6019066", "0.59796184", "0.5958776", "0.59341925", "0.5916341", "0.5913185", "0.59033746", "0.58452886", "0.5837796", "0.58269835", "0.58207935", "0.5810996", "0.57730633", "0.5715967", "0.57029545", "0.57018274", "0.5682899", "0.567555", "0.56662947", "0.5665411", "0.5663907", "0.5662404", "0.565892", "0.5652189", "0.56516373", "0.56513333", "0.56454897", "0.5634438", "0.56141996", "0.5613797", "0.5606257", "0.56022024", "0.5597532", "0.559678", "0.55927116", "0.55866766", "0.55859333", "0.55798256", "0.55687743", "0.5563849", "0.55597204", "0.55452955", "0.5541655", "0.5537518", "0.5528953", "0.55062884", "0.54988986", "0.548363", "0.54821914", "0.548071", "0.54798055", "0.54727244", "0.54590076", "0.54536647", "0.54484874", "0.5448129", "0.5441453", "0.5432229", "0.5431318", "0.5429343", "0.5423189", "0.5422993", "0.5421694", "0.5416723", "0.54122686", "0.54106295", "0.54069614", "0.54004306", "0.5395961", "0.5392469", "0.5384253", "0.53796434", "0.5372985", "0.5365895", "0.5365776", "0.5364559", "0.536082", "0.5352921", "0.53467315", "0.53454065", "0.53447676", "0.53425634", "0.5341198", "0.5339945", "0.5336759", "0.5317938", "0.53125405", "0.5310483", "0.53097165", "0.5303767", "0.52966356" ]
0.0
-1
Gives the hostName of the user that is hosting the game
public String getHostName() { return hostName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getRemoteHostName();", "java.lang.String getHost();", "java.lang.String getHost();", "String getHost();", "@Override\n\tpublic java.lang.String getRemoteHost() {\n\t\treturn _userTracker.getRemoteHost();\n\t}", "public String getUserHost() {\n return userHost;\n }", "private String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "public String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "public String getHostName (){\n return hostName;\n }", "private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }", "Host getHost();", "String getHostName();", "String getHostName();", "public String getHostName() {\n return hostName;\n }", "public String getHostName() {\n return hostName;\n }", "public String getHost();", "public String getHost();", "java.lang.String getRemoteHost();", "String host();", "public String getHostName();", "public String getHostName() {\n return this.hostContext.getHostName();\n }", "public String getHost() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getHost()\");\n Via via=(Via)sipHeader;\n return via.getHost();\n }", "public String getHost() {\n\t\ttry {\n\t\t\treturn InetAddress.getLocalHost().getHostName();\n\t\t} catch (UnknownHostException e) {\n\t\t\treturn \"unknown\";\n\t\t}\n\t}", "public String getHost() {\r\n \t\treturn properties.getProperty(KEY_HOST);\r\n \t}", "private String GetHostName() throws UnknownHostException{\n return Inet4Address.getLocalHost().getHostName();\n }", "String getHostname();", "String getHostname();", "public String getHostName() {\n return FxSharedUtils.getHostName();\n }", "public String getHost() {\n\t\treturn this.sipStack.getHostAddress();\n\t}", "public String getHost() {\n return host.getText();\n }", "static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return \"unknown\";\n }\n }", "public String getHost() {\n \t\treturn host;\n \t}", "public String getHostname();", "public InetAddress getHost();", "public String getHost() {\n\t\treturn url.getHost();\n }", "public String getHost(){\n\t\treturn this.host;\n\t}", "public String getHostName() throws UnknownHostException\n\t{\n\t\t\n\t\treturn InetAddress.getLocalHost().getHostAddress();\n\t\t\n\t}", "public String getHost() {\r\n return host;\r\n }", "public String getHost( ) {\n\t\treturn host;\n\t}", "public String getHost() {\n\t\treturn host;\n\t}", "public String getHost() {\n\t\treturn host;\n\t}", "String getHost()\n {\n return host;\n }", "@Override\n\tpublic Player getHost() {\n\t\treturn host;\n\t}", "public String getHost()\n\t{\n\t\treturn m_strHostname;\n\t}", "public static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return LOCALHOST;\n }\n }", "public String getHost() { return host; }", "String getIntegHost();", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getFullHost() {\n return \"http://\" + get(HOSTNAME_KEY) + \":\" + get(PORT_KEY) + \"/\" + get(CONTEXT_ROOT_KEY) + \"/\";\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public java.lang.String getHost() {\n java.lang.Object ref = host_;\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 host_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getHostURL() {\n return getHostURL(PAActiveObject.getActiveObjectNodeUrl(PAActiveObject.getStubOnThis()));\n }", "@Override\n\t\tpublic String getRemoteHost() {\n\t\t\treturn null;\n\t\t}", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\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 remoteHost_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getPreferredHost() {\n return preferredHost;\n }", "public String hostname() {\n return this.hostname;\n }", "default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\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 remoteHost_ = s;\n }\n return s;\n }\n }", "private static String getHostname()\n throws UnknownHostException {\n return InetAddress.getLocalHost().getHostName();\n }", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "public String host() {\n return host;\n }", "public String getHostName() {\n return null;\n }", "public static String getHostname()\n\t{\n\t\treturn hostname; // send the hostname\n\t}", "public GUI GetHost() {\n\t\treturn m_Host;\n\t}", "public void setHost(String hostName)\n {\n this.hostName = hostName;\n }", "private static String getHostNameImpl() {\n String bindAddr = System.getProperty(\"jboss.bind.address\");\n if (bindAddr != null && !bindAddr.trim().equals(\"0.0.0.0\")) {\n return bindAddr;\n }\n\n // Fallback to qualified name\n String qualifiedHostName = System.getProperty(\"jboss.qualified.host.name\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // If not on jboss env, let's try other possible fallbacks\n // POSIX-like OSes including Mac should have this set\n qualifiedHostName = System.getenv(\"HOSTNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // Certain versions of Windows\n qualifiedHostName = System.getenv(\"COMPUTERNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n try {\n return NetworkUtils.canonize(getLocalHost().getHostName());\n } catch (UnknownHostException uhe) {\n uhe.printStackTrace();\n return \"unknown-host.unknown-domain\";\n }\n }", "public String getHost(Env env) {\n return client.getHost();\n }", "public String getHost() {\n return messageProcessor.getIpAddress().getHostAddress();\n }", "@java.lang.Override\n public java.lang.String getHost() {\n java.lang.Object ref = host_;\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 host_ = s;\n return s;\n }\n }", "public static String getHostName(HttpRequest argHttpRequest) {\r\n\t\tif (argHttpRequest != null) {\r\n\t\t\tHeader hostHeader = argHttpRequest\r\n\t\t\t\t\t.getFirstHeader(HttpConstants.HOST);\r\n\t\t\tString originHostName = hostHeader.getValue();\r\n\t\t\treturn originHostName;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String connectedHost()\n {\n return connectedHost;\n }", "public java.lang.String getRemoteHost() {\r\n return remoteHost;\r\n }", "protected String get_object_name() {\n\t\treturn this.hostname;\n\t}", "public String getHostname() {\r\n return hostname;\r\n }", "public String getHostname () {\n return hostname;\n }", "public void setHostName(String hostName) {\n this.hostName = hostName;\n }", "public String getHost( ) {\n return props.getProperty(HOST, \"localhost\");\n }", "public String getHostName() {\n\t\treturn \"RaspberryHostName\";\n\t}", "public String getHostname() {\n return this.hostname;\n }", "public static String getLocalHostId() {\r\n\t\treturn localHostId;\r\n\t}", "private static String getHost(final String host) {\n final int colonIndex = host.indexOf(':');\n\n if (colonIndex == -1) {\n return host;\n }\n\n return host.substring(0, colonIndex);\n }", "public String getHost() {\n return m_host;\n }", "String getServerName() {\n return game.z.C;\n }", "public static String getHostname()\n {\n String host = \"unknown\";\n try\n {\n return InetAddress.getLocalHost().getHostName();\n }\n catch ( UnknownHostException e )\n {\n // ignore\n }\n return host;\n }", "public String getHost() {\n return stack.stackAddress;\n }", "@Override\n\t\tpublic String getHost() {\n\t\t\treturn null;\n\t\t}", "public String getHostname() {\n return this.config.getHostname();\n }", "HostInfo getHostInfo();", "public boolean getGuessHostname();", "public static String getBaseHost() {\r\n if (baseHost == null) {\r\n baseHost = PropertiesProvider.getInstance().getProperty(\"server.name\", \"localhost\");\r\n }\r\n return baseHost;\r\n }" ]
[ "0.7374822", "0.7357229", "0.7357229", "0.73081034", "0.7284129", "0.72686815", "0.7246457", "0.7242686", "0.72376865", "0.72060007", "0.7148848", "0.7128052", "0.7128052", "0.71179646", "0.71179646", "0.7076967", "0.7076967", "0.7070445", "0.70335996", "0.69883496", "0.6979763", "0.69529444", "0.687561", "0.6862006", "0.6860339", "0.68201697", "0.68201697", "0.6790924", "0.67844605", "0.6761398", "0.67242527", "0.6708015", "0.668812", "0.6678478", "0.6674142", "0.66498864", "0.6603582", "0.659474", "0.65808785", "0.65772945", "0.65772945", "0.6562793", "0.6562488", "0.6534774", "0.65233165", "0.6518497", "0.6512659", "0.65018034", "0.65018034", "0.65018034", "0.65018034", "0.65018034", "0.65018034", "0.6501678", "0.6501678", "0.6500481", "0.6494983", "0.6494983", "0.64903724", "0.64883214", "0.64836735", "0.6442331", "0.6433829", "0.64013207", "0.6386444", "0.6378548", "0.6368969", "0.63683736", "0.63683736", "0.63521713", "0.6340512", "0.63390493", "0.63383627", "0.6326578", "0.63264835", "0.6325356", "0.6294284", "0.6287158", "0.62714887", "0.62701625", "0.62520695", "0.6245358", "0.62363297", "0.62178665", "0.6206225", "0.61972404", "0.6190443", "0.6164582", "0.6152444", "0.61507744", "0.61335534", "0.6121575", "0.6120843", "0.61113584", "0.6105882", "0.61018926", "0.60942584", "0.60887086", "0.6067026" ]
0.7130999
11
Connects to the gameserver with the given ip and serverPort set in the constructor and sends if the user is the host and the userName from when you login
public void connect() { try { connection = new Socket(ip, serverPort); // 128.39.83.87 // 127.0.0.1 output = new BufferedWriter(new OutputStreamWriter( connection.getOutputStream())); input = new BufferedReader(new InputStreamReader( connection.getInputStream())); if (hostName.equals(Constants.IDGK + Main.userName)) sendText("1" + Main.userName); else sendText("2" + Main.userName); } catch (UnknownHostException e) { Main.LOGGER.log(Level.SEVERE, "Error connecting server", e); } catch (IOException e) { Main.LOGGER.log(Level.WARNING, "Error making output/input", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void login(String addr, String port, String user){\n if (state != State.NOCONNECTION){\n Log.d(\"State\", state.toString());\n return;\n }\n if (user.length() < 3){\n Log.d(\"Username\", \"length too short\");\n return; //BAD HUMAN!!!\n }\n _user = user;\n try {\n mConnection = new NetworkingConnection(new MyResponseVisitor(), addr, port);\n state = State.HASCONNECTION;\n } catch (UnknownHostException e){\n e.printStackTrace();\n //there is an unknown host aka ur IP is wrong bish\n Log.d(\"Bad IP address\", addr);\n state = State.NOCONNECTION;\n }\n //make the error handler somewher\n INetworkingConnection.OnErrorSend handleErr = new INetworkingConnection.OnErrorSend(){\n public void onError(@NonNull Throwable err){\n err.printStackTrace();\n }\n };\n //send the login request somewhere(???)\n LoginRequest loginReq = new LoginRequest(user);\n mConnection.send(loginReq, handleErr).execute();\n state = State.ATTEMPTEDLOGIN;\n }", "public boolean login() {\r\n try {\r\n if (socket == null) {\r\n SocketFactory socketFactory = SSLSocketFactory.getDefault();\r\n socket = socketFactory.createSocket(host, port);\r\n // System.err.println(\"Socket created\");\r\n if (Preferences.debugLevel(Preferences.DEBUG_COMMS)) {\r\n if (socket instanceof SSLSocket) { // of course it is!\r\n SSLSession session = ((SSLSocket) socket).getSession();\r\n try {\r\n javax.security.cert.X509Certificate[] x509 = session.getPeerCertificateChain();\r\n for (int i = 0; i < x509.length; i++ )\r\n System.out.println(\"Certs: \" + x509[i].toString());\r\n } catch (SSLPeerUnverifiedException ex) {\r\n System.err.println(ex.toString());\r\n return false;\r\n }\r\n }\r\n }\r\n if (socket.isConnected()) {\r\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n out = new PrintWriter(socket.getOutputStream(), true);\r\n out.println(clientName);\r\n out.println(clientIP);\r\n start();\r\n } else {\r\n println(\"Unable to make connection with server\");\r\n return false;\r\n }\r\n }\r\n } catch (ConnectException e) {\r\n println(\"Unable to connect. Server is most likely down.\");\r\n return false;\r\n } catch (UnknownHostException e) {\r\n println(\"Unknown host, please notify admin.\");\r\n return false;\r\n } catch (IOException e) {\r\n println(\"I/O socket error.\");\r\n e.printStackTrace();\r\n return false;\r\n } catch (Exception e) {\r\n println(\"Cannot log in, please try again later.\");\r\n return false;\r\n }\r\n return true;\r\n }", "public void login(){\n JSONObject clientInfo = new JSONObject();\n try{\n clientInfo.put(\"username\", mUsername);\n clientInfo.put(\"password\", mPassword);\n clientInfo.put(\"deviceID\", getDeviceID());\n clientInfo.put(\"ipAddress\", getClientIP());\n mSocket.emit(\"login\", clientInfo);\n }catch(JSONException ex){\n throw new RuntimeException(ex);\n }\n }", "public boolean connect() {\n\t\tString name = getUserName();\n\t\tfor (int i = 0; i < name.length(); i++) {\n\t\t\tchar ch = name.charAt(i);\n\t\t\tif (!Character.isLetter(ch) && !Character.isDigit(ch)) {\n\t\t\t\tthrow new IllegalNameException(\"Cannot log in to the server using the name \" + name);\n\t\t\t}\n\t\t}\n\t\tboolean retVal = login();\n\t\tMessageScanner rms = MessageScanner.getInstance();\n\t\taddMessageListener(rms);\n\t\tmessageScanner = rms;\n\t\tif (!userName.startsWith(\"AGENCY\") && !userName.startsWith(\"ADMIN\")) {\n\t\t\tsetUserName(getUserName().substring(1, getUserName().length()));\n\t\t}\n\n\t\treturn retVal;\n\t}", "private boolean connect(String host, int port){\n\t\t/* Connect to server */\n\t\tDebug.log(\"Player\", \"Connecting on host ...\");\n\n\t\t/* Get the Registry! */\n\t\ttry{\n\t\t\tRegistry reg = LocateRegistry.getRegistry(host, port);\n\t\t\tserver = (ServerInterface)reg.lookup(\"Server\");\n\n\t\t\t/* Reflect in GUI */\n\t\t\tgui.showConnectionProgress();\n\n\t\t\tDebug.log(\"Player\", \"Connected!\");\n\n\t\t\treturn true;\n\t\t}catch(AccessException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not access server registry \" + e.toString());\n\t\t}catch(RemoteException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not find the RMI register on the server\" + e.toString());\n\t\t}catch(NotBoundException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not bind to the provided RMI address \" + e.toString());\n\t\t}\n\n\t\treturn false;\n\t}", "public void connect(String host, int port) {\n\t\t\n\t\ttry {\n\t\t\tconnection = new Socket(host, port);\n\t\t\tdis = new DataInputStream(connection.getInputStream()); // get data from sever\n\t\t\tdos = new DataOutputStream(connection.getOutputStream()); // get data to server\n\t\t\t\t\t\t\n\t\t\tJDialog.setDefaultLookAndFeelDecorated(true);\n\t\t Object[] selectionValues = { \"Chess\", \"Mill\"};\n\t\t String initialSelection = \"Chess\";\n\t\t selection = JOptionPane.showInputDialog(null, \"Select a Game\",\n\t\t \"Select a game\", JOptionPane.QUESTION_MESSAGE, null, selectionValues, initialSelection);\n\n\t\t setupStates();\t\t\n\t\t\tthis.start();\n\t\t\t\n\t\t} catch (IOException ieo) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Server is not running\", \"Connection Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "void realLogin(String host, String name) {\r\n\t\ttry {\r\n\t\t\t// connect to the server\r\n\t\t\tthis.name = name;\r\n\t\t\tserver = new Socket(host, port);\r\n\t\t\tin = new BufferedReader(new InputStreamReader(server.getInputStream()));\r\n\t\t\tout = new PrintWriter(server.getOutputStream());\r\n\r\n\t\t\t// sending login cmd\r\n\t\t\tout.println(\"login \" + name);\r\n\t\t\tout.flush();\r\n\t\t\trepaint();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public boolean connectServer(String usrNickName) {\n\t\ttry {\n\t\t\t// Send login request to server through socket\n\t\t\tdout.writeUTF(\"client login##\" + usrNickName);\n\t\t\t\n\t\t\t// Wait for response from server\n\t\t\tlong startTime = System.currentTimeMillis(); //fetch starting time\n\t\t\twhile (true) {\n\t\t\t\tString str = din.readUTF(); \n\t\t\t\tif(str.equals(\"login confirm\")) {\n\t\t\t\t\tSystem.out.println(\"Client [\" + usrNickName+ \"] logged in!\");\n\t\t\t\t\treturn true;\n\t\t\t\t} \n\t\t\t\tif (str.equals(\"duplicate nickname\")) {\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Nick name duplicated! \\nPlease Choose another one!\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If haven't received response from server over 5 sec, retry log in\n\t\t\t\tif (System.currentTimeMillis() - startTime < 5000) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Login request timeout! \\nPlease try again later!\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e1) {\n\t\t\tSystem.out.println(\"Client connection refused!\");\n\t\t\tJOptionPane.showMessageDialog(null, \"Log in failed! \\nPlease make sure the server already start and you type in the correct port number!\");\n\t\t}\n\t\treturn false; \n\t}", "public String connect(String ip, int port, String nick) throws IOException {\r\n\t\t\r\n\t\tString message = \"101&\"+nick;\r\n\t\tString returnMessage =\"\";\r\n\t\t//ENTER YOUR CODE TO CONNECT\r\n\t\tthis.serverIP = ip;\r\n\t\tthis.serverPort = port;\r\n\t\ttry {\r\n\t\t\tthis.udpSocket= new DatagramSocket();\r\n\t\t\tsendDatagramPacket(message);\r\n\t\t\tSystem.out.println(\"A la espera\");\r\n\t\t\tDatagramPacket receivedPacket= receiveDatagramPacket();\r\n\t\t\treturnMessage=new String(receivedPacket.getData());\r\n\t\t\treturnMessage=returnMessage.trim();\r\n\t\t\tSystem.out.println(\"returnmessage= \"+returnMessage);\r\n\t\t\t\r\n\t\t\t//If the message starts with 201 the user can connect to the server and receive the list of users\r\n\t\t\tif (returnMessage.split(\"&\")[0].equals(\"201\")){\r\n\t\t\t\tthis.connectedUser = new User();\r\n\t\t\t\tthis.connectedUser.setNick(nick);\r\n\t\t\t\t//If the message ends with & means that the message is not complete yet\r\n\t\t\t\tif (returnMessage.charAt(returnMessage.length()-1)=='&'){\r\n\t\t\t\t\tincompletedListUsers = returnMessage.substring(4);\r\n\t\t\t\t\tSystem.out.println(\"acaba en &\");\r\n\t\t\t\t\tMessageProcesorClient messageProcesor = new MessageProcesorClient(this);\r\n\t\t\t\t\tmessageProcesor.start();\r\n\t\t\t\t\treturn \"\";\r\n\t\t\t\t}\r\n\t\t\t\t//The message is complete\r\n\t\t\t\telse{\t\t\t\t\t\r\n\t\t\t\t\tMessageProcesorClient messageProcesor = new MessageProcesorClient(this);\r\n\t\t\t\t\tmessageProcesor.start();\r\n\t\t\t\t\treturn returnMessage.substring(4);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.udpSocket.close();\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t} catch (SocketException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\t\r\n\t}", "private void connectToTheGameServer(String addPort) {\n\t\tString[] add = addPort.split(\":\");\n\t\tString address = add[0];\n\t\tString port = add[1];\n\t\tInetAddress intaddr;\n\t\tSystem.out.println(\"connectToTheGameServer: @:\" + address + \", port:\" + port);\n\n\t\ttry {\n\t\t\tif(address.equals(\"127.0.0.1\")){\n\t\t\t\tintaddr = socket.getInetAddress();\n\t\t\t}else{\n\t\t\t\tintaddr = InetAddress.getByName(address);\n\t\t\t}\n\t\t\tthis.gameServerSocket = new Socket(intaddr, Integer.valueOf(port));\n\t\t\tSystem.out.println(\"connectToTheGameServer: connected\");\n\t\t\tClient.myState = Client.Current_state.client_client;\n\t\t\tClient.myRole = current_role.client;\n\t\t\tClient.myPlatforme = new Platforme();\n\t\t\tClient.sendMessagesToServer(Client.ok, osServ);\n\t\t\tClient.myPlatforme.show();\n\t\t\tif (Client.myPlatforme == null) {\n\t\t\t\tSystem.out.println(\"ici null\");\n\t\t\t}\n\t\t\tstartClientClientListener(gameServerSocket, false);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"client message: \" + e.getMessage().toString());\n\t\t}\n\t}", "private void joinGame(String server, int port, String playername) throws UnknownHostException, IOException, ClassNotFoundException, UnableToStartGameException\n\t{\n\t\tsocket = new Socket(server, port);\n\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\tObject object = objectInputStream.readObject();\n\t\t//Spielerid empfangen\n\t\tif (object instanceof ClientId)\n\t\t{\n\t\t\tClientId clientId = (ClientId) object;\n\t\t\tplayerId = clientId.getClientId();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new UnableToStartGameException(\"Konnte die Spielerid nicht empfangen.\");\n\t\t}\n\t\t\n\t\t//Dem Server unseren Namen mitteilen\n\t\tthis.objectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\tobjectOutputStream.writeObject(new PlayerName(playername, playerId));\n\t\t\n\t}", "public void login() {\r\n if (connected) {\r\n return;\r\n }\r\n try {\r\n sock = new Socket(\"localhost\", port);\r\n showStatus(\"CONNECTION DONE !!!\");\r\n reader = new BufferedReader(new InputStreamReader(sock.getInputStream()));\r\n writer = new PrintWriter(sock.getOutputStream(), true);\r\n } catch (IOException e) {\r\n System.err.println(e);\r\n }\r\n\r\n clientName = myText.getText();\r\n\r\n writer.println(\"? \" + clientName);\r\n connected = true;\r\n new Thread(new Runnable() {\r\n public void run() {\r\n String st;\r\n try {\r\n while (connected && ((st = reader.readLine()) != null)) {\r\n chat.append(st + \"\\n\");\r\n }\r\n } catch (IOException e) {\r\n showStatus(\"CONNECTION LOST !!!\");\r\n return;\r\n }\r\n }\r\n }).start();\r\n }", "public Reply login(String hostname) throws ThingsException, InterruptedException;", "public void connectToServer(String ip, int port2, String name) {\n\t\tserverIP = ip;\r\n\t\tport = port2;\r\n\t\tusername = name;\r\n\r\n\t\t// create socket\r\n\t\ttry {\r\n\t\t\tsocket = new Socket(InetAddress.getByName(serverIP), port);\r\n\r\n\t\t\tos = new DataOutputStream(socket.getOutputStream());\r\n\t\t\tis = new DataInputStream(socket.getInputStream());\r\n\t\t\t// this.os = new DataOutputStream(os);\r\n\t\t\t// this.is = new DataInputStream(is);\r\n\r\n\t\t\tthread = new Thread(this);\r\n\t\t\tthread.start(); // call run()\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "private void connectToServer() {\n\n try {\n this.socket = new Socket(InetAddress.getByName(serverIP), this.port);\n\n oos = new ObjectOutputStream(socket.getOutputStream());\n oos.flush();\n ois = new ObjectInputStream(socket.getInputStream());\n\n Message connectMessage = new Message(Message.CLIENT_CONNECT);\n connectMessage.setMessage(userName);\n sendToServer(connectMessage);\n\n Message message;\n while (true){// wait for welcome message\n message = (Message) ois.readObject();\n if(message != null && message.getType() == Message.WELCOME){\n handleMessage(message);\n break;\n }\n }\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public GameHandler(int serverPort, String ip, int caseNr, String hostName) {\n\t\tthis.serverPort = serverPort;\n\t\tthis.hostName = hostName;\n\t\tthis.caseNr = caseNr;\n\t\tthis.ip = ip;\n\t\t\n\t\texecutorService = Executors.newFixedThreadPool(1); // Lager et pool av threads for bruk\n\t\t\n\t\tconnect();\n\t\tcreateNewLobby();\n\t}", "public void start() {\n // set player number\n playerNumber = clientTUI.getInt(\"set player number (2-4):\");\n while (true) {\n try {\n game = new Game();\n game.setPlayerNumber(playerNumber - 1);\n host = this.clientTUI.getString(\"server IP address:\");\n port = this.clientTUI.getInt(\"server port number:\");\n clientName = this.clientTUI.getString(\"your name:\");\n player = clientTUI.getBoolean(\"are you human (or AI): (true/false)\") ?\n new HumanPlayer(clientName) : new ComputerPlayer(clientName);\n game.join(player);\n // initialize the game\n game.init();\n while (clientName.indexOf(' ') >= 0) {\n clientName = this.clientTUI.getString(\"re-input your name without space:\");\n }\n this.createConnection();\n this.sendJoin(clientName);\n this.handleJoin();\n if (handshake) {\n run();\n } else {\n if (!this.clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n } catch (ServerUnavailableException e) {\n clientTUI.showMessage(\"A ServerUnavailableException error occurred: \" + e.getMessage());\n if (!clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n }\n clientTUI.showMessage(\"Exiting...\");\n }", "public void startConnection(String ip, int port) {\n try {\n clientSocket = new Socket(ip, port);\n Debugger.logConnect(String.format(\"Client bind to IP:%s PORT:%d\",ip,port));\n out = new ObjectOutputStream(clientSocket.getOutputStream());\n in = new ObjectInputStream(clientSocket.getInputStream());\n this.gameLoop();\n }\n catch (IOException e)\n {\n Debugger.logError(e.getMessage());\n } catch (InterruptedException e) {\n Debugger.logError(e.getMessage());\n } catch (ClassNotFoundException e) {\n Debugger.logError(e.getMessage());\n }\n finally {\n\n }\n\n }", "private void loginClient() throws IOException {\n\t\tString instanceID = UUID.randomUUID().toString();\r\n\t\tString loginName = fromClient.readLine();\r\n\t\t\r\n\t\tif (clientTable.has(loginName)) {\r\n\t\t\tString password = fromClient.readLine();\r\n\t\t\t\r\n\t\t\tif (!clientTable.testPassword(loginName, password)) toClient.println(Commands.INVALID_PASSWORD);\r\n\t\t\telse {\r\n\t\t\t\tReport.behaviour(loginName + \" has connected\");\r\n\t\t\t\t\r\n\t\t\t\t//tells the client the connection was a success\r\n\t\t\t\ttoClient.println(Commands.CONNECTION_SUCCESS);\r\n\t\t\t\t\r\n\t\t\t\t//adds a running queue to the account\r\n\t\t\t\tclientTable.addQueue(loginName, instanceID);\r\n\t\t\t\t\r\n\t\t\t\t//create threads\r\n\t\t\t\tmakeThreads(loginName, instanceID);\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t\t//send error messages if the login was unsuccessful\r\n\t\telse toClient.println(Commands.USER_NOT_FOUND);\r\n\t}", "private boolean login() {\n\t\t// Now log in using this name.\n\n\t\tif(!option.equals(\"1\") && !option.equals(\"2\") && !option.equals(\"3\") && !option.equals(\"0\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tMessage loginMessage = Message.makeLoginMessage(userName,password,option);\n\t\ttry {\n\t\t\tsocketConnection = new SocketNB(hostName, portNum);\n\t\t\tsocketConnection.startIMConnection();\n\t\t} catch (IOException e) {\n\t\t\t// Report the error\n\t\t\tSystem.err.println(\"ERROR: Could not make a connection to: \" + hostName + \" at port \" + portNum);\n\t\t\tSystem.err.println(\n\t\t\t\t\t\" If the settings look correct and your machine is connected to the Internet, report this error to Dr. Jump\");\n\t\t\t// And print out the problem\n\t\t\te.printStackTrace();\n\t\t\t// Return that the connection could not be made.\n\t\t\treturn false;\n\t\t}\n\t\t// Send the message to log us into the system.\n\t\tsocketConnection.print(loginMessage);\n\t\t// Create the background thread that handles our incoming messages.\n\t\tworkerBee = new ScanForMessagesWorker(this, socketConnection);\n\t\t// Start the worker bee scanning for messages.\n\t\tworkerBee.execute();\n\t\t// Return that we were successful\n\t\treturn true;\n\t}", "public static void main(String[] args) throws IOException {\n // Get proper arguments and override defaults\n\n boolean isExit = false;\n Scanner scan = new Scanner( System.in );\n\n String username;\n int port;\n String serverAddress;\n\n switch( args.length ) {\n case 3:\n username = args[0];\n port = Integer.parseInt( args[1] );\n serverAddress = args[2];\n break;\n case 2:\n username = args[0];\n port = Integer.parseInt( args[1] );\n serverAddress = \"localhost\";\n break;\n case 1:\n username = args[0];\n port = 1500;\n serverAddress = \"localhost\";\n break;\n default:\n username = \"Anonymous\";\n port = 1500;\n serverAddress = \"localhost\";\n }\n\n String hostname;\n\n // Create your client and start it\n ChatClient client = new ChatClient( serverAddress, port, username );\n //ChatClient client = new ChatClient(\"localhost\", 1500, \"CS 180 Student\");\n boolean serverStart = client.start();\n\n // Send an empty message to the server\n if ( !serverStart || !client.socket.isConnected() ) {\n System.out.print(\"\");\n isExit = true;\n } else {\n try {\n client.sendMessage(new ChatMessage( \"just joined\", 0, null));\n } catch ( SocketException ignored) {\n isExit = true;\n }\n }\n //client.sOutput.flush();\n //client.sendMessage( new ChatMessage( \"yeet\", 0 ));\n\n while ( !isExit ) {\n String message = scan.nextLine();\n\n if ( message.toLowerCase().contains( \"/logout\" ) ) {\n client.sendMessage(new ChatMessage(message, 1, null));\n try {\n client.sOutput.close();\n client.sInput.close();\n isExit = true;\n System.out.println(\"You have been successfully logged out.\");\n //client.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if ( message.contains( \"/msg\" ) ) {\n String[] msg = message.split(\" \");\n String privateMessage = \"\";\n for ( int i = 2; i < msg.length; i++ ) {\n privateMessage = privateMessage + msg[i] + \" \";\n }\n client.sendMessage( new ChatMessage( privateMessage , 2, msg[1] ));\n } else if ( message.contains( \"/list\" ) ) {\n client.sendMessage( new ChatMessage( null, 3, null ));\n } else {\n client.sendMessage( new ChatMessage( message, 0 , null) );\n }\n }\n\n //BufferedReader userInputReader = new BufferedReader( new InputStreamReader( client.socket.getInputStream() ));\n //String message = userInputReader.readLine();\n //client.sendMessage( new ChatMessage( message, 0));\n\n }", "public void start() throws LoginFailedException {\n\t\ttry {\n\t\t\tServerSocket socket = new ServerSocket(0, 0, InetAddress.getByName(\"192.168.1.122\"));\n\t\t\tInetAddress address = socket.getInetAddress();\n\t\t\tint port = socket.getLocalPort();\n\n\t\t\t/* ServerSocket opened just to get free port */\n\t\t\tsocket.close();\n\n\t\t\tBindings bindings = new Bindings().addAddress(address);\n\t\t\tpeer = new PeerBuilderDHT(new PeerBuilder(new Number160(random)).bindings(bindings).ports(port).start()).start();\n\t\t\tSystem.out.println(\"Created peer with ID: \" + peer.peerID().toString());\n\n\t\t\t/* Specifies what to do when message is received */\n\t\t\tpeer.peer().objectDataReply(new ObjectDataReply() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic Object reply(PeerAddress sender, Object request) throws Exception {\n\t\t\t\t\tif (request instanceof String) {\n\t\t\t\t\t\tString payload = (String) request;\n\t\t\t\t\t\tint notaryAndIDSeparatorIndex = payload.indexOf(\"_\");\n\t\t\t\t\t\tint idAndUsernameSeparatorIndex = payload.indexOf(\"_\", notaryAndIDSeparatorIndex+1);\n\t\t\t\t\t\tint usernameAndMessageSeparatorIndex = payload.lastIndexOf(\"_\");\n\t\t\t\t\t\tif (notaryAndIDSeparatorIndex > 0 && idAndUsernameSeparatorIndex > 0 && usernameAndMessageSeparatorIndex > 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tString notary = payload.substring(0, notaryAndIDSeparatorIndex);\n\t\t\t\t\t\t\t\tboolean isSigned = false;\n\t\t\t\t\t\t\t\tif(notary.compareTo(\"0\") == 0) {\n\t\t\t\t\t\t\t\t\tisSigned = false;\n\t\t\t\t\t\t\t\t} else if (notary.compareTo(\"1\") == 0) {\n\t\t\t\t\t\t\t\t\tisSigned = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(delegate != null) {\n\t\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tString messageIDStr = payload.substring(notaryAndIDSeparatorIndex + 1, idAndUsernameSeparatorIndex);\n\t\t\t\t\t\t\t\tlong messageID = Long.parseLong(messageIDStr);\n\t\t\t\t\t\t\t\tString username = payload.substring(idAndUsernameSeparatorIndex+1, usernameAndMessageSeparatorIndex);\n\t\t\t\t\t\t\t\tString message = payload.substring(usernameAndMessageSeparatorIndex+1, payload.length());\n\n\t\t\t\t\t\t\t\tMessage messageObj = new Message();\n\t\t\t\t\t\t\t\tmessageObj.setMessage(message);\n\t\t\t\t\t\t\t\tmessageObj.setNotary(isSigned);\n\t\t\t\t\t\t\t\tContact contact = new Contact(username);\n\t\t\t\t\t\t\t\tMessageResult result = new MessageResult(messageID);\n\n\t\t\t\t\t\t\t\tFutureDirect ackMessage = peer.peer().sendDirect(sender).object(\"ack_\" + messageID).start();\n\t\t\t\t\t\t\t\tackMessage.addListener(new BaseFutureAdapter<FutureDirect>() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void operationComplete(FutureDirect future) throws Exception {\n\t\t\t\t\t\t\t\t\t\tif (future.isSuccess()) {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Successfully acknowledged incoming message!\");\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Failed to acknowledge incoming message!\");\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Reason is: \" + future.failedReason());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(messageObj, contact, result, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\t\t\tSystem.err.println(\"Failed casting message ID to long!\");\n\t\t\t\t\t\t\t\tnfe.printStackTrace();\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (payload.startsWith(\"ack\") && payload.indexOf(\"_\") > 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tString messageIDStr = payload.substring(payload.indexOf(\"_\")+1, payload.length());\n\t\t\t\t\t\t\t\tlong messageID = Long.parseLong(messageIDStr);\n\t\t\t\t\t\t\t\tMessageResult result = new MessageResult(messageID);\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveAck(result, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\t\t\tSystem.err.println(\"Failed casting message ID to long!\");\n\t\t\t\t\t\t\t\tnfe.printStackTrace();\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveAck(null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if(payload.compareTo(\"ping\") == 0) {\n\t\t\t\t\t\t\tFutureDirect pingACKMessage = peer.peer().sendDirect(sender).object(\"pingACK_\" + peerInfo.getUsername()).start();\n\t\t\t\t\t\t\tpingACKMessage.addListener(new BaseFutureAdapter<FutureDirect>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void operationComplete(FutureDirect future) throws Exception {\n\t\t\t\t\t\t\t\t\tif (future.isFailed()) {\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Failed to send ping ACK!\");\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Reason is: \" + future.failedReason());\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Successfully sent ping ACK message!\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if(payload.startsWith(\"pingACK_\")) {\n\t\t\t\t\t\t\tString username = payload.substring(payload.indexOf(\"_\") + 1, payload.length());\n\t\t\t\t\t\t\tContact contact = new Contact(username);\n\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\tdelegate.didUpdateOnlineStatus(contact, true, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t delegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpeerInfo.setInetAddress(address);\n\t\t\tpeerInfo.setPort(port);\n\t\t\tpeerInfo.setPeerAddress(peer.peerAddress());\n\n\t\t\tSystem.out.println(\"Client peer started on IP \" + address + \" on port \" + port);\n\t\t\tSystem.out.println(\"Bootstrapping peer...\");\n\t\t\tbootstrap();\n\t\t} catch (IOException ie) {\n\t\t\tie.printStackTrace();\n\n\t\t\tif (delegate != null) {\n\t\t\t\tdelegate.didLogin(null, P2PLoginError.SOCKET_OPEN_ERROR);\n\t\t\t}\n\t\t}\n\t}", "protected boolean verifyLogin(String username, String password){\n ServerSocket ss = null;\n Socket s = null;\n try {\n s = new Socket(\"123.56.4.12\", 8080);\n\n InputStream is = s.getInputStream();\n DataInputStream dis = new DataInputStream(is);\n\n OutputStream os = s.getOutputStream();\n DataOutputStream dos = new DataOutputStream(os);\n\n dos.writeUTF(username);\n dos.writeUTF(password);\n\n String info = dis.readUTF();\n if (info.equals(\"True\")){\n return true;\n } else {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"提示\");\n builder.setMessage(\"密码错误或找不到此用户\");\n builder.setPositiveButton(\"确认\", null);\n builder.show();\n return false;\n }\n } catch (Exception e) {\n e.printStackTrace();\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"提示\");\n builder.setMessage(\"连接失败\");\n builder.setPositiveButton(\"确认\", null);\n builder.show();\n return false;\n } finally {\n try {\n if (s != null) s.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }\n }", "private boolean joinGame() throws RemoteException{\n\t\tgui.showLoginWindow(playerDetails);\n\n\t\twhile(!gui.isUserDataAvailable()){\n\t\t\t// wait for user to enter details\n\t\t\tDebug.log(\"MainMenu\", \"waiting for player details\");\n\t\t\ttry{\n\t\t\t\tThread.sleep(1000);\n\t\t\t}catch(InterruptedException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\t\t}\n\t\tplayerDetails = gui.getPlayerDetails();\n\t\tDebug.log(\"MainMenu\", \"player details received!\");\n\n\t\tif(playerDetails == null) quitGame(false); // quit if player declined/cancelled to enter details\n\n\t\t/* Get preferred position */\n\t\tpreferredPosition = gui.getPreferredPosition();\n\n\t\t/* Register this client as Callback */\n\t\treturn server.connect(this, myHost, myPort, preferredPosition, false, playerDetails.getFirstName(), playerDetails.getSurname(),\n\t\t\t\tplayerDetails.getAddress(), playerDetails.getPhone(), playerDetails.getUsername(), playerDetails.getPassword());\n\t}", "void connectToServer(String serverName, int serverPort){\n try{\n this.socket = new Socket(serverName, serverPort);\n } catch(IOException e){\n e.printStackTrace();\n }\n \n }", "private boolean start() {\n // Create a socket\n try {\n socket = new Socket(server, port);\n } catch (IOException e) {\n System.out.println( \"Don't try to connect before the server starts!\");\n return false;\n //e.printStackTrace();\n }\n\n // Create your input and output streams\n try {\n sInput = new ObjectInputStream(socket.getInputStream());\n sOutput = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // This thread will listen from the server for incoming messages\n Runnable r = new ListenFromServer();\n Thread t = new Thread(r);\n t.start();\n\n // After starting, send the clients username to the server.\n try {\n sOutput.writeObject(username);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return true;\n }", "public boolean start() {\n\t\ttry {\n\t\t\tsocket = new Socket(server, port);\n\t\t} \n\t\t\n\t\tcatch(Exception ec) {\n\t\t\tdisplay(\"Bląd podczas łaczenia z serwerem:\" + ec);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString msg = \"Połączono \" + socket.getInetAddress() + \":\" + socket.getPort();//popatrzyc\n\t\tdisplay(msg);\n\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tinput = new ObjectInputStream(socket.getInputStream());\n\t\t\toutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception creating new Input/output Streams: \" + eIO);\n\t\t\treturn false;\n\t\t}\n\n\t\t\n\t\tnew ListenFromServer().start();\n\t\t\n\t\ttry\n\t\t{\n\t\t\toutput.writeObject(username);\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception doing login : \" + eIO);\n\t\t\tdisconnect();\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\n\t}", "public PeerToPeerConnection(GameController controller, String ip, int port){\n this.controller = controller;\n this.ip = ip;\n this.port = port;\n clientID = \"ConnectingClient\";\n isHost = false;\n System.out.println(\"PeerToPeerConnection: Constructor: ConnectingClient\");\n }", "public void start()\r\n {\r\n System.out.print(\"Server host? [localhost]: \");\r\n String host = scanner.nextLine().trim();\r\n if(host.length() == 0)\r\n {\r\n host = \"localhost\";\r\n }\r\n \r\n System.out.print(\"Server port? [2345]: \");\r\n String portString = scanner.nextLine().trim();\r\n if(portString.length() == 0)\r\n {\r\n portString = \"2345\";\r\n }\r\n int port = Integer.parseInt(portString);\r\n //trying to establish connection through the socket\r\n try(Socket socket = new Socket(host, port))\r\n {\r\n //creating i/o streams\r\n outputStream = new ObjectOutputStream(socket.getOutputStream());\r\n HelloRequest request = new HelloRequest();\r\n request.setName(\"world\");\r\n outputStream.writeObject(request);\r\n inputStream = new ObjectInputStream(socket.getInputStream());\r\n inputStream.readObject();\r\n System.out.println(\"Server connected.\");\r\n \r\n // login.\r\n while(!this.login())\r\n {\r\n ;\r\n }\r\n \r\n // Executing users input\r\n options:\r\n while(true)\r\n {\r\n try\r\n {\r\n int option = this.readOption(\"1. Create a game 2. Set commands 3. Get high scores 4. Delete a game 5. Start a game 6. Show a game 7. Logout : \", 1, 7);\r\n switch(option)\r\n {\r\n case 1: this.createGame(); break;\r\n case 2: this.setCommands(); break;\r\n case 3: this.getHighScores(); break;\r\n case 4: this.deleteGame(); break;\r\n case 5: this.startGame(); break;\r\n case 6: this.showGame(); break;\r\n case 7: this.logout(); break options;\r\n }\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }catch(Exception e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n }", "@Override\n public void initClient(final String hostName, final String serverAddr, \n final int serverPort) {\n final GameBoard gameBoard = new GameBoard(Controller.DEFAULT_GRID_SIZE);\n gameBoard.setVisible(true);\n gameBoard.toConsole(\"Hello \" + hostName);\n gameBoard.toConsole(\"Connecting to server...\");\n \n SwingWorker socketWorker = new SwingWorker<Socket, Integer>() {\n\n @Override\n protected Socket doInBackground() throws Exception {\n \n Socket socket = null;\n try {\n //attempt to connect to the server\n socket = new Socket(serverAddr, serverPort);\n \n gameBoard.toConsole(\"Connection successful!!\");\n gameBoard.toConsole(\"Waiting for opponent...\");\n \n /* Open an input stream to read messages from the server.\n * If we are the first of two players attempting a connection\n * then we will get two messages from the server - one to \n * let us know the server is waiting for an opponent and \n * another to let us know two clients are connected. There\n * is also the possibility that the \n */\n \n DataInputStream in = new DataInputStream(socket.getInputStream());\n \n int messageCode = in.readInt();\n String controlFlag = Controller.GO_SECOND;\n \n if(messageCode == WAITING_CODE) {\n gameBoard.toConsole(\"Waiting for opponent...\");\n messageCode = in.readInt();\n controlFlag = Controller.GO_FIRST;\n }\n\n if(messageCode == ALL_OPPONENTS_READY) {\n \n new Controller(hostName, controlFlag, socket, gameBoard);\n }\n else if(messageCode == ERROR_CODE){\n //get the error message\n gameBoard.toConsole(in.readUTF());\n }\n \n }\n catch(UnknownHostException e) {\n gameBoard.toConsole(e.toString());\n }\n catch(IOException e) {\n System.out.println(e);\n }\n \n return socket;\n }\n \n };\n \n socketWorker.execute();\n \n }", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "public boolean start() {\n\t\t\n\t\t// Try to connect to the server\n\t\t\n\t\ttry {\n\t\t\tsocket = new Socket(server, port);\n\t\t}\n\t\t\n\t\t// If failed can only display the error\n\t\t\n\t\tcatch(Exception ec) {\n\t\t\tdisplay(\"Error connectiong to server:\" + ec);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString msg = \"Connection accepted \" + socket.getInetAddress() + \" : \" + socket.getPort();\n\t\tdisplay(msg);\n\t\n\t\t// Creating I/O data streams\n\t\t\n\t\ttry\n\t\t{\n\t\t\tsInput = new ObjectInputStream(socket.getInputStream());\n\t\t\tsOutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception creating new Input/output Streams: \" + eIO);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Creates Server listener Thread \n\t\t\n\t\tnew ListenFromServer().start();\n\t\t\n\t\t// Send username to the server as a string - all chat messages will be sent as objects\n\t\t\n\t\ttry {\n\t\t\tsOutput.writeObject(username);\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception during login : \" + eIO);\n\t\t\tdisconnect();\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // Inform caller it worked\n\t}", "private void connectToCS(int port, String host)throws Exception{\n socket = new Socket(host, port);\n inStream = new PDUInputStream(socket.getInputStream());\n outStream = new PDUOutputStream(socket.getOutputStream());\n\n PduJoin join = new PduJoin(nickName);\n outStream.writeToServer(join.getByteArray());\n\n chatCS();\n }", "Client(String server, int port, String username, ClientGUI cg) {\n\t\tthis.server = server;\n\t\tthis.port = port;\n\t\tthis.username = username;\n\t\tthis.cg = cg; // Saved if in GUI mode or not\n\t}", "private boolean start() {\n // Create a socket\n try {\n socket = new Socket(server, port);\n } catch (IOException e) {\n //e.printStackTrace();\n System.out.println(\"Could not connect. Server is not on!\");\n return false;\n }\n\n // Attempt to create output stream\n try {\n sOutput = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n // Attempt to create input stream\n try {\n sInput = new ObjectInputStream(socket.getInputStream());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n // Create client thread to listen from the server for incoming messages\n Runnable r = new ListenFromServer();\n Thread t = new Thread(r);\n t.start();\n\n // After starting, send the clients username to the server.\n try {\n sOutput.writeObject(username);\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n\n return true;\n }", "public void connexionServeur() {\r\n\r\n\t\tString serverIp = JOptionPane\r\n\t\t\t\t.showInputDialog(\"Entrez le nom du serveur.\");\r\n\t\ttry {\r\n\t\t\tsocket = new Socket(serverIp, 4456);\r\n\t\t\tlogger.info(\"Connexion au socket serveur.\");\r\n\r\n\t\t\tThread t = new Thread(new EnvoiPresence(socket));\r\n\t\t\tt.start();\r\n\r\n\t\t\tThread t2 = new Thread(new ReceptionListUser(socket, mainView));\r\n\t\t\tt2.start();\r\n\r\n\t\t} catch (ConnectException e) {\r\n\t\t\tJOptionPane.showMessageDialog(new Frame(),\r\n\t\t\t\t\t\"Le serveur Draw Me An Idea n'est pas lancé\", \"Erreur\", 1);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (UnknownHostException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void connectToServerPVP() {\n\n\t\ttry \n\t\t{\n\t\t\tSocket socket = new Socket(host, 8001);\n\t\t\tfromServer = new DataInputStream(socket.getInputStream());\n\t\t\ttoServer = new DataOutputStream(socket.getOutputStream());\n\n\t\t\ttoServer.writeInt(vsPLAYER);\n\n\t\t} catch (IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tThread thread = new Thread(new clientHandlingPlayer(fromServer, toServer));\n\t\tthread.start();\n\t}", "protected abstract void createLogin(Socket socket);", "public boolean startClient(OnlineScene game) {\n InetSocketAddress hostAddress = new InetSocketAddress(Client.address, port);\n try {\n client = SocketChannel.open(hostAddress);\n client.configureBlocking(true);\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n name = Scene.userInfo != null ? Scene.userInfo.getUserID() : UIHandler.username;\n\n log(\"started\");\n this.game = game;\n\n startThreads();\n sendRegisterMessage();\n return true;\n }", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "public ClientConsole(String loginID, String host, int port) {\n internalLoginID = loginID;\n internalHost = host;\n internalPort = port;\n try {\n client = new ChatClient(loginID, host, port, this);\n System.out.println(loginID + \" has logged on.\");\n } catch (IOException exception) {\n System.out.println(\"Error: Can't open connection. Awaiting Command\");\n }\n }", "void startAIGame() {\n int status = gameServer.restartServer( true, settingsMenu.getMapSize(),\n settingsMenu.getPlayFor(), settingsMenu.getFirstMove(),\n settingsMenu.getServerName() );\n if( status != 0 ) {\n JOptionPane.showMessageDialog( frame, Language.ERROR_STARTUP,\n Language.CAPTION_ERROR, JOptionPane.PLAIN_MESSAGE );\n } else {\n host = \"127.0.0.1\";\n role = \"admin\";\n password = gameServer.getServerPassword();\n ( new Thread( this ) ).start();\n }\n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "Client(String server, int port, String username, ClientGUI clientgui) {\n\t\tthis.server = server;\n\t\tthis.port = port;\n\t\tthis.username = username;\n\t\tthis.clientGui = clientgui;\n\t}", "private void connect()\r\n\t{\r\n\t\tString remoteHostName = txtComputerName.getText();\r\n\t\tint remoteHostPort = Integer.parseInt(txtPort.getText());\r\n\t\tif (remoteHostName == null || remoteHostName.equals(\"\"))\r\n\t\t{\r\n\t\t\twriteLine(\"Enter a Computer Name\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (remoteHostPort <= 0)\r\n\t\t\t{\r\n\t\t\t\twriteLine(\"Enter a Port\", 0);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// we can now connect\r\n\t\t\t\t// set our cursor to notify the user that they might need to\r\n\t\t\t\t// wait\r\n\t\t\t\twriteLine(\"Connecting to: \" + remoteHostName + \" : \"\r\n\t\t\t\t\t\t+ remoteHostPort, 0);\r\n\t\t\t\tthis.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t\t\t\t// lets try to connect to the remote server\r\n\r\n\t\t\t\ttheSocket = new CommSocket(remoteHostName, remoteHostPort);\r\n\r\n\t\t\t\tif (theSocket.connect())\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\r\n\t\t\t\t\t\t\t\"We are successfuly connected to: \"\r\n\t\t\t\t\t\t\t\t\t+ theSocket.getRemoteHostIP(), 0);\r\n\t\t\t\t\twriteLine(\"On Port: \" + theSocket.getRemoteHostPort(), 0);\r\n\t\t\t\t\trunning = true;\r\n\t\t\t\t\t// socketListener();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\"We failed to connect!\", 0);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.setCursor(Cursor\r\n\t\t\t\t\t\t.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void runServer()\n\t{\n\t\tif(sm == null)\n\t\t{\n\t\t\tsm = new ServerManager();\n\t\t}\n\t\t\n\t\tint port = 1209;\n\t\ttry \n\t\t{\n\t\t\twaitUser(sm, port);\n\t\t\t//이 아래 로직이 실행된다는건 유저가 다 들어왔다는 뜻임. 즉 게임 시작할 준비 되었음을 의미함\t\t\t\n\t\t\tGame.getInstance().runGame();\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[Server.runServer()] error >>> : \" + e.getMessage());\n\t\t}\n\t}", "ServerClient(ChatServer serv, Socket cl, String user){\n this.server = serv;\n this.client = cl;\n this.username = user;\n this.clientConnected = true;\n this.room = serv.name;\n }", "private void login(){\n out.println(\"Enter player name: \");\n player = new Player(in.nextLine());\n game.addPlayerObject(player);\n out.println(\"Player name set to: \" + player.getName() + \"\\r\\n\");\n\n game.incrementPlayersConnected();\n\n login = true;\n }", "public static void main(String uname) throws Exception {\r\n\t\tString ipusername= uname; //variable to store user name\r\n\t Conn(\"127.0.0.1\",5000,ipusername); //Function call to connect to server via socket\r\n\t \r\n\t\t}", "void login() {\r\n\t\t// to show the window and the data input\r\n\t\td = new Dialog(f, true);\r\n\t\thost = new TextField(10);\r\n\t\ttf_name = new TextField(10);\r\n\t\td.setLayout(new GridLayout(3, 2));\r\n\t\td.add(new Label(\"host:\"));\r\n\t\td.add(host);\r\n\t\td.add(new Label(\"name:\"));\r\n\t\td.add(tf_name);\r\n\t\tButton b = new Button(\"OK\");\r\n\t\tb.addActionListener(new ActionListener() {\r\n\t\t\t// if the input is ended, then use the realLogin method to login the server\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\trealLogin(host.getText(), tf_name.getText());\r\n\t\t\t\td.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\td.add(b);\r\n\t\td.setResizable(true);\r\n\t\td.setSize(200, 150);\r\n\t\td.show();\r\n\t\t(new Thread(this)).start();\r\n\t}", "public void connect(String host, int port, String name) {\r\n Socket socket;\r\n try {\r\n socket = new Socket(host, port);\r\n } catch (IOException e) {\r\n System.err.println(\"Cannot connect to \" + host + \":\" + port);\r\n return;\r\n }\r\n try {\r\n this.name = name;\r\n connection = new Connection(socket, name, this);\r\n connection.start();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n addressQueryFrame.setVisible(false);\r\n menuFrame.setVisible(false);\r\n lobbyFrame.setVisible(true);\r\n lobbyFrame.setTitle(host);\r\n }", "public void startConnection(){\n EditText editText = (EditText) findViewById(R.id.ipAddress);\n final String ipAddress = editText.getText().toString();\n new Thread(new Runnable() {\n public void run() {\n try {\n System.out.println(ipAddress);\n Socket client = new Socket(ipAddress, 5000);\n System.out.println(\"connected\");\n OutputStream outToServer = client.getOutputStream();\n DataOutputStream out = new DataOutputStream(outToServer);\n EditText userNameText = (EditText) findViewById(R.id.UserName);\n final String userName = userNameText.getText().toString();\n out.writeUTF(userName);\n InputStream inFromServer = client.getInputStream();\n BufferedReader in = new BufferedReader(new InputStreamReader(inFromServer));\n SocketSingleton.setSocket(client);\n while (!in.ready()) {\n String readline = in.readLine();\n System.out.println(readline);\n if (\"success\".equals(readline)){\n Intent intent = new Intent(ConnectToComputer.this, RemoteActivity.class);\n startActivity(intent);\n } else {\n System.out.println(in.readLine());\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }).start();\n }", "public void connectToClientAndServer(String host, int port) throws InterruptedException, IOException {\n final int timeout = 1000;\n Socket socket = new Socket();\n socket.connect(new InetSocketAddress(host, port), timeout);\n this.inputQueue = new LinkedBlockingQueue<String>();\n this.outputQueue = new LinkedBlockingQueue<String>();\n ClientMessagePassingThread messagePassingThread = new ClientMessagePassingThread(socket, inputQueue , outputQueue); \n Thread t = new Thread(messagePassingThread); \n t.start(); \n \n String myBoardName = \"myboardname=\"+board.getName();\n outputQueue.put(myBoardName);\n for (PortalInfo portal : board.getPortalInfo()){\n String portalContained = \"portal name=\"+portal.name()+\" x=\"+portal.x()+\" y=\"+portal.y();\n outputQueue.put(portalContained);\n }\n this.isConnectedToClientServer = true;\n board.connectToClientServer();\n }", "public SimpleGUI(String p_host, String p_name) {\r\n super();\r\n initialize();\r\n int porti=1099;\r\n String adresa=\"192.165.43.195\"; \r\n try\r\n {\r\n this.rem = (ServerInterface)Naming.lookup(\"rmi://\"+adresa+\":\"+porti+\"/RMD\");\r\n \t\r\n this.id = rem.EnterGame(p_name);\r\n System.out.println(\"Your id is : \"+ id);\r\n \t\r\n if(id == 0)\r\n {\r\n System.out.println(\"Max Connection reached\");\r\n \t\r\n }\r\n else\r\n {\r\n this.name = rem.getName(id);\r\n this.setTitle(\"Welcome \" + name);\r\n \t\r\n GiveCards();\r\n \t\r\n }\r\n \r\n }\r\n catch (MalformedURLException e)\r\n {\r\n System.err.println(\"MalformedURLException: \"+e.getMessage());\r\n }\r\n catch (RemoteException e)\r\n {\r\n System.err.println(\"RemoteException: \" + e.getMessage());\r\n }\r\n catch (NotBoundException e)\r\n {\r\n System.err.println(\"NotBoundException: \"+e.getMessage());\r\n }\r\n }", "public void initiateContact(){\n try{\n clientSocket = new Socket(hostName, portNumber); \n inFromUser = new BufferedReader(new InputStreamReader(System.in)); \n outToServer = new DataOutputStream(clientSocket.getOutputStream()); \n inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); \n }catch(IOException e){\n System.err.println(\"Caught IOException in initiateContact: \" + e.getMessage());\n }\n }", "public ServerGame(int port)\r\n\t{\r\n\t\tsuper(NetworkMode.SERVER);\r\n\t\tserver = new Server(port, getWorld());\r\n\t}", "private void connectToServer() {\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Attempting connection to server at port: 5555\");\n\t\t\tsocket = new Socket(\"localhost\", 5554);\n\t\t\tSystem.out.println(\"Connected to server at port: 5555\");\n\n\t\t\tobjectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\t\t\n\t\t\t// sending client object to server\n\t\t\tobjectOutputStream.writeInt(Main.getUser().getUserId());\n\t\t\tobjectOutputStream.flush();\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }", "public void onClick(View arg0) {\n\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString ip = serverip.getText().toString();\n\t\t\t\t\t\tString port1 = port.getText().toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\t soc1 = new SocketC(getApplicationContext(),ip,port1);\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t Intent i1 = new Intent(SolveIt.this, Login.class);\n\t\t\t\t\t\t i1.putExtra(\"ipaddress\", ip);\n\t\t\t\t\t\t i1.putExtra(\"portnumber\", port1);\n\t\t\t\t\t\t startActivity(i1);\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tToast.makeText(SolveIt.this,\"Server Not available\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t}", "public void run() {\n try {\n \n // Input reader (from client)\n this.in = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));\n \n // Output printer (to client)\n this.out = new PrintWriter(this.socket.getOutputStream(), true);\n \n /**\n * First, send a login request command REQUESTLOGIN\n * continuously to client until login data has been received.\n */\n while(true) {\n out.println(\"LOGINREQUEST\");\n this.request = in.readLine();\n \n // If no login data is received, keep reading inputs\n if (request == null) {\n return;\n }\n \n System.out.println(request);\n \n // Split incoming message\n this.args = this.request.split(\" \");\n \n // If client is attempting to register a new user REGISTER <username> <password>\n if(this.request.startsWith(\"REGISTER\")) {\n \n /**\n * Arguments\n * \n * args[0] = REGISTER\n * args[1] = username\n * args[2] = password\n */\n \n // Register username if not already taken.\n if(!userHandler.usernameTaken(args[1])) {\n userHandler.newUser(args[1], args[2]);\n out.println(\"REGISTERACCEPTED\");\n } else {\n out.println(\"ALREADYEXISTS\");\n }\n }\n \n // If client is attempting to log in with LOGIN <username> <password>\n if(this.request.startsWith(\"LOGIN\") && args.length == 3) {\n \n this.username = args[1].toLowerCase();\n this.password = args[2];\n \n // Attempt to authenticate user. Make sure the users list is used synchronously\n synchronized(users) {\n if(userHandler.authenticateUser(username, password)) {\n if(!users.contains(username)) {\n users.add(username);\n break;\n } else {\n out.println(\"ALREADYLOGGEDIN\");\n }\n } else {\n out.println(\"LOGINDENIED\");\n }\n }\n \n }\n }\n \n // Report back to client that login authentication succeeded.\n this.out.println(\"LOGINACCEPTED\");\n writers.add(out);\n \n /**\n * Handle incoming chat messages from client and\n * broadcast them to every connected client.\n */\n while(true) {\n this.request = in.readLine();\n \n // Skip if no request\n if(request == null) {\n continue;\n }\n \n // Split request into arguments\n this.args = request.split(\" \");\n \n // If this is a MESSAGE request from client, broadcast to everyone in chat\n if(this.request.startsWith(\"MESSAGE\") && this.args.length >= 2) {\n \n for(PrintWriter writer : writers) {\n writer.println(\"MESSAGE \" + this.username + \" \" + this.request.substring(\"MESSAGE \".length()));\n }\n \n // Write chat to file\n FileWriter fw = new FileWriter(\"chatlog.dat\", true);\n fw.write(this.username + \": \" + this.request.substring(\"MESSAGE \".length()) + \"\\n\");\n fw.close();\n }\n \n // Manual logout from client\n if(this.request.startsWith(\"LOGOUT\")) {\n \n // Remove username from users list\n if(this.username != null) {\n users.remove(this.username);\n }\n \n // Remove client from writers list\n if(this.out != null) {\n writers.remove(this.out);\n }\n \n // Close socket with client\n try {\n this.socket.close();\n } catch (IOException e) {\n System.out.println(\"Error closing socket for \" + username + \": \" + e);\n }\n }\n \n }\n \n } catch (IOException e) {\n System.out.println(e);\n } finally {\n \n /**\n * Cleanup when the client is disconnected.\n */\n \n // Remove username from users list\n if(username != null) {\n users.remove(this.username);\n }\n \n // Remove client from writers list\n if(out != null) {\n writers.remove(this.out);\n }\n \n // Close socket with client\n try {\n socket.close();\n } catch (IOException e) {\n System.out.println(\"Error closing socket for \" + username + \": \" + e);\n }\n }\n }", "public String login(Request req, Response res) {\n String body = req.body();\n ServerResponse err = ValidationUtil.validateBody(body);\n\n // Return on error\n if (err != null) {\n res.status(400);\n return JsonUtil.stringify(err);\n }\n\n // parse request body\n JsonObject bodyJson = JsonUtil.parse(body);\n\n // get name from body\n String name = bodyJson.getString(COM_NAME);\n\n // check if user already logged in, if yes, return with error message\n for (User user : model.getAvailableUser()) {\n if (user.getName().equals(name) && user.getStatus()) {\n res.status(400);\n return JsonUtil.stringify(new ServerResponse(FAILURE, \"Already logged in\"));\n }\n }\n\n // set user online and save ip\n User currentUser = editor.haveUser(name, req.ip());\n chatSocket.sendUserJoined(currentUser);\n\n // Save currentUser\n ResourceManager.saveServerUsers(currentUser);\n\n // send response that everything went fine\n res.status(200);\n return JsonUtil.stringify(new ServerResponse(SUCCESS, JsonUtil.buildOkLogin()));\n }", "public void connectGameServer()\n {\n try {\n GameServerConnection.getInstance().connect();\n }\n catch (Exception e)\n {\n btnCheckHistory.setDisable(true);\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Game server\");\n\n // Header Text: null\n alert.setHeaderText(\"connection error\");\n alert.setContentText(\"Couldn't connect to the game server. \\nLobbys can be created but you cannot play or retrieve games.\");\n\n alert.showAndWait();\n }\n }", "public String login(String name) {\n // Check if name is longer than 0 characters\n if (name.length() > 0) {\n if (!connected) {\n connect(serverIP, serverPort);\n }\n\n if(connected) {\n try {\n write(\"login \" + name);\n } catch (IOException e) {\n System.out.println(\"No connecting with server:login\");\n }\n System.out.println(\"Logged in\");\n return \"ok\"; // Valid name\n } else {\n return \"connection\";\n }\n }\n return \"short\"; // Invalid name -- To short\n //return \"inUse\"; // Invalid name -- Already in use\n\n // // Check if name is longer than 0 characters\n // if (!connected) {\n // connect();\n // }\n // if (name.length() > 0) {\n // try {\n // write(\"login \" + name);\n // } catch (IOException e) {\n // System.out.println(\"No connecting with server:login\");\n // }\n // System.out.println(\"Logged in\");\n // return \"ok\"; // Valid name\n // }\n // return \"short\"; // Invalid name -- To short\n // //return \"inUse\"; // Invalid name -- Already in use\n }", "public ConnectToServerGUI(ClientGUI cg, String serverName, int port, String IPAddress) {\n this();\n if (serverName != null) {\n this.serverName = serverName;\n }\n if (IPAddress != null) {\n this.IPAddress = IPAddress;\n }\n if (port != -1) {\n this.port = port;\n }\n this.cg = cg;\n \n if (port == -1) port = 1500;\n\n serverNameField.setText(serverName);\n IPField.setText(this.IPAddress);\n portField.setText(port + \"\");\n \n \n this.addWindowListener(new WindowAdapter()\n {\n @Override\n public void windowClosing(WindowEvent e)\n {\n e.getWindow().setVisible(false);\n }\n });\n }", "public void listen(){\n \ttry{ \t\t\n \t\twhile(true){\n \t \t\tSocket socket = server.accept();\n \t \t\tString nickname = new String(\"Guest_\" + String.valueOf(nextId));\n \t \t\t\n \t \t\t// Create a server connection and connect it to the appropriate user.\n \t \t\tServerConnection userConnection = new ServerConnection(nextId, socket, this);\n \t \t\tUser user = new User(nextId, nickname, userConnection);\n \t \t\tuserConnection.setUser(user);\n \t \t\t\n \t \t\tsynchronized(userMap){\n \t \t\t\tuserMap.put(nextId, user);\n \t \t\t}\n \t \t\t// Send a response that connection was successful;\n \t \t\tuserConnection.sendMessage(new Message(Command.REPLY_SUCCESS, \"\", Calendar.getInstance(), \"\"));\n \t \t\t\n \t \t\tnextId++;\n \t\t}\n \t}\n \tcatch(IOException e){\n \t\te.printStackTrace();\n \t}\n }", "public boolean login(String user, String pwd){\n\t\ttry\n\t\t{\n\t\t\tCryptoHelper ch = new CryptoHelper();\n\t\t\tMessageDigest msgDigest = MessageDigest.getInstance(\"SHA-256\"); \n\t\t\tbyte[] userHash = msgDigest.digest(user.getBytes(\"UTF-16\")); // generating hash of the user\n\t\t\t\n\t\t\tif(sock.isConnected())\n\t\t\t{\n\t\t\t\t// send msg {Login+Hash(User)}serverPublickey to the server\n\t\t\t\tOutputStream sout = sock.getOutputStream();\t\t\t\t\n\t\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t\t\t\toutputStream.write((byte)LOGIN); // send login signal to the server\n\t\t\t\tHashHelper.WriteInt(outputStream, userHash.length);\n\t\t\t\toutputStream.write(userHash);\n\t\t\t\tHashHelper.WriteInt(outputStream, clientPort);\n\t\t\t\tbyte msg[] = outputStream.toByteArray();\n\t\t\t\tmsg = ch.asymEncrypt(serverPubKey, msg); // Asymmetric encrypting the message\n\t\t\t\toutputStream = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(outputStream, msg.length);\n\t\t\t\toutputStream.write(msg);\n\t\t\t\tsout.write(outputStream.toByteArray()); // sending the message to the server\n\t\t\t\t\n\t\t\t\t// read server response\n\t\t\t\tDataInputStream sin = new DataInputStream(sock.getInputStream());\n\t\t\t\tint response = HashHelper.ReadInt(sin);\n\t\t\t\t\n\t\t\t\t// Any error is handled in the following condition\n\t\t\t\tif (response == ERROR){\n\t\t\t\t\tSystem.out.println(\"User already logged in or doesn't exist...\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if nonce and salt are received then read nonce\n\t\t\t\tbyte[] nonce = new byte[response];\n\t\t\t\tsin.readFully(nonce);\n\t\t\t\t\n\t\t\t\t// Read the salt for the password\n\t\t\t\tbyte[] salt = new byte[HashHelper.ReadInt(sin)];\n\t\t\t\tsin.readFully(salt);\n\t\t\t\t\n\t\t\t\t// Send nonce+hash(salt||password) to server encrypted with server's public key\n\t\t\t\tbyte[] passwordByte = pwd.getBytes(\"UTF-16\");\n\t\t\t\tbyte[] saltedPassword = new byte[salt.length + passwordByte.length];\n\t\t\t\tSystem.arraycopy(salt, 0, saltedPassword, 0, salt.length);\n\t\t\t\tSystem.arraycopy(passwordByte, 0, saltedPassword, salt.length, passwordByte.length);\n\t\t\t\tbyte[] saltedHash = msgDigest.digest(saltedPassword);\n\t\t\t\toutputStream = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(outputStream, nonce.length);\n\t\t\t\toutputStream.write(nonce);\n\t\t\t\tHashHelper.WriteInt(outputStream, saltedHash.length);\n\t\t\t\toutputStream.write(saltedHash);\n\t\t\t\t// Asymmetric encrypting the salted hash with the server's public key.\n\t\t\t\tbyte[] message = ch.asymEncrypt(serverPubKey, outputStream.toByteArray());\n\t\t\t\toutputStream = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(outputStream, message.length);\n\t\t\t\toutputStream.write(message);\n\t\t\t\tsout.write(outputStream.toByteArray()); // sending the message to the server.\n\t\t\t\t\n\t\t\t\t// Generate Client's Diffie-Hellman Part\n\t\t\t\tDHHelper dh = new DHHelper();\n\t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\t\t\tObjectOutputStream serializer = new ObjectOutputStream(sout);\n\t\t\t\tDHParameterSpec spec = dh.getParameterSpec();\n\t\t\t\tserializer.writeObject(spec.getP());\n\t\t\t\tserializer.writeObject(spec.getG());\n\t\t\t\tserializer.writeInt(spec.getL());\n\t\t\t\tserializer.writeObject(dh.getPublicKey());\n\t\t\t\tserializer.flush();\n\t\t\t\t\n\t\t\t\t//read the server's response\n\t\t\t\tresponse = HashHelper.ReadInt(sin);\n\t\t\t\t\n\t\t\t\t// Errors are handled by the following condition.\n\t\t\t\tif (response == ERROR){\n\t\t\t\t\tSystem.out.println(\"Incorrect password...\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//else read Diffie-Hellman part of server\n\t\t\t\tbyte[] serverDH = new byte[response];\n\t\t\t\tsin.readFully(serverDH);\n\t\t\t\tByteArrayInputStream in = new ByteArrayInputStream(serverDH);\n\t\t\t\tObjectInputStream deserializer = new ObjectInputStream(in);\n\t\t\t\tPublicKey pubkey = (PublicKey)deserializer.readObject();\n\t\t\t\t\n\t\t\t\t// Obtain the symmetric key.\n\t\t\t\tSecretKey symKey = dh.doFinal(pubkey, \"AES\");\n\t\t\t\tsymK = symKey;\n\t\t\t\t\n\t\t\t\t// reading c1 received from server\n\t\t\t\tbyte[] c1iv = new byte[HashHelper.ReadInt(sin)];\n\t\t\t\tsin.readFully(c1iv);\n\t\t\t\tByteArrayInputStream bais = new ByteArrayInputStream(c1iv);\n\t\t\t\tDataInputStream dis = new DataInputStream(bais);\n\t\t\t\tint len = HashHelper.ReadInt(dis);\n\t\t\t\tbyte[] iv = new byte[len];\n\t\t\t\tdis.readFully(iv);\n\t\t\t\tbyte[] c1 = new byte[HashHelper.ReadInt(dis)]; \n\t\t\t\tdis.readFully(c1);\n\t\t\t\tbyte[] c1_dec = ch.symDecrypt(symKey, iv, c1);\n\t\t\t\t\n\t\t\t\t// Generate C2 to be appended with C1\n\t\t\t\tSecureRandom rand = new SecureRandom();\n\t\t\t\tbyte[] c2 = new byte[32];\n\t\t\t\trand.nextBytes(c2);\n\t\t\t\t\n\t\t\t\t// encrypt c1+c2 with symmetric key \n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tout.write(c1_dec);\n\t\t\t\tout.write(c2);\n\t\t\t\tbyte[] c1c2enc = ch.symEncrypt(symKey, out.toByteArray());\n\t\t\t\t\n\t\t\t\t// send K{c1+c2} to server\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(out, c1c2enc.length);\n\t\t\t\tout.write(c1c2enc);\n\t\t\t\tsout.write(out.toByteArray());\n\t\t\t\t\n\t\t\t\t// receive c2 from server and decrypt\n\t\t\t\tbyte[] c2iv = new byte[HashHelper.ReadInt(sin)];\n\t\t\t\tsin.readFully(c2iv);\n\t\t\t\tbais = new ByteArrayInputStream(c2iv);\n\t\t\t\tdis = new DataInputStream(bais);\n\t\t\t\tlen = HashHelper.ReadInt(dis);\n\t\t\t\tiv = new byte[len];\n\t\t\t\tdis.readFully(iv);\n\t\t\t\tbyte[] c2_received = new byte[HashHelper.ReadInt(dis)]; \n\t\t\t\tdis.readFully(c2_received);\n\t\t\t\tbyte[] c2_dec = ch.symDecrypt(symKey, iv, c2_received);\n\t\t\t\t\n\t\t\t\t// compare received and sent c2\n\t\t\t\tif (!Arrays.equals(c2_dec, c2)){\n\t\t\t\t\tSystem.out.println(\"Login failed as c2!=c2\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Logged in successfully...\");\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Socket not connected\");\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Login failed\");\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public TCPGameClient(String host, int port)\n throws IOException {\n this.host = host;\n this.port = port;\n\n done = false;\n thread = new Thread(this);\n\n setupSocketToUse(new Socket(host, port));\n }", "private void startClientConnection() {\r\n\t\t\t\r\n\t//\tStringBuilder sbreq = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*making connection request*/\r\n\t\t\tclientsoc = new Socket(ip,port);\r\n\t\t\t\r\n\t\t\t/*Input and output streams for data sending and receiving through client and server sockets.*/\r\n\t\t\tdis = new DataInputStream(clientsoc.getInputStream());\t\r\n\t\t\tdos = new DataOutputStream(clientsoc.getOutputStream());\r\n\t\t\t\r\n\t\t\tStringBuilder sbconnreq = new StringBuilder();\r\n\r\n\t\t\t/*Building the Http Connection Request and passing Client name as body. Thus the Http Header\r\n\t\t\tare encoded around the client name data.*/\r\n\t\t\tsbconnreq.append(\"POST /\").append(\"{\"+clientname+\"}\").append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(clientname.length()).append(\"\\r\\n\").\r\n\t\t\tappend(date).append(new Date()).append(\"\\r\\n\");\r\n\t\t\t\r\n\t\t\tdos.writeUTF(sbconnreq.toString());\r\n\r\n\t\t\totherusers = new ArrayList<>(10);\r\n\t\t\tusertimestamp = new HashMap<>(10);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You have logged in. You can start Chatting: \" + clientname);\r\n\t\t\tconnected = true;\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ChatClient(String name, String ip, JChatFrame chatFrame, String host, int port) {\r\n this.clientName = name;\r\n this.clientIP = ip;\r\n this.chatFrame = chatFrame;\r\n this.host = host;\r\n this.port = port;\r\n chatFrame.notifyLogin(login());\r\n }", "public static void main(String args[]) {\r\n\t\tString serverName; \r\n\t\tif (args.length < 1) //in case we don't give another IP,input\r\n\t\t\tserverName = \"localhost\"; //the default choice is the local host\r\n\t\telse\r\n\t\t\tserverName = args[0]; //if we give an ip it connects to that one, for my machine the IP is : \"192.168.0.34\"\r\n\t\tSystem.out.println(\"!!! Athina's JokeClient !!!\\n\"); //print the message\r\n\t\tSystem.out.println(\"Server that we try to connect is : \" + \" \" +serverName + \", listening to Port: 4545\\n\");//print server name\r\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //read \r\n\t\ttry {\r\n\t\t\tString idName;//a string that is used to save the user name provided by the user\r\n\t\t\tString connect=null; //depending the command will connect to the server, have to be enter\r\n\t\t\tSystem.out.println(\"Please enter your username for identification\");\r\n\t\t\tidName = in.readLine(); //read the user name\r\n\t\t\tdo { //run until quit message or a word with \"quit \" inside\r\n\t\t\t\tSystem.out.print(\"The user : \" + \" \" + idName +\" asks for a joke or proverb ,\" + \"Please press enter to confirm or quit to exit: \");\r\n\t\t\t\tSystem.out.flush();//is used to empty the memory from every byte that is written in the buffer\r\n\t\t\t\tconnect = in.readLine();//reads enter or quit\r\n\t\t\t\tif (connect.isEmpty()&& (connect.indexOf(\"quit\") < 0)){ //no quit and enter from user\r\n\t\t\t\t\tgetConnection(idName,serverName); //user name and server name as parameter\r\n\t\t\t\t}\r\n\t\t\t\telse if (connect.equals(\"quit\")){System.out.println(\"user wants to exit \\n\");}\r\n\t\t\t\telse {System.out.println(\"Wrong input,Press enter or w\");} //in case of invalid output, not enter\r\n\t\t\t\t} while (connect.indexOf(\"quit\") < 0); // this will run until the user give an exit message , a word with \"quit \" inside\r\n\t\t\tSystem.out.println(\"Exit from JokeClient \\n\"); //print exit message\r\n\t\t} catch (IOException x) {\r\n\t\t\tx.printStackTrace();\r\n\t\t}\r\n\t}", "public ChatClient(String nick, String choice,\n String host, int port)throws Exception{\n\n nickName = nick;\n\n if (choice.equals(\"cs\")){\n connectToCS(port, host);\n }\n else if (choice.equals(\"ns\")){\n connectToNS(port, host);\n }\n }", "public Client(){\r\n\t\t// ask the user for a host, port, and user name\r\n\t\tString host = JOptionPane.showInputDialog(\"Host address:\");\r\n\t\t\r\n\t\tString port = JOptionPane.showInputDialog(\"Host port:\");\r\n\t\tboolean shouldRepeat = true;\r\n\t\tint portNum = 0;\r\n\t\twhile(shouldRepeat){\r\n\t\t\ttry{\r\n\t\t\tportNum = Integer.parseInt(port);\r\n\t\t\tshouldRepeat = false;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e){\r\n\t\t\t\tport = JOptionPane.showInputDialog(\"Host port:\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tclientName = JOptionPane.showInputDialog(\"User name:\");\r\n\t\t\r\n\t\tif (host == null || port == null || clientName == null)\r\n\t\t\treturn;\r\n\t\t\r\n\t\ttry{\r\n\t\t\t// Open a connection to the server\r\n\t\t\tserver = new Socket(host, portNum);\r\n\t\t\tout = new ObjectOutputStream(server.getOutputStream());\r\n\t\t\tin = new ObjectInputStream(server.getInputStream());\r\n\t\t\t\r\n\t\t\tout.writeObject(clientName);\r\n\t\t\t\r\n\t\t\tsetupGUI();\r\n\t\t\t\r\n\t\t\t// start a thread for handling server events\r\n\t\t\tnew Thread(new ServerHandler()).start();\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void connect(ServerEntry server, String name) throws Exception;", "@Override\n\tprotected void handleMessageFromClient(Object arg0, ConnectionToClient arg1)\n\t{\n\t\t\n\t\t\n\t\tif (arg0 instanceof LoginData)\n\t\t{\n\t\t\tlog.append(\"Log In info from Client \" + arg1.getId() + \"\\n\");\n\n\t\t\tLoginData loginData = (LoginData)arg0;\n\n\t\t\tPlayer user = new Player(loginData.getUsername(), loginData.getPassword());\n\n\t\t\tdatabase.findUser(user);\n\n\t\t\t//If can't find user, send error msg to client\n\t\t\tif (!database.getFoundUser())\n\t\t\t{\n\t\t\t\tlog.append(\"Cannot find Client \" + arg1.getId() + \"\\n\");\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\targ1.sendToClient(\"Cannot find log in info. Check username/password or create an account.\");\n\t\t\t\t} catch (IOException e)\n\t\t\t\t{\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\n\t\t\t//If user found\n\t\t\telse \n\t\t\t{\n\t\t\t\tlog.append(\"Log in for Client \" + arg1.getId() + \" successful\\n\");\n//\t\t\t\tif (logincount < 1)\n//\t\t\t\t{\n//\t\t\t\t\tlogincount++;\n//\t\t\t\t\ttry\n//\t\t\t\t\t{\n//\t\t\t\t\t\targ2 = arg1;\n//\t\t\t\t\t\targ1.wait();\n//\t\t\t\t\t} catch (InterruptedException e)\n//\t\t\t\t\t{\n//\t\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tthis.send\n//\t\t\t\tif (logincount == 2)\n//\t\t\t\t{\n//\t\t\t\t\tthis.notifyAll();\n\t\t\t\tlogincount++;\n\t\t\t\tif(logincount == 2) {\n\n\t\t\t\t\tGame game = new PacmanGame();\n\t\t\t\t\tthis.sendToAllClients(game);\n\t\t\t\t}\n\t\t\t\t\t\n\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//If client sends create account info to server, check if username exists\n\t\telse if (arg0 instanceof CreateAccountData)\n\t\t{\n\t\t\tlog.append(\"Create Account info from Client \" + arg1.getId() + \"\\n\");\n\t\t\tCreateAccountData createData = (CreateAccountData)arg0;\n\n\t\t\tPlayer user = new Player(createData.getUsername(), createData.getPassword());\n\n\t\t\tlog.append(\"Create Account for Client \" + arg1.getId() + \" successful\\n\");\n\t\t\tuser.setID();\n\t\t\tdatabase.addUser(user);\n\n\t\t\t//If can't find username, send CreateAccountData instance to client\n\t\t\tif (!database.getFoundUser())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\targ1.sendToClient(createData);\n\t\t\t\t} catch (IOException e)\n\t\t\t\t{\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\n\t\t\t//If username found, send error msg to client\n\t\t\telse \n\t\t\t{\n\t\t\t\tlog.append(\"Username already existed\\n\");\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\targ1.sendToClient(\"Username already existed.\");\n\t\t\t\t} catch (IOException e)\n\t\t\t\t{\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}", "public BeforeGame(String server, int port, String playername) throws UnknownHostException, IOException, ClassNotFoundException, UnableToStartGameException\n\t{\n\t\tjoinGame(server, port, playername);\n\t}", "public boolean connect(String sIP, int sPort) {\n socket = null;\n reader = null;\n writer = null;\n serverIP = sIP;\n serverPort = sPort;\n\n try {\n socket = new Socket(serverIP, serverPort);\n reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));\n connected = true;\n return true;\n } catch (IOException e) {\n connected = false;\n System.out.println(\"Could not connect with server\");\n return false;\n }\n\n }", "public IMConnection(String host, int port, String username, String password, String option) {\n\t\tif ((username == null) || username.trim().equals(\"\")) {\n\t\t\tusername = \"TooDumbToEnterRealUsername\";\n\t\t}\n\t\tif ((password == null) || password.trim().equals(\"\")) {\n\t\t\tpassword = \"TooDumbToEnterRealPassword\";\n\t\t}\n\t\tlinkListeners = new Vector<LinkListener>();\n\t\tmessageListeners = new Vector<MessageListener>();\n\t\tuserName = username;\n\t\tthis.option = option;\n\t\tPasswordEncryption obj = new PasswordEncryption();\n\t\tthis.password = new String(obj.encrypt(password));\n\t\thostName = host;\n\t\tportNum = port;\n\t}", "public boolean connect(){\r\n\r\n\t\t// Connect to server via TCP socket\r\n\t\ttry {\r\n\r\n\t\t\tclient = new Socket(host, port);\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"[EXCEPTION] connecting to server\");\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Connection to server could not be made. Try again later.\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\r\n\t\t// Get input and output Streams\r\n\t\ttry {\r\n\r\n\t\t\tpw = new PrintWriter(client.getOutputStream());\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(client.getInputStream()));\r\n\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"[EXCEPTION] creating streams\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Connection to server SUCESSFULL\");\r\n\t\treturn true;\r\n\t}", "@Override\n public synchronized boolean login(String username) throws RemoteException {\n Player p = getPlayer(username);\n if (p != null) {\n // El jugador ya esta conectado, entonces no puede conectarse de nuevo\n if (p.isOnline())\n return false;\n // Jugador estaba desconectado\n p.setOnline(true);\n return true;\n }\n // Jugador no existe, entonces lo agregamos a la partida\n else addNewPlayer(username).setOnline(true);\n return true;\n }", "public boolean start() {\n\t\t// Tenta se conectar ao servidor\n\t\ttry {\n\t\t\tsocket = new Socket(server, port); //assimila o socket e busca conexão caso a porta esteja aberta\n\t\t} \n\t\tcatch(Exception ec) {\n\t\t\tdisplay(\"Não foi possível estabelecer a conexão com o servidor\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString msg = \"Conexão estabelecida com servidor [\" + socket.getInetAddress() + \":\" + socket.getPort()+\"]\";\n\t\tdisplay(msg);\n\t\n\t\t\n\t\t\n\t\t//\tCria canal de entrada e canal de saida com servidor\n\t\ttry\n\t\t{\n\t\t\tsInput = new ObjectInputStream(socket.getInputStream());\n\t\t\tsOutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Não foi possível criar canais de comunicação\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// INCIA THREAD ( escuta o servidor ) \n\t\tnew ListenFromServer().start();\n\t\t\n\t\t\n\t\t// tenta enviar a primeira mensagem\n\t\ttry\t{\n\t\t\tsOutput.writeObject(username);\n\t\t} catch (IOException eIO) {\n\t\t\tdisplay(\"A comunicação não foi estabelecida por completo, a conexão será desfeita\");\n\t\t\tdisconnect();\n\t\t\treturn false;\n\t\t}\n\n\t\t//retorna true para validar a conexão estabelecida\n\t\treturn true;\n\t}", "public interface IServer {\n\n Result Login(String id, String password);\n Result Register(String id, String password);\n Result JoinGame(String id, String gameID, String authToken);\n Result CreateGame(Game game, String authToken);\n Result StartGame(Game game, String authToken);\n Result GetGameList(String authToken);\n Result GetPlayerList(String gameID, String authToken);\n}", "public void connect(String host, int port) throws IllegalStateException,\n \t\t\tIOException, JHGDException {\n \t\t// Check if the client is already connected\n \t\tif (connected) {\n \t\t\tthrow new IllegalStateException(\"Client already connected to \"\n \t\t\t\t\t+ host + \" on port \" + port);\n \t\t}\n \n \t\t// Open socket\n \t\topenSocket(host, port);\n \n \t\tString returnMessage = (String) input.readLine();\n \n \t\tif (checkServerResponse(returnMessage) != HGDConsts.SUCCESS) {\n \t\t\tthrow new JHGDException(returnMessage.substring(returnMessage\n \t\t\t\t\t.indexOf('|') + 1));\n \t\t}\n \t\t\n \t\tString protocolVersion = requestProto();\n \t\tif ( !protocolVersion.equalsIgnoreCase(HGDConsts.PROTOCOLVERSION)) {\n \t\t\tthrow new JHGDException(\"Incompatible protocols. Client: \" + HGDConsts.PROTOCOLVERSION + \", Daemon: \" + protocolVersion);\n \t\t}\n \t\t\n \t\t// set the flags\n \t\tthis.connected = true;\n \t\tthis.authenticated = false;\n \t\tthis.host = host;\n \t\tthis.port = port;\n \t\tthis.username = null;\n \t\tthis.password = null;\n \t\t\n \t}", "public ClientThread(String user, String host, String port)\n\t{\n\t\tsuper();\n\t\tthis._myName = user;\n\t\tthis._hostname = host;\n\t\tthis._portnum = port;\n\t}", "public Server(int port) {\n \ttry{\n \t\tserver = new ServerSocket(port);\n \t\tuserMap = new HashMap<Integer, User>();\n \t\troomMap = new HashMap<String, Channel>();\n \t\tnextId = 0;\n \t}\n \tcatch(Exception e){\n \t\te.printStackTrace(); \t\t\n \t}\n }", "public void connect(View view) {\n if (game.isConnected()) {\n showMessage(\"Already connected!\");\n setupRoles();\n return;\n }\n EditText text = (EditText) findViewById(R.id.ip_address);\n @SuppressWarnings(\"ConstantConditions\") String ip = text.getText().toString();\n if (ip.equals(\"\")) {\n showMessage(\"Please enter an IP-Address\");\n return;\n }\n showProgressDialog();\n game.connect(ip, this);\n }", "public RemoteUser(Socket connection) {\n connectToSocket(connection);\n }", "public static void main(String args[]) throws UnknownHostException, IOException {\n Scanner scanner = new Scanner(System.in); // Create scanner to allow keyboard input\n\n while(true) {\n System.out.print(\"INFO: Enter 1 to register\\n Enter 2 to login\\n Enter ´q´ to stop session\\n\");\n String state = scanner.nextLine();\n if (\"q\".equals(state)) {\n System.out.println(\"Exit!\"); // if keyboard input equal to ´q´ close client process\n break;\n }else if(\"1\".equals(state)){\n System.out.print(\"Enter username :\\n\");\n String username = scanner.nextLine(); // Waiting for keyboard input\n if(username.isEmpty()){System.out.println(\"please enter a username\"); username=scanner.nextLine();}\n System.out.println(\"Enter password :\\n\");\n String password = scanner.nextLine();\n if(password.isEmpty()){System.out.println(\"please enter a password\"); password=scanner.nextLine();}\n System.out.println(\"Enter name :\\n\");\n String name = scanner.nextLine();\n if(name.isEmpty()){System.out.println(\"please enter a name\"); name=scanner.nextLine();}\n\n System.out.println(\"Enter rate :\\n\");\n int rate = scanner.nextInt();\n if(rate == 0){System.out.println(\"please enter a rate = 1\"); username=scanner.nextLine();}\n\n System.out.println(\"choose a role from (main role, part role 1, part role 2)\");\n String role = scanner.nextLine();\n TeamMember member = new TeamMember(username,password,name,rate,role,state);\n thPoolClient.execute(new ClientSocketTask(member)); // create a new socket task\n\n }else if(\"2\".equals(state)){\n\n System.out.print(\"Enter username :\\n\");\n String username = scanner.nextLine(); // Waiting for keyboard input\n if(username.isEmpty()){System.out.println(\"please enter a username\"); username=scanner.nextLine();}\n System.out.println(\"Enter password :\\n\");\n String password = scanner.nextLine();\n if(password.isEmpty()){System.out.println(\"please enter a password\"); password=scanner.nextLine();}\n TeamMember member = new TeamMember(username, password, state);\n thPoolClient.execute(new ClientSocketTask(member)); // create a new socket task\n\n }else {\n System.out.println(\"Enter 1, 2 or q\");\n }\n thPoolClient.shutdown(); //shutdown the ThreadPool\n\n\n }\n }", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public void login() {\n String line = null;\n String ID = null;\n String Password = null;\n \n try {\n client_PW.println(\"--------------Welcom to chat-------------\");\n client_PW.println(\"Sign in or Sign up? : <i/u>\");\n client_PW.flush();\n\n line = client_BR.readLine();\n if(line.equals(\"i\")) {\n // sign in\n clearScreen(client_PW);\n client_PW.println(\"Enter ID : \");\n client_PW.flush();\n ID = client_BR.readLine();\n client_PW.println(\"Enter PassWord : \");\n client_PW.flush();\n Password = client_BR.readLine();\n\n if(!mem_id.containsKey(ID)) {\n clearScreen(client_PW);\n client_PW.println(\"Can't find such ID\");\n client_PW.flush();\n login();\n } else {\n if(!mem_id.get(ID).equals(Password)) {\n clearScreen(client_PW);\n client_PW.println(\"Incorrect password!\");\n client_PW.flush();\n login();\n } else {\n this.client_ID = ID;\n // 다른 member들에게 현재 client가 접속했다고 공지\n broadcast(client_ID + \"님이 접속했습니다.\",client_ID);\n // 서버의 콘솔창에 현재 client의 ID와 접속한 ip주소 표시\n System.out.println(client_ID+\" 회원이 접속했습니다.\");\n System.out.println(\"IP : \" + client_IP.getHostAddress());\n client_PW.flush();\n help_menu();\n }\n }\n\n \n } else if(line.equals(\"u\")) {\n // sign up\n clearScreen(client_PW);\n client_PW.println(\"Enter ID : \");\n client_PW.flush();\n ID = client_BR.readLine();\n client_PW.println(\"Enter PassWord : \");\n client_PW.flush();\n Password = client_BR.readLine();\n\n mem_id.put(ID, Password);\n\n this.client_ID = ID;\n // 다른 member들에게 현재 client가 접속했다고 공지\n broadcast(client_ID + \"님이 접속했습니다.\",client_ID);\n // 서버의 콘솔창에 현재 client의 ID와 접속한 ip주소 표시\n System.out.println(client_ID+\" 회원이 접속했습니다.\");\n System.out.println(\"IP : \" + client_IP.getHostAddress());\n client_PW.flush();\n help_menu();\n \n\n } else {\n clearScreen(client_PW);\n client_PW.println(\"invalid command\");\n login();\n }\n } catch (Exception e) {\n System.out.print(e);\n }\n }", "public void join(String host, int port);", "@Override\n\tpublic void sendLogin() {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\tString result = \"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.login();\n\t\t\t} else {\n\t\t\t\tWebResource loginService = service.path(URI_LOGIN);\n\t\t\t\tresult = loginService.accept(MediaType.TEXT_PLAIN).get(String.class);\n\t\t\t}\n\t\t\t//get the clientId\n\t\t\tclientId = Integer.parseInt(result);\n\t\t\t//set the status\n\t\t\tgui.setStatus(\"Successfully logged in! Obtained client ID: \"+clientId+\" from server!\");\n\t\t\t//immediately send the request for the list of items\n\t\t\tsendItemListRequest();\n\t\t} catch (ClientHandlerException ex){\n\t\t\t//exceptions for REST service\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!! Closing application...\");\n\t\t\tSystem.exit(0);\n\t\t} catch (WebServiceException ex){\n\t\t\t//exceptions for SOAP-RPC service\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!! Closing application...\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "@Override\n public void setUsername() {\n try {\n JCheckBox botCheckBox = (JCheckBox) logIn.getComponent(5);\n bot = botCheckBox.isSelected();\n if(bot) {\n try {\n int thinkingTime = Integer.parseInt((String) JOptionPane.showInputDialog(frame, \"Please enter the AI thinking time in seconds\", \"Thinking time\", JOptionPane.INFORMATION_MESSAGE, null, null, 0));\n client.setThinkintTime(thinkingTime);\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(frame, \"Set thinking time to 0\", \"Illegal input\", JOptionPane.ERROR_MESSAGE);\n client.setThinkintTime(0);\n }\n }\n username = ((JTextField) logIn.getComponent(3)).getText();\n client.setName(username);\n if(serverBrowser == null) {\n serverList();\n } else {\n frame.setContentPane(serverBrowser);\n ((JLabel)((JPanel) serverBrowser.getComponent(0)).getComponent(0)).setText(username);\n }\n } catch (IllegalNameException e) {\n JOptionPane.showMessageDialog(frame, \"Invalid name, please do not use ';' in your name.\", \"Ilegal username\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public abstract void createConnection(Socket socket, String userName);", "public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }", "private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void connectServer(String nickName, String server, String port)\n throws IOException\n {\n int portNr = Integer.parseInt(port);\n\n Socket newSocket;\n BufferedReader newStreamIn;\n OutputStream newStreamOut;\n\n newSocket = new Socket(server, portNr);\n clientFrame.printMsg(\"Connected to \" + server + \" at port \" + portNr);\n\n newStreamIn = new BufferedReader(new InputStreamReader(\n newSocket.getInputStream()));\n\n newStreamOut = newSocket.getOutputStream();\n\n streamIn = newStreamIn;\n streamOut = newStreamOut;\n\n if (socket != null)\n socket.close();\n\n socket = newSocket;\n\n sendMsg(nickName);\n }", "private boolean requestUserLogin() {\n\t\tServerAPITask userTasks = new ServerAPITask();\n\t\tString uName = usernameField.getText().toString();\n\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\ttry {\n\t\t\tString response = userTasks.execute(\"\").get();\n\t\t\tLog.e(\"Response String\", response);\n\t\t\t\n\t\t\tjsonResponse = new JSONArray(response);\n\t\t\tif (jsonResponse.length() < 1) {\n\t\t\t\tToast.makeText(this.getContext(), \"The username does not exist\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJSONObject jsObj = jsonResponse.getJSONObject(0);\n\t\t\t\tif (jsObj == null) {\n\t\t\t\t\tToast.makeText(this.getContext(), \"An error occurred while retrieving user\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString _user_id = jsObj.getString(\"_id\");\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USER_ID_KEY, _user_id);\n\t\t\t\t\t\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USERNAME_KEY, uName);\n\t\t\t\t\t((Activity) userContext).getActionBar().setTitle(\"Stone - \" + uName);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\treturn true;\n\t}", "public DungeonServer(int port){\n\t\t/*Constructor sets the server up and defaults class fields. \n\t\t * Assigns the programme to run on the argument port*/\n\t \ttry{\n\t server = new ServerSocket(port);\n\t game = new GameLogic(\"SmallMap.txt\");\n\t }\n\t \tcatch(IOException | ParseException e){\n\t\t System.out.println(\"Sorry, there was an error in construction! \");\n\t \t}\n\t}", "@Override\n\tpublic void run() \n\t{\n\t\tcommunicator = com.zeroc.Ice.Util.initialize();\n GameServerPrx clientPrx = GameServerPrx.checkedCast(\n communicator.stringToProxy(\"client:default -h 58.167.142.74 -p 10002\")).ice_twoway().ice_secure(false).ice_collocationOptimized(false).ice_compress(true);\n\n if(clientPrx == null)\n {\n //If connection is failed due to server problems\n System.err.println(\"SB Connect: \" + \"Invalid proxy\");\n return;\n }\n System.out.println(\"SB Connect: \" + \"Connected\");\n Server server = new Server();\n server.address = ServerInfo.ADDRESS;\n server.UUID = ServerInfo.UUID;\n server.port = ServerInfo.PORT;\n server.name = ServerInfo.NAME;\n server.players = (short) players;\n\t\tclientPrx.sendServerDetails(server);\n\t\tSystem.out.println(\"SB Connect: \" + \"Data sent\");\n\t}", "public void connect(String ip,int port){\r\n this.ip = ip;\r\n this.port = port;\r\n try {\r\n socket = new Socket(ip,port);\r\n System.out.println(\"Connected with \"+ip+\":\"+port);\r\n ClientListener listener = new ClientListener(socket,this.receivedMessages);\r\n Thread listenerThread = new Thread(listener);\r\n listenerThread.start();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Creating new connection....\");\r\n }\r\n }" ]
[ "0.70372075", "0.6581612", "0.6531378", "0.65061057", "0.6478663", "0.645682", "0.6450158", "0.6414292", "0.6378545", "0.63741666", "0.6371679", "0.63671654", "0.63439846", "0.6330611", "0.6259775", "0.6216498", "0.61938244", "0.61735994", "0.6167169", "0.614368", "0.6132818", "0.60966253", "0.60711783", "0.60418355", "0.60396457", "0.6035036", "0.6029717", "0.60099626", "0.6001504", "0.5999009", "0.5994995", "0.59892035", "0.59840167", "0.59758663", "0.59674317", "0.5955966", "0.5949959", "0.59488106", "0.5942161", "0.59379476", "0.5936324", "0.59356916", "0.5913308", "0.5905346", "0.5896529", "0.5886092", "0.5882718", "0.58636576", "0.58630437", "0.5861035", "0.5859678", "0.58558244", "0.5848963", "0.5843234", "0.58397186", "0.5836426", "0.5827264", "0.5822327", "0.5802094", "0.5795292", "0.57945156", "0.5788553", "0.57878274", "0.57817394", "0.5780637", "0.5779804", "0.5779632", "0.57794434", "0.57792073", "0.5778813", "0.5758295", "0.5754176", "0.5741017", "0.57397515", "0.57370585", "0.5724967", "0.57160735", "0.57119036", "0.5709814", "0.570811", "0.57069737", "0.57020926", "0.5688464", "0.56859195", "0.56836975", "0.56821877", "0.5680006", "0.5679631", "0.5679441", "0.5678951", "0.5668816", "0.5642678", "0.563697", "0.5631979", "0.56292725", "0.5624719", "0.562168", "0.5620019", "0.5618169", "0.56101865" ]
0.71900755
0
Method used to send a message to the server. Handled in a separate method to ensure that all messages are ended with a newline character and are flushed (ensure they are sent.)
public void sendText(String textToSend) { try { output.write(textToSend); output.newLine(); output.flush(); } catch (IOException ioe) { Main.LOGGER.log(Level.WARNING, "Unable to send message to server", ioe); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendMessage(String msg) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n \n } catch (IOException e) {\n \tshutdown();\n e.printStackTrace();\n }\n }", "@Override\n public void send(String message) {\n\n out.println(message);\n out.flush();\n\n }", "public void sendMessage(String message){\n\t if (mOut != null && !mOut.checkError()) {\n\t mOut.println(message+\"\\n\");\n\t mOut.flush();\n\t }\n\t }", "private void sendMessage() throws Exception {\n\t\tGetTimestamp(\"Sending Message: \");\n\t\tString inputMessage;\n\t\tinputMessage = input.nextLine();\n\t\tString tosend = encrypt(clientkey, inputMessage);\n\t\t\n\t\tJSONObject RESPONSE = new JSONObject();\n\t\tRESPONSE.put(\"payload\",tosend);\n\t\tSystem.out.println(RESPONSE);\n\t\t\n\t\tpw.println(tosend);\n\t\tpw.flush();\n\t\tSystem.out.println(\"Message sent to the client : \" + inputMessage);\n\t\tif (inputMessage.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"sending close command\");\n\t\t\tcloseConnection();\n\t\t} else {\n\t\t\tgetMessage();\n\t\t}\n\t}", "public void sendMessage(String s){\r\n\t\tsynchronized(msgToSend){ // synchronized to maintain thread-safety\r\n\t\t\tmsgToSend.append(s + \"\\n\");\r\n\t\t}\r\n\t}", "public void sendMessage(String message) {\n\t\tsocketTextOut.println(message);\n\t\tsocketTextOut.flush();\n\t}", "public void sendMessage(String message) {\n try {\n bos.write(message);\n bos.newLine();\n bos.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }", "public void sendln(String msg)\n\t{\n\t\tsendPlain(codeFilter(msg+\"\\n\\r\"));\n\t}", "public void send(String text) {\r\n try {\r\n outputStream.write((text + CRLF).getBytes());\r\n outputStream.flush();\r\n } catch (IOException ex) {\r\n notifyObservers(ex);\r\n }\r\n }", "void send(String message);", "private synchronized void sendToClient(PrintWriter pw, String message)\n {\n pw.write(message + \"\\n\");\n pw.flush();\n }", "@Override\n public void sendMessage(Message<JsonPayload> message) throws IOException {\n System.out.println(\"Trying to send a message...\");\n outputMessageStream.write(message.getContent().getJson());\n outputMessageStream.newLine();\n outputMessageStream.flush();\n socket.shutdownOutput();\n }", "@Override\n\tpublic void send(String msg) {\n\t}", "public synchronized void send(String message) {\n writer.println(message);\n writer.flush();\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public void send(String text) {\n try {\n outputStream.write((text + CRLF).getBytes());\n outputStream.flush();\n } catch (IOException ex) {\n notifyObservers(ex);\n }\n }", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "public void send(Message msg);", "private void sendLineCommand(String message) throws IOException,\n \t\t\tIllegalStateException {\n \t\tif (!connected) {\n \t\t\tthrow new IllegalStateException(\"Client not connected\");\n \t\t}\n \t\toutput.write(message + \"\\r\");\n \t\toutput.newLine();\n \t\toutput.flush();\n \t}", "public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public void flush() {\n mMessages.postToServer();\n }", "private void sendClientMessage() throws IOException {\n ArrayList<ByteString> blindedFriends = Crypto.byteArraysToStrings(mClientPSI.encodeBlindedItems());\n ClientMessage cm = new ClientMessage.Builder()\n .messages(getMessages())\n .blindedFriends(blindedFriends)\n .build();\n boolean success = lengthValueWrite(out, cm);\n if (!success) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Length/value write of client message failed.\");\n throw new IOException(\"Length/value write of client message failed, but exception is hidden (see Exchange.java)\");\n }\n }", "public void sendMessage(String message) {\r\n\r\n synchronized (this) {\r\n //count++;\r\n if (mBufferOut != null && !mBufferOut.checkError()) {\r\n Log.i(TAG, \"message: \" + message);\r\n mBufferOut.print(message);\r\n mBufferOut.flush();\r\n }\r\n }\r\n }", "public abstract void send(String message) throws IOException;", "@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}", "public void sendMessage(String text)\n\t{\n\t\ttry\n\t\t{\n\t\t\tout.println(text);\n\t\t\tout.flush();\n\t\t}\n\t\tcatch(NullPointerException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}", "public void sendToServer(String msg) throws IOException {\n if (clientSocket == null || output == null) {\n throw new SocketException(\"socket does not exist\");\n }\n\n // messageQueue.offer(msg);\n // sendFromMessageQueue();\n \n // 發送中文\n byte[] bytes = msg.getBytes(\"big5\");\n int[] ints = new int[bytes.length];\n for (int i = 0, l = bytes.length; i < l; i++) {\n ints[i] = bytes[i] & 0xff;\n output.write(ints[i]);\n }\n output.writeBytes(\"\\n\");\n }", "public static void sendMsg(String msg)\n throws IOException\n {\n if (streamOut == null)\n clientFrame.printMsg(\"Error: Not connected.\");\n else\n streamOut.write((msg + \"\\n\").getBytes());\n }", "public void encodeAndSend(String msg)\n\t{\n\t\tif (isClosed())\n\t\t\treturn;\n\t\ttry\n\t\t{\n\t\t\tCharset charset = Charset.forName(\"ISO-8859-1\");\n\t\t\tCharsetEncoder encoder = charset.newEncoder();\n\t\t\tByteBuffer bbuf = encoder.encode(CharBuffer.wrap(msg));\n\t\t\toutToClient.write(bbuf.array());\n\t\t\toutToClient.flush();\n\t\t\tlastOutput = 0;\n\t\t\t\n\t\t\t// Copy output to anyone snooping this connection.\n\t\t\tfor (UserCon c : conns)\n\t\t\t\tif (c.snoop == this)\n\t\t\t\t\tc.encodeAndSend(\"} \"+msg);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tif (!e.getMessage().equals(\"Broken pipe\"))\n\t\t\t{\n\t\t\t\tsysLog(\"bugs\", \"Error in encodeAndSend: \"+e.getMessage());\n\t\t\t\tlogException(e);\n\t\t\t}\n\t\t\telse\n\t\t\t\tcloseSocket();\n\t\t}\n\t}", "public void sendMessage(String message)\n\t\t{\n\t\t\twriter.println(message);\n\t\t\twriter.flush();\n\t\t}", "private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "synchronized void sendMessage(Message message) throws IOException {\n socketOutput.reset();\n socketOutput.writeObject(message);\n socketOutput.flush();\n }", "public void send(String message) throws IOException {\r\n OutputStream stream = socket.getOutputStream();\r\n PrintWriter writer = new PrintWriter(stream);\r\n writer.println(message);\r\n writer.flush();\r\n }", "public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Exception writing to server: \" + e);\n\t\t}\n\t}", "public void tellServer(String message)\n\t{\n\t\ttoServer.println(message);\n\t\ttoServer.flush();\n\t}", "@Override\r\n\tpublic boolean send(String msg) {\n \ttry {\r\n \t\tsendMessage(msg);\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 true;\r\n\t}", "void sendMessage(Message m) throws IOException {\n String msg = m.toString();\n\n buffer = msg.getBytes(\"Windows-1256\");\n toServer = new DatagramPacket(buffer, buffer.length,\n InetAddress.getByName(sendGroup), port);\n if (m.getType() == Message.DATA) {\n manager.mManager.addMessage(m);\n }\n\n System.out.println(getName() + \"-->\" + m);\n serverSocket.send(toServer);\n }", "void sendMessage(String message) throws SocketIOException;", "public void send(String command)\n {\n if (connected) { \n writer.println(command + \";\");\n }\n }", "public void send(Message message) {\r\n channel.writeAndFlush(message);\r\n }", "public synchronized void sendMessage(String msg) throws ServerUnavailableException {\n if (out != null) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n } catch (IOException e) {\n System.out.println(e.getMessage());\n throw new ServerUnavailableException(\"Could not write \\\"\" + msg + \"\\\" to server.\");\n }\n } else {\n throw new ServerUnavailableException(\"Could not write \\\"\" + msg + \"\\\" to server.\");\n }\n }", "public synchronized void send(final String _mes) {\r\n\t\t// new Thread(new Runnable() {\r\n\t\t// @Override\r\n\t\t// public void run() {\r\n\t\tif (!closed) {\r\n\t\t\toutput.write(_mes + \"\\r\\n\");\r\n\t\t\toutput.flush();\r\n\t\t}\r\n\t\t// }\r\n\t\t// }).run();\r\n\t}", "private void sendMessage(ChatMessage msg) throws IOException {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n sOutput.close();\n sInput.close();\n e.printStackTrace();\n }\n //sOutput.flush();\n }", "void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}", "public void send_message(){\n logical_clock++;\n System.out.println(\"Send Message Clock:\" +logical_clock);\n encrypt(logical_clock);\n\n }", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "@Override\n\tpublic void sendMsg(String msg) {\n\n\t}", "void sendMessage(String msg);", "protected void print(Message msg) {\n\t\tif (!isConnected()) {\n\t\t\tthrow new IllegalOperationException(\"Cannot send a message when we are not connected!\");\n\t\t}\n\t\tString str = msg.toString();\n\t\tByteBuffer wrapper = ByteBuffer.wrap(str.getBytes());\n\t\tint bytesWritten = 0;\n\t\twhile (bytesWritten != str.length()) {\n\t\t\ttry {\n\t\t\t\tbytesWritten += channel.write(wrapper);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// May want to do something here, but now will simply cover the\n\t\t\t\t// issue up\n\t\t\t\tassert false;\n\t\t\t}\n\t\t}\n\t}", "private void write(String msg) throws IOException {\n if (connectedSwitch) {\n outStream.writeBytes(msg + \";\");\n outStream.flush();\n } else {\n Log.e(TAG, \"Socket disconnected\");\n }\n }", "void sendMessage(String message) {\n writer.println(message);\n }", "public void send() {\n\t}", "public static final void sendRaw(String message) {\r\n //Twitch IRC uses \\n as the deliminator for input, so make sure it has it.\r\n if (message.charAt(message.length() - 1) != '\\n') {\r\n message += \"\\n\";\r\n }\r\n int attempt = 0;\r\n do {\r\n try {\r\n out.write(message);\r\n out.flush();\r\n return;\r\n }\r\n catch (IOException e) {\r\n ++attempt;\r\n ErrorLog.writeToLog(e);\r\n }\r\n } while (attempt < 4);\r\n }", "public static void Send(Message message)\n\t{\n\t\ttry\n\t\t{\n\t\t\t_sendBuf = toByteArray(message);\n\n\t\t\t//dc message\n\t\t\tif (message.getRecipient().equalsIgnoreCase(\"\") &&\n\t\t\t\tmessage.getMessage().equalsIgnoreCase(\"%BYE%\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent BYE\");\n\t\t\t\t_socket.getOutputStream().write(Message.BYE);\n\t\t\t}\n\t\t\t//lobby message\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent LOBBY\");\n\t\t\t\t_socket.getOutputStream().write(Message.LOBBY);\n\t\t\t}\n\t\t\t//search request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"all\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent SEARCH\");\n\t\t\t\t_socket.getOutputStream().write(Message.SEARCH);\n\t\t\t}\n\t\t\t//answer request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"server\") &&\n\t\t\t\t\t message.getOrigin().equalsIgnoreCase(\"none\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent CHOICE\");\n\t\t\t\t_socket.getOutputStream().write(Message.CHOICE);\n\t\t\t}\n\t\t\t//whisper message\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent WHISPER\");\n\t\t\t\t_socket.getOutputStream().write(Message.WHISPER);\n\t\t\t}\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void sendMsgToClient(String msg) {\n controlOutWriter.println(msg);\n }", "public void sendMessage(String message) {}", "public void sendMessage(String message) {\n\n\t\tif (mOut != null && !mOut.checkError()) {\n\n\t\t\t// If encryption connection has been made\n\n\t\t\tif (diffieHellmanModule.isConnected()) {\n\t\t\t\tmessage = diffieHellmanModule.encryptString(message);\n\t\t\t}\n\n\t\t\tmOut.println(message);\n\t\t\tmOut.flush();\n\t\t}\n\t}", "public void send(String msg) throws CcException\n {\n commWriter.send(msg);\n }", "void messageSent();", "protected void sendToServer(String string) {\r\n System.out.println(\"Sending to server: \" + string);\r\n toServer.println(string);\r\n toServer.flush();\r\n }", "private void sendMessageToClient(String messageToClient){\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n output.println(\"\\n\" + \"Server: \" + messageToClient);\n output.flush();\n }\n });\n }", "public void send(String message) {\r\n String command;\r\n if ( !message.startsWith(\"/\") || message.length() == 1 || message.startsWith(\"/ \")) {\r\n command = \"MESG\" + \" \" + message;\r\n } else {\r\n StringTokenizer tokens = new StringTokenizer(message);\r\n command = tokens.nextToken(\"/\").toUpperCase();\r\n if (command.equals(\"MESG\") && tokens.hasMoreTokens()) {\r\n command = command + \" \" + tokens.nextToken(\"\\n\").trim();\r\n } else {\r\n while (tokens.hasMoreTokens()) {\r\n command = command + \" \" + tokens.nextToken(\" \\n\");\r\n }\r\n }\r\n }\r\n if (out != null) {\r\n out.println(command);\r\n } else {\r\n keepGoing = false;\r\n finalize();\r\n }\r\n }", "public void sendMessage(String message) {\n printWriter.append(message);\n printWriter.flush();\n }", "public void send(String message){\n\t\ttry {\n\t\t\tSystem.out.println(\"Sende Nachricht \" + message);\n\t\t\tout.reset();\n\t\t\tout.writeObject(message);\n\t\t\tout.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void send(String msg) {\n CompletableFuture.runAsync(() -> serverCon.send(msg));\n }", "public void sendMessage(String message);", "public void sendMessage(String message) {\n\t\ttry {\n\t\t\tout.writeUTF(message);\n\t\t\tserver.CommunicationLog.info(\"Sent:\" + message + \" to \" + clientSocket.getInetAddress().toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }", "public void sendMessage(ChatMessage msg) {\n try{\n loginOutput.writeObject(msg);\n }\n catch(IOException e){\n display(\"Exception on send message to server: \" + e);\n }\n }", "private void sendMessageToClient(String message) {\n try {\n outputStream.writeObject(message);\n outputStream.flush();\n } catch (IOException e) {\n System.out.println(\"Erreur lors de l'envoi du message au client\");\n }\n }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "private void send(Message outgoing, ByteBuffer buffer, SocketChannel channel, boolean debug) throws IOException {\n\t\tif (debug)\n\t\t\tSystem.out.println(\"Worker Thread \" + threadID + \" sending new message: \" + outgoing.toString());\n\t\tbuffer = ByteBuffer.wrap(Serializer.serialize(outgoing));\n\t\tchannel.write(buffer);\n\t\tif (debug)\n\t\t\tSystem.out.println(\"Worker Thread \" + threadID + \"sent message\");\n\t}", "public void send(final String data) throws IOException {\r\n\t\t//Writes the packet as a byte buffer, using the data from the packet and converting in to bytes\r\n\t\t//Adds an end-of-packet footer to the data\r\n\t\tif(channel.isConnected()) {\r\n\t\t\tchannel.write(ByteBuffer.wrap((data + \"%EOP%\").getBytes()));\r\n\t\t}\r\n\t}", "private void sendMessage()\n\t{\n\t\tfinal String message = messageTextArea.getText(); \n\t\tif(message.length() == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tmessageTextArea.setText(\"\");\n\t\ttry\n\t\t{\n\t\t\teventsBlockingQueue.put(new MessageEvent(message));\n\t\t}\n\t\tcatch (final InterruptedException e1)\n\t\t{\n\t\t}\n\t}", "public void sendMessage(common.messages.KVMessage msg) throws IOException {\r\n\t\tbyte[] msgBytes = msg.getMsgBytes();\r\n\t\toutput.write(msgBytes, 0, msgBytes.length);\r\n\t\toutput.flush();\r\n\t\tlogger.debug(\"SEND \\t<\" \r\n\t\t\t\t+ clientSocket.getInetAddress().getHostAddress() + \":\" \r\n\t\t\t\t+ clientSocket.getPort() + \">: '\" \r\n\t\t\t\t+ msg.getMsg() +\"'\");\r\n }", "public String sendMessage(){\n System.out.print(handle);\n try{ \n message = inFromUser.readLine();\n if(message.equals(\"SIGINT\")){\n outToServer.writeBytes(\"SIGINT\");\n System.out.println(\"\\nTCP connection closed and program terminated.\");\n response = inFromServer.readLine();\n if(!response.isEmpty()){\n System.out.println(response + \" message received from server means OK to close connection\");\n clientSocket.close();\n }\n return \"INTERRUPT\";\n } \n else if(message.equals(\"\\\\quit\")){\n outToServer.writeBytes(\"SIGQUIT\");\n System.out.println(\"\\nTCP connection closed.\");\n response = inFromServer.readLine();\n if(!response.isEmpty()) {\n System.out.println(response + \" message received from server means OK to close connection on this side\");\n clientSocket.close();\n }\n return \"QUIT\";\n }\n else{\n handleMsg = handle + message;\n int lengthInt = handleMsg.length();\n outToServer.writeBytes(handleMsg); \n return \"OK\";\n }\n }catch(IOException e){\n System.err.println(\"Caught IOException in sendMessage(): \" + e.getMessage());\n } \n return null;\n }", "private void sendServerMessage() throws NoSuchAlgorithmException, \n IOException {\n if (mRemoteClientMessage == null) {\n throw new IOException(\"Remote client message was null in sendServerMessage.\");\n } else if (mRemoteClientMessage.blindedFriends == null) {\n throw new IOException(\"Remove client message blinded friends is null in sendServerMessage.\");\n }\n\n // This can't return null because byteStringsToArrays only returns null\n // when passed null, and we already checked that ClientMessage.blindedFriends\n // isn't null.\n ArrayList<byte[]> remoteBlindedItems;\n remoteBlindedItems = Crypto.byteStringsToArrays(mRemoteClientMessage.blindedFriends);\n\n // Calculate responses that appear in the ServerMessage.\n ServerReplyTuple srt;\n try { \n srt = mServerPSI.replyToBlindedItems(remoteBlindedItems);\n } catch (NoSuchAlgorithmException e) {\n Log.wtf(TAG, \"No such algorithm in replyToBlindedItems: \" + e);\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"PSI subsystem is broken, NoSuchAlgorithmException\");\n throw e;\n } catch (IllegalArgumentException e) {\n Log.wtf(TAG, \"Null passed to replyToBlindedItems on serverPSI? \" + e);\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Bad argument to server PSI subsystem. (null remoteBlindedItems?)\");\n throw e;\n }\n\n // Format and create ServerMessage.\n ArrayList<ByteString> doubleBlindedStrings = Crypto.byteArraysToStrings(srt.doubleBlindedItems);\n ArrayList<ByteString> hashedBlindedStrings = Crypto.byteArraysToStrings(srt.hashedBlindedItems);\n ServerMessage sm = new ServerMessage.Builder() \n .doubleBlindedFriends(doubleBlindedStrings)\n .hashedBlindedFriends(hashedBlindedStrings)\n .build(); \n\n // Write out the ServerMessage.\n boolean success = lengthValueWrite(out, sm);\n if (!success) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Length/value write of server message failed.\");\n throw new IOException(\"Length/value write of server message failed, but exception is hidden (see Exchange.java)\");\n }\n }", "void send() throws ImsException;", "@Override\n public void run() {\n if (this.clientInterfaceTCP.getConnected())\n this.clientInterfaceTCP.sendString(this.messageToSend);\n }", "private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void sendMessageToServer(String message) {\n if (outputStream != null) {\n outputStream.println(message);\n } else {\n System.out.println(\"No OutputStream!\");\n }\n }", "private void sendMessage(String message){\n try{\n output.writeObject(nickname+\" : \" + message);\n output.flush();\n showMessage(\"\\n\"+nickname+\" : \" + message);\n }catch(IOException ioException){\n chatWindow.append(\"\\n Oops! Something went wrong!\");\n }\n }", "private void send (String messageToSend) throws IOException {\n byte[] ba = messageToSend.getBytes();\n \n packetToSend = new DatagramPacket (ba, ba.length, serverIPAddress, PORT);\n \n //Envia el paquete por el socket.\n clientSocket.send(packetToSend);\n }", "protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }", "public void send(Serializable msg) throws IOException;", "public boolean Send(String message) {\r\n\t\t\r\n\t\t//Add a new line so it gets entered into the robot console \r\n\t\tmessage = message.concat(\"\\n\");\r\n\t\t\r\n\t\t//Construct ip address of Robot by team number \r\n\t\taddress = this.numberToAddress(NetConsole.window.getTeam());\r\n\t\t\r\n\t\t//deconstruct String into byte array \r\n\t\tbyte[] sendData = message.getBytes();\r\n\t\t\r\n\t\t//deconstruct packet for cleansing\r\n\t\tDatagramPacket packet = null;\r\n\t\t\r\n\t\t//reconstruct packet with default port \r\n\t\tpacket = new DatagramPacket(sendData, sendData.length, address, 6668);\r\n\t\ttry {\r\n\t\t\t//Send all the Packets!\r\n\t\t\tserverSocket.send(packet);\r\n\t\t} catch (IOException e) {\r\n\t\t\tNetConsole.window.error(\"Error Sending Packets\");\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\t//Just in case we want to know if the proccess was successful\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\r\n\t}", "protected void sendMessage(final String message) {\n\n logger.debug(LOG_TAG + \".sendMessage()\");\n\n // send message to client\n printWriter.println(message);\n\n }", "public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.print(\"\\n\\tException writing to destination: \\n\\t\\t\" + e\n\t\t\t\t\t+ \"\\n\\tIf error persists, terminate connection and reconnect.\");\n\t\t}\n\t}", "public void sendFromMessageQueue() throws IOException {\n Date canSendDate = new Date(lastReceiveMsgDate.getTime() + 2000);\n if (canSendDate.before(new Date())) {\n String msg = messageQueue.poll();\n if (msg == null)\n return;\n\n output.writeBytes(msg + \"\\n\");\n }\n }", "public synchronized void sendMessage (String msg, ServerThread current) {\n\t\tcurrent.send (msg);\n\t}", "@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }", "public void sendMsg(Message msg){\n messagesParser.sendMsg(msg);\n }", "private void sendMessage() {\n\t\tString text = myMessagePane.getText();\n\t\tMessage msg = new Message(text, myData.userName, myData.color);\n\n\t\tcommunicationsHandler.send(msg);\n\n\t\t// De-escape xml-specific characters\n\t\tXmlParser xmlParser = new XmlParser(myData);\n\t\tString outText = xmlParser.deEscapeXMLChars(msg.text);\n\t\tmsg.text = outText;\n\n\t\tmyMessagePane.setText(\"\");\n\t\tupdateMessageArea(msg);\n\n\t}", "private void write(String command) throws IOException {\n if (connected) {\n try {\n writer.write(command);\n writer.newLine();\n writer.flush();\n } catch (IOException e) {\n System.out.println(\"Could not read from server -> ServerCommunication:write()\");\n System.out.println(e);\n }\n } else {\n throw new IOException(\"Not Connected\");\n }\n }", "void send();", "public void sendMessage(String message) {\n\t\tSystem.out.println(\"DEBUG : response sent by server = \" + message);\n\t\tprinter.println(message);\n\t}", "private static void sendDataMessage() {\r\n\t\tSystem.out.println(\"CLIENT: \" + \" \" + \"DataMessage sent.\");\r\n\t\t\r\n\t\tbyte[] blockNumberAsByteArray = helper.intToByteArray(blockNumberSending);\r\n\t\tsplitUserInput = helper.divideArray(userInputByteArray);\r\n\r\n\t\tsendData = message.dataMessage(blockNumberAsByteArray, splitUserInput[sendingPackageNumber]);\r\n\t\tsendingPackageNumber++;\r\n\t\tblockNumberSending++; // blocknumber that is given to the next message to be transmitted\r\n\r\n\t\t// trims the message (removes empty bytes), so the last message can be detected\r\n\t\ttrimmedSendData = helper.trim(sendData);\r\n\r\n\t\tsendDataMessage = new DatagramPacket(trimmedSendData, trimmedSendData.length, ipAddress, SERVER_PORT);\r\n\t\ttry {\r\n\t\t\tclientSocket.send(sendDataMessage);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tackNeeded = true;\r\n\r\n\t\tif (trimmedSendData.length < 516) {\r\n\t\t\tlastPackage = true;\r\n\t\t}\r\n\t}", "private void sendMessage(ProtocolMessage msg, SocketChannel channel) throws IOException {\n\t\tchannel.write(ProtocolMessage.toBytes(msg));\n\t}", "public void send(String msg)\n\t{\n\t\tsendPlain(codeFilter(msg));\n\t}" ]
[ "0.7167023", "0.71376634", "0.6877357", "0.6831733", "0.6817085", "0.6784803", "0.67649823", "0.6748069", "0.6675928", "0.66692233", "0.6662474", "0.6660236", "0.66514784", "0.6635271", "0.66262877", "0.6612163", "0.6602868", "0.6601171", "0.6586461", "0.65396106", "0.6531188", "0.65306747", "0.6518566", "0.64819056", "0.64739096", "0.6470911", "0.6452239", "0.6435757", "0.64348775", "0.643141", "0.6424694", "0.6419312", "0.6411178", "0.6409167", "0.6381963", "0.63793564", "0.63771176", "0.6357729", "0.6347066", "0.63442206", "0.6323995", "0.6321761", "0.6298945", "0.6280614", "0.62801915", "0.62761", "0.62542105", "0.6248357", "0.62431395", "0.6242673", "0.62418085", "0.6239573", "0.6227176", "0.6225803", "0.6221819", "0.62147796", "0.6196873", "0.6181629", "0.618091", "0.6180545", "0.61721903", "0.6167387", "0.61644465", "0.61501426", "0.61489475", "0.61399394", "0.6105928", "0.61006874", "0.60961366", "0.6095211", "0.609145", "0.60908884", "0.6087137", "0.6086678", "0.60750276", "0.6053056", "0.6051141", "0.6049764", "0.60488456", "0.6042076", "0.6040562", "0.6036175", "0.60344964", "0.6030166", "0.60293025", "0.60291255", "0.602251", "0.6016836", "0.60030735", "0.5998188", "0.5994206", "0.5992835", "0.5979237", "0.59784085", "0.59760594", "0.597153", "0.5967327", "0.59548926", "0.59543765", "0.59468305", "0.59380186" ]
0.0
-1